decocms 4.563.0 → 4.563.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-2LbzMVC9.js → AlertCircle-CzNhPAKr.js} +1 -1
- package/dist/client/assets/{AreaChart-qBz2MFzD.js → AreaChart-jXN8ob1W.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BeuQwyHa.js → ArrowLeft-BZrvcUxe.js} +1 -1
- package/dist/client/assets/{ArrowUp-DmxAfWhF.js → ArrowUp-BmvC0gDN.js} +1 -1
- package/dist/client/assets/{CartesianChart-BSwxZ1ZU.js → CartesianChart-Dr9bA6s0.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DVdTZlRq.js → CategoricalChart-Db8BeNXp.js} +1 -1
- package/dist/client/assets/{CheckCircle-BzNTGMCW.js → CheckCircle-BfgWRJx4.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-XdbRnSsi.js → ChevronSelectorVertical-Dk3Ic8_G.js} +1 -1
- package/dist/client/assets/{ChevronUp-aYmfXYet.js → ChevronUp-CslLufEI.js} +1 -1
- package/dist/client/assets/{CreditCard01-yFcUZGe-.js → CreditCard01-DKR27XQP.js} +1 -1
- package/dist/client/assets/{Globe04-RPMmcIuy.js → Globe04-DD-_PtpP.js} +1 -1
- package/dist/client/assets/{Key01-jvDltRrN.js → Key01-CNesFlbK.js} +1 -1
- package/dist/client/assets/{LinkBroken01-Jybptj_M.js → LinkBroken01-K7vV_sRk.js} +1 -1
- package/dist/client/assets/{Minus-BqtyYKKc.js → Minus-DeqVl1Xe.js} +1 -1
- package/dist/client/assets/{Monitor01-As0zpJLy.js → Monitor01-Bx36gCte.js} +1 -1
- package/dist/client/assets/{Play-CdlorRHF.js → Play-CkRBFbju.js} +1 -1
- package/dist/client/assets/{Plus-CzoopYlU.js → Plus-DtM4w8bA.js} +1 -1
- package/dist/client/assets/{ReferenceLine-CJng4Q0_.js → ReferenceLine-38pFjaQt.js} +1 -1
- package/dist/client/assets/{SearchMd-By2dNUiw.js → SearchMd-Bbg1gFfR.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DhegylE0.js → ShoppingBag01-DW9ACSlI.js} +1 -1
- package/dist/client/assets/{Sun-Hd0LHTxB.js → Sun-DUSHragw.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Czrqzt6f.js → SwitchHorizontal01-BCe-gFOc.js} +1 -1
- package/dist/client/assets/{Tool01-D38zOT0h.js → Tool01-snML4pPn.js} +1 -1
- package/dist/client/assets/{Tooltip-Dxjn-_yM.js → Tooltip-CNZGI5Tv.js} +1 -1
- package/dist/client/assets/{Trash01-BxSWir9J.js → Trash01-DPGVoVI0.js} +1 -1
- package/dist/client/assets/{Upload01-C8sapTWh.js → Upload01-B1K1jpRL.js} +1 -1
- package/dist/client/assets/{UserSquare-CEg-eLCw.js → UserSquare-DgIYcYhA.js} +1 -1
- package/dist/client/assets/{Users01-CMreTMtq.js → Users01-DeK6IcUy.js} +1 -1
- package/dist/client/assets/{XClose-DGifUqyQ.js → XClose-B40NOWtA.js} +1 -1
- package/dist/client/assets/{Zap-BLaVFWQx.js → Zap-PrQtyQ4u.js} +1 -1
- package/dist/client/assets/{access-gate-BJSZ7nU5.js → access-gate-Czwg28Aa.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Dpu5ecJP.js → add-connection-dialog-CvoK8CuD.js} +1 -1
- package/dist/client/assets/agent-app-CIdQoDEi.js +1 -0
- package/dist/client/assets/{agent-assets-7nArEuts.js → agent-assets-BJMuyqMN.js} +1 -1
- package/dist/client/assets/{agent-automation-Dq1UMpQM.js → agent-automation-CC8RZvdz.js} +1 -1
- package/dist/client/assets/{agent-automations-DF3vcb3-.js → agent-automations-Cv89ZDoQ.js} +1 -1
- package/dist/client/assets/{agent-calendar-CsvxRBRw.js → agent-calendar-DWLtrh5a.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CaXbVMop.js → agent-capabilities-DYSIvwwC.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-84FLUgzX.js → agent-connect-sources-dcz4ghlO.js} +1 -1
- package/dist/client/assets/agent-deck-79ukGlaD.js +1 -0
- package/dist/client/assets/{agent-e2e-CfTkWgUa.js → agent-e2e-BecV8iK7.js} +1 -1
- package/dist/client/assets/agent-experiments-0rDHUtoa.js +1 -0
- package/dist/client/assets/{agent-file-C7mhhKFK.js → agent-file-CcRMmQIR.js} +1 -1
- package/dist/client/assets/{agent-hosting-BmtgVBqV.js → agent-hosting-Bp7-sUtV.js} +1 -1
- package/dist/client/assets/{agent-icon-U2nlXoBG.js → agent-icon-_Y5eusMw.js} +1 -1
- package/dist/client/assets/agent-library-CGgf7yTT.js +1 -0
- package/dist/client/assets/agent-library-file-A_6ZSStB.js +1 -0
- package/dist/client/assets/agent-overview-CcczGeFG.js +1 -0
- package/dist/client/assets/{agent-releases-DOPovy0S.js → agent-releases-Kc5s36Dn.js} +2 -2
- package/dist/client/assets/agent-settings-BrQ-Mnfr.js +1 -0
- package/dist/client/assets/{agent-site-editor-Pg_WHlnv.js → agent-site-editor-DcjkqLR_.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-C9Vac5kP.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BK40eFw4.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-BmrJe1z-.js +1 -0
- package/dist/client/assets/agent-view-CwNNidpp.js +1 -0
- package/dist/client/assets/{agent-view-guard-BFnkZyhp.js → agent-view-guard-coqrNjXy.js} +1 -1
- package/dist/client/assets/{ai-providers-tFJSU00y.js → ai-providers-D_h0GcaP.js} +1 -1
- package/dist/client/assets/{alert-B52lXsYB.js → alert-h8V4X8Ql.js} +1 -1
- package/dist/client/assets/{analytics-sections-DgZGw207.js → analytics-sections-BBSHBKo9.js} +1 -1
- package/dist/client/assets/{api-keys-Bc1E8umo.js → api-keys-BZ1sBCY5.js} +1 -1
- package/dist/client/assets/api-keys-Clz5-Ffr.js +1 -0
- package/dist/client/assets/{app-editor-a13s_yZZ.js → app-editor-CYkeSh8v.js} +1 -1
- package/dist/client/assets/{asset-utils-DxOK6Cj3.js → asset-utils-0I7CXwnB.js} +1 -1
- package/dist/client/assets/{auth-D991fBKg.js → auth-BFbUp7Gk.js} +1 -1
- package/dist/client/assets/{auth-catchall-CO4eQSBG.js → auth-catchall-Ciz3QLIw.js} +1 -1
- package/dist/client/assets/{auth-entry-IOobChfY.js → auth-entry-CIbESaRU.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Dn_4EroD.js → auth-split-layout-DXGPO57q.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CM3iiCDW.js → authenticate-and-persist-oauth-CDOOyhvF.js} +1 -1
- package/dist/client/assets/{automation-list-row-sEGCpgiC.js → automation-list-row-cqG8j4NI.js} +1 -1
- package/dist/client/assets/{automation-runs-DnhCJL7r.js → automation-runs-CJPBgcyt.js} +1 -1
- package/dist/client/assets/automations-CUnI1LGP.js +1 -0
- package/dist/client/assets/{autosend-D6GGYoeu.js → autosend-hIWj1gzu.js} +1 -1
- package/dist/client/assets/{badge-C9w1KAGQ.js → badge-DccxBHlR.js} +1 -1
- package/dist/client/assets/{block-document-ExA3sDvi.js → block-document-DQqooS8Z.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Gbv7_zq8.js → blocks-preview-workspace-context-DHaN_ngV.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-oXZbJa9b.js → blocks-tab-states-CXVOpcLP.js} +1 -1
- package/dist/client/assets/{blog-schema-4OEvCOpU.js → blog-schema-DZRuLzaf.js} +1 -1
- package/dist/client/assets/{buckets-DsGf5D8D.js → buckets-CF13tBzF.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BpZBupFA.js → build-improve-prompt-doc-Csewa1WB.js} +1 -1
- package/dist/client/assets/{calendar-ahGH-Iwe.js → calendar-CUq9MxZD.js} +1 -1
- package/dist/client/assets/{capability-load-error-BG7LprlO.js → capability-load-error-PMRTSYzm.js} +1 -1
- package/dist/client/assets/{category-editor-Ctbp0oQy.js → category-editor-f0PbIiVt.js} +1 -1
- package/dist/client/assets/chart-DHsiNcHK.js +13 -0
- package/dist/client/assets/{chat-context-CCj5lauv.js → chat-context-zQ-qHQlQ.js} +1 -1
- package/dist/client/assets/{chat-draft-BtMWyLm7.js → chat-draft-DnX_-WHk.js} +1 -1
- package/dist/client/assets/{checkbox-DB14k3TQ.js → checkbox-DNUaBZYX.js} +1 -1
- package/dist/client/assets/{choose-editor-D4zx1UJt.js → choose-editor-Bre429IU.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DeaH4VUx.js → cli-auth-success-xdbDz12_.js} +1 -1
- package/dist/client/assets/{client-icons-C4W9Kqhd.js → client-icons-DbvjRooY.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-CcuLaEnU.js → cms-settings-editor-B3_YVdwE.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BumH78UY.js → cms-store-drafts-BL8-fLzg.js} +1 -1
- package/dist/client/assets/{collapsible-BPEhSNLz.js → collapsible-DEQoVVA9.js} +1 -1
- package/dist/client/assets/{collection-detail-ralZDDkv.js → collection-detail-Dl6n3nUb.js} +1 -1
- package/dist/client/assets/{collection-display-button-CigTGx80.js → collection-display-button-BgO5nlf5.js} +1 -1
- package/dist/client/assets/{collection-search-D_oD-yY0.js → collection-search-BKCnDfDh.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C2dK4p_4.js → collection-table-wrapper-BiwEx8lf.js} +1 -1
- package/dist/client/assets/{collection-tabs-SAUXvS4g.js → collection-tabs-CLJwpk3w.js} +1 -1
- package/dist/client/assets/{combobox-hVgdYGtQ.js → combobox-BLt_NngQ.js} +1 -1
- package/dist/client/assets/{command-DiccrIM8.js → command-CnM6TkoO.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BUEyDlWy.js → companion-mcps-section-DDgSYTAO.js} +1 -1
- package/dist/client/assets/{config-DgUlbPLE.js → config-CTbwXMPm.js} +1 -1
- package/dist/client/assets/{connect-DhpQ_i5Y.js → connect-BzaGqaBY.js} +3 -3
- package/dist/client/assets/{connect-layout-Dgb_j_Nn.js → connect-layout-BZ1xoFNF.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-Dga8Dh15.js → connect-source-dialog-BPQ5BKOR.js} +1 -1
- package/dist/client/assets/{connection-DF20RpK_.js → connection-BWV5QLFO.js} +1 -1
- package/dist/client/assets/{connection-card-DeCnJCAi.js → connection-card-xMr1YFzW.js} +1 -1
- package/dist/client/assets/{connection-detail-Dn5XmXHk.js → connection-detail-CGUXC9hw.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B4MG2Fy2.js → connection-form-helpers-CaRBbMf9.js} +1 -1
- package/dist/client/assets/{connection-slug-tS8GnOSc.js → connection-slug-Ygf3Xiz0.js} +1 -1
- package/dist/client/assets/{connections-DREB4U2P.js → connections-wIdj6C4c.js} +1 -1
- package/dist/client/assets/content-tab-D6UWTBDG.js +25 -0
- package/dist/client/assets/{context-Gpy7m9cw.js → context-B_HaMwVa.js} +1 -1
- package/dist/client/assets/{context-menu-vUs3I8Wh.js → context-menu-BOlWz_az.js} +1 -1
- package/dist/client/assets/{context-shell-vU2YMH1K.js → context-shell-Cdw9KYb9.js} +3 -3
- package/dist/client/assets/{core.esm-CWyzckxm.js → core.esm-BbSbwofB.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-qsB5dfrW.js → create-organization-dialog-Dzeh0MX0.js} +1 -1
- package/dist/client/assets/{device-hint-DMMaEP-p.js → device-hint-D3M6OFi8.js} +1 -1
- package/dist/client/assets/{discover-DN-I6i-O.js → discover-DCcWfC01.js} +1 -1
- package/dist/client/assets/{domain-settings-FZeIPnhT.js → domain-settings-Ce2bhWej.js} +1 -1
- package/dist/client/assets/{drawer-CMTReHxa.js → drawer-D4DxFGqN.js} +1 -1
- package/dist/client/assets/{editor-C6CE2FNQ.js → editor-DKoVU6S3.js} +1 -1
- package/dist/client/assets/{editor-classes-DbMPYB4Z.js → editor-classes-DEInI3IT.js} +1 -1
- package/dist/client/assets/{empty-state-DF9St1T6.js → empty-state-CiXq08R1.js} +1 -1
- package/dist/client/assets/{empty-state-ovRL7NEK.js → empty-state-DMIzfRid.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BXlwzycK.js → experiments-tab-choice-DtHr55-O.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Q1k0ncm3.js → extract-connection-data-m9qRk70G.js} +1 -1
- package/dist/client/assets/{feature-gate-DKF86Lcy.js → feature-gate-CbZSFCGe.js} +1 -1
- package/dist/client/assets/{feature-paywall-BoU9TII8.js → feature-paywall-BorE2qu6.js} +1 -1
- package/dist/client/assets/{feedback-f3MT17uD.js → feedback-DM7ibKhA.js} +1 -1
- package/dist/client/assets/{file-explorer-DmvPCizi.js → file-explorer-DgsYJwlc.js} +1 -1
- package/dist/client/assets/{file-preview-aD0sVwV5.js → file-preview-ClFQiMsH.js} +1 -1
- package/dist/client/assets/{file-share-button-agT85qGG.js → file-share-button-oASYWaTp.js} +1 -1
- package/dist/client/assets/{file-type-icon-CflTIvHJ.js → file-type-icon-BgsOvG37.js} +1 -1
- package/dist/client/assets/{folder-icon-BKhbsJwX.js → folder-icon-CjXRQ1u4.js} +1 -1
- package/dist/client/assets/{form-B_3ZthF3.js → form-BV9LGfdZ.js} +1 -1
- package/dist/client/assets/{general-BdjsCK2j.js → general-BOq7h34V.js} +1 -1
- package/dist/client/assets/{github-icon-M-2WiP3Y.js → github-icon-BoZFAAoR.js} +1 -1
- package/dist/client/assets/{home-dTYjLEfm.js → home-Y-BAzROz.js} +1 -1
- package/dist/client/assets/{home-overview-BAVfF6qS.js → home-overview-ztctpGGy.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-B3o4dv7j.js → hosted-reconcile-DgpDwrI2.js} +1 -1
- package/dist/client/assets/{icon-button-DQuPTgIB.js → icon-button-DeiyuWHW.js} +1 -1
- package/dist/client/assets/{index-DT3lYd1R.js → index-2dSYni92.js} +1 -1
- package/dist/client/assets/{index-0kopV6YP.js → index-5iKTkoGz.js} +1 -1
- package/dist/client/assets/{index-iezPx7cK.js → index-BEm4jG3I.js} +1 -1
- package/dist/client/assets/{index-DzmcFP3y.js → index-BFUInOpF.js} +1 -1
- package/dist/client/assets/{index-cmF_qGuq.js → index-CDlOTJSg.js} +1 -1
- package/dist/client/assets/{index-BlTJ0I-U.js → index-CK6jFdOD.js} +1 -1
- package/dist/client/assets/{index-mtR249ru.js → index-CKcY9sA2.js} +1 -1
- package/dist/client/assets/{index-C81DBcO6.js → index-CxYhsN0K.js} +1 -1
- package/dist/client/assets/{index-BM0DSfBG.js → index-DFF-_wih.js} +1 -1
- package/dist/client/assets/{index-2bmOBUEF.js → index-DHdEN2_u.js} +1 -1
- package/dist/client/assets/{index-C2-s3ia2.js → index-DSp2YJxk.js} +1 -1
- package/dist/client/assets/{index-Cjc_aSrk.js → index-DYiWplV5.js} +1 -1
- package/dist/client/assets/{index-BvJNHE6H.js → index-DbAn_rcU.js} +1 -1
- package/dist/client/assets/{index-DHMhIfTt.js → index-Dh9YHhq0.js} +1 -1
- package/dist/client/assets/{index-BZX-7ipZ.js → index-DxGCPS5f.js} +48 -48
- package/dist/client/assets/{index-D7Mi9FGh.js → index-DzoENFz8.js} +1 -1
- package/dist/client/assets/{index-redirect-ay83YA5a.js → index-redirect-rsQ177qk.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CQGSlzKO.js → infiniteQueryObserver-BRbF_8wg.js} +1 -1
- package/dist/client/assets/{infra-billing-DUjivW_p.js → infra-billing-CskAuVtU.js} +1 -1
- package/dist/client/assets/{input-CcFFY__7.js → input-BznJkJE1.js} +3 -3
- package/dist/client/assets/{input-3OyhKW_c.js → input-CYN8nGNA.js} +1 -1
- package/dist/client/assets/{integration-icon-Btk7lWbK.js → integration-icon-CivNYrxB.js} +1 -1
- package/dist/client/assets/{jira-icon-TeK8CaRV.js → jira-icon-EhOwRLcu.js} +1 -1
- package/dist/client/assets/{label-BGCn7A0y.js → label-Co3RnKjI.js} +1 -1
- package/dist/client/assets/{layout-XVKa9Y6f.js → layout-ChuRSl3A.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DksTbOzF.js → legacy-agents-deep-D0c9eotJ.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-8kA2UC85.js → legacy-main-redirect-B6HagH9j.js} +1 -1
- package/dist/client/assets/library-P47bCY92.js +1 -0
- package/dist/client/assets/{library-tab-DJKD7rUC.js → library-tab-QNwTrF2z.js} +1 -1
- package/dist/client/assets/{login-CH5yud2M.js → login-G4MQMu-X.js} +1 -1
- package/dist/client/assets/{markdown-B6eeRWQb.js → markdown-BkKuf5yA.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DwuRGgZk.js → mcp-app-renderer-AZxi3AlX.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Bz1Lo9Pk.js → mcp-oauth-C-lvxcK7.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BvqIKSqR.js → mcp-oauth-C3sBEl47.js} +1 -1
- package/dist/client/assets/{members-FYjquUkN.js → members-fyMprese.js} +1 -1
- package/dist/client/assets/{memory-CoUl94G3.js → memory-0qhTiXOS.js} +1 -1
- package/dist/client/assets/{mock-board-DvOE8ZQh.js → mock-board-B5Lo4WRg.js} +3 -3
- package/dist/client/assets/{monaco-editor-vUgphdkE.js → monaco-editor-03CuhEOx.js} +1 -1
- package/dist/client/assets/{monitoring-UUQquQf7.js → monitoring-BWMV-UnG.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BY92i-Bt.js → monitoring-stats-row-BHB7ML9p.js} +1 -1
- package/dist/client/assets/{multi-select-9ieJQPsD.js → multi-select-BvRkhFxR.js} +1 -1
- package/dist/client/assets/{mustache-CgF6ozKS.js → mustache-BRZEXzlS.js} +3 -3
- package/dist/client/assets/{named-rule-view-CdhLqAy7.js → named-rule-view-NWkI621l.js} +1 -1
- package/dist/client/assets/{new-project-dialog-EK9WMEhp.js → new-project-dialog-B_Izhfc6.js} +1 -1
- package/dist/client/assets/{oauth-callback-Cuv6PAYs.js → oauth-callback-C3qf7NWs.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BGc97raN.js → oauth-callback-ai-provider-BOCoomMC.js} +1 -1
- package/dist/client/assets/{oauth-consent-fGbsmdGY.js → oauth-consent-kRuFuPRq.js} +1 -1
- package/dist/client/assets/{onboarding-DF5AGUdi.js → onboarding-C9TuarYv.js} +1 -1
- package/dist/client/assets/{openai-conversation-CMIme_Ur.js → openai-conversation-C1V_CQca.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-mQ0HUqGi.js → optimistic-project-sidebar-views-Ms5q90dF.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BPx4Aihv.js → order-monitor-day-B8IwQXNk.js} +1 -1
- package/dist/client/assets/{organization-choice-KNGQur5O.js → organization-choice-IdTamlIL.js} +1 -1
- package/dist/client/assets/{orgs-C5Zlwg3I.js → orgs-D6Y9NZAy.js} +1 -1
- package/dist/client/assets/{own-accounts-section-C_F0-lzr.js → own-accounts-section-CX4xOba8.js} +1 -1
- package/dist/client/assets/{pair-C5KKQk8r.js → pair-BzWauPYd.js} +1 -1
- package/dist/client/assets/{parse-sections-DE2O_vev.js → parse-sections-DE8GWmV_.js} +3 -3
- package/dist/client/assets/{plan-DdvgvWt2.js → plan-CANZ8MES.js} +1 -1
- package/dist/client/assets/{plan-ladder-BQ0gcfdF.js → plan-ladder-CAL4h1RI.js} +1 -1
- package/dist/client/assets/{plan-usage-card-8-3zMqsW.js → plan-usage-card-B0E1Mqx-.js} +2 -2
- package/dist/client/assets/{popover-CkuSZicN.js → popover-cnXo99rU.js} +1 -1
- package/dist/client/assets/{post-calendar-DVrcXuZq.js → post-calendar-CR_baRyF.js} +1 -1
- package/dist/client/assets/{post-editor-CG6NXsGN.js → post-editor-DuGV7g7L.js} +1 -1
- package/dist/client/assets/{preview-content-xRBU7B3O.js → preview-content-Cspo-rar.js} +1 -1
- package/dist/client/assets/{preview-dialog-D36kXBk6.js → preview-dialog-sM6fzUlE.js} +1 -1
- package/dist/client/assets/{preview-panel-Cp7F1lqp.js → preview-panel-vDb65VC_.js} +1 -1
- package/dist/client/assets/preview-tab-BjhtYZTR.js +551 -0
- package/dist/client/assets/{product-picker-dialog-C2KLekZA.js → product-picker-dialog-DL4criSm.js} +1 -1
- package/dist/client/assets/{profile-BfDfzRPA.js → profile-D0f8KwpQ.js} +1 -1
- package/dist/client/assets/project-app-view-BAfcj1IV.js +1 -0
- package/dist/client/assets/{project-apps-D47w7eJj.js → project-apps-DoVt9kS_.js} +1 -1
- package/dist/client/assets/{project-icon-ofE-LDok.js → project-icon-BnHxv46u.js} +1 -1
- package/dist/client/assets/{project-index-PpuyCKHe.js → project-index-WJ4tXHCM.js} +1 -1
- package/dist/client/assets/project-reports-DYL24PFI.js +1 -0
- package/dist/client/assets/{project-sidebar-views-Dew_3OKS.js → project-sidebar-views-CLVZ96mT.js} +1 -1
- package/dist/client/assets/project-tasks-C0N1MlNa.js +1 -0
- package/dist/client/assets/{projects-Be7d593_.js → projects-LpPdlGF4.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DpmH0sch.js → projects-empty-state-iR6Zz5-N.js} +1 -1
- package/dist/client/assets/{prompts-ClmMS_OK.js → prompts-XgZrzKUE.js} +1 -1
- package/dist/client/assets/record-editor-B9sjj4Iw.js +1 -0
- package/dist/client/assets/{redirect-editor-W9B4A_h8.js → redirect-editor-D2q-6Lz4.js} +1 -1
- package/dist/client/assets/{reports-DCsJlho1.js → reports-5E4FVu6v.js} +1 -1
- package/dist/client/assets/reports-D1yzySzc.js +1 -0
- package/dist/client/assets/{reports-onboarding-CMTzWUTp.js → reports-onboarding-DC_5ahpO.js} +1 -1
- package/dist/client/assets/{reports-tab-BKnG1JmX.js → reports-tab-CJb3-7vP.js} +2 -2
- package/dist/client/assets/{repositories-KlUH4dUR.js → repositories-7NE-Y-fP.js} +1 -1
- package/dist/client/assets/repositories-B2vK4Cqr.js +1 -0
- package/dist/client/assets/{repository-binding-CqOunspI.js → repository-binding-C4_xIShf.js} +1 -1
- package/dist/client/assets/{repository-picker-DNdEQtlZ.js → repository-picker-CX0VOapR.js} +1 -1
- package/dist/client/assets/{require-capability-RYn3iksk.js → require-capability-1AcS0xbn.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Dfyc4Zas.js → required-auth-layout-lwAsP7t-.js} +1 -1
- package/dist/client/assets/{reset-password-CTGJ7V-t.js → reset-password-DRB8IWFN.js} +1 -1
- package/dist/client/assets/{resizable-BCGqPRic.js → resizable-CZ6UntWr.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BnqDq-fY.js → resolve-tab-icon-JlFD9Ttu.js} +1 -1
- package/dist/client/assets/{review-settings-DvoYyrmi.js → review-settings-DpoAEk87.js} +1 -1
- package/dist/client/assets/{role-color-cUMHSMVi.js → role-color-CAgewKmr.js} +1 -1
- package/dist/client/assets/{roles-x3B4vLKU.js → roles-D-1qXwgE.js} +1 -1
- package/dist/client/assets/{route-PbputQp9.js → route-BM3UxPQb.js} +1 -1
- package/dist/client/assets/{route-h-Fc_oVe.js → route-CAQmwL3B.js} +1 -1
- package/dist/client/assets/route-DVYYyJNN.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-CXwLCWvJ.js → sandbox-lifecycle-context-ByyfF0kL.js} +1 -1
- package/dist/client/assets/{schema-C1bLOk3P.js → schema-DyY5h7Rx.js} +1 -1
- package/dist/client/assets/{schema-DHLwjAWR.js → schema-STdjEbAK.js} +1 -1
- package/dist/client/assets/{scroll-area-rELMi4e6.js → scroll-area-DJvIk_1i.js} +1 -1
- package/dist/client/assets/{search-input-Crult1Qo.js → search-input-BRZEiJxt.js} +1 -1
- package/dist/client/assets/{search-toggle-DzMf9QP4.js → search-toggle-BW-nCNIt.js} +1 -1
- package/dist/client/assets/{secret-picker-CimF9dsx.js → secret-picker-DvJbV8kU.js} +1 -1
- package/dist/client/assets/{secrets-CZCnF6s4.js → secrets-CQ4fmQqK.js} +1 -1
- package/dist/client/assets/{section-array-field-C3Tpx16b.js → section-array-field-CzG_jptj.js} +1 -1
- package/dist/client/assets/{sections-346PcP2T.js → sections-CHxeuMKy.js} +1 -1
- package/dist/client/assets/{sections-editor-DwV32_3f.js → sections-editor-B_kNIbOe.js} +1 -1
- package/dist/client/assets/{select-CwDmbwEv.js → select-C30nxii2.js} +1 -1
- package/dist/client/assets/{select-model-B1ocDBwF.js → select-model-DRBYpCaL.js} +1 -1
- package/dist/client/assets/{seo-editor-D1gGpMMF.js → seo-editor-DazAHwbK.js} +1 -1
- package/dist/client/assets/{separator-C05SxAdn.js → separator-vR8karC8.js} +1 -1
- package/dist/client/assets/settings-tab-Bvb5mnr2.js +1 -0
- package/dist/client/assets/{sheet-BYgfxL9i.js → sheet-ClaqVLRv.js} +1 -1
- package/dist/client/assets/{shell-layout-BvJfyzsq.js → shell-layout-dHGD2tyJ.js} +1 -1
- package/dist/client/assets/{site-draft-actions-CgeV78uL.js → site-draft-actions-BIA6lR1g.js} +1 -1
- package/dist/client/assets/{site-draft-view-Dkq2XweK.js → site-draft-view-Ci2I7i9g.js} +1 -1
- package/dist/client/assets/site-editor-CmjAnts6.js +1 -0
- package/dist/client/assets/site-editor-toast-CgoUJTSW.js +1 -0
- package/dist/client/assets/{skills-OVV2oEwU.js → skills-D1-DQBAA.js} +1 -1
- package/dist/client/assets/{slider-Ipy9G5jv.js → slider-B_ZUvu11.js} +1 -1
- package/dist/client/assets/{sortable.esm-DgwAq-fn.js → sortable.esm-BqKBxgnm.js} +1 -1
- package/dist/client/assets/{sso-C9cutlah.js → sso-DFYqPjQF.js} +1 -1
- package/dist/client/assets/{suggestion-Dwy6qysF.js → suggestion-B-tT_3Ba.js} +1 -1
- package/dist/client/assets/{switch-BLkpF22m.js → switch-BhYC-gsU.js} +1 -1
- package/dist/client/assets/{synced-repos-orJHnVxs.js → synced-repos-CNpviR6w.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Co1M723I.js → tab-icon-glyph-BrdbQUjH.js} +1 -1
- package/dist/client/assets/{table-DPFxRA7S.js → table-Dioc_TQV.js} +1 -1
- package/dist/client/assets/{tabs--wmPR0cZ.js → tabs-t_453qON.js} +1 -1
- package/dist/client/assets/{task-board-DJtwkz3O.js → task-board-T7oS4tjE.js} +1 -1
- package/dist/client/assets/{task-route-vCMrJPp9.js → task-route-BABnfdht.js} +1 -1
- package/dist/client/assets/{task-status-msgu5x2s.js → task-status-B5yaN2e9.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-5nxg7YXN.js → taskboard-analytics-CEOCzjed.js} +1 -1
- package/dist/client/assets/{tasks-DpWVcTLT.js → tasks-CPtiTkqv.js} +3 -3
- package/dist/client/assets/tasks-DmeEepcP.js +1 -0
- package/dist/client/assets/{textarea-D5OF_Tld.js → textarea-CHZQytvO.js} +1 -1
- package/dist/client/assets/{thread-analytics-CVsji2MZ.js → thread-analytics-w3Kn_9QO.js} +1 -1
- package/dist/client/assets/{thread-intent-DIce2mks.js → thread-intent-DckhqhKt.js} +1 -1
- package/dist/client/assets/{thread-route-CP2TR6nw.js → thread-route-CIVmQ-Bx.js} +1 -1
- package/dist/client/assets/{thread-route-CGqDFJ1K.js → thread-route-DyG_eSJM.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Cba15kJF.js → thread-sheet-body-C7OutFPd.js} +1 -1
- package/dist/client/assets/{time-range-picker-OdWLHy9U.js → time-range-picker-Dg1tvNlk.js} +1 -1
- package/dist/client/assets/{toggle-group-DbLOGwe7.js → toggle-group-CC2qDSue.js} +1 -1
- package/dist/client/assets/{tool-namespace-BQhkJpu9.js → tool-namespace-WdIPTHBa.js} +1 -1
- package/dist/client/assets/{tool-set-selector-BmAnaEsw.js → tool-set-selector-By0-LDtv.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BzIcnxXk.js → toolbar-icon-button-CjbxTTYr.js} +1 -1
- package/dist/client/assets/{tooltip--uPFG1gb.js → tooltip-xj6ZnC0s.js} +1 -1
- package/dist/client/assets/{tooltipContext-C8ArdkXW.js → tooltipContext-BPLu0XDW.js} +1 -1
- package/dist/client/assets/{track-Bb4064-s.js → track-Ba7_Ntbn.js} +1 -1
- package/dist/client/assets/{types-EjHtXl5u.js → types-B8snWcBI.js} +1 -1
- package/dist/client/assets/{url-slug-rCJqhuIp.js → url-slug-Dv3zxns9.js} +1 -1
- package/dist/client/assets/{usage-stats-DaOtdhEm.js → usage-stats-hNAp_EX0.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C5rCFpU_.js → use-ai-providers-8QFj-dPT.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-zZmpVvRd.js → use-apply-named-rule-BKcXT1e9.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-C5fM3Bv6.js +1 -0
- package/dist/client/assets/{use-automations-CI7vvUzE.js → use-automations-CTbTqBX7.js} +1 -1
- package/dist/client/assets/{use-autosave-DUBcsRSH.js → use-autosave-CiyRV4I8.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-Oxne65-_.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-CZaSk8YF.js → use-chat-layout-state-D-U8t0kV.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-BV2nwL3g.js → use-cms-publish-actions-DmkL-hz5.js} +5 -5
- package/dist/client/assets/{use-connect-companion-DC6UOpxV.js → use-connect-companion-Bwtrfh-M.js} +1 -1
- package/dist/client/assets/{use-connection-BEb786wf.js → use-connection-B3EvPXuJ.js} +1 -1
- package/dist/client/assets/{use-content-sync-CtHfpBJp.js → use-content-sync-C8Ux_RZ8.js} +1 -1
- package/dist/client/assets/{use-copy-DccRTYvG.js → use-copy-O-MML7rC.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DD1YxYKP.js → use-date-fns-locale-CP8lOmDn.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-clO2CzWE.js → use-debounced-autosave-BXwcTWeY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CJpdUTvG.js → use-debounced-value-DDir1rWd.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DtE2LNZs.js → use-deco-credits-Dy_Hg4i-.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DxBT3zOC.js → use-decopilot-events-BAXWzGGN.js} +1 -1
- package/dist/client/assets/{use-delete-connection-COvFjvtJ.js → use-delete-connection-ZbJPfKIZ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BSEuekHe.js → use-deployment-admin-DNwohGK9.js} +1 -1
- package/dist/client/assets/{use-entitlements-CWXMyUT0.js → use-entitlements-SlWYl1h3.js} +1 -1
- package/dist/client/assets/use-fast-preview-draft-url-DB6fawwn.js +1 -0
- package/dist/client/assets/{use-file-configs-DsyBYIJw.js → use-file-configs-BiPsjSp0.js} +1 -1
- package/dist/client/assets/{use-id-selection-6CmUdc1s.js → use-id-selection-CQGXhZf9.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-okLCp4Pp.js → use-inbox-feed-G78cFBlF.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-4e7tB3Vz.js → use-infinite-scroll-CuJmRWs3.js} +1 -1
- package/dist/client/assets/{use-join-requests-muPMmn0O.js → use-join-requests-BtFDzITE.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-D_s_t2hY.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-D_TqnxnH.js → use-mcp-auth-status-C4Vaxyeo.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CrdyqnFt.js → use-mcp-client-BFuEikBh.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C3SHzM_d.js → use-mcp-prompts-W7_z0mx2.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DQIJMlw-.js → use-mcp-tools-Fkw183dy.js} +1 -1
- package/dist/client/assets/{use-mobile-BDWitdax.js → use-mobile-COmq9TQM.js} +1 -1
- package/dist/client/assets/use-move-blocks-DtAEvUrz.js +1 -0
- package/dist/client/assets/{use-navigate-to-agent-C3sX18jI.js → use-navigate-to-agent-RGucqDuO.js} +1 -1
- package/dist/client/assets/{use-org-fs-BRERSVus.js → use-org-fs-B1VEI_Er.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BFFdo3jR.js → use-org-repo-syncs-DE87oI9s.js} +1 -1
- package/dist/client/assets/{use-org-sso-BHDTii7j.js → use-org-sso-RIE_JSyT.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DPCrcu8e.js → use-organization-settings-DqmiRW0D.js} +1 -1
- package/dist/client/assets/{use-project-scope-k7OaKjIm.js → use-project-scope-CYZ0mCfQ.js} +1 -1
- package/dist/client/assets/{use-recent-apps-Buo9cWvj.js → use-recent-apps-D1NSRmBo.js} +1 -1
- package/dist/client/assets/use-reports-diagnostic-DGd4jOlT.js +1 -0
- package/dist/client/assets/{use-sandbox-events-BRJYKM54.js → use-sandbox-events-nFpLHv9o.js} +1 -1
- package/dist/client/assets/{use-secrets-DlNiP0j4.js → use-secrets-B3RSCdMi.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CL9U3MEc.js → use-section-preview-base-CvJ34UxX.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-ByMTBVZc.js → use-sidebar-collapsed-DXX9If3C.js} +1 -1
- package/dist/client/assets/{use-tags-CcJayzHf.js → use-tags-BjaNX9ld.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-0-6_3j_2.js → use-task-board-analytics--QCcKCkA.js} +1 -1
- package/dist/client/assets/{use-task-board-events-CzDIUBok.js → use-task-board-events-p-Cj7F6A.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DbHC-4Ry.js → use-task-board-item-prs-DRcN9Nsr.js} +1 -1
- package/dist/client/assets/{use-task-board-items-COxHF7_K.js → use-task-board-items-tdp7palw.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CKi9j8wF.js → use-task-board-prompts-CPvlYwGk.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BxcNhivS.js → use-task-metadata-D1snlV6w.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-lMVF4bT2.js → use-thread-outputs-bD7oL4Tg.js} +1 -1
- package/dist/client/assets/{use-voice-input-DsJxHyTh.js → use-voice-input-CZ-OU5Nk.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-ByQLYXMe.js +1 -0
- package/dist/client/assets/{useQueries-BO8pZ9q-.js → useQueries-DSvnP38O.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ClUlWmLx.js +1 -0
- package/dist/client/assets/{users-DCPPe9Uo.js → users-Bqa3Dwe4.js} +1 -1
- package/dist/client/assets/{utils-D0xixM8q.js → utils-Dk3SKS5y.js} +1 -1
- package/dist/client/assets/{variant-calendar-C5r0ak32.js → variant-calendar-CD4VQuq0.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-QQd3tA7f.js → variant-matcher-override-NriuY-7n.js} +1 -1
- package/dist/client/assets/{view-header-BPAnt0vh.js → view-header-B6CnFcfB.js} +1 -1
- package/dist/client/assets/{virtual-mcp-Dzr3mFmO.js → virtual-mcp-D5NkkvKn.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-j0K-nQ0i.js → watch-sse-pool-BKRouklE.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-CHKycGm0.js +0 -1
- package/dist/client/assets/agent-deck-DEx4qeYv.js +0 -1
- package/dist/client/assets/agent-experiments-BMy2QOPP.js +0 -1
- package/dist/client/assets/agent-library-DIxeSWXa.js +0 -1
- package/dist/client/assets/agent-library-file-DQB6i5_0.js +0 -1
- package/dist/client/assets/agent-overview-D8ZTdoEM.js +0 -1
- package/dist/client/assets/agent-settings-x3yUV6x9.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DDscaXHP.js +0 -2
- package/dist/client/assets/agent-site-editor-content-CBj6Azpl.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Doqukvwz.js +0 -1
- package/dist/client/assets/agent-view-CvpQlU18.js +0 -1
- package/dist/client/assets/api-keys-BEFmsf3L.js +0 -1
- package/dist/client/assets/automations-BopJHgke.js +0 -1
- package/dist/client/assets/chart-DnblhNHq.js +0 -13
- package/dist/client/assets/content-tab-kF-GtTU9.js +0 -25
- package/dist/client/assets/library-O1-Gs4qz.js +0 -1
- package/dist/client/assets/preview-tab-Dn0RGnhj.js +0 -551
- package/dist/client/assets/project-app-view-DVhAuH9N.js +0 -1
- package/dist/client/assets/project-reports-BuJS86vH.js +0 -1
- package/dist/client/assets/project-tasks-CZtVWSYo.js +0 -1
- package/dist/client/assets/record-editor-OoLxSu9R.js +0 -1
- package/dist/client/assets/reports-s2E9cwFc.js +0 -1
- package/dist/client/assets/repositories-Dj2kaTIN.js +0 -1
- package/dist/client/assets/route-wINBwrny.js +0 -1
- package/dist/client/assets/settings-tab-BImv5HgS.js +0 -1
- package/dist/client/assets/site-editor-B9ARkCiN.js +0 -1
- package/dist/client/assets/site-editor-toast-D83gMpdg.js +0 -1
- package/dist/client/assets/tasks-hbXv3hSd.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BaG9i0zc.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-CXrKL60y.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-BCmBxVQg.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-BcP_qZl8.js +0 -1
- package/dist/client/assets/use-move-blocks-B48xFUbp.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-B1lbI319.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B313haH3.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-07GrICuv.js +0 -1
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-editor-a13s_yZZ.js","assets/index-BZX-7ipZ.js","assets/index-SmuiYnIl.css","assets/chat-context-CCj5lauv.js","assets/autosend-D6GGYoeu.js","assets/thread-route-CP2TR6nw.js","assets/use-project-scope-k7OaKjIm.js","assets/repository-binding-CqOunspI.js","assets/use-mcp-client-CrdyqnFt.js","assets/auth-D991fBKg.js","assets/thread-intent-DIce2mks.js","assets/delay-CnY5UFtP.js","assets/watch-sse-pool-j0K-nQ0i.js","assets/task-board-DJtwkz3O.js","assets/schema-C1bLOk3P.js","assets/use-entitlements-CWXMyUT0.js","assets/use-ai-providers-C5rCFpU_.js","assets/use-decopilot-events-DxBT3zOC.js","assets/use-organization-settings-DPCrcu8e.js","assets/use-voice-input-DsJxHyTh.js","assets/popover-CkuSZicN.js","assets/drawer-CMTReHxa.js","assets/tooltip--uPFG1gb.js","assets/index-BM0DSfBG.js","assets/use-mobile-BDWitdax.js","assets/agent-icon-U2nlXoBG.js","assets/AlertCircle-2LbzMVC9.js","assets/Tool01-D38zOT0h.js","assets/ArrowUp-DmxAfWhF.js","assets/ArrowLeft-BeuQwyHa.js","assets/LinkBroken01-Jybptj_M.js","assets/ShoppingBag01-DhegylE0.js","assets/Globe04-RPMmcIuy.js","assets/CheckCircle-BzNTGMCW.js","assets/ChevronUp-aYmfXYet.js","assets/ChevronSelectorVertical-XdbRnSsi.js","assets/UserSquare-CEg-eLCw.js","assets/CreditCard01-yFcUZGe-.js","assets/SwitchHorizontal01-Czrqzt6f.js","assets/Key01-jvDltRrN.js","assets/Minus-BqtyYKKc.js","assets/Monitor01-As0zpJLy.js","assets/Sun-Hd0LHTxB.js","assets/Play-CdlorRHF.js","assets/Plus-CzoopYlU.js","assets/SearchMd-By2dNUiw.js","assets/Trash01-BxSWir9J.js","assets/Upload01-C8sapTWh.js","assets/Users01-CMreTMtq.js","assets/XClose-DGifUqyQ.js","assets/Zap-BLaVFWQx.js","assets/index-DT3lYd1R.js","assets/checkbox-DB14k3TQ.js","assets/select-CwDmbwEv.js","assets/index-BdQq_4o_.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/scroll-area-rELMi4e6.js","assets/use-section-preview-base-CL9U3MEc.js","assets/parse-sections-DE2O_vev.js","assets/utils-D0xixM8q.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-C5KKQk8r.js","assets/collapsible-BPEhSNLz.js","assets/use-copy-DccRTYvG.js","assets/usage-stats-DaOtdhEm.js","assets/tool-namespace-BQhkJpu9.js","assets/form-B_3ZthF3.js","assets/label-BGCn7A0y.js","assets/utils-CVEq3hMx.js","assets/markdown-B6eeRWQb.js","assets/shell-layout-BvJfyzsq.js","assets/use-deployment-admin-BSEuekHe.js","assets/admin-fetch-BhTJlAsX.js","assets/command-DiccrIM8.js","assets/index-cmF_qGuq.js","assets/integration-icon-Btk7lWbK.js","assets/project-icon-ofE-LDok.js","assets/use-navigate-to-agent-C3sX18jI.js","assets/new-project-dialog-EK9WMEhp.js","assets/repository-picker-DNdEQtlZ.js","assets/github-icon-M-2WiP3Y.js","assets/useInfiniteQuery-B313haH3.js","assets/infiniteQueryObserver-CQGSlzKO.js","assets/collection-search-D_oD-yY0.js","assets/use-debounced-value-CJpdUTvG.js","assets/required-auth-layout-Dfyc4Zas.js","assets/use-org-sso-BHDTii7j.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DwuRGgZk.js","assets/types-EjHtXl5u.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-BYgfxL9i.js","assets/use-connection-BEb786wf.js","assets/use-mcp-prompts-C3SHzM_d.js","assets/use-thread-outputs-lMVF4bT2.js","assets/file-type-icon-CflTIvHJ.js","assets/section-array-field-C3Tpx16b.js","assets/blocks-tab-states-oXZbJa9b.js","assets/site-editor-toast-D83gMpdg.js","assets/use-blocks-v8-project-CXrKL60y.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-BRJYKM54.js","assets/sandbox-git-api-DcqI6XE4.js","assets/empty-state-DF9St1T6.js","assets/hosted-reconcile-B3o4dv7j.js","assets/slider-Ipy9G5jv.js","assets/index-iezPx7cK.js","assets/tooltipContext-C8ArdkXW.js","assets/CategoricalChart-DVdTZlRq.js","assets/index-D7Mi9FGh.js","assets/switch-BLkpF22m.js","assets/textarea-D5OF_Tld.js","assets/monaco-editor-vUgphdkE.js","assets/editor-C6CE2FNQ.js","assets/calendar-ahGH-Iwe.js","assets/editor-classes-DbMPYB4Z.js","assets/core.esm-CWyzckxm.js","assets/sortable.esm-DgwAq-fn.js","assets/toggle-group-DbLOGwe7.js","assets/active-indicator-CCMhAsc_.js","assets/combobox-hVgdYGtQ.js","assets/search-input-Crult1Qo.js","assets/tabs--wmPR0cZ.js","assets/use-file-configs-DsyBYIJw.js","assets/asset-utils-DxOK6Cj3.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/view-header-BPAnt0vh.js","assets/use-cms-publish-actions-BV2nwL3g.js","assets/use-content-sync-CtHfpBJp.js","assets/mustache-CgF6ozKS.js","assets/sandbox-lifecycle-context-CXwLCWvJ.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-B48xFUbp.js","assets/badge-C9w1KAGQ.js","assets/empty-state-ovRL7NEK.js","assets/collection-table-wrapper-C2dK4p_4.js","assets/table-DPFxRA7S.js","assets/agent-capabilities-CaXbVMop.js","assets/cms-settings-editor-CcuLaEnU.js","assets/post-editor-CG6NXsGN.js","assets/multi-select-9ieJQPsD.js","assets/block-document-ExA3sDvi.js","assets/suggestion-Dwy6qysF.js","assets/product-picker-dialog-C2KLekZA.js","assets/index-C81DBcO6.js","assets/blog-schema-4OEvCOpU.js","assets/use-fast-preview-draft-url-BCmBxVQg.js","assets/use-autosave-DUBcsRSH.js","assets/record-editor-OoLxSu9R.js","assets/context-Gpy7m9cw.js","assets/index-BvJNHE6H.js","assets/use-org-fs-BRERSVus.js","assets/icon-button-DQuPTgIB.js","assets/category-editor-Ctbp0oQy.js","assets/sections-editor-DwV32_3f.js","assets/seo-editor-D1gGpMMF.js","assets/use-apply-named-rule-zZmpVvRd.js","assets/variant-matcher-override-QQd3tA7f.js","assets/variant-calendar-C5r0ak32.js","assets/post-calendar-DVrcXuZq.js","assets/redirect-editor-W9B4A_h8.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as ce,b as Ee,j as o,B as De,h as mt,q as qi,e as Xi,K as ko,m as je,r as F,w as Ys,x as Es,I as ms,y as Ws,v as Ps,D as As,aT as Xn,ba as Qi,aG as Ji,t as ke,ak as Zi,bb as Fs,bc as $s,X as nn,bd as jo,Z as on,_ as an,b2 as Qn,aU as el,Y as Ot,as as ln,be as Jn,bf as tl,bg as sl,au as _n,am as nl,bh as ma,a5 as ol,bi as al,u as ga,b9 as xt,aN as il,aM as ll,aJ as rl,aH as cl,aI as dl,aL as ul,aK as pl,bj as fl,bk as ml}from"./index-BZX-7ipZ.js";import{a as Zn}from"./use-organization-settings-DPCrcu8e.js";import{u as yn,c as eo}from"./chat-context-CCj5lauv.js";import{H as gl,N as hl}from"./hosted-reconcile-B3o4dv7j.js";import{f as Dn,e as xl,c as bl,g as ha,B as Bn,P as yl,h as vl,i as xa,j as kl,k as jl,n as wl,L as Sl,u as vn,l as Cl,o as Nl,R as Tl,E as ft,q as ba,r as El,s as Pl,a as ya,t as Al,v as et,H as va,w as _l,x as ka,y as Dl,M as Bl,d as Rl,z as $l,p as Ol,A as Ll,C as Il,b as Kl,S as Fl,D as wo,F as zl,N as Ml}from"./parse-sections-DE2O_vev.js";import{S as Vl,a as Ul}from"./view-header-BPAnt0vh.js";import{i as Vs}from"./AlertCircle-2LbzMVC9.js";import{Z as ja,l as zn,v as Gl,_ as wa,$ as Sa,a0 as to,a1 as Ca,b as rn,T as Na,a2 as Hl,a3 as Yl,a4 as Wl,a5 as ql,a6 as Mn,e as so,n as Xl,a7 as Ta,a8 as Ql,a9 as Jl,aa as Zl,m as So,ab as er,Y as Ea}from"./agent-icon-U2nlXoBG.js";import{a as Pa,s as cn,i as no,d as tr,e as Co}from"./UserSquare-CEg-eLCw.js";import{c as oo,i as sr}from"./SwitchHorizontal01-Czrqzt6f.js";import{s as kn}from"./Plus-CzoopYlU.js";import{t as Aa}from"./Users01-CMreTMtq.js";import{S as qs}from"./scroll-area-rELMi4e6.js";import{T as wt,a as St,c as Ct}from"./tooltip--uPFG1gb.js";import{o as nr,c as _a,W as or,X as ar,Y as ir,Z as lr,q as Da,_ as ao,u as io,m as Ba,z as rr,$ as cr,a0 as dr,a1 as ur,l as pr,a2 as fr,E as No,n as mr,b as gr}from"./site-editor-toast-D83gMpdg.js";import{l as hr,m as xr,o as br,q as yr,t as vr,w as Ra,n as Kt,v as kr,R as jr,x as wr,y as Sr,z as Cr,A as $a,D as Nr,E as Oa,F as Tr,G as Er,H as Pr,I as Ar,i as _r,J as Qs,u as Dr,K as Br,e as To,L as Eo,S as Rr,C as $r,M as Or,c as Lr,O as Ir,h as Kr,P as Fr,Q as zr,T as Mr,U as Vr,V as Ur,W as Gr,X as Hr}from"./blocks-tab-states-oXZbJa9b.js";import{C as La,u as Yr,h as Po}from"./use-cms-publish-actions-BV2nwL3g.js";import{u as Wr,S as qr}from"./mustache-CgF6ozKS.js";import{u as Xr}from"./use-content-sync-CtHfpBJp.js";import{s as Qr}from"./sandbox-git-api-DcqI6XE4.js";import{u as lo}from"./use-voice-input-DsJxHyTh.js";import{b as ro}from"./sandbox-url-D3mC8qhT.js";import{d as Jr}from"./utils-D0xixM8q.js";import{a as Zr}from"./autosend-D6GGYoeu.js";import{u as Ia,b as Ka}from"./repository-binding-CqOunspI.js";import{g as Fa,a as za,b as ec}from"./section-array-field-C3Tpx16b.js";import{n as Ma}from"./ShoppingBag01-DhegylE0.js";import{t as Us}from"./ChevronUp-aYmfXYet.js";import{i as Va}from"./Zap-BLaVFWQx.js";import{C as tc,a as sc,b as nc}from"./collapsible-BPEhSNLz.js";import{u as oc}from"./use-sandbox-events-BRJYKM54.js";import{a as ac}from"./sandbox-lifecycle-context-CXwLCWvJ.js";import{C as jn}from"./checkbox-DB14k3TQ.js";import{L as cs}from"./label-BGCn7A0y.js";import{c as ic,b as lc,a as rc,d as cc,S as dc}from"./select-CwDmbwEv.js";import{s as uc}from"./thread-intent-DIce2mks.js";import{s as pc}from"./date-utils-CrvIKg-s.js";import{u as fc}from"./use-move-blocks-B48xFUbp.js";import{i as mc}from"./CheckCircle-BzNTGMCW.js";import{s as co}from"./Trash01-BxSWir9J.js";import{i as Rn}from"./Upload01-C8sapTWh.js";import{B as wn}from"./badge-C9w1KAGQ.js";import{E as gc}from"./empty-state-ovRL7NEK.js";import{u as hc}from"./use-ai-providers-C5rCFpU_.js";import{T as Ao}from"./textarea-D5OF_Tld.js";import{u as xc}from"./use-file-configs-DsyBYIJw.js";import{MonacoCodeEditor as Ua}from"./monaco-editor-vUgphdkE.js";import"./core.esm-CWyzckxm.js";import"./sortable.esm-DgwAq-fn.js";import{c as bc}from"./Tool01-D38zOT0h.js";import{S as yc}from"./search-input-Crult1Qo.js";import{a as vc,T as $n}from"./toggle-group-DbLOGwe7.js";import{C as kc}from"./collection-table-wrapper-C2dK4p_4.js";import{a as _o}from"./agent-capabilities-CaXbVMop.js";import{E as jc}from"./empty-state-DF9St1T6.js";import{G as Do}from"./github-icon-M-2WiP3Y.js";import{R as wc}from"./new-project-dialog-EK9WMEhp.js";function Ga(){return Zn("blog_ai_enabled")}const Bo=2e3,Sc=45;function Cc(t){const{resolveType:e,meta:s,reads:n,window:a}=t;return typeof e!="string"||e===""?{interval:!1,window:null}:s&&hr(e,s)?{interval:!1,window:null}:!a||a.resolveType!==e?{interval:Bo,window:{resolveType:e,reads:n}}:n-a.reads>=Sc?{interval:!1,window:a}:{interval:Bo,window:a}}const Nc=[{blockKey:"deco-vtex",vendor:"deco",app:"vtex",title:"VTEX",description:"Loaders, actions and workflows for adding VTEX Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vtex/logo.png"},{blockKey:"deco-shopify",vendor:"deco",app:"shopify",title:"Shopify",description:"Loaders, actions and workflows for adding Shopify Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/shopify/logo.png"},{blockKey:"deco-vnda",vendor:"deco",app:"vnda",title:"VNDA",description:"Loaders, actions and workflows for adding VNDA Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vnda/logo.png"},{blockKey:"deco-wake",vendor:"deco",app:"wake",title:"Wake",description:"Loaders, actions and workflows for adding Wake Commerce Platform to your website.",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/wake/logo.png"},{blockKey:"deco-nuvemshop",vendor:"deco",app:"nuvemshop",title:"Nuvemshop",description:"Loaders, actions and workflows for adding Nuvemshop Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/nuvemshop.png"},{blockKey:"deco-linx",vendor:"deco",app:"linx",title:"Linx",description:"Loaders, actions and workflows for adding Linx Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/linx.png"},{blockKey:"deco-wap",vendor:"deco",app:"wap",title:"Uappi",description:"Loaders, actions and workflows for adding Uappi Commerce Platform to your website.",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/uappi.png"},{blockKey:"deco-sap",vendor:"deco",app:"sap",title:"SAP Commerce",description:"Loaders, actions and workflows for adding SAP Commerce Platform to your website.",category:"Ecommerce",logo:"https://decoims.com/decocms/389b8d9b-e102-4ee7-9e9b-9c81c433581a/Sap_fav.png"},{blockKey:"deco-streamshop",vendor:"deco",app:"streamshop",title:"Streamshop",description:"Incorporate videos into your eCommerce. Boost sales significantly with Video Commerce Streamshop.",category:"Ecommerce"},{blockKey:"deco-algolia",vendor:"deco",app:"algolia",title:"Algolia",description:"Product search & discovery that increases conversions at scale.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/algolia/logo.png"},{blockKey:"deco-typesense",vendor:"deco",app:"typesense",title:"TypeSense",description:"Open source search engine meticulously engineered for performance & ease-of-use.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/typesense/logo.png"},{blockKey:"deco-smarthint",vendor:"deco",app:"smarthint",title:"SmartHint",description:"Smart search and product recommendation to improve your eCommerce customer experience.",category:"Search",logo:"https://github.com/deco-cx/apps/blob/main/smarthint/logo.png?raw=true"},{blockKey:"deco-linx-impulse",vendor:"deco",app:"linx-impulse",title:"Linx Impulse",description:"Build, manage and deliver B2B, B2C and Marketplace commerce experiences.",category:"Search",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/linx-impulse/logo.png"},{blockKey:"deco-verified-reviews",vendor:"deco",app:"verified-reviews",title:"Verified Reviews",description:"A specialized solution in the collection of customer reviews",category:"Review",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/verified-reviews/logo.png"},{blockKey:"deco-power-reviews",vendor:"deco",app:"power-reviews",title:"Power Reviews",description:"Collect more and better Ratings & Reviews and other UGC. Create UGC displays that convert. Analyze to enhance product experience and positioning.",category:"Review",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/power-reviews/logo.png"},{blockKey:"deco-konfidency",vendor:"deco",app:"konfidency",title:"Konfidency",description:"Product reviews and store reviews.",category:"Review",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/konfidency.png"},{blockKey:"deco-ra-trustvox",vendor:"deco",app:"ra-trustvox",title:"RA Trustvox",description:"RA Trustvox reviews.",category:"Review",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/ra-trustvox.png"},{blockKey:"deco-analytics",vendor:"deco",app:"analytics",title:"Deco Analytics",description:"Measure your site traffic at a glance in a simple and modern web analytics dashboard.",category:"Analytics",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/analytics/logo.png"},{blockKey:"deco-posthog",vendor:"deco",app:"posthog",title:"PostHog",description:"All-in-one platform for product analytics, feature flags, session replays, experiments, and surveys, built for developers.",category:"Analytics",logo:"https://decoims.com/decocms/cb17e9dc-8772-4873-8dae-f5a9f99694d4/posthog-icon-logo-png_seeklogo-483563.png"},{blockKey:"deco-resend",vendor:"deco",app:"resend",title:"Resend",description:"Resend is an email platform that helps developers build and send transactional and marketing emails.",category:"Email",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/resend-logo.png"},{blockKey:"deco-mailchimp",vendor:"deco",app:"mailchimp",title:"Mailchimp",description:"Email and marketing automations platform for growing businesses.",category:"Email",logo:"https://assets.decocache.com/admin/094cf93f-f1cb-4ef1-b993-9d9785b3cd0c/channels4_profile-(1).jpg"},{blockKey:"deco-blog",vendor:"deco",app:"blog",title:"Deco Blog",description:"Manage your posts.",category:"Content",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png"},{blockKey:"deco-weather",vendor:"deco",app:"weather",title:"Weather",description:"Vary your content based on the current weather of your visitors.",category:"Tool",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png"}],Tc=[{blockKey:"deco-vtex",vendor:"deco",app:"vtex",title:"VTEX",description:"VTEX IO commerce integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/vtex/logo.png",npm:{name:"@decocms/apps-vtex",registryExport:"VTEX_REGISTRY_ENTRY"}},{blockKey:"deco-shopify",vendor:"deco",app:"shopify",title:"Shopify",description:"Shopify Storefront API commerce integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/shopify/logo.png",npm:{name:"@decocms/apps-shopify",registryExport:"SHOPIFY_REGISTRY_ENTRY"}},{blockKey:"deco-wake",vendor:"deco",app:"wake",title:"Wake",description:"Wake Commerce (Storefront API) integration",category:"Ecommerce",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/wake/logo.png",npm:{name:"@decocms/apps-wake",registryExport:"WAKE_REGISTRY_ENTRY"}},{blockKey:"deco-nuvemshop",vendor:"deco",app:"nuvemshop",title:"Nuvemshop",description:"Nuvemshop (Tiendanube) Storefront API commerce integration",category:"Ecommerce",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/nuvemshop.png",npm:{name:"@decocms/apps-nuvemshop",registryExport:"NUVEMSHOP_REGISTRY_ENTRY"}},{blockKey:"deco-resend",vendor:"deco",app:"resend",title:"Resend",description:"Transactional email via Resend",category:"Email",logo:"https://auth.deco.cx/storage/v1/object/public/assets/1/user_content/resend-logo.png",npm:{name:"@decocms/apps-resend",registryExport:"RESEND_REGISTRY_ENTRY"}},{blockKey:"deco-blog",vendor:"deco",app:"blog",title:"Blog",description:"Blog posts, categories, and authors from CMS collections",category:"Content",logo:"https://raw.githubusercontent.com/deco-cx/apps/main/weather/logo.png",npm:{name:"@decocms/apps-blog",registryExport:"BLOG_REGISTRY_ENTRY"}}];function Sn(t,e){return`${t}-${e}`}function Cn(t,e){return`site/apps/${t}/${e}.ts`}const Ec="@decocms/",Pc=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function Ac(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const _c={"tanstack-start":"tanstack"};function Dc(t){return t?_c[t]??null:"deno"}function Ha(t){if(!t)return null;try{const e=JSON.parse(t);return e&&typeof e=="object"&&!Array.isArray(e)?e:null}catch{return null}}function Ya(t){const e={};for(const s of["dependencies","devDependencies"]){const n=t[s];if(!(!n||typeof n!="object"||Array.isArray(n)))for(const[a,i]of Object.entries(n))typeof i=="string"&&!(a in e)&&(e[a]=i)}return e}const Bc=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function Wa(t){return Bc.test(t)}function Rc(t){const e=Ha(t);if(!e)return null;const s=Ya(e),n=[...Pc,...Object.keys(s).filter(i=>i.startsWith(Ec)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!Wa(r))return r;a??=r}}return a}function $c(t,e){const s=Ha(t);return s?Ya(s)[e]??null:null}function Oc(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:Rc(t.packageJson)}:null}class Me extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function qa(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return/^[0-9]/.test(s)?`app${s}`:s}function Lc(t){return`${qa(t)}Mod`}const Ic=/"apps"\s*:\s*\{/;function Ro(t){const e=`apps/${t.app}/mod.ts`;return{path:`apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${e}";
|
|
3
|
-
export * from "${e}";
|
|
4
|
-
`}}function Kc(t,e){const s=`${e}/mod`;return{path:`src/apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${s}";
|
|
5
|
-
export * from "${s}";
|
|
6
|
-
`}}function Fc(t,e){const s=`./apps/${t.vendor}/${t.app}.ts`,n=Cn(t.vendor,t.app);if(e.includes(`"${n}"`))return null;const a=Ic.exec(e);if(!a)throw new Me("manifest.gen.ts declares no `apps` map, so this site's runtime has no place to register the app. Run `deno task dev` once and reinstall.");const i=`${qa(t.app)}App`;if(new RegExp(`\\b${i}\\b`).test(e))throw new Me(`manifest.gen.ts already declares \`${i}\`, which this install needs as its own name`);const r=[...e.matchAll(Xa)].filter(d=>d.index<a.index).pop();if(!r)throw new Me("manifest.gen.ts has no imports to extend");const c=r.index+r[0].length,l=a.index+a[0].length;return{path:"manifest.gen.ts",content:[e.slice(0,c),`
|
|
7
|
-
import * as ${i} from "${s}";`,e.slice(c,l),`
|
|
8
|
-
"${n}": ${i},`,e.slice(l)].join("")}}function zc(t,e){let s=0,n=null;for(let a=e;a<t.length;a++){const i=t[a];if(n){i==="\\"?a++:i===n&&(n=null);continue}if(i==='"'||i==="'")n=i;else if(i==="{")s++;else if(i==="}"&&--s===0)return a}throw new Me("package.json: unbalanced braces")}function $o(t,e){let s=e;for(;s<t.length&&` \r
|
|
9
|
-
`.includes(t[s]);)s++;return s}function Mc(t){let e=0,s=!1,n=-1;for(let a=0;a<t.length;a++){const i=t[a];if(s){if(i==="\\")a++;else if(i==='"'){if(s=!1,e!==1||t.slice(n+1,a)!=="dependencies")continue;const r=$o(t,a+1);if(t[r]!==":")continue;const c=$o(t,r+1);if(t[c]==="{")return c}continue}i==='"'?(s=!0,n=a):i==="{"||i==="["?e++:(i==="}"||i==="]")&&e--}return-1}function Vc(t,e,s){const n=Mc(t);if(n===-1)throw new Me('package.json has no "dependencies" — add it before installing an app');const a=zc(t,n),i=t.slice(n+1,a),r=[...i.matchAll(/^([ \t]*)"((?:[^"\\]|\\.)*)"\s*:/gm)],c=r[0]?.[1]??" ",l=/(^|\n)([ \t]*)$/.exec(i)?.[2]??" ",d=`${c}${JSON.stringify(e)}: ${JSON.stringify(s)}`;if(r.length===0)return`${t.slice(0,n+1)}
|
|
10
|
-
${d}
|
|
11
|
-
${l}${t.slice(a)}`;const u=r.find(p=>p[2]>e);if(u){const p=n+1+u.index;return`${t.slice(0,p)}${d},
|
|
12
|
-
${t.slice(p)}`}const g=r[r.length-1],m=i.indexOf(`
|
|
13
|
-
`,g.index),f=n+1+(m===-1?i.length:m);return`${t.slice(0,f)},
|
|
14
|
-
${d}${t.slice(f)}`}const Xa=/(?:^import\s*|\bfrom\s*)(["'])[^"'\n]*\1[ \t]*;?/gm,Qa=/const\s+APP_REGISTRY\b[^=]*=\s*\[/;function Uc(t){return(t.match(/\bimport\s*\{[^{}]*\}\s*from\b/g)??[]).some(s=>/\bAPP_REGISTRY\b/.test(s))}function Gc(t,e,s){const n=Lc(e.app),a=`
|
|
15
|
-
import { ${s.registryExport} } from "${s.name}/registry";
|
|
16
|
-
import * as ${n} from "${s.name}/mod";`,i=` { ...${s.registryExport}, module: async () => ${n} as never },`,r=Qa.exec(t);if(!r)throw new Me("This site does not register apps through `autoconfigApps`: src/setup.ts declares no `APP_REGISTRY` array for the entry. Add one and call `autoconfigApps(blocks, APP_REGISTRY)`, then reinstall — or wire this app by hand.");const c=[...t.matchAll(Xa)].filter(g=>g.index<r.index).pop();if(!c)throw new Me("src/setup.ts has no imports to extend");const l=c.index+c[0].length,d=r.index+r[0].length,u=t.slice(d);return[t.slice(0,l),a,t.slice(l,d),`
|
|
17
|
-
${i}`,/^\s*\]/.test(u)?`
|
|
18
|
-
${u.replace(/^\s*\]/,"]")}`:u].join("")}function Hc(t){const{entry:e,technology:s}=t,n={key:e.blockKey,value:{__resolveType:Cn(e.vendor,e.app)}};if(s==="deno"){const d=t.manifestGenTs;if(d==null)throw new Me("Could not read the site's manifest.gen.ts, which is where a Deno site registers its apps");const u=Fc(e,d);return{files:u?[Ro(e),u]:[Ro(e)],block:n,dependency:null}}const a=e.npm;if(!a)throw new Me(`${e.title} has no TanStack package — it is only available on Deno sites`);const i=t.packageJson,r=t.setupTs;if(i==null||r==null)throw new Me("Could not read the site's package.json and src/setup.ts");const c=t.decocmsVersion;if(!c)throw new Me("This repository declares no @decocms/* dependency, so it is not a TanStack deco site");if(Wa(c))throw new Me(`@decocms/* is pinned at "${c}", which resolves only for a package this workspace already declares — add ${a.name} there, then reinstall`);const l=[Kc(e,a.name)];if($c(i,a.name)===null&&l.push({path:"package.json",content:Vc(i,a.name,c)}),!Qa.test(r)&&Uc(r))throw new Me("This branch still wires apps through the monolithic `@decocms/apps` registry, which cannot see the split `@decocms/apps-*` packages. Move src/setup.ts to a local `APP_REGISTRY` array first.");return r.includes(a.registryExport)||l.push({path:"src/setup.ts",content:Gc(r,e,a)}),{files:l,block:n,dependency:a.name}}function Ja(t){return t==="deno"?Nc:Tc}function Vn(t,e){return Ja(t).find(s=>s.blockKey===e)??null}function Yc(t){return Vn("tanstack",t)??Vn("deno",t)??null}function Za(t){const e=t.match(/^site\/apps\/([^/]+)\/([^/.]+)\.tsx?$/);if(e)return{vendor:e[1],app:e[2]};const s=t.match(/^([^/]+)\/apps\/([^/.]+)\.tsx?$/);return s?{vendor:s[1],app:s[2]}:null}function Wc(t){const e=t.match(/^([^-]+)-(.+)$/);return e?{vendor:e[1],app:e[2]}:null}function qc(t){return t==="local"?"Custom":"Installed"}function Xc(t){return t.split(/[-_.]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function ei(t,e,s,n,a,i){const r=Ra(t,i),c=r.title&&r.title!==t?r.title:void 0,l=Yc(Sn(e,s));return{title:c??l?.title??n,description:r.description??l?.description??"",category:l?.category??a,logo:r.logo??r.icon??l?.logo}}function ti(t,e,s){const n=new Set([Sn(t,e),e].map(i=>i.toLowerCase())),a=Cn(t,e);for(const[i,r]of Object.entries(s)){if(i.includes("/")||!r||typeof r!="object"||Array.isArray(r))continue;const c=r;if(n.has(i.toLowerCase())||c.__resolveType===a)return i}return null}function Qc(t,e){const{vendor:s,app:n}=t,a=ti(s,n,e);return{id:t.blockKey,app:n,vendor:s,title:t.title,description:t.description,category:t.category,logo:t.logo,resolveType:Cn(s,n),blockKey:a,installed:a!==null,installable:!0}}function Jc(t,e,s){if(t===xr)return null;const n=Za(t);if(!n)return null;const{vendor:a,app:i}=n,r=ti(a,i,s);return{id:Sn(a,i),app:i,vendor:a,...ei(t,a,i,Xc(i),a==="local"?"Custom":"Others",e),resolveType:t,blockKey:r,installed:r!==null,installable:!1}}function Zc(t,e,s){const n=e.__resolveType;if(typeof n!="string"||br(t,e)||!yr(n))return null;const a=Za(n)??Wc(t);if(!a)return null;const{vendor:i,app:r}=a;return{id:Sn(i,r),app:r,vendor:i,...ei(n,i,r,vr(t,e,s),qc(i),s),resolveType:n,blockKey:t,installed:!0,installable:!1}}function ed(t,e,s){const n=new Map;for(const i of t){const r=Qc(i,s);n.set(r.id,r)}const a=e.manifest?.blocks?.apps??{};for(const i of Object.keys(a)){const r=Jc(i,e,s);!r||n.has(r.id)||n.set(r.id,r)}for(const[i,r]of Object.entries(s)){if(i.includes("/")||!r||typeof r!="object"||Array.isArray(r))continue;const c=Zc(i,r,e);!c||n.has(c.id)||n.set(c.id,c)}return[...n.values()].sort(td)}function td(t,e){return t.installed!==e.installed?t.installed?-1:1:t.title.localeCompare(e.title)}function sd(t){const e=ce.c(38),{entry:s,technology:n,blocked:a,isInstalling:i,installError:r,onInstall:c}=t,l=Ee();let d;e[0]!==a||e[1]!==s.installable||e[2]!==l?(d=s.installable?a:{reason:l("sandbox.appInstallPanel.notInstallable")},e[0]=a,e[1]=s.installable,e[2]=l,e[3]=d):d=e[3];const u=d;let g;e[4]!==s.title?(g=o.jsx("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:o.jsx("span",{className:"truncate text-sm font-medium",children:s.title})}),e[4]=s.title,e[5]=g):g=e[5];let m;e[6]!==s.logo?(m=s.logo?o.jsx("img",{src:s.logo,alt:"",className:"size-12 shrink-0 rounded-xl bg-muted object-cover"}):o.jsx("span",{className:"flex size-12 shrink-0 items-center justify-center rounded-xl bg-muted",children:o.jsx(oo,{size:20,className:"text-muted-foreground"})}),e[6]=s.logo,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=o.jsx("div",{className:"truncate text-base font-medium",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];let p;e[10]!==s.category?(p=o.jsx("div",{className:"truncate text-xs text-muted-foreground",children:s.category}),e[10]=s.category,e[11]=p):p=e[11];let y;e[12]!==f||e[13]!==p?(y=o.jsxs("div",{className:"min-w-0",children:[f,p]}),e[12]=f,e[13]=p,e[14]=y):y=e[14];let j;e[15]!==m||e[16]!==y?(j=o.jsxs("div",{className:"flex items-center gap-3",children:[m,y]}),e[15]=m,e[16]=y,e[17]=j):j=e[17];let E;e[18]!==s.description?(E=s.description&&o.jsx("p",{className:"text-sm text-muted-foreground",children:s.description}),e[18]=s.description,e[19]=E):E=e[19];let x;e[20]!==s.app||e[21]!==s.vendor||e[22]!==i||e[23]!==c||e[24]!==u||e[25]!==l||e[26]!==n?(x=u?o.jsxs("div",{className:"flex flex-col items-start gap-2",children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:u.reason}),u.action&&o.jsx(De,{type:"button",variant:"outline",onClick:u.action.onClick,children:u.action.label})]}):o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:l(n==="deno"?"sandbox.appInstallPanel.writesDeno":"sandbox.appInstallPanel.writesTanstack",{vendor:s.vendor,app:s.app})}),o.jsx("div",{children:o.jsxs(De,{type:"button",onClick:c,disabled:i,className:"gap-2",children:[i&&o.jsx(mt,{className:"size-3.5"}),l(i?"sandbox.appInstallPanel.installing":"sandbox.appInstallPanel.install")]})})]}),e[20]=s.app,e[21]=s.vendor,e[22]=i,e[23]=c,e[24]=u,e[25]=l,e[26]=n,e[27]=x):x=e[27];let S;e[28]!==r?(S=r&&o.jsx("p",{className:"text-xs text-destructive",children:r}),e[28]=r,e[29]=S):S=e[29];let C;e[30]!==S||e[31]!==j||e[32]!==E||e[33]!==x?(C=o.jsx(qs,{className:"min-h-0 min-w-0 flex-1",children:o.jsx("div",{className:"px-6 py-6",children:o.jsxs("div",{className:"mx-auto flex max-w-xl flex-col gap-4",children:[j,E,x,S]})})}),e[30]=S,e[31]=j,e[32]=E,e[33]=x,e[34]=C):C=e[34];let b;return e[35]!==C||e[36]!==g?(b=o.jsxs("div",{className:"flex h-full flex-col",children:[g,C]}),e[35]=C,e[36]=g,e[37]=b):b=e[37],b}function Os(t){const e=ce.c(6),{hasItems:s,emptyLabel:n,emptyHint:a}=t;let i;e[0]!==a||e[1]!==n||e[2]!==s?(i=s?"No results match your search.":o.jsxs(o.Fragment,{children:[o.jsx("div",{children:n}),o.jsx("div",{className:"mt-1 text-muted-foreground/80",children:a})]}),e[0]=a,e[1]=n,e[2]=s,e[3]=i):i=e[3];let r;return e[4]!==i?(r=o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i}),e[4]=i,e[5]=r):r=e[5],r}function nd(t){return t.dependency?{force:t.files.some(e=>e.path==="package.json")}:null}function od(t,e){return t.files.length===0?!1:e?.force!==!0}function ad(t){if(t instanceof Error&&"status"in t&&typeof t.status=="number")return t.status}function Oo(t){return new Me(`Could not read ${t} — the sandbox is not answering yet. Try again in a moment.`)}async function Js(t,e,s){const n=await lr(t,Da(e,s)).catch(a=>{const i=ad(a);throw i!==void 0&&i>=500?Oo(s):a});if(n.kind==="unavailable")throw Oo(s);return n.kind==="data"?n.data:null}async function Lo(t,e,s){const n=await fetch(ro(t,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:Da(e,s.path),content:s.content})});n.ok||await ao(n,"Write")}async function id(t,e){const s=await fetch(ro({...t,threadId:null},"setup/install",{force:e?"1":"0"}),{method:"POST"});s.ok||await ao(s,"Dependency install"),await si(s,e,"install")}async function si(t,e,s){if(!e)return;const n=await t.clone().json().catch(()=>null);if((typeof n=="object"&&n!==null&&"force"in n?n.force:void 0)!==!0)throw new Me(`This sandbox is running a daemon that ignores a forced ${s}, so the install would answer "done" without doing it. Restart the sandbox to pick up a current image, then install again.`)}async function ld(t){const e=await fetch(ro({...t,threadId:null},"setup/start",{force:"1"}),{method:"POST"});e.ok||await ao(e,"Dev restart"),await si(e,!0,"restart")}function rd(t){const e=ce.c(30),{orgSlug:s,virtualMcpId:n,branch:a}=t,i=qi(),r=yn()?.taskId??null,c=nr(n),l=lo(n).runtime==="cms",{url:d}=_a(n);let u;e[0]!==a||e[1]!==s||e[2]!==n?(u={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=u):u=e[3];const g=Xr(u);let m;e[4]!==a||e[5]!==s||e[6]!==n?(m=ar(s,n,a),e[4]=a,e[5]=s,e[6]=n,e[7]=m):m=e[7];let f;e[8]!==a||e[9]!==s||e[10]!==n?(f=or(s,n,a),e[8]=a,e[9]=s,e[10]=n,e[11]=f):f=e[11];let p;e[12]!==a||e[13]!==g||e[14]!==l||e[15]!==d||e[16]!==s||e[17]!==c||e[18]!==i||e[19]!==r||e[20]!==n?(p=async E=>{const{blockKey:x}=E;if(d)throw new Me("Local preview has no repository to install into");if(l)throw new Me("Installing an app writes code, which a Fast Preview session cannot do");const S={orgSlug:s,virtualMcpId:n,branch:a,threadId:r},[C,b]=await Promise.all([Js(S,c,"deno.json"),Js(S,c,"package.json")]),v=Oc({denoJson:C,packageJson:b});if(!v)throw new Me("This repository has no deno.json or package.json");const T=Vn(v.technology,x);if(!T)throw new Me(`No app "${x}" is available for a ${v.technology} site`);const w=Hc({technology:v.technology,entry:T,decocmsVersion:v.decocmsVersion,packageJson:b,setupTs:v.technology==="tanstack"?await Js(S,c,"src/setup.ts"):null,manifestGenTs:v.technology==="deno"?await Js(S,c,"manifest.gen.ts"):null});return ir(g,{kind:"edit",write:async()=>{for(const O of w.files)await Lo(S,c,O);const _=nd(w);return _&&await id(S,_.force),od(w,_)&&await ld(S),await Lo(S,c,{path:Jr(w.block.key),content:`${JSON.stringify(w.block.value,null,2)}
|
|
19
|
-
`}),await i.invalidateQueries({queryKey:Qr(S)}),await i.invalidateQueries({queryKey:ko.liveMeta(s,n,a)}),w.block}})},e[12]=a,e[13]=g,e[14]=l,e[15]=d,e[16]=s,e[17]=c,e[18]=i,e[19]=r,e[20]=n,e[21]=p):p=e[21];let y;e[22]!==g||e[23]!==i?(y=E=>{g.cacheKey&&i.setQueryData(ko.decofile(g.cacheKey),x=>({...x??{},[E.key]:E.value}))},e[22]=g,e[23]=i,e[24]=y):y=e[24];let j;return e[25]!==m||e[26]!==f||e[27]!==p||e[28]!==y?(j={mutationKey:m,scope:f,mutationFn:p,onSuccess:y},e[25]=m,e[26]=f,e[27]=p,e[28]=y,e[29]=j):j=e[29],Xi(j)}function cd(t,e){const s=ce.c(3),n=Ia(t)?.metadata?.runtime?.selected;let a;return s[0]!==e||s[1]!==n?(a=(e?Dc(e.framework):null)??Ac(n),s[0]=e,s[1]=n,s[2]=a):a=s[2],a}function We(t){const e=ce.c(18),{icon:s,label:n,count:a,mark:i,active:r,onClick:c,indent:l,"aria-current":d}=t,u=l&&"pl-6",g=r?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-foreground";let m;e[0]!==u||e[1]!==g?(m=je("flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors cursor-pointer",u,g),e[0]=u,e[1]=g,e[2]=m):m=e[2];let f;e[3]!==s?(f=o.jsx(s,{size:16,className:"shrink-0"}),e[3]=s,e[4]=f):f=e[4];let p;e[5]!==n?(p=o.jsx("span",{className:"flex-1 truncate",children:n}),e[5]=n,e[6]=p):p=e[6];let y;e[7]!==r||e[8]!==a?(y=a!==void 0&&o.jsx("span",{className:je("shrink-0 text-xs tabular-nums",r?"text-accent-foreground/70":"text-muted-foreground/70"),children:a}),e[7]=r,e[8]=a,e[9]=y):y=e[9];let j;return e[10]!==d||e[11]!==i||e[12]!==c||e[13]!==m||e[14]!==f||e[15]!==p||e[16]!==y?(j=o.jsxs("button",{type:"button",onClick:c,"aria-current":d,className:m,children:[f,p,i,y]}),e[10]=d,e[11]=i,e[12]=c,e[13]=m,e[14]=f,e[15]=p,e[16]=y,e[17]=j):j=e[17],j}function dd(t){const e=ce.c(5),{icon:s,label:n}=t;let a;e[0]!==s?(a=s&&o.jsx(s,{size:13,className:"shrink-0"}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==n||e[3]!==a?(i=o.jsxs("div",{className:"mt-3 flex items-center gap-1.5 px-2.5 pb-1 pt-1 text-xs font-medium text-muted-foreground/70",children:[a,n]}),e[2]=n,e[3]=a,e[4]=i):i=e[4],i}const ud=["sections","apps","loaders","actions"],pd=[];function fd(t){const e=ce.c(73),{active:s,counts:n,hidden:a,showBlog:i,showContext:r,onSelect:c}=t,l=a===void 0?pd:a,d=Ee();let u;e[0]!==l?(u=U=>!l.includes(U),e[0]=l,e[1]=u):u=e[1];const g=u;let m;e[2]!==d?(m=d("sandbox.collectionsSidebar.content"),e[2]=d,e[3]=m):m=e[3];let f;e[4]!==m?(f=o.jsx("div",{className:"px-3 h-12 flex items-center border-b shrink-0",children:o.jsx("span",{className:"text-sm font-medium",children:m})}),e[4]=m,e[5]=f):f=e[5];let p;e[6]!==d?(p=d("sandbox.collectionsSidebar.pages"),e[6]=d,e[7]=p):p=e[7];const y=s==="pages";let j;e[8]!==c?(j=()=>c("pages"),e[8]=c,e[9]=j):j=e[9];let E;e[10]!==n.pages||e[11]!==p||e[12]!==y||e[13]!==j?(E=o.jsx(We,{icon:Pa,label:p,count:n.pages,active:y,onClick:j}),e[10]=n.pages,e[11]=p,e[12]=y,e[13]=j,e[14]=E):E=e[14];let x;e[15]!==d?(x=d("sandbox.collectionsSidebar.redirects"),e[15]=d,e[16]=x):x=e[16];const S=s==="redirects";let C;e[17]!==c?(C=()=>c("redirects"),e[17]=c,e[18]=C):C=e[18];let b;e[19]!==n.redirects||e[20]!==S||e[21]!==C||e[22]!==x?(b=o.jsx(We,{icon:ja,label:x,count:n.redirects,active:S,onClick:C}),e[19]=n.redirects,e[20]=S,e[21]=C,e[22]=x,e[23]=b):b=e[23];let v;e[24]!==s||e[25]!==c||e[26]!==g||e[27]!==d?(v=g("site")&&o.jsx(We,{icon:zn,label:d("sandbox.collectionsSidebar.site"),active:s==="site",onClick:()=>c("site")}),e[24]=s,e[25]=c,e[26]=g,e[27]=d,e[28]=v):v=e[28];let T;e[29]!==d?(T=d("sandbox.collectionsSidebar.seo"),e[29]=d,e[30]=T):T=e[30];const w=s==="seo";let _;e[31]!==c?(_=()=>c("seo"),e[31]=c,e[32]=_):_=e[32];let O;e[33]!==T||e[34]!==w||e[35]!==_?(O=o.jsx(We,{icon:Ca,label:T,active:w,onClick:_}),e[33]=T,e[34]=w,e[35]=_,e[36]=O):O=e[36];let R;e[37]!==s||e[38]!==c||e[39]!==g||e[40]!==d?(R=g("settings")&&o.jsx(We,{icon:zn,label:d("sandbox.collectionsSidebar.settings"),active:s==="settings",onClick:()=>c("settings")}),e[37]=s,e[38]=c,e[39]=g,e[40]=d,e[41]=R):R=e[41];let K;e[42]!==s||e[43]!==c||e[44]!==g||e[45]!==d?(K=g("calendar")&&o.jsx(We,{icon:Gl,label:d("sandbox.collectionsSidebar.calendar"),active:s==="calendar",onClick:()=>c("calendar")}),e[42]=s,e[43]=c,e[44]=g,e[45]=d,e[46]=K):K=e[46];let k;e[47]!==s||e[48]!==n||e[49]!==c||e[50]!==g?(k=o.jsx(md,{active:s,counts:n,shown:g,onSelect:c}),e[47]=s,e[48]=n,e[49]=c,e[50]=g,e[51]=k):k=e[51];let z;e[52]!==s||e[53]!==n.authors||e[54]!==n.categories||e[55]!==n.posts||e[56]!==c||e[57]!==i||e[58]!==r||e[59]!==d?(z=i&&o.jsxs(o.Fragment,{children:[o.jsx(dd,{icon:Ma,label:d("sandbox.collectionsSidebar.blog")}),r&&o.jsx(We,{icon:cn,label:d("sandbox.collectionsSidebar.context"),active:s==="context",onClick:()=>c("context")}),o.jsx(We,{icon:wa,label:d("sandbox.collectionsSidebar.posts"),count:n.posts,active:s==="posts",onClick:()=>c("posts")}),o.jsx(We,{icon:Aa,label:d("sandbox.collectionsSidebar.authors"),count:n.authors,active:s==="authors",onClick:()=>c("authors")}),o.jsx(We,{icon:Sa,label:d("sandbox.collectionsSidebar.categories"),count:n.categories,active:s==="categories",onClick:()=>c("categories")}),o.jsx(We,{icon:to,label:d("sandbox.collectionsSidebar.postSchedule"),active:s==="post-schedule",onClick:()=>c("post-schedule")})]}),e[52]=s,e[53]=n.authors,e[54]=n.categories,e[55]=n.posts,e[56]=c,e[57]=i,e[58]=r,e[59]=d,e[60]=z):z=e[60];let P;e[61]!==b||e[62]!==v||e[63]!==O||e[64]!==R||e[65]!==K||e[66]!==k||e[67]!==z||e[68]!==E?(P=o.jsxs("nav",{className:"flex flex-col p-1.5 gap-0.5",children:[E,b,v,O,R,K,k,z]}),e[61]=b,e[62]=v,e[63]=O,e[64]=R,e[65]=K,e[66]=k,e[67]=z,e[68]=E,e[69]=P):P=e[69];let I;return e[70]!==P||e[71]!==f?(I=o.jsxs("div",{className:"w-[208px] shrink-0 border-r flex flex-col",children:[f,P]}),e[70]=P,e[71]=f,e[72]=I):I=e[72],I}function md(t){const e=ce.c(54),{active:s,counts:n,shown:a,onSelect:i}=t,r=Ee();let c;e[0]!==s?(c=ud.includes(s),e[0]=s,e[1]=c):c=e[1];const l=c,[d,u]=F.useState(!1),g=d||l;let m,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=je("flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors cursor-pointer","text-muted-foreground hover:bg-accent hover:text-foreground"),f=o.jsx(Hl,{size:16,className:"shrink-0"}),e[2]=m,e[3]=f):(m=e[2],f=e[3]);let p;e[4]!==r?(p=r("sandbox.collectionsSidebar.advanced"),e[4]=r,e[5]=p):p=e[5];let y;e[6]!==p?(y=o.jsx("span",{className:"flex-1 truncate",children:p}),e[6]=p,e[7]=y):y=e[7];const j=g&&"rotate-180";let E;e[8]!==j?(E=je("shrink-0 text-muted-foreground/70 transition-transform",j),e[8]=j,e[9]=E):E=e[9];let x;e[10]!==E?(x=o.jsx(Us,{size:16,className:E}),e[10]=E,e[11]=x):x=e[11];let S;e[12]!==y||e[13]!==x?(S=o.jsxs(tc,{className:m,children:[f,y,x]}),e[12]=y,e[13]=x,e[14]=S):S=e[14];let C;e[15]!==r?(C=r("sandbox.collectionsSidebar.sections"),e[15]=r,e[16]=C):C=e[16];const b=s==="sections";let v;e[17]!==i?(v=()=>i("sections"),e[17]=i,e[18]=v):v=e[18];let T;e[19]!==n.sections||e[20]!==C||e[21]!==b||e[22]!==v?(T=o.jsx(We,{icon:rn,label:C,count:n.sections,active:b,onClick:v,indent:!0}),e[19]=n.sections,e[20]=C,e[21]=b,e[22]=v,e[23]=T):T=e[23];let w;e[24]!==s||e[25]!==n.apps||e[26]!==i||e[27]!==a||e[28]!==r?(w=a("apps")&&o.jsx(We,{icon:oo,label:r("sandbox.collectionsSidebar.apps"),count:n.apps,active:s==="apps",onClick:()=>i("apps"),indent:!0}),e[24]=s,e[25]=n.apps,e[26]=i,e[27]=a,e[28]=r,e[29]=w):w=e[29];let _;e[30]!==r?(_=r("sandbox.collectionsSidebar.loaders"),e[30]=r,e[31]=_):_=e[31];const O=s==="loaders";let R;e[32]!==i?(R=()=>i("loaders"),e[32]=i,e[33]=R):R=e[33];let K;e[34]!==n.loaders||e[35]!==_||e[36]!==O||e[37]!==R?(K=o.jsx(We,{icon:Na,label:_,count:n.loaders,active:O,onClick:R,indent:!0}),e[34]=n.loaders,e[35]=_,e[36]=O,e[37]=R,e[38]=K):K=e[38];let k;e[39]!==s||e[40]!==n.actions||e[41]!==i||e[42]!==a||e[43]!==r?(k=a("actions")&&o.jsx(We,{icon:Va,label:r("sandbox.collectionsSidebar.actions"),count:n.actions,active:s==="actions",onClick:()=>i("actions"),indent:!0}),e[39]=s,e[40]=n.actions,e[41]=i,e[42]=a,e[43]=r,e[44]=k):k=e[44];let z;e[45]!==T||e[46]!==w||e[47]!==K||e[48]!==k?(z=o.jsxs(sc,{className:"flex flex-col gap-0.5 pt-0.5",children:[T,w,K,k]}),e[45]=T,e[46]=w,e[47]=K,e[48]=k,e[49]=z):z=e[49];let P;return e[50]!==g||e[51]!==z||e[52]!==S?(P=o.jsxs(nc,{open:g,onOpenChange:u,children:[S,z]}),e[50]=g,e[51]=z,e[52]=S,e[53]=P):P=e[53],P}function gd(t){const e=ce.c(12),{state:s,claimPhase:n,lifecycle:a,onStart:i,connectionsHref:r}=t;switch(s.kind){case"starting":{let c;e[0]!==n||e[1]!==a?(c=xl({claimPhase:n,lifecycle:a}),e[0]=n,e[1]=a,e[2]=c):c=e[2];let l;return e[3]!==n||e[4]!==c?(l=o.jsx(Dn,{kind:"starting",progress:c,claimPhase:n}),e[3]=n,e[4]=c,e[5]=l):l=e[5],l}case"suspended":{let c;return e[6]!==i?(c=o.jsx(Dn,{kind:"suspended",onResume:i}),e[6]=i,e[7]=c):c=e[7],c}case"errored":{let c;return e[8]!==r||e[9]!==i||e[10]!==s.error?(c=o.jsx(Dn,{kind:"errored",error:s.error,onRetry:i,connectionsHref:r}),e[8]=r,e[9]=i,e[10]=s.error,e[11]=c):c=e[11],c}}}const hd=new Set(["clone-failed","install-failed","start-failed","crashed"]);function xd(t){if(t.fastPreviewActive)return{kind:"ready",devServerReady:!1,sandboxWarming:!1};if(t.previewState.kind!=="iframe")return{kind:"sandbox-card",state:t.previewState};const e=t.lifecyclePhase==="running",s=!e&&!hd.has(t.lifecyclePhase);return{kind:"ready",devServerReady:e,sandboxWarming:s}}function Io(t,e){const s=e.replace(/\s*\(copy(?:\s+\d+)?\)\s*$/,"").trim(),n=`${s} (copy)`;if(!t.has(n))return n;for(let a=2;a<1e3;a++){const i=`${s} (copy ${a})`;if(!t.has(i))return i}return`${s} (copy ${Date.now()})`}function bd(t,e){const s=Kt,n=e.replace(/-copy(?:-\d+)?$/,""),a=`${n}-copy`;if(!t.has(s(a)))return a;for(let i=2;i<1e3;i++){const r=`${n}-copy-${i}`;if(!t.has(s(r)))return r}return`${n}-copy-${Date.now()}`}function yd(t,e){const s=e.replace(/_copy(?:_\d+)?$/,""),n=`${s}_copy`;if(!Object.hasOwn(t,n))return n;for(let a=2;a<1e3;a++){const i=`${s}_copy_${a}`;if(!Object.hasOwn(t,i))return i}return`${s}_copy_${Date.now()}`}function vd(t){const e=ha(t.newName),s={...t.source,name:t.newName,path:t.newPath};return{key:e,data:s}}function kd(t,e,s){return bl(t,e,s)}const jd=1e3;function wd(t,e){for(let s=0;s<jd;s++){const n=ha(e);if(!Object.hasOwn(t,n))return n}throw new Error("Could not generate a unique page block key")}const Sd={create:"sandbox.pageFormDialog.titleCreate",duplicate:"sandbox.pageFormDialog.titleDuplicate",rename:"sandbox.pageFormDialog.titleRename"},Cd={create:"sandbox.pageFormDialog.submitCreate",duplicate:"sandbox.pageFormDialog.submitDuplicate",rename:"sandbox.pageFormDialog.submitSave"},Nd={create:"sandbox.pageFormDialog.pendingCreate",duplicate:"sandbox.pageFormDialog.pendingDuplicate",rename:"sandbox.pageFormDialog.pendingSave"};function Td(t){const e=ce.c(88),{open:s,mode:n,initialName:a,initialPath:i,isPending:r,error:c,templates:l,validate:d,onSubmit:u,onOpenChange:g}=t,m=r===void 0?!1:r,f=Ee(),[p,y]=F.useState(a),[j,E]=F.useState(i),[x,S]=F.useState(Bn),[C,b]=F.useState(null),[v,T]=F.useState(s);s!==v&&(T(s),s&&(y(a),E(i),S(Bn),b(null)));const w=n==="create"&&!!l?.length;let _;e[0]!==m||e[1]!==g?(_=ae=>{!ae&&!m&&(b(null),g(!1))},e[0]=m,e[1]=g,e[2]=_):_=e[2];const O=_;let R;e[3]!==m||e[4]!==p||e[5]!==u||e[6]!==j||e[7]!==w||e[8]!==x||e[9]!==d?(R=async ae=>{ae.preventDefault();const ye=p.trim(),Se=j.trim();if(!ye||!Se||m)return;const _e=kr(Se);if(_e){b(_e);return}const we=d?.({name:ye,path:Se});if(we){b(we);return}b(null),await u({name:ye,path:Se,templateKey:w&&x!==Bn?x:null})},e[3]=m,e[4]=p,e[5]=u,e[6]=j,e[7]=w,e[8]=x,e[9]=d,e[10]=R):R=e[10];const K=R,k=C??c,z=Sd[n];let P;e[11]!==f||e[12]!==z?(P=f(z),e[11]=f,e[12]=z,e[13]=P):P=e[13];let I;e[14]!==P?(I=o.jsx(Ys,{children:o.jsx(Es,{children:P})}),e[14]=P,e[15]=I):I=e[15];let U;e[16]!==m||e[17]!==w||e[18]!==f||e[19]!==x||e[20]!==l?(U=w&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{htmlFor:"page-form-template",className:"text-xs font-medium text-muted-foreground",children:f("sandbox.pageFormDialog.labelTemplate")}),o.jsx(yl,{id:"page-form-template",value:x,onChange:S,templates:l??[],disabled:m})]}),e[16]=m,e[17]=w,e[18]=f,e[19]=x,e[20]=l,e[21]=U):U=e[21];let q;e[22]!==f?(q=f("sandbox.pageFormDialog.labelName"),e[22]=f,e[23]=q):q=e[23];let Y;e[24]!==q?(Y=o.jsx("label",{htmlFor:"page-form-name",className:"text-xs font-medium text-muted-foreground",children:q}),e[24]=q,e[25]=Y):Y=e[25];let Q;e[26]===Symbol.for("react.memo_cache_sentinel")?(Q=ae=>y(ae.target.value),e[26]=Q):Q=e[26];let A;e[27]!==f?(A=f("sandbox.pageFormDialog.placeholderName"),e[27]=f,e[28]=A):A=e[28];let G;e[29]!==m||e[30]!==p||e[31]!==A?(G=o.jsx(ms,{id:"page-form-name",value:p,onChange:Q,placeholder:A,autoFocus:!0,disabled:m}),e[29]=m,e[30]=p,e[31]=A,e[32]=G):G=e[32];let $;e[33]!==G||e[34]!==Y?($=o.jsxs("div",{className:"space-y-1.5",children:[Y,G]}),e[33]=G,e[34]=Y,e[35]=$):$=e[35];let N;e[36]!==f?(N=f("sandbox.pageFormDialog.labelPath"),e[36]=f,e[37]=N):N=e[37];let L;e[38]!==N?(L=o.jsx("label",{htmlFor:"page-form-path",className:"text-xs font-medium text-muted-foreground",children:N}),e[38]=N,e[39]=L):L=e[39];let de;e[40]===Symbol.for("react.memo_cache_sentinel")?(de=ae=>E(ae.target.value),e[40]=de):de=e[40];let ne;e[41]!==f?(ne=f("sandbox.pageFormDialog.placeholderPath"),e[41]=f,e[42]=ne):ne=e[42];let ie;e[43]!==m||e[44]!==j||e[45]!==ne?(ie=o.jsx(ms,{id:"page-form-path",value:j,onChange:de,placeholder:ne,disabled:m}),e[43]=m,e[44]=j,e[45]=ne,e[46]=ie):ie=e[46];let fe;e[47]!==L||e[48]!==ie?(fe=o.jsxs("div",{className:"space-y-1.5",children:[L,ie]}),e[47]=L,e[48]=ie,e[49]=fe):fe=e[49];let ue;e[50]!==k?(ue=k&&o.jsx("p",{className:"text-xs text-destructive",children:k}),e[50]=k,e[51]=ue):ue=e[51];let te;e[52]!==$||e[53]!==fe||e[54]!==ue||e[55]!==U?(te=o.jsxs("div",{className:"space-y-4 py-4",children:[U,$,fe,ue]}),e[52]=$,e[53]=fe,e[54]=ue,e[55]=U,e[56]=te):te=e[56];let le;e[57]!==g?(le=()=>g(!1),e[57]=g,e[58]=le):le=e[58];let oe;e[59]!==f?(oe=f("sandbox.pageFormDialog.buttonCancel"),e[59]=f,e[60]=oe):oe=e[60];let be;e[61]!==m||e[62]!==le||e[63]!==oe?(be=o.jsx(De,{type:"button",variant:"outline",onClick:le,disabled:m,children:oe}),e[61]=m,e[62]=le,e[63]=oe,e[64]=be):be=e[64];let M;e[65]!==m||e[66]!==p||e[67]!==j?(M=!p.trim()||!j.trim()||m,e[65]=m,e[66]=p,e[67]=j,e[68]=M):M=e[68];let re;e[69]!==m||e[70]!==n||e[71]!==f?(re=m?o.jsxs(o.Fragment,{children:[o.jsx(mt,{className:"size-3.5"}),f(Nd[n])]}):f(Cd[n]),e[69]=m,e[70]=n,e[71]=f,e[72]=re):re=e[72];let me;e[73]!==M||e[74]!==re?(me=o.jsx(De,{type:"submit",disabled:M,children:re}),e[73]=M,e[74]=re,e[75]=me):me=e[75];let J;e[76]!==be||e[77]!==me?(J=o.jsxs(Ws,{children:[be,me]}),e[76]=be,e[77]=me,e[78]=J):J=e[78];let D;e[79]!==K||e[80]!==te||e[81]!==J||e[82]!==I?(D=o.jsx(Ps,{className:"sm:max-w-md",children:o.jsxs("form",{onSubmit:K,children:[I,te,J]})}),e[79]=K,e[80]=te,e[81]=J,e[82]=I,e[83]=D):D=e[83];let Z;return e[84]!==O||e[85]!==s||e[86]!==D?(Z=o.jsx(As,{open:s,onOpenChange:O,children:D}),e[84]=O,e[85]=s,e[86]=D,e[87]=Z):Z=e[87],Z}const Ed=[{value:"temporary",labelKey:"sandbox.redirectEditor.typeTemporary"},{value:"permanent",labelKey:"sandbox.redirectEditor.typePermanent"}],Ko={from:"",to:"",type:"temporary",discardQueryParameters:!1};function Pd(t){const e=ce.c(111),{open:s,isPending:n,error:a,onSubmit:i,onOpenChange:r}=t,c=n===void 0?!1:n,l=Ee(),[d,u]=F.useState(Ko),[g,m]=F.useState(null),[f,p]=F.useState(s);s!==f&&(p(s),s&&(u(Ko),m(null)));let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=xe=>u(Re=>({...Re,...xe})),e[0]=y):y=e[0];const j=y;let E;e[1]!==c||e[2]!==r?(E=xe=>{!xe&&!c&&(m(null),r(!1))},e[1]=c,e[2]=r,e[3]=E):E=e[3];const x=E;let S;e[4]!==c||e[5]!==i||e[6]!==d||e[7]!==l?(S=async xe=>{xe.preventDefault();const Re=d.from.trim(),Ke=d.to.trim();if(!Re||!Ke||c){m(l("sandbox.redirectFormDialog.errorRequired"));return}m(null),await i({...d,from:Re,to:Ke})},e[4]=c,e[5]=i,e[6]=d,e[7]=l,e[8]=S):S=e[8];const C=S,b=g??a;let v;e[9]!==c||e[10]!==d.from||e[11]!==d.to?(v=!!d.from.trim()&&!!d.to.trim()&&!c,e[9]=c,e[10]=d.from,e[11]=d.to,e[12]=v):v=e[12];const T=v;let w;e[13]!==l?(w=l("sandbox.redirectFormDialog.title"),e[13]=l,e[14]=w):w=e[14];let _;e[15]!==w?(_=o.jsx(Ys,{children:o.jsx(Es,{children:w})}),e[15]=w,e[16]=_):_=e[16];let O;e[17]!==l?(O=l("sandbox.redirectEditor.fromLabel"),e[17]=l,e[18]=O):O=e[18];let R;e[19]!==O?(R=o.jsx(cs,{htmlFor:"redirect-form-from",children:O}),e[19]=O,e[20]=R):R=e[20];const K=d.from;let k;e[21]===Symbol.for("react.memo_cache_sentinel")?(k=xe=>j({from:xe.target.value}),e[21]=k):k=e[21];let z;e[22]!==l?(z=l("sandbox.redirectEditor.fromPlaceholder"),e[22]=l,e[23]=z):z=e[23];let P;e[24]!==c||e[25]!==d.from||e[26]!==z?(P=o.jsx(ms,{id:"redirect-form-from",value:K,onChange:k,placeholder:z,autoFocus:!0,disabled:c}),e[24]=c,e[25]=d.from,e[26]=z,e[27]=P):P=e[27];let I;e[28]!==P||e[29]!==R?(I=o.jsxs("div",{className:"space-y-1.5",children:[R,P]}),e[28]=P,e[29]=R,e[30]=I):I=e[30];let U;e[31]!==l?(U=l("sandbox.redirectEditor.toLabel"),e[31]=l,e[32]=U):U=e[32];let q;e[33]!==U?(q=o.jsx(cs,{htmlFor:"redirect-form-to",children:U}),e[33]=U,e[34]=q):q=e[34];const Y=d.to;let Q;e[35]===Symbol.for("react.memo_cache_sentinel")?(Q=xe=>j({to:xe.target.value}),e[35]=Q):Q=e[35];let A;e[36]!==l?(A=l("sandbox.redirectEditor.toPlaceholder"),e[36]=l,e[37]=A):A=e[37];let G;e[38]!==c||e[39]!==d.to||e[40]!==A?(G=o.jsx(ms,{id:"redirect-form-to",value:Y,onChange:Q,placeholder:A,disabled:c}),e[38]=c,e[39]=d.to,e[40]=A,e[41]=G):G=e[41];let $;e[42]!==q||e[43]!==G?($=o.jsxs("div",{className:"space-y-1.5",children:[q,G]}),e[42]=q,e[43]=G,e[44]=$):$=e[44];let N;e[45]!==l?(N=l("sandbox.redirectEditor.typeLabel"),e[45]=l,e[46]=N):N=e[46];let L;e[47]!==N?(L=o.jsx(cs,{htmlFor:"redirect-form-type",children:N}),e[47]=N,e[48]=L):L=e[48];const de=d.type;let ne;e[49]===Symbol.for("react.memo_cache_sentinel")?(ne=xe=>j({type:xe}),e[49]=ne):ne=e[49];let ie;e[50]!==l?(ie=l("sandbox.redirectEditor.typePlaceholder"),e[50]=l,e[51]=ie):ie=e[51];let fe;e[52]!==ie?(fe=o.jsx(lc,{id:"redirect-form-type",className:"w-full",children:o.jsx(rc,{placeholder:ie})}),e[52]=ie,e[53]=fe):fe=e[53];let ue;e[54]!==l?(ue=Ed.map(xe=>o.jsx(ic,{value:xe.value,children:l(xe.labelKey,{status:jr[xe.value]})},xe.value)),e[54]=l,e[55]=ue):ue=e[55];let te;e[56]!==ue?(te=o.jsx(cc,{children:ue}),e[56]=ue,e[57]=te):te=e[57];let le;e[58]!==c||e[59]!==d.type||e[60]!==fe||e[61]!==te?(le=o.jsxs(dc,{value:de,onValueChange:ne,disabled:c,children:[fe,te]}),e[58]=c,e[59]=d.type,e[60]=fe,e[61]=te,e[62]=le):le=e[62];let oe;e[63]!==L||e[64]!==le?(oe=o.jsxs("div",{className:"space-y-1.5",children:[L,le]}),e[63]=L,e[64]=le,e[65]=oe):oe=e[65];let be;e[66]===Symbol.for("react.memo_cache_sentinel")?(be=xe=>j({discardQueryParameters:xe===!0}),e[66]=be):be=e[66];let M;e[67]!==c||e[68]!==d.discardQueryParameters?(M=o.jsx(jn,{checked:d.discardQueryParameters,disabled:c,onCheckedChange:be}),e[67]=c,e[68]=d.discardQueryParameters,e[69]=M):M=e[69];let re;e[70]!==l?(re=l("sandbox.redirectEditor.discardQueryParameters"),e[70]=l,e[71]=re):re=e[71];let me;e[72]!==re?(me=o.jsx("span",{className:"text-sm",children:re}),e[72]=re,e[73]=me):me=e[73];let J;e[74]!==M||e[75]!==me?(J=o.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[M,me]}),e[74]=M,e[75]=me,e[76]=J):J=e[76];let D;e[77]!==b?(D=b&&o.jsx("p",{className:"text-xs text-destructive",children:b}),e[77]=b,e[78]=D):D=e[78];let Z;e[79]!==I||e[80]!==$||e[81]!==oe||e[82]!==J||e[83]!==D?(Z=o.jsxs("div",{className:"space-y-4 py-4",children:[I,$,oe,J,D]}),e[79]=I,e[80]=$,e[81]=oe,e[82]=J,e[83]=D,e[84]=Z):Z=e[84];let ae;e[85]!==r?(ae=()=>r(!1),e[85]=r,e[86]=ae):ae=e[86];let ye;e[87]!==l?(ye=l("sandbox.redirectFormDialog.cancel"),e[87]=l,e[88]=ye):ye=e[88];let Se;e[89]!==c||e[90]!==ae||e[91]!==ye?(Se=o.jsx(De,{type:"button",variant:"outline",onClick:ae,disabled:c,children:ye}),e[89]=c,e[90]=ae,e[91]=ye,e[92]=Se):Se=e[92];const _e=!T;let we;e[93]!==c||e[94]!==l?(we=c?o.jsxs(o.Fragment,{children:[o.jsx(mt,{className:"size-3.5"}),l("sandbox.redirectFormDialog.pending")]}):l("sandbox.redirectFormDialog.submit"),e[93]=c,e[94]=l,e[95]=we):we=e[95];let Be;e[96]!==_e||e[97]!==we?(Be=o.jsx(De,{type:"submit",disabled:_e,children:we}),e[96]=_e,e[97]=we,e[98]=Be):Be=e[98];let W;e[99]!==Se||e[100]!==Be?(W=o.jsxs(Ws,{children:[Se,Be]}),e[99]=Se,e[100]=Be,e[101]=W):W=e[101];let se;e[102]!==C||e[103]!==Z||e[104]!==W||e[105]!==_?(se=o.jsx(Ps,{className:"sm:max-w-md",children:o.jsxs("form",{onSubmit:C,children:[_,Z,W]})}),e[102]=C,e[103]=Z,e[104]=W,e[105]=_,e[106]=se):se=e[106];let he;return e[107]!==x||e[108]!==s||e[109]!==se?(he=o.jsx(As,{open:s,onOpenChange:x,children:se}),e[107]=x,e[108]=s,e[109]=se,e[110]=he):he=e[110],he}function Ad(t){const e=ce.c(70),{open:s,blockKey:n,initialName:a,isPending:i,onSubmit:r,onOpenChange:c}=t,l=i===void 0?!1:i,d=Ee(),[u,g]=F.useState(a),[m,f]=F.useState(s);s!==m&&(f(s),s&&g(a));let p;e[0]!==l||e[1]!==c?(p=de=>{!de&&!l&&c(!1)},e[0]=l,e[1]=c,e[2]=p):p=e[2];const y=p;let j;e[3]!==l||e[4]!==u||e[5]!==r?(j=async de=>{de.preventDefault();const ne=u.trim();!ne||l||await r(ne)},e[3]=l,e[4]=u,e[5]=r,e[6]=j):j=e[6];const E=j;let x;e[7]!==d?(x=d("sandbox.sectionRenameDialog.title"),e[7]=d,e[8]=x):x=e[8];let S;e[9]!==x?(S=o.jsx(Es,{children:x}),e[9]=x,e[10]=S):S=e[10];let C;e[11]!==d?(C=d("sandbox.sectionRenameDialog.description"),e[11]=d,e[12]=C):C=e[12];let b;e[13]!==C?(b=o.jsx(Xn,{children:C}),e[13]=C,e[14]=b):b=e[14];let v;e[15]!==S||e[16]!==b?(v=o.jsxs(Ys,{children:[S,b]}),e[15]=S,e[16]=b,e[17]=v):v=e[17];let T;e[18]!==d?(T=d("sandbox.sectionRenameDialog.nameLabel"),e[18]=d,e[19]=T):T=e[19];let w;e[20]!==T?(w=o.jsx("label",{htmlFor:"section-rename-name",className:"text-xs font-medium text-muted-foreground",children:T}),e[20]=T,e[21]=w):w=e[21];let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=de=>g(de.target.value),e[22]=_):_=e[22];let O;e[23]!==l||e[24]!==u?(O=o.jsx(ms,{id:"section-rename-name",value:u,onChange:_,autoFocus:!0,disabled:l}),e[23]=l,e[24]=u,e[25]=O):O=e[25];let R;e[26]!==w||e[27]!==O?(R=o.jsxs("div",{className:"space-y-1.5",children:[w,O]}),e[26]=w,e[27]=O,e[28]=R):R=e[28];let K;e[29]!==d?(K=d("sandbox.sectionRenameDialog.keyLabel"),e[29]=d,e[30]=K):K=e[30];let k;e[31]!==K?(k=o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:K}),e[31]=K,e[32]=k):k=e[32];let z;e[33]!==n?(z=o.jsx(ms,{value:n,readOnly:!0,disabled:!0,className:"font-mono"}),e[33]=n,e[34]=z):z=e[34];let P;e[35]!==k||e[36]!==z?(P=o.jsxs("div",{className:"space-y-1.5",children:[k,z]}),e[35]=k,e[36]=z,e[37]=P):P=e[37];let I;e[38]!==R||e[39]!==P?(I=o.jsxs("div",{className:"space-y-4 py-4",children:[R,P]}),e[38]=R,e[39]=P,e[40]=I):I=e[40];let U;e[41]!==c?(U=()=>c(!1),e[41]=c,e[42]=U):U=e[42];let q;e[43]!==d?(q=d("sandbox.sectionRenameDialog.cancel"),e[43]=d,e[44]=q):q=e[44];let Y;e[45]!==l||e[46]!==U||e[47]!==q?(Y=o.jsx(De,{type:"button",variant:"outline",onClick:U,disabled:l,children:q}),e[45]=l,e[46]=U,e[47]=q,e[48]=Y):Y=e[48];let Q;e[49]!==l||e[50]!==u?(Q=!u.trim()||l,e[49]=l,e[50]=u,e[51]=Q):Q=e[51];let A;e[52]!==l||e[53]!==d?(A=l?o.jsxs(o.Fragment,{children:[o.jsx(mt,{className:"size-3.5"}),d("sandbox.sectionRenameDialog.saving")]}):d("sandbox.sectionRenameDialog.save"),e[52]=l,e[53]=d,e[54]=A):A=e[54];let G;e[55]!==Q||e[56]!==A?(G=o.jsx(De,{type:"submit",disabled:Q,children:A}),e[55]=Q,e[56]=A,e[57]=G):G=e[57];let $;e[58]!==Y||e[59]!==G?($=o.jsxs(Ws,{children:[Y,G]}),e[58]=Y,e[59]=G,e[60]=$):$=e[60];let N;e[61]!==E||e[62]!==I||e[63]!==$||e[64]!==v?(N=o.jsx(Ps,{className:"sm:max-w-md",children:o.jsxs("form",{onSubmit:E,children:[v,I,$]})}),e[61]=E,e[62]=I,e[63]=$,e[64]=v,e[65]=N):N=e[65];let L;return e[66]!==y||e[67]!==s||e[68]!==N?(L=o.jsx(As,{open:s,onOpenChange:y,children:N}),e[66]=y,e[67]=s,e[68]=N,e[69]=L):L=e[69],L}function _d(t,e){const[s,n]=F.useState(t);return t!==null&&(t.title!==s?.title||t.description!==s?.description)&&n(t),t??(e?s:null)}function Dd(t){const e=ce.c(9),{redirect:s}=t,n=s.type;let a;e[0]!==s?(a=wr(s),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==a?(i=o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-2xs font-medium tabular-nums text-muted-foreground",children:a})}),e[2]=a,e[3]=i):i=e[3];const r=n==="permanent"?"Permanent":"Temporary";let c;e[4]!==r?(c=o.jsx(St,{side:"left",children:r}),e[4]=r,e[5]=c):c=e[5];let l;return e[6]!==i||e[7]!==c?(l=o.jsxs(Ct,{children:[i,c]}),e[6]=i,e[7]=c,e[8]=l):l=e[8],l}const Bd=["draft","active","paused","finished"],Rd=["launch","seasonal","trend","seo_gap","inventory","partnership","reputation"],$d=["awareness","education","conversion","retention","repositioning"],Od=["category","collection"],Ld=3,Fo=12,Id=60,Kd=25,Fd=8e3,zd=2e3,Md="vtex/loaders/intelligentSearch/productList.ts";function Lt(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function On(t){return typeof t=="string"||typeof t=="number"?String(t):""}function Ln(t){const e=Lt(t);return!!e&&typeof e.__resolveType=="string"&&"productId"in e}function kg(t){if(typeof t=="string")return t?[t]:[];if(Array.isArray(t))return t.every(n=>typeof n=="string")?t:t.map(n=>On(Lt(n)?.productId));const e=Lt(t),s=Lt(e?.props);return s&&Array.isArray(s.ids)?s.ids.map(On):e&&"productId"in e?[On(e.productId)]:[]}function Vd(t){const e=Lt(t)??{};return typeof e.__resolveType=="string"?e.__resolveType:Md}function Ud(t,e){if(typeof t=="string")return e[0]??"";if(Array.isArray(t)){if(t.length>0&&t.every(r=>typeof r=="string"))return e;const i=t.find(Ln);if(i)return e.map((r,c)=>{const l=Lt(t[c]);return{...Ln(l)?l:{__resolveType:i.__resolveType},productId:r}})}const s=Lt(t);if(Ln(s)&&!Lt(s.props)?.ids)return{...s,productId:e[0]??""};const n=Lt(s?.props)??{},a=Vd(t);return{...s??{},__resolveType:a,props:{...n,ids:e,simulationBehavior:n.simulationBehavior??"default"}}}const Gd=["title","titleTemplate","description","descriptionTemplate"];function ni(t){return typeof t=="string"?t.trim():""}function zo(t){if(!jl(t))return"";const e=xa(t);if(!e)return"";const s=[];for(const n of Gd){const a=ni(e[n]);a&&s.push(`${n}: ${a}`)}return s.join(`
|
|
20
|
-
`).slice(0,zd)}function oi(t,e){const s=t[e.key],n=s&&typeof s=="object"?xa(s.seo):null,a=ni(n?.__resolveType);if(a){const i=kl(a);if(i==="pdp"||i==="plp")return"commerce"}return Sr(e.path).length>0?"commerce":e.path==="/"?"home":"institutional"}function Hd(t,e){const s=[],n=new Set;let a=Fd;const i=(d,u)=>{!u||n.has(u)||s.length>=Kd||u.length>a||(n.add(u),s.push({key:d,content:u}),a-=u.length)},r=vl(t);r&&i("site",zo(r.seoData));const c={home:[],institutional:[],commerce:[]};for(const d of e)c[oi(t,d)].push(d);const l=[...c.home,...c.institutional,...c.commerce.slice(0,2)];for(const d of l){const u=t[d.key];!u||typeof u!="object"||i(d.path,zo(u.seo))}return s}const In={post:"blog/loaders/Blogpost.ts",author:"blog/loaders/Author.ts",category:"blog/loaders/Category.ts"},uo=["posts","authors","categories"],zs={posts:"post",authors:"author",categories:"category"};function ds(t){return uo.includes(t)}const Nn={posts:"post",authors:"author",categories:"category"},ai={posts:In.post,authors:In.author,categories:In.category},Yd=Object.fromEntries(Object.entries(ai).map(([t,e])=>[e,t]));function ii(t){return typeof t=="string"?Yd[t]??null:null}function Te(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function V(t){return typeof t=="string"?t:""}function Wd(t,e){switch(t){case"posts":return{label:V(e.title)||"Untitled post",subtitle:V(e.slug),missing:Tn(e)};case"authors":return{label:V(e.name)||"Unnamed author",subtitle:V(e.email),missing:[]};case"categories":return{label:V(e.name)||"Unnamed category",subtitle:V(e.slug),slug:V(e.slug),parentSlug:V(e.parentSlug),missing:lu(e)};default:{const s=t;throw new Error(`Unhandled blog kind: ${String(s)}`)}}}function li(t){const e={posts:[],authors:[],categories:[]},s=[];for(const[n,a]of Object.entries(t)){const i=Te(a);if(!i)continue;const r=ii(i.__resolveType);if(!r)continue;const c=Te(i[Nn[r]])??{},l={key:n,kind:r,...Wd(r,c)};e[r].push(l),s.push({entry:l,key:fn(V(c[r==="posts"?"title":"name"]))})}qd(s);for(const n of uo)e[n].sort((a,i)=>a.label.localeCompare(i.label));return e}function qd(t){const e=new Map;for(const{entry:s,key:n}of t){if(!n)continue;const a=`${s.kind}:${n}`;e.set(a,(e.get(a)??0)+1)}for(const{entry:s,key:n}of t)n&&(e.get(`${s.kind}:${n}`)??0)>1&&(s.duplicateName=!0)}function Xd(t,e){return li(t)[e]}function ht(t,e){return Xd(t,e).map(s=>({key:s.key,payload:ps(Te(t[s.key])??void 0,e)}))}const Un=Object.freeze({});function ps(t,e){return t?Te(t[Nn[e]])??Un:Un}function Cs(t,e,s){return{name:t,__resolveType:ai[e],[Nn[e]]:s}}function jg({records:t,selected:e,valueField:s,toRef:n}){const a=Array.isArray(e)?e:[],i=m=>typeof m=="string"?m:V(Te(m)?.[s]),r=m=>typeof m=="string"?m:V(Te(m)?.name),c=m=>{const f=i(m),p=f?t.find(({payload:j})=>V(j[s])===f):void 0;if(p)return p;const y=r(m);return y?t.find(({payload:j})=>V(j.name)===y):void 0},l=t.map(({key:m,payload:f})=>({value:m,label:V(f.name)||V(f[s])||m})),d=new Map,u=[];return a.forEach((m,f)=>{const p=c(m);if(p){u.includes(p.key)||u.push(p.key);return}const y=`unresolved:${f}`;d.set(y,m),u.push(y),l.push({value:y,label:r(m)||i(m)||"Unknown"})}),{options:l,selectedValues:u,refsForValues:m=>m.map(f=>{const p=t.find(y=>y.key===f);return p?n(p.payload):d.get(f)}).filter(f=>f!==void 0)}}function Qd(t){return ht(t,"authors").map(({payload:e})=>({...e,name:V(e.name),email:V(e.email)})).filter(e=>e.email)}function at(t){return Array.isArray(t)?t:[]}function It(t){if(typeof t=="string")return t;const e=Te(t);return e?V(e.slug):""}function ri(t){if(typeof t=="string")return t;const e=Te(t);return e?V(e.email):""}const Jd={title:"sandbox.blogField.title",slug:"sandbox.blogField.slug",category:"sandbox.blogField.category",excerpt:"sandbox.blogField.excerpt",image:"sandbox.blogField.image",name:"sandbox.blogField.name"};function Zd(t,e){return t.map(s=>e(Jd[s])).join(", ")}function Tn(t){const e=[];return V(t.title).trim()||e.push("title"),V(t.slug).trim()||e.push("slug"),at(t.categories).map(It).filter(Boolean).length===0&&e.push("category"),V(t.excerpt).trim()||e.push("excerpt"),V(t.image).trim()||e.push("image"),e}const po=["draft","generating","awaiting_review","scheduled","published","archived"],ci=8;function Ds(t){switch(V(t.status)){case"draft":case"idea":return"draft";case"generating":return"generating";case"awaiting_review":case"in_review":return"awaiting_review";case"scheduled":return"scheduled";case"published":return"published";case"archived":return"archived";case"":return"published";default:return"awaiting_review"}}function wg(t){return Ds(t)==="archived"}function eu(t,e){return e!=="published"&&e!=="scheduled"||Ds(t)===e?!1:Tn(t).length>0}function tu(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1,ci).toISOString()}function dn(t,e,s){if(e!=="scheduled")return{...t,status:e,scheduledDatetime:""};const n=V(t.scheduledDatetime);return{...t,status:"scheduled",scheduledDatetime:Number.isNaN(new Date(n).getTime())?tu(s):n}}function di(t,e=Ti(t)){return ht(t,"posts").map(({key:s,payload:n})=>({key:s,duplicateTitle:e.has(s),title:V(n.title)||"Untitled post",slug:V(n.slug),date:V(n.date),scheduledDatetime:V(n.scheduledDatetime),categorySlugs:at(n.categories).map(It).filter(Boolean),authorEmails:at(n.authors).map(ri).filter(Boolean),missing:Tn(n),status:Ds(n),form:"live"}))}const ui="blog-manager/posts/";function pi(t){return t.startsWith(ui)}function Ms(t){return t.split("/").pop()??t}function un(t){return`${ui}${t}`}function su(t){return`collections/blog/posts/${t}`}function Gn(){return _s(12)}function nu(t){const e=Te(t.planning)??{},s=Te(e.format);return{campaignKey:V(e.campaignKey)||void 0,format:s?{name:V(s.name),value:V(s.value)}:void 0,brief:V(e.brief)||void 0}}function fi(t){return{title:t.title,slug:"",excerpt:"",date:t.now.toISOString().slice(0,10),image:"",alt:"",authors:[],categories:[],sections:[],status:"draft",planning:t.planning??{}}}function fs(t,e){return{name:t,[Nn.posts]:e}}function ou(t,e){return pi(t)?fs(t,e):Cs(t,"posts",e)}function mi(t){const e=[];for(const[s,n]of Object.entries(t)){if(!pi(s))continue;const a=Te(n);a&&e.push({key:s,payload:ps(a,"posts")})}return e}function gi(t){return[...mi(t),...ht(t,"posts")]}function au(t){const e=Ti(t);return[...mi(t).map(({key:n,payload:a})=>({key:n,duplicateTitle:e.has(n),title:V(a.title)||"Untitled post",slug:V(a.slug),date:V(a.date),scheduledDatetime:V(a.scheduledDatetime),categorySlugs:at(a.categories).map(It).filter(Boolean),authorEmails:at(a.authors).map(ri).filter(Boolean),missing:Tn(a),status:Ds(a),form:"planning"})),...di(t,e)]}function iu(t,e,s){const n=dn(t.payload,e,s),a=Ms(t.key),i=e==="scheduled"||e==="published"?"live":"planning",r=i==="live"?su(a):un(a),c=i==="live"?Cs(r,"posts",n):fs(r,n);return{writes:{[r]:c},deletes:r===t.key?[]:[t.key]}}function Sg(t,e,s){const n=at(t.categories);if(!n.some(l=>It(l)===e))return t;let a=!1;const i=n.map(l=>{const d=It(l);if(d!==e&&d!==s.slug)return l;const u=Te(l);return u&&V(u.slug)===s.slug&&V(u.name)===s.name?l:(a=!0,{name:s.name,slug:s.slug})});if(!a){const l=n.map(It).filter(Boolean);if(new Set(l).size===l.length)return t}const r=new Set,c=i.filter(l=>{const d=It(l);return d?r.has(d)?!1:(r.add(d),!0):!0});return{...t,categories:c}}function lu(t){const e=[];return V(t.name).trim()||e.push("name"),V(t.slug).trim()||e.push("slug"),e}function ru(t,e){const s=at(t.categories);return s.some(n=>It(n)===e)?{...t,categories:s.filter(n=>It(n)!==e)}:t}function Cg(t,e,s){return V(t.parentSlug)!==e?t:{...t,parentSlug:s}}function cu(t){const e=V(t.status),s=e==="idea"||e==="in_review"?{status:Ds(t)}:{};return{...t,...s,dateModified:new Date().toISOString()}}function _s(t){const e=new Uint8Array(Math.ceil(t/2));return crypto.getRandomValues(e),Array.from(e,s=>s.toString(16).padStart(2,"0")).join("").slice(0,t)}function Kn(t,e){const s=`collections/blog/${e}/${_s(12)}`;if(!Object.hasOwn(t,s))return s;throw new Error("Could not generate a unique blog block key")}function hi(t){switch(t){case"posts":return{title:"Untitled post",excerpt:"",slug:`untitled-${_s(8)}`,date:new Date().toISOString().slice(0,10),image:"",alt:"",authors:[],categories:[],sections:[]};case"authors":return{name:"New author",type:"Person",email:"",jobTitle:"",company:"",url:"",avatar:""};case"categories":return{name:"New category",slug:`category-${_s(8)}`,description:"",sections:[]};default:{const e=t;throw new Error(`Unhandled blog kind: ${String(e)}`)}}}const du={Paragraph:{title:"Paragraph",description:"Rich text content",iconName:"Pilcrow01"},Heading:{title:"Heading",description:"Section title (H1–H6)",iconName:"HeadingSquare"},Quote:{title:"Quote",description:"Pull quote",iconName:"MessageTextSquare02"},Code:{title:"Code",description:"Code block with syntax highlighting",iconName:"Code02"},List:{title:"List",description:"Bulleted or numbered list",iconName:"List"},BlockImage:{title:"Image",description:"Image with optional caption",iconName:"Image01"},Video:{title:"Video",description:"Embedded video",iconName:"PlayCircle"},Divider:{title:"Divider",description:"Horizontal divider",iconName:"Divider"},Cta:{title:"Call to action",description:"Button linking to a URL",iconName:"CursorClick01"},Callout:{title:"Callout",description:"Highlighted note, tip or warning",iconName:"Lightbulb02"},Stat:{title:"Stat",description:"Single key metric",iconName:"BarChartSquareUp"},StatGroup:{title:"Stat group",description:"Row of metrics",iconName:"BarChartSquare02"},CardGroup:{title:"Card group",description:"Grid of cards",iconName:"LayoutGrid01"},Checklist:{title:"Checklist",description:"List of check items",iconName:"CheckSquare"},Steps:{title:"Steps",description:"Step-by-step guide",iconName:"LayersThree01"},Comparison:{title:"Comparison",description:"Side-by-side comparison",iconName:"Columns03"},Table:{title:"Table",description:"Rows and columns of structured data",iconName:"Table"},ProductCard:{title:"Product card",description:"Single product",iconName:"Tag01"},ProductShelf:{title:"Product shelf",description:"Row of products",iconName:"ShoppingBag01"}},Mo="Box";function xi(t){return t.startsWith("blog/")?"app":"site"}function uu(t){return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||t.startsWith("/")}function Ls(...t){for(const e of t)if(e!==void 0)return e}function Vo(t){if(t&&!(t.includes("/")||/\.(tsx?|jsx?)$/.test(t)))return t}function pu(t){const e=t.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_]+/g," ").trim();return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():t}function fu(t,e){const s=Ra(t,e),n=En(t),a=du[n],i=xi(t),r=Vo(s.title),c=Vo(s.description),l=(i==="site"?Ls(r,a?.title):Ls(a?.title,r))??pu(n),d=i==="site"?Ls(c,a?.description):Ls(a?.description,c),u=i==="site"?s.icon:void 0,g=u&&uu(u)?u:void 0,m=g!==void 0?a?.iconName??Mo:Ls(u,a?.iconName)??Mo;return{resolveType:t,title:l,description:d,iconName:m,iconUrl:g,source:i}}function bi(t,{hideDefaults:e=!1,customPaths:s=[]}={}){const n=new Set,a=[],i=t.manifest?.blocks??{};for(const[r,c]of Object.entries(i))for(const l of Object.keys(c))n.has(l)||!(r==="sections"&&yi(l,s)&&!Cr(l,t))&&!gu(l)||e&&xi(l)==="app"||(n.add(l),a.push(fu(l,t)));return a.sort((r,c)=>r.title.localeCompare(c.title))}function En(t){return(t.split("/").pop()??t).replace(/\.(tsx?|jsx?)$/,"")}const mu=["blog/sections/blocks/","site/sections/Blog/Post/"];function gu(t,e=[]){return mu.some(s=>t.startsWith(s))||yi(t,e)}function yi(t,e){if(e.length===0)return!1;const s=t.toLowerCase();return e.some(n=>s===n||s.startsWith(`${n}/`))}const hu=/\/blog\.tsx?$/;function xu(t){const e=[];for(const[s,n]of Object.entries(t)){if(s.includes("/")||!n||typeof n!="object"||Array.isArray(n))continue;const a=n;typeof a.__resolveType=="string"&&hu.test(a.__resolveType)&&e.push(a)}return e}const bu=Qi(Ji());function Ng(t){const e=new Set;for(const s of xu(t)){const n=bu.safeParse(s.customSectionPaths);if(n.success)for(const a of n.data){const i=a.trim().replace(/^\/+|\/+$/g,"").toLowerCase();i&&e.add(i)}}return[...e]}const yu="blog-manager-brand",vu="blog-manager-context",vi=["companyName","description","language","storeUrl","targetAudience","values","competitors","keywords","commercialPolicies","specialDates"],ki=["tone","dos","avoid","categories","vocabulary","voiceExamples"];function Tg(t){return Te(t)??Un}function pn(t,e){const s={};for(const n of e)n in t&&(s[n]=t[n]);return s}function Eg(t,e,s){const n=pn(t,vi);if(Te(s))return n;const a=Te(e)??{};return{...pn(a,ki),...n}}function ku(t,e){const s=Te(t)??{},n=Te(e),a=pn(s,vi),i=n??pn(s,ki);return{brand:a,context:i,merged:{...a,...i}}}function ji(t){return ku(t[yu],t[vu])}function ju(t){return{companyName:V(t.companyName),description:V(t.description),language:V(t.language),storeUrl:uc(V(t.storeUrl))??"",tone:V(t.tone),targetAudience:V(t.targetAudience),values:ot(tt(t.values)),competitors:ot(tt(t.competitors)),specialDates:ot(tt(t.specialDates)),dos:ot(tt(t.dos)),avoid:ot(tt(t.avoid)),keywords:Hs(Gs(t.keywords)),commercialPolicies:ot(tt(t.commercialPolicies)),vocabulary:ot(tt(t.vocabulary)),voiceExamples:Yn(Hn(t.voiceExamples))}}function Hn(t){if(!Array.isArray(t))return[];const e=[];for(const s of t){if(typeof s=="string"){s.trim()&&e.push({text:s,sounds:!0});continue}const n=Te(s);if(!n)continue;const a=V(n.text)||V(n.value);e.push({text:a,sounds:n.sounds!==!1})}return e}function Yn(t){return t.filter(e=>e.text.trim())}function Pg(t,e,s){const n=[];for(const a of s.textFields){const i=V(e[a]).trim();i&&(s.mode==="empty"&&V(t[a]).trim()||(t[a]=i,n.push(a)))}for(const a of s.ruleFields){const i=ot(tt(e[a]));i.length!==0&&(s.mode==="empty"&&ot(tt(t[a])).length>0||(t[a]=i,n.push(a)))}for(const a of s.termFields??[]){const i=Hs(Gs(e[a]));i.length!==0&&(s.mode==="empty"&&Hs(Gs(t[a])).length>0||(t[a]=i,n.push(a)))}for(const a of s.exampleFields??[]){const i=Yn(Hn(e[a]));i.length!==0&&(s.mode==="empty"&&Yn(Hn(t[a])).length>0||(t[a]=i,n.push(a)))}return n}function Gs(t){if(!Array.isArray(t))return[];const e=[];for(const s of t){if(typeof s=="string"){e.push(s);continue}const n=Te(s);n&&e.push(V(n.name)||V(n.value))}return e}function Hs(t){return t.filter(e=>e.trim())}function tt(t){if(!Array.isArray(t))return[];const e=[];for(const s of t){if(typeof s=="string"){s.trim()&&e.push({name:s,value:""});continue}const n=Te(s);n&&e.push({name:V(n.name),value:V(n.value)})}return e}function ot(t){return t.filter(e=>e.name.trim()||e.value.trim())}const wu=6e4,Su=4e3;function Cu(t){const e=[],s=new Set,n=(a,i)=>{if(typeof a=="string"){if(!a.includes(" ")||a.length<4||/^(https?:)?\/\//.test(a)||/^data:/.test(a))return;const r=`${i}: ${a.trim()}`;if(s.has(r))return;s.add(r),e.push(r);return}if(Array.isArray(a)){for(const r of a)n(r,i);return}if(a&&typeof a=="object")for(const[r,c]of Object.entries(a))r!=="__resolveType"&&n(c,r)};return n(t,"block"),e.join(`
|
|
21
|
-
`)}function Ag(t,e){const s=new Map,n=m=>{const f=s.get(m);if(f!==void 0)return f;const p=Cu(t[m]).slice(0,Su);return s.set(m,p),p},a=(m,f)=>n(f).length-n(m).length,i=Hd(t,e),r=i.reduce((m,f)=>m+f.content.length,0),c={home:[],institutional:[],commerce:[]};for(const m of e)c[oi(t,m)].push(m.key);const l=[...ht(t,"posts").map(m=>m.key).sort(a),...ht(t,"categories").map(m=>m.key),...c.home,...c.institutional.sort(a),...c.commerce.sort(a)],d=[],u=new Set;let g=Math.max(0,wu-r);for(const m of l){if(d.length>=Id)break;if(u.has(m)||!t[m])continue;u.add(m);const f=n(m);if(f.length>g)break;d.push({key:m,content:f}),g-=f.length}return{blocks:d,seo:i}}const wi="blog-manager/campaigns/";function _g(){return`${wi}${crypto.randomUUID()}`}function tn(t,e,s){return t.find(n=>n===e)??s}function Uo(t){return V(t)||null}function Nu(t){const e=[];for(const s of at(t)){const n=Te(s);n&&e.push({kind:tn(Od,n.kind,"category"),id:V(n.id),name:V(n.name),url:V(n.url),description:V(n.description)})}return e}function Tu(t){const e=at(t.images).map(n=>V(n));return(e.length>0?e:[V(t.image)].filter(Boolean)).slice(0,Ld)}function Eu(t){const e=[];for(const s of at(t)){const n=Te(s);n&&e.push({id:V(n.id),name:V(n.name),url:V(n.url),images:Tu(n),category:V(n.category),description:V(n.description)})}return e}function Dg(t,e){return{name:t,campaignName:e.name,seedKey:e.seedKey,status:e.status,period:{start:e.period.start??"",end:e.period.end??""},trigger:{type:e.trigger.type,note:e.trigger.note},intent:{objective:e.intent.objective,targets:e.intent.targets,products:e.intent.products,keywords:e.intent.keywords},guardrails:{avoidComplements:e.guardrails.avoidComplements,toneOverrides:e.guardrails.toneOverrides},createdAt:e.createdAt,updatedAt:e.updatedAt}}function Pu(t){const e=[];for(const[s,n]of Object.entries(t)){if(!s.startsWith(wi))continue;const a=Te(n);if(!a)continue;const i=Te(a.period)??{},r=Te(a.trigger)??{},c=Te(a.intent)??{},l=Te(a.guardrails)??{};e.push({key:s,name:V(a.campaignName),seedKey:V(a.seedKey),status:tn(Bd,a.status,"draft"),period:{start:Uo(i.start),end:Uo(i.end)},trigger:{type:tn(Rd,r.type,"seasonal"),note:V(r.note)},intent:{objective:tn($d,c.objective,"awareness"),targets:Nu(c.targets),products:Eu(c.products),keywords:Hs(Gs(c.keywords))},guardrails:{avoidComplements:tt(l.avoidComplements),toneOverrides:V(l.toneOverrides)},createdAt:V(a.createdAt),updatedAt:V(a.updatedAt)})}return e.sort((s,n)=>n.createdAt.localeCompare(s.createdAt)||s.name.localeCompare(n.name))}function Bg(t){const e=t.toISOString();return{name:"",seedKey:"",status:"draft",period:{start:null,end:null},trigger:{type:"seasonal",note:""},intent:{objective:"awareness",targets:[],products:[],keywords:[]},guardrails:{avoidComplements:[],toneOverrides:""},createdAt:e,updatedAt:e}}const Si="blog-manager/campaign-seeds/";function Rg(){return`${Si}${crypto.randomUUID()}`}function $g(t,e){return{name:t,seedName:e.name,keywords:e.keywords,prompt:e.prompt,createdAt:e.createdAt,updatedAt:e.updatedAt}}function Og(t){const e=[];for(const[s,n]of Object.entries(t)){if(!s.startsWith(Si))continue;const a=Te(n);a&&e.push({key:s,name:V(a.seedName),keywords:Hs(Gs(a.keywords)),prompt:V(a.prompt),createdAt:V(a.createdAt),updatedAt:V(a.updatedAt)})}return e.sort((s,n)=>n.createdAt.localeCompare(s.createdAt)||s.name.localeCompare(n.name))}function Lg(t){const e=t.toISOString();return{name:"",keywords:[],prompt:"",createdAt:e,updatedAt:e}}const Au="blog-manager-formats",_u=40;function Ig(t){return ht(t,"posts").slice(0,_u).map(({key:e,payload:s})=>({key:e,title:V(s.title),sections:at(s.sections).map(n=>V(Te(n)?.__resolveType)).filter(Boolean).map(En)}))}function Du(t,e){return bi(t,e).map(s=>({name:En(s.resolveType),resolveType:s.resolveType,title:s.title,description:s.description}))}function Ci(t,e={}){const s=new Set,n=/\[@[^\]]+\]\(([^)\s]+)\)/g;for(const i of t.matchAll(n))i[1]&&s.add(i[1]);const a=/(?:^|[\s([{>])@([A-Za-z][\w-]*)/g;for(const i of t.replace(n," ").matchAll(a)){const r=i[1];r&&s.add(e[r]??r)}return[...s]}function Kg(t,e,s={}){const n=new Set(e);return Ci(t,s).filter(a=>!n.has(a))}function Fg(t,e){const s=/\[@[^\]]+\]\([^)\s]+\)/g,n=[];let a=0;for(const i of t.matchAll(s)){const r=i.index??0;n.push(Go(t.slice(a,r),e),i[0]),a=r+i[0].length}return n.push(Go(t.slice(a),e)),n.join("")}function Go(t,e){return t.replace(/(^|[\s([{>])@([A-Za-z][\w-]*)/g,(s,n,a)=>{const i=e[a];return i?`${n}[@${a}](${i})`:s})}const Bu=["Heading","Paragraph","BlockImage","List","Cta"];function zg(t){return Bu.filter(e=>e in t)}function fn(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/\s+/g," ").trim()}function Mg(t,e,s,n){const a=fn(n);return a?Ni(t,e).some(i=>i.key!==s&&fn(i.name)===a):!1}function Ni(t,e){return e!=="posts"?ht(t,e).map(({key:s,payload:n})=>({key:s,name:V(n.name)})):gi(t).map(({key:s,payload:n})=>({key:s,name:V(n.title)}))}function Ti(t){const e=new Map;for(const{key:n,name:a}of Ni(t,"posts")){const i=fn(a);if(!i)continue;const r=e.get(i);r?r.push(n):e.set(i,[n])}const s=new Set;for(const n of e.values())if(n.length>1)for(const a of n)s.add(a);return s}const Ru=["companyName","language","description","tone","targetAudience"];function $u(t){const e=Te(t)??{},s=[];for(const n of Ru)V(e[n]).trim()||s.push(n);return ot(tt(e.dos)).length===0&&s.push("dos"),ot(tt(e.avoid)).length===0&&s.push("avoid"),s}function Ou(t,e){const s=t.required;if(!Array.isArray(s))return;const n=new Set(e&&typeof e=="object"?Object.keys(e):[]),a=s.filter(i=>typeof i=="string"&&n.has(i));return a.length>0?a:void 0}const Lu=6,Iu=6e3;function Ku(t){const e=t.schema??{},s=e.$defs??e.definitions;return s&&typeof s=="object"?s:{}}function Fu(t,e){for(const s of Object.values(e.manifest?.blocks??{})){const n=s[t];if(n)return n}}function sn(t,e,s){if(Array.isArray(t))return t.map(i=>sn(i,e,s));if(!t||typeof t!="object")return t;const n=t;if(typeof n.$ref=="string"){if(s>=Lu)return{};const i=n.$ref.split("/").pop()??"",r=e[i];return r===void 0?{}:sn(r,e,s+1)}const a={};for(const[i,r]of Object.entries(n))a[i]=sn(r,e,s);return a}function zu(t,e){const s=Ku(e),n=sn(Fu(t,e),s,0);if(!n||typeof n!="object")return{};const a=n,i=a.allOf,r=Array.isArray(i)&&i.length===1?i[0]:a;if(!r||typeof r!="object")return{};const{$schema:c,...l}=r,d=Ho(l);return JSON.stringify(d).length>Iu?Ho(l,!0):d}function Ho(t,e=!1){const s={...t},n=s.properties;if(n&&typeof n=="object"){const a=Object.fromEntries(Object.entries(n).filter(([i])=>!i.startsWith("__")).map(([i,r])=>[i,e?Ei(r):r]));s.properties=a,s.required=Ou(s,a),s.required||delete s.required}return s}function Ei(t){if(!t||typeof t!="object")return t;const e=t,s={};for(const n of["type","description","format","options","enum"])n in e&&(s[n]=e[n]);return Array.isArray(e.anyOf)&&(s.anyOf=e.anyOf.map(Ei)),s}function Mu(t){if(t==null)return null;if(Array.isArray(t))return"array";const e=typeof t;return e==="number"||e==="boolean"||e==="string"||e==="object"?e:null}function Vu(t,e){const s=t.properties;if(!e||!s||typeof s!="object")return t;const n=s;let a=!1;const i={};for(const[r,c]of Object.entries(n)){const l=c&&typeof c=="object"?{...c}:c,d=l?.type,u=Mu(e[r]);l&&typeof l=="object"&&u&&typeof d=="string"&&d!==u&&(delete l.type,delete l.enum,a=!0),i[r]=l}return a?{...t,properties:i}:t}const Uu={Paragraph:{html:"<p>A dúvida entre 9000 ou 12000 BTUs é a mais comum na hora de escolher.</p>"},Heading:{text:"Antes de escolher: o resumo",level:"h2"},Quote:{quote:"Levei só a mala de bordo e não senti falta de nada.",attribution:"Ana, leitora"},List:{items:`<strong>Tecnologia Inverter:</strong> temperatura mais estável;
|
|
22
|
-
<strong>Gaveta HortiNatura:</strong> frescor por duas vezes mais tempo;`,style:"unordered"},BlockImage:{url:"https://cdn.exemplo.com/2026/10/mochila.webp",alt:"Mochila escolar azul apoiada em uma cadeira de sala de aula",size:"full"},Video:{url:"https://www.youtube.com/watch?v=dQw4w9WgXcQ",caption:"Como medir a capacidade da mala"},Divider:{},Cta:{text:"Ver toda a linha Escolar",href:"/escolar"},Callout:{title:"VOCÊ SABIA?",body:"Pediatras recomendam que a mochila carregada não passe de 10% do peso da criança.",variant:"tip"},Code:{code:"const total = itens.length;",language:"ts"},Stat:{value:"30%",label:"menos desperdício",description:"Comparado ao modelo anterior da mesma linha."},StatGroup:{stats:'[{"value":"30%","label":"menos desperdício"},{"value":"2x","label":"mais frescor"}]'},CardGroup:{cards:'[{"title":"Pré-escola","body":"Pouco material, mochila pequena."},{"title":"Fundamental","body":"Cadernos e livros pesam; considere rodinhas."}]'},Checklist:{title:"Antes de comprar, confira",items:'["Capacidade em litros","Alças acolchoadas","Compartimento para notebook"]'},Steps:{title:"Como medir",steps:'[{"title":"Meça a altura","description":"Da base ao topo, sem as alças."},{"title":"Some a profundidade"}]'},Comparison:{left:'{"title":"Com rodinhas","items":["Poupa a coluna","Mais pesada vazia"]}',right:'{"title":"De costas","items":["Mais leve","Exige ajuste das alças"]}'},Table:{headers:'["Modelo","Capacidade","Preço"]',rows:'[["Bordo","38L","R$ 399"],["Média","68L","R$ 599"]]'}},Gu=600;function Hu(t,e){for(const{payload:s}of ht(e,"posts"))for(const n of at(s.sections)){const a=Te(n);if(!a||a.__resolveType!==t)continue;const{__resolveType:i,...r}=a;if(Object.keys(r).length!==0&&!(JSON.stringify(r).length>Gu))return r}}function Yu(t,e,s,n){const a=Du(e,n),i=fo(e,n),r=new Set(Ci(t.value,i)),c=a.filter(g=>r.has(g.resolveType)),l=c.length>0?c:a,d=new Set,u=[];for(const g of l){if(d.has(g.name)||i[g.name]!==g.resolveType)continue;d.add(g.name);const m=Hu(g.resolveType,s)??Uu[g.name];u.push({name:g.name,title:g.title,description:g.description??"",schema:Vu(zu(g.resolveType,e),m),example:m})}return u}function fo(t,e){const s={};for(const n of bi(t,e)){const a=En(n.resolveType);a in s||(s[a]=n.resolveType)}return s}function Wu(t,e,s={}){const n=[];for(const a of t){const i=e[a.type];if(!i)continue;const r=Qu(a.props,a.productIds??[],s[a.type]);n.push({__resolveType:i,...r})}return n}const qu=["product","products"];function Xu(t){const e=Te(t);return e?qu.find(s=>s in e)??null:null}function Qu(t,e,s){const n=e.filter(Boolean),a=Xu(s);if(n.length===0||!a)return t;const i=s[a];return{...t,[a]:Ud(i,n)}}const mo=80;function Pi(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,mo)}function Vg(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+/,"").slice(0,mo)}function Yo(t,e){const s=mo-e.length-1;return`${t.slice(0,s).replace(/-+$/,"")}-${e}`}function Ai(t,e,s){const n=Pi(t)||`${s}-${_s(6)}`,a=new Set(e);if(!a.has(n))return n;for(let i=2;i<100;i++){const r=Yo(n,String(i));if(!a.has(r))return r}return Yo(n,_s(4))}function _i(t,e){return Ai(t,e,"post")}function Ju(t,e){return Ai(t,e,"category")}function Zu({draft:t,resolveTypes:e,productShapes:s,categories:n,authors:a,planning:i,takenSlugs:r,now:c}){const l=new Set(t.categorySlugs),d=new Set(t.authorEmails),u={title:t.title,slug:_i(t.title,r),date:c.toISOString().slice(0,10),excerpt:t.excerpt,image:t.cover.url,alt:t.cover.alt,authors:a.filter(g=>d.has(g.email)),categories:n.filter(g=>l.has(g.slug)),seo:{title:t.seo.title,description:t.seo.description,image:t.cover.url},sections:Wu(t.sections,e,s),planning:i??{}};return dn(u,"awaiting_review",c)}function mn(t){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const Di=/^(\d{4})-(\d{2})-(\d{2})$/;function gn(t){const e=t.trim();if(!e)return null;const s=Di.exec(e);if(s){const a=Number(s[1]),i=Number(s[2])-1,r=Number(s[3]),c=new Date(a,i,r);return c.getMonth()===i&&c.getDate()===r?c:null}const n=new Date(e);return Number.isNaN(n.getTime())?null:pc(n)}function ep(t){const e=new Date(t.getFullYear(),t.getMonth(),t.getDate(),ci);return{...hi("posts"),status:"scheduled",scheduledDatetime:e.toISOString(),date:mn(t)}}function tp(t){if(typeof t!="string")return null;const e=t.trim();if(!e)return null;if(Di.test(e))return gn(e);const s=new Date(e);return Number.isNaN(s.getTime())?null:s}function sp(t,e){const s=tp(t.scheduledDatetime);if(!s)return null;const n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()),a={...t,scheduledDatetime:n.toISOString()};return(typeof t.date=="string"?t.date:"")===mn(s)&&(a.date=mn(n)),a}function np(t){return gn(t.scheduledDatetime)??gn(t.date)}function Ug(t){const e=new Map,s=[];for(const a of t){const i={post:a,scheduled:gn(a.scheduledDatetime)!==null},r=np(a);if(!r){s.push(i);continue}const c=mn(r),l=e.get(c);l?l.push(i):e.set(c,[i])}const n=(a,i)=>Number(i.scheduled)-Number(a.scheduled)||a.post.title.localeCompare(i.post.title);for(const a of e.values())a.sort(n);return s.sort(n),{byDay:e,undated:s}}const hn={draft:"sandbox.postBoard.laneDraft",generating:"sandbox.postBoard.laneGenerating",awaiting_review:"sandbox.postBoard.laneAwaitingReview",scheduled:"sandbox.postBoard.laneScheduled",published:"sandbox.postBoard.lanePublished",archived:"sandbox.postBoard.laneArchived"};function op({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,onMoved:a}){const i=Ee(),r=fc({orgSlug:t,virtualMcpId:e,branch:s}),[c,l]=F.useState(new Set),d=f=>ps(n[f],"posts"),u=(f,p,y=d(f))=>p==="generating"?{kind:"not-a-target"}:c.has(Ms(f))?{kind:"in-flight"}:eu(y,p)?{kind:"incomplete"}:null,g=f=>{switch(f.kind){case"incomplete":return i("sandbox.postBoard.moveBlocked");case"in-flight":return i("sandbox.postBoard.moveInFlight");case"not-a-target":return i("sandbox.postBoard.moveNotATarget");default:return String(f)}};return{apply:async(f,p,y,j)=>{const E=y??d(f);if(Ds(E)===p)return null;const x=u(f,p,E);if(x)return x.kind!=="in-flight"&&ke.error(g(x)),null;const S=Ms(f);l(v=>new Set(v).add(S));const C=iu({key:f,payload:E},p,new Date),b=Object.keys(C.writes)[0]??f;b!==f&&a?.(f,b);try{return await r.move(C,{shown:j}),b}catch(v){return b!==f&&a?.(b,f),v instanceof gl||ke.error(v instanceof Error?v.message:i("sandbox.postBoard.moveFailed")),null}finally{l(v=>{const T=new Set(v);return T.delete(S),T})}},refuse:u,reasonText:g,isMoving:f=>c.has(Ms(f))}}function Bi(){return Zn("hide_default_blog_blocks")}function ap(t){const e=ce.c(15),{value:s,onChange:n,placeholder:a,className:i,onFocus:r,onBlur:c,onKeyDown:l,spellCheck:d,readOnly:u,inputRef:g}=t,m=d===void 0?!0:d;let f;e[0]!==n?(f=j=>n(j.target.value),e[0]=n,e[1]=f):f=e[1];let p;e[2]!==i?(p=je("w-full resize-none border-0 bg-transparent p-0 outline-none [field-sizing:content] placeholder:text-muted-foreground/50 focus:ring-0",i),e[2]=i,e[3]=p):p=e[3];let y;return e[4]!==g||e[5]!==c||e[6]!==r||e[7]!==l||e[8]!==a||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p||e[13]!==s?(y=o.jsx("textarea",{ref:g,value:s,onChange:f,onInput:ip,onFocus:r,onBlur:c,onKeyDown:l,placeholder:a,spellCheck:m,readOnly:u,rows:1,className:p}),e[4]=g,e[5]=c,e[6]=r,e[7]=l,e[8]=a,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=s,e[14]=y):y=e[14],y}function ip(t){const e=t.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function pt(t){return typeof t=="string"?t:""}function Gg(t){const e=ce.c(11);let s,n;e[0]!==t?({className:s,...n}=t,e[0]=t,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let a;e[3]!==s?(a=je(s,"pr-9"),e[3]=s,e[4]=a):a=e[4];let i;e[5]!==n||e[6]!==a?(i=o.jsx(ap,{...n,className:a}),e[5]=n,e[6]=a,e[7]=i):i=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Yl,{size:18,"aria-hidden":!0,className:"pointer-events-none absolute right-2 top-3 text-muted-foreground/40 transition-opacity group-hover/editable:text-muted-foreground group-focus-within/editable:text-muted-foreground"}),e[8]=r):r=e[8];let c;return e[9]!==i?(c=o.jsxs("div",{className:"group/editable relative -mx-2 rounded-md px-2 transition-colors hover:bg-accent focus-within:bg-muted/50",children:[i,r]}),e[9]=i,e[10]=c):c=e[10],c}function Hg(t){const e=ce.c(5),{label:s,onClick:n,disabled:a}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(kn,{size:13}),e[0]=i):i=e[0];let r;return e[1]!==a||e[2]!==s||e[3]!==n?(r=o.jsxs("button",{type:"button",onClick:n,disabled:a,className:"flex items-center gap-1.5 rounded-lg border border-dashed px-2.5 py-1.5 text-xs text-muted-foreground transition-colors hover:border-foreground/30 hover:text-foreground disabled:opacity-40 disabled:hover:border-dashed disabled:hover:text-muted-foreground cursor-pointer",children:[i,s]}),e[1]=a,e[2]=s,e[3]=n,e[4]=r):r=e[4],r}function Yg(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(co,{className:"size-3.25"}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx(De,{variant:"ghost-destructive",size:"icon-xs",type:"button","aria-label":s,onClick:n,className:"opacity-0 transition-opacity group-hover/item:opacity-100",children:a}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function Wg(t){const e=ce.c(2),{children:s}=t;let n;return e[0]!==s?(n=o.jsx("div",{className:"absolute -top-9 left-0 z-10 flex items-center gap-0.5 rounded-md bg-popover p-0.5 shadow-soft",children:s}),e[0]=s,e[1]=n):n=e[1],n}function qg(t){if(Array.isArray(t))return t;if(typeof t!="string"||t.trim()==="")return[];try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}}function Wo(t){const e=ce.c(14),{options:s,value:n,emptyLabel:a,onChange:i}=t;let r;e[0]!==a||e[1]!==i||e[2]!==n?(r=a&&o.jsx(qo,{active:!n,onClick:()=>i(""),children:a}),e[0]=a,e[1]=i,e[2]=n,e[3]=r):r=e[3];let c;if(e[4]!==i||e[5]!==s||e[6]!==n){let d;e[8]!==i||e[9]!==n?(d=u=>o.jsx(qo,{active:u===n,onClick:()=>i(u),children:u},u),e[8]=i,e[9]=n,e[10]=d):d=e[10],c=s.filter(Boolean).map(d),e[4]=i,e[5]=s,e[6]=n,e[7]=c}else c=e[7];let l;return e[11]!==r||e[12]!==c?(l=o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,c]}),e[11]=r,e[12]=c,e[13]=l):l=e[13],l}function qo(t){const e=ce.c(7),{active:s,onClick:n,children:a}=t,i=s?"border-primary bg-primary text-primary-foreground":"bg-card hover:bg-accent";let r;e[0]!==i?(r=je("cursor-pointer rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",i),e[0]=i,e[1]=r):r=e[1];let c;return e[2]!==s||e[3]!==a||e[4]!==n||e[5]!==r?(c=o.jsx("button",{type:"button","aria-pressed":s,onClick:n,className:r,children:a}),e[2]=s,e[3]=a,e[4]=n,e[5]=r,e[6]=c):c=e[6],c}function Xg(t,e=[]){return typeof t=="string"?t:JSON.stringify(t??e)}const Zs=[{id:"campaign",label:"sandbox.generatePost.stepCampaign"},{id:"format",label:"sandbox.generatePost.stepFormat"},{id:"extra",label:"sandbox.generatePost.stepExtra"}],lp=[1,2,3],rp={companyName:"sandbox.blogBrand.companyNameLabel",language:"sandbox.blogBrand.languageLabel",description:"sandbox.blogBrand.descriptionLabel",tone:"sandbox.blogBrand.toneLabel",targetAudience:"sandbox.blogBrand.audienceLabel",dos:"sandbox.blogBrand.tabDos",avoid:"sandbox.blogBrand.tabGuardrails"};function cp({open:t,onOpenChange:e,decofile:s,hasAi:n,onGenerate:a}){const i=Ee(),r=xc(),[c,l]=F.useState("campaign"),[d,u]=F.useState(""),[g,m]=F.useState(""),[f,p]=F.useState(""),[y,j]=F.useState(""),[E,x]=F.useState(1),{merged:S}=ji(s),C=$u(S),b=Pu(s).filter(P=>P.status!=="finished"),v=b.find(P=>P.key===d),T=s[Au],w=ot(tt(T?.formats)),_=()=>{l("campaign"),u(""),m(""),p(""),j(""),x(1)},O=P=>{e(P),P||_()},R=Zs.findIndex(P=>P.id===c),K=c==="campaign"?!!v:c==="format"?g.trim().length>0&&f.trim().length>0:!0,k=c==="extra",z=()=>{v&&(a({campaign:v,format:{name:g.trim(),value:f.trim()},extraInstructions:y.trim()||void 0,count:E,fileConfigId:wl(r.data?.configs??[],null,typeof window<"u"?window.localStorage.getItem(Sl):null)??void 0}),O(!1))};return o.jsx(As,{open:t,onOpenChange:O,children:o.jsxs(Ps,{className:"flex max-h-[85vh] flex-col sm:max-w-2xl",children:[o.jsxs(Ys,{children:[o.jsx(Es,{children:i("sandbox.generatePost.title")}),o.jsx(Xn,{children:i("sandbox.generatePost.subtitle")})]}),C.length>0?o.jsx("p",{className:"text-sm text-muted-foreground",children:i("sandbox.generatePost.blockedBrand",{fields:C.map(P=>i(rp[P])).join(", ")})}):o.jsxs(o.Fragment,{children:[o.jsx("ol",{className:"flex shrink-0 items-center gap-1.5 text-xs",children:Zs.map((P,I)=>o.jsx("li",{className:je("rounded-md px-2 py-1",I===R?"bg-primary text-primary-foreground":I<R?"text-foreground":"text-muted-foreground"),children:i(P.label)},P.id))}),o.jsxs("div",{className:"min-h-0 flex-1 space-y-4 overflow-y-auto py-1",children:[c==="campaign"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.campaignHint")}),b.length===0?o.jsx("p",{className:"rounded-lg border border-dashed px-3 py-6 text-center text-sm text-muted-foreground",children:i("sandbox.generatePost.noCampaigns")}):o.jsx(dp,{campaigns:b,chosen:d,onChoose:u})]}),c==="format"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatHint")}),o.jsx(Wo,{options:w.map(P=>P.name),value:g,onChange:P=>{m(P),p(w.find(I=>I.name===P)?.value??"")}}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{htmlFor:"generate-format-name",children:i("sandbox.generatePost.formatNameLabel")}),o.jsx(ms,{id:"generate-format-name",value:g,onChange:P=>m(P.target.value),placeholder:i("sandbox.generatePost.formatNamePlaceholder")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{htmlFor:"generate-format-value",children:i("sandbox.generatePost.formatValueLabel")}),o.jsx(Ao,{id:"generate-format-value",value:f,onChange:P=>p(P.target.value),placeholder:i("sandbox.generatePost.formatValuePlaceholder"),rows:4})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatBlocksHint")})]}),c==="extra"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{htmlFor:"generate-extra",children:i("sandbox.generatePost.extraLabel")}),o.jsx(Ao,{id:"generate-extra",value:y,onChange:P=>j(P.target.value),placeholder:i("sandbox.generatePost.extraPlaceholder"),rows:4})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(cs,{children:i("sandbox.generatePost.countLabel")}),o.jsx(Wo,{options:lp.map(String),value:String(E),onChange:P=>x(Number(P)||1)}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.countHint")})]}),o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.coverHint")})]})]}),o.jsxs(Ws,{className:"shrink-0 sm:justify-between",children:[o.jsx(De,{type:"button",variant:"outline",disabled:R===0,onClick:()=>l(Zs[R-1].id),children:i("sandbox.generatePost.back")}),k?o.jsxs(De,{type:"button",disabled:!n,onClick:z,children:[o.jsx(cn,{size:14}),i("sandbox.generatePost.generate",{count:String(E)})]}):o.jsx(De,{type:"button",disabled:!K,onClick:()=>l(Zs[R+1].id),children:i("sandbox.generatePost.next")})]})]})]})})}function dp(t){const e=ce.c(11),{campaigns:s,chosen:n,onChoose:a}=t,i=Ee();let r;if(e[0]!==s||e[1]!==n||e[2]!==a||e[3]!==i){let l;e[5]!==n||e[6]!==a||e[7]!==i?(l=d=>o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>a(d.key),className:je("w-full cursor-pointer rounded-lg border bg-card p-2.5 text-left transition-colors hover:border-primary/40",n===d.key&&"border-primary"),children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:d.name||i("sandbox.campaigns.untitled")}),o.jsx(wn,{variant:"outline",size:"sm",className:"shrink-0",children:d.intent.products.length>0?i("sandbox.generatePost.campaignProducts",{count:String(d.intent.products.length)}):i("sandbox.generatePost.campaignNoProducts")})]}),d.trigger.note&&o.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:d.trigger.note})]})},d.key),e[5]=n,e[6]=a,e[7]=i,e[8]=l):l=e[8],r=s.map(l),e[0]=s,e[1]=n,e[2]=a,e[3]=i,e[4]=r}else r=e[4];let c;return e[9]!==r?(c=o.jsx("ul",{className:"space-y-1.5",children:r}),e[9]=r,e[10]=c):c=e[10],c}function up(t){const e=[];for(let s=0;e.length<Fo;s+=1){const n=e.length;for(const a of t){const i=a.images?.[s];if(i&&(e.push(i),e.length>=Fo))return e}if(e.length===n)break}return e}const pp={"no-store-data":"sandbox.generatePost.gapNoStoreData","sections-dropped":"sandbox.generatePost.gapSectionsDropped","no-bucket":"sandbox.generatePost.gapNoBucket","no-image-model":"sandbox.generatePost.gapNoImageModel","images-failed":"sandbox.generatePost.gapImagesFailed","drafts-failed":"sandbox.generatePost.gapDraftsFailed"};function fp({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,meta:a,onStarted:i}){const r=Ee(),c=Zi(),l=Bi(),d=vn({orgSlug:t,virtualMcpId:e,branch:s});return async u=>{const g={campaignKey:u.campaign.key,format:u.format,brief:u.campaign.trigger.note},m=dn(fi({title:u.campaign.name,planning:g,now:new Date}),"generating",new Date),f=Array.from({length:u.count},()=>un(Gn())),{merged:p}=ji(n),y=ju(p),j=ht(n,"categories").map(({payload:w})=>({name:pt(w.name),slug:pt(w.slug)})).filter(w=>w.slug),E=Qd(n),x=Yu(u.format,a,n,{hideDefaults:l}),S=Object.fromEntries(x.map(w=>[w.name,w.example])),C=async(w,_=f.length)=>{for(const O of f.slice(w,_))try{await d.mutateAsync({blockKey:O,data:fs(O,dn(m,"draft",new Date))})}catch(R){console.warn("[generatePost] could not reset a card",R)}},b=async(w,_)=>{if(!_.fileConfigId||w.length===0)return new Map;try{const O=await c.call("BLOG_POST_ILLUSTRATE",{requests:w.map((R,K)=>({id:String(K),prompt:R.cover.prompt,alt:R.cover.alt})),productImages:up(_.campaign.intent.products),companyName:y.companyName??"",fileConfigId:_.fileConfigId});return new Map(O.images.map(R=>[R.id,R.url]))}catch(O){return console.warn("[generatePost] illustrating failed",O),new Map}};let v=0;try{for(const w of f)await d.mutateAsync({blockKey:w,data:fs(w,m)}),v+=1}catch(w){await C(0,v),ke.error(w instanceof Error?w.message:r("sandbox.generatePost.failed"));return}i?.(f);let T=0;try{const w=await c.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"post",focus:`${u.campaign.name}: ${u.campaign.trigger.note}`,language:y.language}).catch(k=>{console.warn("[generatePost] grounding failed",k)}),_=await c.call("BLOG_POST_DRAFT",{virtualMcpId:e,grounding:w?{report:w.report,outcome:w.outcome}:void 0,brand:{companyName:y.companyName,description:y.description,language:y.language,storeUrl:y.storeUrl,targetAudience:y.targetAudience,tone:y.tone,dos:y.dos,avoid:y.avoid,vocabulary:y.vocabulary,voiceExamples:y.voiceExamples},campaign:{name:u.campaign.name,period:u.campaign.period,trigger:u.campaign.trigger,intent:{objective:u.campaign.intent.objective,targets:u.campaign.intent.targets,products:u.campaign.intent.products,keywords:u.campaign.intent.keywords},guardrails:u.campaign.guardrails},format:u.format,blocks:x,categories:j,authors:E.map(({name:k,email:z})=>({name:k,email:z})),extraInstructions:u.extraInstructions?.trim()||void 0,count:u.count}),O=await b(_.posts,u),R=fo(a,{hideDefaults:l}),K=di(n).map(k=>k.slug);for(const[k,z]of _.posts.entries()){const P=f[k];if(!P)break;const I=Zu({draft:{...z,cover:{...z.cover,url:O.get(String(k))??""}},resolveTypes:R,productShapes:S,categories:j,authors:E,planning:g,takenSlugs:K,now:new Date});K.push(pt(I.slug)),await d.mutateAsync({blockKey:P,data:fs(P,I)}),T=k+1}await C(T),_.posts.length>0&&ke.success(r("sandbox.generatePost.done",{count:String(_.posts.length)}));for(const k of _.gaps)ke.warning(r(pp[k.code],{count:k.count??0}))}catch(w){await C(T),ke.error(w instanceof Error?w.message:r("sandbox.generatePost.failed"))}}}const mp=/<(h[1-6]|p|ul|ol|div|img|br|blockquote|section|article|figure)\b|<\/[a-z]/i;function Ri(t){return mp.test(t)}function gp(t){const e=t.trim();return e?Ri(e)?wp(e):Cp(e):{title:"",sections:[]}}function go(t){return t.replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/�?39;|'/gi,"'").replace(/&/gi,"&")}function Is(t){let e=t,s;do s=e,e=e.replace(/<[^>]+>/g,"");while(e!==s);return go(e).replace(/\s+/g," ").trim()}function hp(t){let e=t,s;do s=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==s);return e}function xp(t){let e=t,s;do s=e,e=e.replace(/<(script|style)\b[\s\S]*?<\/\1\s*>/gi,"");while(e!==s);return e}function $i(t){let e=t,s;do s=e,e=xp(hp(e));while(e!==s);return e}const bp=/^(a|b|strong|i|em|u|s|code|br|span|sub|sup)$/;function xn(t){let e="";for(const s of t)s.charCodeAt(0)>31&&(e+=s);return e=e.trim(),!/^[a-z][a-z0-9+.-]*:/i.test(e)||/^(https?|mailto|tel):/i.test(e)}function yp(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}const vp=/^<\/?([a-z][a-z0-9]*)\b([^>]*)>/i;function kp(t,e,s){const n=e.toLowerCase();if(!bp.test(n))return"";if(t.startsWith("</"))return`</${n}>`;if(n!=="a")return`<${n}>`;const a=go(s.match(/href\s*=\s*"([^"]*)"/i)?.[1]??"");return xn(a)&&a?`<a href="${yp(a)}">`:"<a>"}function Oi(t){const e=$i(t);let s="",n=0;for(;n<e.length;){const a=e.indexOf("<",n);if(a===-1){s+=e.slice(n);break}s+=e.slice(n,a);const i=vp.exec(e.slice(a));if(!i){s+="<",n=a+1;continue}s+=kp(i[0],i[1]??"",i[2]??""),n=a+i[0].length}return s}function en(t,e){const s=t.match(new RegExp(`${e}\\s*=\\s*"([^"]*)"`,"i"));return s?.[1]?go(s[1]):""}const jp=/<(h[1-6]|p|ul|ol|blockquote|figure)\b[^>]*>([\s\S]*?)<\/\1\s*>|<hr\b[^>]*\/?>|<img\b[^>]*>/gi;function wp(t){const e=$i(t);let s="";const n=[];for(const a of e.matchAll(jp)){const i=a[1]?.toLowerCase(),r=a[2]??"",c=a[0];if(!i){if(/^<img/i.test(c)){const l=en(c,"src");l&&xn(l)&&n.push({kind:"image",url:l,alt:en(c,"alt"),caption:""})}else n.push({kind:"divider"});continue}if(/^h[1-6]$/.test(i)){const l=Is(r);if(!l)continue;if(i==="h1"&&!s){s=l;continue}n.push({kind:"heading",text:l,level:i.slice(1)})}else if(i==="p"){const l=Oi(r.trim());Is(l)&&n.push({kind:"paragraph",html:l})}else if(i==="ul"||i==="ol"){const l=[...r.matchAll(/<li\b[^>]*>([\s\S]*?)<\/li\s*>/gi)].map(d=>Is(d[1]??"")).filter(Boolean);l.length&&n.push({kind:"list",items:l,ordered:i==="ol"})}else if(i==="blockquote"){const l=Is(r);l&&n.push({kind:"quote",text:l})}else if(i==="figure"){const l=r.match(/<img\b[^>]*>/i)?.[0],d=l?en(l,"src"):"",u=Is(r.match(/<figcaption\b[^>]*>([\s\S]*?)<\/figcaption\s*>/i)?.[1]??"");d&&xn(d)&&n.push({kind:"image",url:d,alt:l?en(l,"alt"):"",caption:u})}}return{title:s,sections:n}}function Sp(t){return t.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g,'<a href="$2">$1</a>').replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>").replace(/(^|[^*])\*([^*]+)\*/g,"$1<em>$2</em>").replace(/`([^`]+)`/g,"<code>$1</code>")}function Cp(t){const e=t.replace(/\r\n?/g,`
|
|
23
|
-
`).split(`
|
|
24
|
-
`);let s="";const n=[];let a=[],i=null,r=[];const c=()=>{a.length&&(n.push({kind:"paragraph",html:Oi(Sp(a.join(" ")))}),a=[])},l=()=>{i&&(n.push({kind:"list",items:i.items,ordered:i.ordered}),i=null)},d=()=>{r.length&&(n.push({kind:"quote",text:r.join(" ")}),r=[])},u=()=>{c(),l(),d()};for(const g of e){const m=g.trimEnd(),f=m.match(/^(#{1,6})\s+(.*)$/),p=m.match(/^!\[([^\]]*)\]\(([^)\s]+)\)\s*$/),y=m.match(/^\s*(?:[-*+]|\d+\.)\s+(.*)$/),j=/^\s*\d+\./.test(m),E=m.match(/^>\s?(.*)$/);if(!m.trim())u();else if(f){u();const x=f[2]?.trim()??"",S=String(f[1]?.length??1);S==="1"&&!s?s=x:x&&n.push({kind:"heading",text:x,level:S})}else if(/^(-{3,}|\*{3,}|_{3,})$/.test(m.trim()))u(),n.push({kind:"divider"});else if(p){u();const x=p[2]??"";xn(x)&&n.push({kind:"image",url:x,alt:p[1]??"",caption:""})}else y?(c(),d(),i||(i={items:[],ordered:j}),i.items.push(y[1]?.trim()??"")):E?(c(),l(),r.push(E[1]?.trim()??"")):(l(),d(),a.push(m.trim()))}return u(),{title:s,sections:n}}const Np={heading:"Heading",paragraph:"Paragraph",list:"List",quote:"Quote",divider:"Divider",image:"BlockImage"};function Tp(t,e){const s=[];for(const n of t){const a=e[Np[n.kind]];if(a)switch(n.kind){case"heading":s.push({__resolveType:a,text:n.text,level:n.level});break;case"paragraph":s.push({__resolveType:a,html:n.html});break;case"list":s.push({__resolveType:a,items:n.items.join(`
|
|
25
|
-
`),style:n.ordered?"ordered":"unordered"});break;case"quote":s.push({__resolveType:a,quote:n.text});break;case"divider":s.push({__resolveType:a});break;case"image":s.push({__resolveType:a,url:n.url,alt:n.alt,caption:n.caption,size:"normal"});break}}return s}function Ep({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?_i(a,s):Pi(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const Xo="__all__",Qo={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},Pp={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},Jo="status:";function Zo(t){if(!t.startsWith(Jo))return null;const e=t.slice(Jo.length);return po.includes(e)?e:null}const ea=F.forwardRef(function(e,s){const n=ce.c(20);let a,i,r,c,l;n[0]!==e?({icon:a,active:i,value:l,className:r,...c}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=c,n[5]=l):(a=n[1],i=n[2],r=n[3],c=n[4],l=n[5]);const d=i?"text-foreground":"text-muted-foreground";let u;n[6]!==r||n[7]!==d?(u=je("gap-1 px-1.5 text-xs",d,r),n[6]=r,n[7]=d,n[8]=u):u=n[8];let g;n[9]!==a?(g=o.jsx(a,{size:14,className:"shrink-0"}),n[9]=a,n[10]=g):g=n[10];let m;n[11]!==l?(m=l&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:l}),n[11]=l,n[12]=m):m=n[12];let f;n[13]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(Us,{size:12,className:"shrink-0 opacity-60"}),n[13]=f):f=n[13];let p;return n[14]!==c||n[15]!==s||n[16]!==u||n[17]!==g||n[18]!==m?(p=o.jsxs(De,{ref:s,type:"button",variant:"ghost",size:"sm",className:u,...c,children:[g,m,f]}),n[14]=c,n[15]=s,n[16]=u,n[17]=g,n[18]=m,n[19]=p):p=n[19],p});function ho(t){const e=ce.c(2),{count:s}=t;let n;return e[0]!==s?(n=o.jsx("span",{className:"ml-auto pl-3 text-xs text-muted-foreground tabular-nums",children:s}),e[0]=s,e[1]=n):n=e[1],n}function Ap(t){const e=ce.c(19),{value:s,onChange:n}=t,a=Ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=m=>n(m.target.value),e[1]=n,e[2]=r):r=e[2];let c;e[3]!==a?(c=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==a?(l=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=l):l=e[6];let d;e[7]!==r||e[8]!==c||e[9]!==l||e[10]!==s?(d=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:c,"aria-label":l,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=c,e[9]=l,e[10]=s,e[11]=d):d=e[11];let u;e[12]!==n||e[13]!==a||e[14]!==s?(u=s&&o.jsx(Li,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=u):u=e[15];let g;return e[16]!==d||e[17]!==u?(g=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,d,u]}),e[16]=d,e[17]=u,e[18]=g):g=e[18],g}function _p(t){const e=ce.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:c,sort:l,onCategoryFilterChange:d,onAuthorFilterChange:u,onStatusFilterChange:g,onSortChange:m}=t,f=Ee();let p;if(e[0]!==s||e[1]!==i){let J;e[3]!==i?(J=D=>D.slug===i,e[3]=i,e[4]=J):J=e[4],p=s.find(J),e[0]=s,e[1]=i,e[2]=p}else p=e[2];const y=p;let j;if(e[5]!==r||e[6]!==n){let J;e[8]!==r?(J=D=>D.email===r,e[8]=r,e[9]=J):J=e[9],j=n.find(J),e[5]=r,e[6]=n,e[7]=j}else j=e[7];const E=j,x=!!(i||r||c);let S;e[10]!==E?.name||e[11]!==y?.name||e[12]!==c||e[13]!==f?(S=y?.name??E?.name??f(c?hn[c]:"sandbox.postToolbar.filterLabel"),e[10]=E?.name,e[11]=y?.name,e[12]=c,e[13]=f,e[14]=S):S=e[14];const C=S,b=i?`cat:${i}`:r?`author:${r}`:c?`status:${c}`:Xo;let v;e[15]!==u||e[16]!==d||e[17]!==g?(v=()=>{d(null),u(null),g(null)},e[15]=u,e[16]=d,e[17]=g,e[18]=v):v=e[18];const T=v;let w;e[19]!==T||e[20]!==u||e[21]!==d||e[22]!==g?(w=J=>{J.startsWith("cat:")?(u(null),g(null),d(J.slice(4))):J.startsWith("author:")?(d(null),g(null),u(J.slice(7))):Zo(J)?(d(null),u(null),g(Zo(J))):T()},e[19]=T,e[20]=u,e[21]=d,e[22]=g,e[23]=w):w=e[23];const _=w;let O;e[24]!==C||e[25]!==x?(O=o.jsx(nn,{asChild:!0,children:o.jsx(ea,{icon:Wl,active:x,value:C,className:"min-w-0 shrink"})}),e[24]=C,e[25]=x,e[26]=O):O=e[26];let R;e[27]!==f?(R=f("sandbox.postToolbar.filterBy"),e[27]=f,e[28]=R):R=e[28];let K;e[29]!==R?(K=o.jsx($s,{children:R}),e[29]=R,e[30]=K):K=e[30];let k;e[31]!==f?(k=f("sandbox.postToolbar.allPosts"),e[31]=f,e[32]=k):k=e[32];let z;e[33]!==k?(z=o.jsx(Fs,{value:Xo,children:k}),e[33]=k,e[34]=z):z=e[34];let P;e[35]!==f?(P=f("sandbox.postToolbar.statusLabel"),e[35]=f,e[36]=P):P=e[36];let I;e[37]!==P?(I=o.jsx($s,{className:"text-muted-foreground/70",children:P}),e[37]=P,e[38]=I):I=e[38];let U;e[39]!==a||e[40]!==f?(U=po.map(J=>o.jsxs(Fs,{value:`status:${J}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:f(hn[J])}),o.jsx(ho,{count:a[J]??0})]},`status:${J}`)),e[39]=a,e[40]=f,e[41]=U):U=e[41];let q;e[42]!==s.length||e[43]!==f?(q=s.length>0&&o.jsx($s,{className:"text-muted-foreground/70",children:f("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=f,e[44]=q):q=e[44];let Y;e[45]!==s?(Y=s.map(Bp),e[45]=s,e[46]=Y):Y=e[46];let Q;e[47]!==n.length||e[48]!==f?(Q=n.length>0&&o.jsx($s,{className:"text-muted-foreground/70",children:f("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=f,e[49]=Q):Q=e[49];let A;e[50]!==n?(A=n.map(Dp),e[50]=n,e[51]=A):A=e[51];let G;e[52]!==b||e[53]!==_||e[54]!==z||e[55]!==I||e[56]!==U||e[57]!==q||e[58]!==Y||e[59]!==Q||e[60]!==A?(G=o.jsxs(jo,{value:b,onValueChange:_,children:[z,I,U,q,Y,Q,A]}),e[52]=b,e[53]=_,e[54]=z,e[55]=I,e[56]=U,e[57]=q,e[58]=Y,e[59]=Q,e[60]=A,e[61]=G):G=e[61];let $;e[62]!==G||e[63]!==K?($=o.jsxs(on,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[K,G]}),e[62]=G,e[63]=K,e[64]=$):$=e[64];let N;e[65]!==$||e[66]!==O?(N=o.jsxs(an,{children:[O,$]}),e[65]=$,e[66]=O,e[67]=N):N=e[67];let L;e[68]!==T||e[69]!==x||e[70]!==f?(L=x&&o.jsx(Li,{label:f("sandbox.postToolbar.clearFilter"),onClick:T}),e[68]=T,e[69]=x,e[70]=f,e[71]=L):L=e[71];const de=Pp[l];let ne;e[72]!==f||e[73]!==de?(ne=f(de),e[72]=f,e[73]=de,e[74]=ne):ne=e[74];let ie;e[75]!==ne?(ie=o.jsx(nn,{asChild:!0,children:o.jsx(ea,{icon:ql,active:!0,value:ne})}),e[75]=ne,e[76]=ie):ie=e[76];let fe;e[77]!==f?(fe=f("sandbox.postToolbar.sortBy"),e[77]=f,e[78]=fe):fe=e[78];let ue;e[79]!==fe?(ue=o.jsx($s,{children:fe}),e[79]=fe,e[80]=ue):ue=e[80];let te;e[81]!==m?(te=J=>m(J),e[81]=m,e[82]=te):te=e[82];let le;e[83]===Symbol.for("react.memo_cache_sentinel")?(le=Object.keys(Qo),e[83]=le):le=e[83];let oe;e[84]!==f?(oe=le.map(J=>o.jsx(Fs,{value:J,children:f(Qo[J])},J)),e[84]=f,e[85]=oe):oe=e[85];let be;e[86]!==l||e[87]!==te||e[88]!==oe?(be=o.jsx(jo,{value:l,onValueChange:te,children:oe}),e[86]=l,e[87]=te,e[88]=oe,e[89]=be):be=e[89];let M;e[90]!==ue||e[91]!==be?(M=o.jsxs(on,{align:"end",className:"w-44",children:[ue,be]}),e[90]=ue,e[91]=be,e[92]=M):M=e[92];let re;e[93]!==ie||e[94]!==M?(re=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(an,{children:[ie,M]})}),e[93]=ie,e[94]=M,e[95]=re):re=e[95];let me;return e[96]!==N||e[97]!==L||e[98]!==re?(me=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[N,L,re]}),e[96]=N,e[97]=L,e[98]=re,e[99]=me):me=e[99],me}function Dp(t){return o.jsxs(Fs,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(ho,{count:t.count})]},`author:${t.email}`)}function Bp(t){return o.jsxs(Fs,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(ho,{count:t.count})]},`cat:${t.slug}`)}function Li(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(Qn,{size:12}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx("button",{type:"button","aria-label":s,onClick:n,className:"flex h-6 w-6 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:bg-accent hover:text-foreground cursor-pointer rounded-lg",children:a}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function Rp(t){const e=ce.c(18),{checked:s,disabled:n,onToggle:a}=t,i=Ee();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let c;e[2]!==s||e[3]!==i?(c=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=c):c=e[4];let l;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==c?(l=o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:$p,children:o.jsx(jn,{checked:s,disabled:n,onCheckedChange:r,"aria-label":c})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=c,e[9]=l):l=e[9];let d;e[10]!==s||e[11]!==i?(d=i(s?"sandbox.postToolbar.deselectAll":"sandbox.postToolbar.selectAll"),e[10]=s,e[11]=i,e[12]=d):d=e[12];let u;e[13]!==d?(u=o.jsx(St,{side:"bottom",children:d}),e[13]=d,e[14]=u):u=e[14];let g;return e[15]!==l||e[16]!==u?(g=o.jsxs(Ct,{children:[l,u]}),e[15]=l,e[16]=u,e[17]=g):g=e[17],g}function $p(t){return t.stopPropagation()}function Op(t){const e=ce.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,c=Ee();let l;e[0]!==n||e[1]!==a?(l=o.jsx(Rp,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=l):l=e[2];let d;e[3]!==s||e[4]!==c?(d=c("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=c,e[5]=d):d=e[5];let u;e[6]!==d?(u=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:d}),e[6]=d,e[7]=u):u=e[7];const g=s===0;let m;e[8]!==c?(m=c("sandbox.postToolbar.archiveSelectedPosts"),e[8]=c,e[9]=m):m=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(el,{size:14}),e[10]=f):f=e[10];let p;e[11]!==i||e[12]!==g||e[13]!==m?(p=o.jsx(wt,{asChild:!0,children:o.jsx(De,{type:"button",variant:"ghost",size:"icon-sm",disabled:g,onClick:i,"aria-label":m,children:f})}),e[11]=i,e[12]=g,e[13]=m,e[14]=p):p=e[14];let y;e[15]!==c?(y=c("sandbox.postToolbar.archiveSelected"),e[15]=c,e[16]=y):y=e[16];let j;e[17]!==y?(j=o.jsx(St,{side:"bottom",children:y}),e[17]=y,e[18]=j):j=e[18];let E;e[19]!==p||e[20]!==j?(E=o.jsxs(Ct,{children:[p,j]}),e[19]=p,e[20]=j,e[21]=E):E=e[21];let x;e[22]!==c?(x=c("sandbox.postToolbar.exitSelection"),e[22]=c,e[23]=x):x=e[23];let S;e[24]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(Qn,{size:14}),e[24]=S):S=e[24];let C;e[25]!==r||e[26]!==x?(C=o.jsx(wt,{asChild:!0,children:o.jsx(De,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":x,children:S})}),e[25]=r,e[26]=x,e[27]=C):C=e[27];let b;e[28]!==c?(b=c("sandbox.postToolbar.exitSelection"),e[28]=c,e[29]=b):b=e[29];let v;e[30]!==b?(v=o.jsx(St,{side:"bottom",children:b}),e[30]=b,e[31]=v):v=e[31];let T;e[32]!==C||e[33]!==v?(T=o.jsxs(Ct,{children:[C,v]}),e[32]=C,e[33]=v,e[34]=T):T=e[34];let w;e[35]!==E||e[36]!==T?(w=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[E,T]}),e[35]=E,e[36]=T,e[37]=w):w=e[37];let _;return e[38]!==l||e[39]!==w||e[40]!==u?(_=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[l,u,w]}),e[38]=l,e[39]=w,e[40]=u,e[41]=_):_=e[41],_}const Lp={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},Wn="generating",Ip=[Wn,...po.filter(t=>t!==Wn)],ta=t=>t.scheduledDatetime||t.date||"",Kp=(t,e)=>ta(e).localeCompare(ta(t)),Fp=t=>t==="scheduled"||t==="published",Ii="application/x-post-key";function zp(t){const e=ce.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:c,onViewChange:l,onOpen:d,onClose:u,move:g,meta:m,renderDetail:f}=t,p=Ee();let y;e[0]!==a||e[1]!==s||e[2]!==n?(y={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=y):y=e[3];const j=vn(y),E=hc().length>0,x=Ga(),S=Bi(),[C,b]=F.useState(null),[v,T]=F.useState(!1),[w,_]=F.useState(!1),[O,R]=F.useState(!1),[K,k]=F.useState(""),z=F.useRef(null);let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P={},e[4]=P):P=e[4];const[I,U]=F.useState(P);let q;e[5]!==I?(q=(H,pe)=>I[H]??pe,e[5]=I,e[6]=q):q=e[6];const Y=q;let Q;e[7]===Symbol.for("react.memo_cache_sentinel")?(Q=(H,pe)=>U(Le=>({...Le,[H]:pe})),e[7]=Q):Q=e[7];const A=Q;let G;e[8]!==d?(G=H=>{const pe=H[0];pe&&d(pe)},e[8]=d,e[9]=G):G=e[9];let $;e[10]!==a||e[11]!==i||e[12]!==m||e[13]!==s||e[14]!==G||e[15]!==n?($={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:m,onStarted:G},e[10]=a,e[11]=i,e[12]=m,e[13]=s,e[14]=G,e[15]=n,e[16]=$):$=e[16];const N=fp($),L=au(i);let de;e[17]!==i?(de=H=>ps(i[H],"posts"),e[17]=i,e[18]=de):de=e[18];const ne=de,ie=c&&L.some(H=>H.key===c)?c:L[0]?.key??null;let fe;e[19]!==g||e[20]!==p?(fe=async H=>{await g.apply(H.key,"archived")&&ke.success(p("sandbox.postBoard.archived"))},e[19]=g,e[20]=p,e[21]=fe):fe=e[21];const ue=fe,[te,le]=F.useState(null),[oe,be]=F.useState(null),[M,re]=F.useState(null),[me,J]=F.useState("date-desc"),[D,Z]=F.useState("");let ae;e[22]===Symbol.for("react.memo_cache_sentinel")?(ae=new Set,e[22]=ae):ae=e[22];const[ye,Se]=F.useState(ae),_e=L.reduce(Hp,{}),we=H=>{const pe=new Map;for(const Le of L)for(const ut of H(Le))pe.set(ut,(pe.get(ut)??0)+1);return pe},Be=we(Gp),W=we(Up),se=ht(i,"categories").map(H=>{const{payload:pe}=H;return{slug:pt(pe.slug),name:pt(pe.name)||pt(pe.slug),count:Be.get(pt(pe.slug))??0}}),he=ht(i,"authors").map(H=>{const{payload:pe}=H;return{email:pt(pe.email),name:pt(pe.name)||pt(pe.email),count:W.get(pt(pe.email))??0}}),xe=D.trim().toLowerCase();let Re;e[23]!==te?(Re=H=>!te||H.categorySlugs.includes(te),e[23]=te,e[24]=Re):Re=e[24];let Ke;e[25]!==oe?(Ke=H=>!oe||H.authorEmails.includes(oe),e[25]=oe,e[26]=Ke):Ke=e[26];let Ge;e[27]!==M?(Ge=H=>!M||H.status===M,e[27]=M,e[28]=Ge):Ge=e[28];let $e;e[29]!==me?($e=(H,pe)=>{if(me==="az")return H.title.localeCompare(pe.title);if(me==="za")return pe.title.localeCompare(H.title);const Le=(H.scheduledDatetime||H.date).localeCompare(pe.scheduledDatetime||pe.date);return me==="date-asc"?Le:-Le},e[29]=me,e[30]=$e):$e=e[30];const qe=L.filter(Re).filter(Ke).filter(Ge).filter(H=>!xe||H.title.toLowerCase().includes(xe)||H.slug.toLowerCase().includes(xe)).sort($e),Nt=ye.size>0;let Pe;e[31]===Symbol.for("react.memo_cache_sentinel")?(Pe=H=>Se(pe=>{const Le=new Set(pe);return Le.delete(H)||Le.add(H),Le}),e[31]=Pe):Pe=e[31];const st=Pe,it=()=>Se(H=>qe.every(pe=>H.has(pe.key))?new Set:new Set(qe.map(Vp)));let Ie;e[32]!==g||e[33]!==ye||e[34]!==p?(Ie=async()=>{let H=0;for(const pe of ye)await g.apply(pe,"archived")&&(H=H+1);Se(new Set),H>0&&ke.success(p("sandbox.postBoard.archived"))},e[32]=g,e[33]=ye,e[34]=p,e[35]=Ie):Ie=e[35];const X=Ie;let Ne;e[36]!==g?(Ne=(H,pe)=>{b(null),g.apply(pe,H)},e[36]=g,e[37]=Ne):Ne=e[37];const Ce=Ne;let Oe;e[38]!==d||e[39]!==j?(Oe=()=>{const H=un(Gn()),pe=fi({title:"",now:new Date});j.mutate({blockKey:H,data:fs(H,pe)}),d(H)},e[38]=d,e[39]=j,e[40]=Oe):Oe=e[40];const He=Oe,Ft=()=>{const H=gp(K),pe=Tp(H.sections,fo(m,{hideDefaults:S}));if(pe.length===0&&!H.title.trim()){ke.error(p("sandbox.postBoard.importEmpty"));return}const Le=un(Gn()),ut=Ep({title:H.title,blocks:pe,takenSlugs:L.map(Mp).filter(Boolean),now:new Date});j.mutate({blockKey:Le,data:fs(Le,ut)}),R(!1),k(""),ke.success(p("sandbox.postBoard.imported")),d(Le)},Jt=r==="list";let Ye;e[41]!==l?(Ye=()=>l("list"),e[41]=l,e[42]=Ye):Ye=e[42];let zt;e[43]===Symbol.for("react.memo_cache_sentinel")?(zt=o.jsx(sr,{size:14}),e[43]=zt):zt=e[43];let Fe;e[44]!==p?(Fe=p("sandbox.postBoard.viewList"),e[44]=p,e[45]=Fe):Fe=e[45];let Ue;e[46]!==Jt||e[47]!==Ye||e[48]!==Fe?(Ue=o.jsx(sa,{active:Jt,onClick:Ye,icon:zt,label:Fe}),e[46]=Jt,e[47]=Ye,e[48]=Fe,e[49]=Ue):Ue=e[49];const Bs=r==="board";let Tt;e[50]!==l?(Tt=()=>l("board"),e[50]=l,e[51]=Tt):Tt=e[51];let Zt;e[52]===Symbol.for("react.memo_cache_sentinel")?(Zt=o.jsx(Xl,{size:14}),e[52]=Zt):Zt=e[52];let Et;e[53]!==p?(Et=p("sandbox.postBoard.viewBoard"),e[53]=p,e[54]=Et):Et=e[54];let bt;e[55]!==Bs||e[56]!==Tt||e[57]!==Et?(bt=o.jsx(sa,{active:Bs,onClick:Tt,icon:Zt,label:Et}),e[55]=Bs,e[56]=Tt,e[57]=Et,e[58]=bt):bt=e[58];let es;e[59]!==Ue||e[60]!==bt?(es=o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"flex items-center gap-0.5 rounded-lg border p-0.5",children:[Ue,bt]})}),e[59]=Ue,e[60]=bt,e[61]=es):es=e[61];let ts;e[62]===Symbol.for("react.memo_cache_sentinel")?(ts=o.jsx(kn,{size:14}),e[62]=ts):ts=e[62];let Xe;e[63]!==p?(Xe=p("sandbox.postBoard.newPost"),e[63]=p,e[64]=Xe):Xe=e[64];let ss;e[65]===Symbol.for("react.memo_cache_sentinel")?(ss=o.jsx(Us,{size:14}),e[65]=ss):ss=e[65];let lt;e[66]!==Xe?(lt=o.jsx(nn,{asChild:!0,children:o.jsxs(De,{type:"button",size:"sm",children:[ts,Xe,ss]})}),e[66]=Xe,e[67]=lt):lt=e[67];let Mt;e[68]!==x||e[69]!==p?(Mt=x&&o.jsxs(Ot,{onClick:()=>_(!0),children:[o.jsx(cn,{size:14}),o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{children:p("sandbox.postBoard.newPostGenerate")}),o.jsx("span",{className:"text-xs text-muted-foreground",children:p("sandbox.postBoard.newPostGenerateHint")})]})]}),e[68]=x,e[69]=p,e[70]=Mt):Mt=e[70];let yt;e[71]===Symbol.for("react.memo_cache_sentinel")?(yt=o.jsx(tr,{size:14}),e[71]=yt):yt=e[71];let Qe;e[72]!==p?(Qe=p("sandbox.postBoard.newPostWrite"),e[72]=p,e[73]=Qe):Qe=e[73];let Pt;e[74]!==Qe?(Pt=o.jsx("span",{children:Qe}),e[74]=Qe,e[75]=Pt):Pt=e[75];let Vt;e[76]!==p?(Vt=p("sandbox.postBoard.newPostWriteHint"),e[76]=p,e[77]=Vt):Vt=e[77];let At;e[78]!==Vt?(At=o.jsx("span",{className:"text-xs text-muted-foreground",children:Vt}),e[78]=Vt,e[79]=At):At=e[79];let vt;e[80]!==Pt||e[81]!==At?(vt=o.jsxs("div",{className:"flex flex-col",children:[Pt,At]}),e[80]=Pt,e[81]=At,e[82]=vt):vt=e[82];let Ut;e[83]!==vt||e[84]!==He?(Ut=o.jsxs(Ot,{onClick:He,children:[yt,vt]}),e[83]=vt,e[84]=He,e[85]=Ut):Ut=e[85];let hs,ns;e[86]===Symbol.for("react.memo_cache_sentinel")?(hs=()=>R(!0),ns=o.jsx(Rn,{size:14}),e[86]=hs,e[87]=ns):(hs=e[86],ns=e[87]);let Gt;e[88]!==p?(Gt=p("sandbox.postBoard.importContent"),e[88]=p,e[89]=Gt):Gt=e[89];let Ht;e[90]!==Gt?(Ht=o.jsx("span",{children:Gt}),e[90]=Gt,e[91]=Ht):Ht=e[91];let Ve;e[92]!==p?(Ve=p("sandbox.postBoard.importContentHint"),e[92]=p,e[93]=Ve):Ve=e[93];let _t;e[94]!==Ve?(_t=o.jsx("span",{className:"text-xs text-muted-foreground",children:Ve}),e[94]=Ve,e[95]=_t):_t=e[95];let Dt;e[96]!==Ht||e[97]!==_t?(Dt=o.jsxs(Ot,{onClick:hs,children:[ns,o.jsxs("div",{className:"flex flex-col",children:[Ht,_t]})]}),e[96]=Ht,e[97]=_t,e[98]=Dt):Dt=e[98];let rt;e[99]!==Mt||e[100]!==Ut||e[101]!==Dt?(rt=o.jsxs(on,{align:"end",className:"w-56",children:[Mt,Ut,Dt]}),e[99]=Mt,e[100]=Ut,e[101]=Dt,e[102]=rt):rt=e[102];let os;e[103]!==lt||e[104]!==rt?(os=o.jsxs(an,{children:[lt,rt]}),e[103]=lt,e[104]=rt,e[105]=os):os=e[105];let Je;e[106]!==x||e[107]!==i||e[108]!==w||e[109]!==N||e[110]!==E?(Je=x&&o.jsx(cp,{open:w,onOpenChange:_,decofile:i,hasAi:E,onGenerate:H=>{N(H)}}),e[106]=x,e[107]=i,e[108]=w,e[109]=N,e[110]=E,e[111]=Je):Je=e[111];let kt;e[112]!==p?(kt=p("sandbox.postBoard.importTitle"),e[112]=p,e[113]=kt):kt=e[113];let ct;e[114]!==kt?(ct=o.jsx(Es,{children:kt}),e[114]=kt,e[115]=ct):ct=e[115];let dt;e[116]!==p?(dt=p("sandbox.postBoard.importDescription"),e[116]=p,e[117]=dt):dt=e[117];let Ze;e[118]!==dt?(Ze=o.jsx(Xn,{children:dt}),e[118]=dt,e[119]=Ze):Ze=e[119];let xs;e[120]!==ct||e[121]!==Ze?(xs=o.jsxs(Ys,{children:[ct,Ze]}),e[120]=ct,e[121]=Ze,e[122]=xs):xs=e[122];const as=Ri(K)?"html":"markdown";let is;e[123]===Symbol.for("react.memo_cache_sentinel")?(is=H=>k(H??""),e[123]=is):is=e[123];let Yt;e[124]!==K||e[125]!==as?(Yt=o.jsx("div",{className:"h-72 overflow-hidden rounded-[var(--studio-control-radius,var(--radius-xl))] border bg-[var(--studio-input-background)]",children:o.jsx(Ua,{code:K,language:as,height:"100%",autoFocus:!0,onChange:is})}),e[124]=K,e[125]=as,e[126]=Yt):Yt=e[126];let ls;e[127]===Symbol.for("react.memo_cache_sentinel")?(ls=o.jsx("input",{ref:z,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async H=>{const pe=H.target.files?.[0];pe&&k(await pe.text()),H.target.value=""}}),e[127]=ls):ls=e[127];let bs,ys;e[128]===Symbol.for("react.memo_cache_sentinel")?(bs=()=>z.current?.click(),ys=o.jsx(Rn,{size:14}),e[128]=bs,e[129]=ys):(bs=e[128],ys=e[129]);let Bt;e[130]!==p?(Bt=p("sandbox.postBoard.importUpload"),e[130]=p,e[131]=Bt):Bt=e[131];let Rt;e[132]!==Bt?(Rt=o.jsxs(De,{type:"button",variant:"outline",size:"sm",onClick:bs,children:[ys,Bt]}),e[132]=Bt,e[133]=Rt):Rt=e[133];let rs;e[134]!==Yt||e[135]!==Rt?(rs=o.jsxs("div",{className:"space-y-3",children:[Yt,ls,Rt]}),e[134]=Yt,e[135]=Rt,e[136]=rs):rs=e[136];let vs;e[137]!==K?(vs=K.trim(),e[137]=K,e[138]=vs):vs=e[138];let ks;e[139]===Symbol.for("react.memo_cache_sentinel")?(ks=o.jsx(Rn,{size:14}),e[139]=ks):ks=e[139];let js;e[140]!==p?(js=p("sandbox.postBoard.importRun"),e[140]=p,e[141]=js):js=e[141];let ws;e[142]!==v||e[143]!==u||e[144]!==f||e[145]!==c||e[146]!==r?(ws=r==="board"&&c&&v&&f&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:f(c,{expanded:!0,onToggleExpand:()=>T(!1),onClose:()=>{T(!1),u?.()}})}),e[142]=v,e[143]=u,e[144]=f,e[145]=c,e[146]=r,e[147]=ws):ws=e[147];const Rs=r==="board"&&!!c&&!v;let Wt;e[148]!==u?(Wt=H=>{H||(T(!1),u?.())},e[148]=u,e[149]=Wt):Wt=e[149];let $t;e[150]!==p?($t=p("sandbox.collectionsSidebar.posts"),e[150]=p,e[151]=$t):$t=e[151];let qt;e[152]!==$t?(qt=o.jsx(Es,{className:"sr-only",children:$t}),e[152]=$t,e[153]=qt):qt=e[153];let Xt;e[154]!==u||e[155]!==f||e[156]!==c?(Xt=c&&f?o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Mn,{size:20,className:"animate-spin text-muted-foreground"})}),children:f(c,{expanded:!1,onToggleExpand:()=>T(!0),onClose:()=>u?.()})}):null,e[154]=u,e[155]=f,e[156]=c,e[157]=Xt):Xt=e[157];let Qt;e[158]!==qt||e[159]!==Xt?(Qt=o.jsxs(Ps,{closeButtonClassName:"hidden",className:"left-auto right-4 top-4 bottom-4 flex h-auto translate-x-0 translate-y-0 flex-col gap-0 overflow-hidden p-0 sm:max-w-3xl",children:[qt,Xt]}),e[158]=qt,e[159]=Xt,e[160]=Qt):Qt=e[160];let Ss;return e[161]!==Rs||e[162]!==Wt||e[163]!==Qt?(Ss=o.jsx(As,{open:Rs,onOpenChange:Wt,children:Qt}),e[161]=Rs,e[162]=Wt,e[163]=Qt,e[164]=Ss):Ss=e[164],o.jsxs("div",{className:"relative flex h-full min-w-0 flex-col",children:[o.jsxs("div",{className:"flex shrink-0 flex-wrap items-center justify-between gap-3 border-b px-6 py-3",children:[es,o.jsxs("div",{className:"flex items-center gap-2",children:[os,Je,o.jsx(As,{open:O,onOpenChange:R,children:o.jsxs(Ps,{className:"max-h-[85vh] sm:max-w-2xl",children:[xs,rs,o.jsx(Ws,{children:o.jsxs(De,{type:"button",disabled:!vs,onClick:Ft,children:[ks,js]})})]})})]})]}),L.length===0?o.jsx(gc,{className:"flex-1",icon:o.jsx(cn,{size:22}),title:p("sandbox.postBoard.emptyTitle"),description:p("sandbox.postBoard.emptyDescription"),buttonProps:{children:p("sandbox.postBoard.newPost"),onClick:He}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:Ip.map(H=>{const pe=p(hn[H]),Le=L.filter(ze=>ze.status===H);Fp(H)&&Le.sort(Kp);const ut=Y(H,Le.length===0);return o.jsxs(F.Fragment,{children:[o.jsx("div",{onDragOver:ze=>{ze.preventDefault(),b(H)},onDragLeave:()=>b(ze=>ze===H?null:ze),onDrop:ze=>{ze.preventDefault(),Ce(H,ze.dataTransfer.getData(Ii))},className:je("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",ut?"w-11":"w-72",C===H&&"border-primary bg-primary/5"),children:ut?o.jsxs("button",{type:"button",onClick:()=>A(H,!1),"aria-label":p("sandbox.postBoard.expandLane",{lane:pe}),"aria-expanded":!1,className:"flex min-h-0 flex-1 cursor-pointer flex-col items-center gap-2 py-2.5 text-muted-foreground hover:text-foreground",children:[o.jsx(ln,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:Le.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:pe})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center justify-between gap-2 px-3 py-2.5 text-sm font-medium",children:[o.jsxs("button",{type:"button",onClick:()=>A(H,!0),"aria-label":p("sandbox.postBoard.collapseLane",{lane:pe}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(Us,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:pe})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:Le.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:Le.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.postBoard.laneEmpty")}):Le.map(ze=>o.jsx(qp,{post:ze,payload:ne(ze.key),moving:g.isMoving(ze.key),onOpen:()=>d(ze.key),onArchive:ze.status==="archived"?void 0:()=>{ue(ze)}},ze.key))})]})}),H===Wn&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},H)})}):o.jsxs("div",{className:"flex min-h-0 flex-1",children:[o.jsxs("div",{className:"flex w-80 shrink-0 flex-col border-r",children:[o.jsx(Ap,{value:D,onChange:Z}),Nt?o.jsx(Op,{count:ye.size,allSelected:qe.length>0&&qe.every(H=>ye.has(H.key)),onToggleSelectAll:it,onArchive:()=>{X()},onExit:()=>Se(new Set)}):o.jsx(_p,{categories:se,authors:he,statusCounts:_e,categoryFilter:te,authorFilter:oe,statusFilter:M,sort:me,onCategoryFilterChange:le,onAuthorFilterChange:be,onStatusFilterChange:re,onSortChange:J}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(Yp,{posts:qe,selectedKey:ie,selectionActive:Nt,selectedKeys:ye,onToggleSelect:st,onOpen:d,isMoving:g.isMoving,onArchive:H=>{ue(H)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:ie&&f?o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Mn,{size:20,className:"animate-spin text-muted-foreground"})}),children:f(ie)}):o.jsx("div",{className:"flex h-full items-center justify-center px-6 text-center text-sm text-muted-foreground",children:p("sandbox.postBoard.selectPrompt")})})]}),ws,Ss]})}function Mp(t){return t.slug}function Vp(t){return t.key}function Up(t){return t.authorEmails}function Gp(t){return t.categorySlugs}function Hp(t,e){return t[e.status]=(t[e.status]??0)+1,t}function sa(t){const e=ce.c(7),{active:s,onClick:n,icon:a,label:i}=t,r=s?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground";let c;e[0]!==r?(c=je("inline-flex cursor-pointer items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors",r),e[0]=r,e[1]=c):c=e[1];let l;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==c?(l=o.jsxs("button",{type:"button",onClick:n,className:c,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=c,e[6]=l):l=e[6],l}function Yp(t){const e=ce.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:c,isMoving:l,onArchive:d}=t,u=Ee();if(s.length===0){let f;e[0]!==u?(f=u("sandbox.postList.noMatches"),e[0]=u,e[1]=f):f=e[1];let p;return e[2]!==f?(p=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f}),e[2]=f,e[3]=p):p=e[3],p}let g;if(e[4]!==l||e[5]!==d||e[6]!==c||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let f;e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(f=p=>o.jsx(Wp,{post:p,selected:p.key===n,selectionActive:a,checked:i.has(p.key),onToggleSelect:()=>r(p.key),moving:l(p.key),onOpen:()=>c(p.key),onArchive:p.status==="archived"?void 0:()=>d(p)},p.key),e[13]=l,e[14]=d,e[15]=c,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=f):f=e[20],g=s.map(f),e[4]=l,e[5]=d,e[6]=c,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=g}else g=e[12];let m;return e[21]!==g?(m=o.jsx("ul",{className:"divide-y",children:g}),e[21]=g,e[22]=m):m=e[22],m}function Wp(t){const e=ce.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:c,onOpen:l,onArchive:d}=t,u=Ee(),g=s.status==="awaiting_review"&&s.missing.length>0,m=s.status==="scheduled"||s.status==="published",f=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let p;e[0]!==f?(p=je("absolute left-3 top-3 z-10 transition-opacity",f),e[0]=f,e[1]=p):p=e[1];let y;e[2]!==r?(y=()=>r(),e[2]=r,e[3]=y):y=e[3];let j;e[4]!==s.title||e[5]!==u?(j=s.title||u("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=u,e[6]=j):j=e[6];let E;e[7]!==i||e[8]!==y||e[9]!==j?(E=o.jsx(jn,{checked:i,onCheckedChange:y,"aria-label":j}),e[7]=i,e[8]=y,e[9]=j,e[10]=E):E=e[10];let x;e[11]!==p||e[12]!==E?(x=o.jsx("span",{className:p,children:E}),e[11]=p,e[12]=E,e[13]=x):x=e[13];let S;e[14]!==c||e[15]!==d||e[16]!==a?(S=d&&!a&&o.jsx(Ki,{onArchive:d,disabled:c,className:"top-2.5"}),e[14]=c,e[15]=d,e[16]=a,e[17]=S):S=e[17];let C;e[18]!==l||e[19]!==r||e[20]!==a?(C=()=>a?r():l(),e[18]=l,e[19]=r,e[20]=a,e[21]=C):C=e[21];const b=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let v;e[22]!==b?(v=je("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",b),e[22]=b,e[23]=v):v=e[23];let T;e[24]!==s.title||e[25]!==u?(T=s.title||u("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=u,e[26]=T):T=e[26];let w;e[27]!==T?(w=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:T}),e[27]=T,e[28]=w):w=e[28];const _=Lp[s.status],O=hn[s.status];let R;e[29]!==u||e[30]!==O?(R=u(O),e[29]=u,e[30]=O,e[31]=R):R=e[31];let K;e[32]!==_||e[33]!==R?(K=o.jsx(wn,{variant:_,className:"shrink-0",children:R}),e[32]=_,e[33]=R,e[34]=K):K=e[34];let k;e[35]!==g||e[36]!==s.missing?(k=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Vs,{size:12}),s.missing.length]}),e[35]=g,e[36]=s.missing,e[37]=k):k=e[37];let z;e[38]!==s.duplicateTitle||e[39]!==u?(z=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:u("sandbox.postBoard.duplicateTitle"),children:[o.jsx(so,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:u("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=u,e[40]=z):z=e[40];let P;e[41]!==m||e[42]!==s.date||e[43]!==s.scheduledDatetime?(P=m&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx(to,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=m,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=P):P=e[44];let I;e[45]!==K||e[46]!==k||e[47]!==z||e[48]!==P?(I=o.jsxs("div",{className:"flex items-center gap-2",children:[K,k,z,P]}),e[45]=K,e[46]=k,e[47]=z,e[48]=P,e[49]=I):I=e[49];let U;e[50]!==n||e[51]!==v||e[52]!==w||e[53]!==I||e[54]!==C?(U=o.jsxs("button",{type:"button",onClick:C,"aria-current":n,className:v,children:[w,I]}),e[50]=n,e[51]=v,e[52]=w,e[53]=I,e[54]=C,e[55]=U):U=e[55];let q;return e[56]!==U||e[57]!==x||e[58]!==S?(q=o.jsxs("li",{className:"group/row relative",children:[x,S,U]}),e[56]=U,e[57]=x,e[58]=S,e[59]=q):q=e[59],q}function qp(t){const e=ce.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,c=Ee(),l=s.status!=="generating"&&!a;let d;e[0]!==n?(d=nu(n),e[0]=n,e[1]=d):d=e[1];const u=d,g=!l&&"opacity-80";let m;e[2]!==g?(m=je("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",g),e[2]=g,e[3]=m):m=e[3];let f;e[4]!==a||e[5]!==r?(f=r&&o.jsx(Ki,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=f):f=e[6];let p;e[7]!==s.key?(p=R=>R.dataTransfer.setData(Ii,s.key),e[7]=s.key,e[8]=p):p=e[8];const y=l?"cursor-grab active:cursor-grabbing":"cursor-pointer";let j;e[9]!==y?(j=je("block w-full p-3 text-left",y),e[9]=y,e[10]=j):j=e[10];let E;e[11]!==s.title||e[12]!==c?(E=s.title||c("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=c,e[13]=E):E=e[13];let x;e[14]!==E?(x=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:E}),e[14]=E,e[15]=x):x=e[15];let S;e[16]!==u||e[17]!==s.status?(S=s.status==="draft"&&u.format?.name&&o.jsx(wn,{variant:"outline",className:"max-w-full truncate",children:u.format.name}),e[16]=u,e[17]=s.status,e[18]=S):S=e[18];let C;e[19]!==s.status||e[20]!==c?(C=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(Mn,{size:12,className:"animate-spin"}),c("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=c,e[21]=C):C=e[21];let b;e[22]!==s.missing||e[23]!==s.status||e[24]!==c?(b=s.status==="awaiting_review"&&(s.missing.length>0?o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Vs,{size:12}),c("sandbox.postBoard.nIssues",{count:String(s.missing.length)})]}):o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-success",children:[o.jsx(mc,{size:12}),c("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=c,e[25]=b):b=e[25];let v;e[26]!==s.date||e[27]!==s.scheduledDatetime||e[28]!==s.status?(v=(s.status==="scheduled"||s.status==="published")&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[o.jsx(to,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[26]=s.date,e[27]=s.scheduledDatetime,e[28]=s.status,e[29]=v):v=e[29];let T;e[30]!==s.duplicateTitle||e[31]!==c?(T=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(so,{size:12,"aria-hidden":!0}),c("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=c,e[32]=T):T=e[32];let w;e[33]!==S||e[34]!==C||e[35]!==b||e[36]!==v||e[37]!==T?(w=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[S,C,b,v,T]}),e[33]=S,e[34]=C,e[35]=b,e[36]=v,e[37]=T,e[38]=w):w=e[38];let _;e[39]!==l||e[40]!==i||e[41]!==w||e[42]!==p||e[43]!==j||e[44]!==x?(_=o.jsxs("button",{type:"button",draggable:l,onDragStart:p,onClick:i,className:j,children:[x,w]}),e[39]=l,e[40]=i,e[41]=w,e[42]=p,e[43]=j,e[44]=x,e[45]=_):_=e[45];let O;return e[46]!==_||e[47]!==m||e[48]!==f?(O=o.jsxs("div",{className:m,children:[f,_]}),e[46]=_,e[47]=m,e[48]=f,e[49]=O):O=e[49],O}function Ki(t){const e=ce.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=Ee();let c;e[0]!==s||e[1]!==r?(c=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=c):c=e[2];const l=c;let d;e[3]!==n?(d=f=>{f.stopPropagation(),n()},e[3]=n,e[4]=d):d=e[4];let u;e[5]!==i?(u=je("absolute right-2 z-10 opacity-0 transition-opacity focus-visible:opacity-100 group-hover/card:opacity-100 group-hover/row:opacity-100",i),e[5]=i,e[6]=u):u=e[6];let g;e[7]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(co,{className:"size-3.25"}),e[7]=g):g=e[7];let m;return e[8]!==a||e[9]!==d||e[10]!==u||e[11]!==l?(m=o.jsx(De,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":l,title:l,onClick:d,className:u,children:g}),e[8]=a,e[9]=d,e[10]=u,e[11]=l,e[12]=m):m=e[12],m}function jt(t){const e=ce.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:c,variantCount:l,trailing:d,selectable:u,selectionActive:g,selected:m,invalid:f,invalidReason:p,warning:y,warningReason:j,onToggleSelect:E,onClick:x,menu:S}=t,C=Ee(),b=c==="global";let v;e[0]!==s||e[1]!==r||e[2]!==b||e[3]!==n?(v=n?o.jsx("img",{src:n,alt:"",className:"size-8 shrink-0 rounded-lg object-cover bg-muted"}):o.jsx("span",{className:je("flex size-8 shrink-0 items-center justify-center rounded-lg",b?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:je("shrink-0",!b&&(r?"text-accent-foreground":"text-muted-foreground")),style:b?{color:Jn}:void 0})}),e[0]=s,e[1]=r,e[2]=b,e[3]=n,e[4]=v):v=e[4];const T=v,w=r?b?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":b?"hover:bg-global-section/10":"hover:bg-accent";let _;e[5]!==w?(_=je("group relative flex min-w-0 items-center rounded-md transition-colors",w),e[5]=w,e[6]=_):_=e[6];let O;e[7]!==E||e[8]!==u||e[9]!==m||e[10]!==g||e[11]!==C||e[12]!==a?(O=u&&o.jsx("span",{className:je("flex shrink-0 items-center pl-2.5 transition-opacity",m||g?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:Xp,children:o.jsx(jn,{checked:m,onCheckedChange:()=>E?.(),"aria-label":C("sandbox.itemRow.selectItem",{title:a})})}),e[7]=E,e[8]=u,e[9]=m,e[10]=g,e[11]=C,e[12]=a,e[13]=O):O=e[13];const R=f&&!r&&"text-destructive";let K;e[14]!==R?(K=je("block truncate text-sm font-medium",R),e[14]=R,e[15]=K):K=e[15];let k;e[16]!==K||e[17]!==a?(k=o.jsx("span",{className:K,children:a}),e[16]=K,e[17]=a,e[18]=k):k=e[18];const z=r?"text-accent-foreground/70":"text-muted-foreground";let P;e[19]!==z?(P=je("block truncate text-xs",z),e[19]=z,e[20]=P):P=e[20];let I;e[21]!==i||e[22]!==P?(I=o.jsx("span",{className:P,children:i}),e[21]=i,e[22]=P,e[23]=I):I=e[23];let U;e[24]!==I||e[25]!==k?(U=o.jsxs("span",{className:"min-w-0 flex-1",children:[k,I]}),e[24]=I,e[25]=k,e[26]=U):U=e[26];let q;e[27]!==r||e[28]!==C||e[29]!==l?(q=l!==void 0&&l>1&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsxs("span",{className:je("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Ta,{size:14}),l]})}),o.jsx(St,{side:"bottom",children:C("sandbox.itemRow.variantCount",{count:l})})]}),e[27]=r,e[28]=C,e[29]=l,e[30]=q):q=e[30];let Y;e[31]!==y||e[32]!==j?(Y=y&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(Vs,{size:14})})}),j&&o.jsx(St,{side:"bottom",children:j})]}),e[31]=y,e[32]=j,e[33]=Y):Y=e[33];let Q;e[34]!==r||e[35]!==f||e[36]!==p?(Q=f&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx("span",{className:je("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(Vs,{size:14})})}),p&&o.jsx(St,{side:"bottom",children:p})]}),e[34]=r,e[35]=f,e[36]=p,e[37]=Q):Q=e[37];let A;e[38]!==x||e[39]!==T||e[40]!==U||e[41]!==q||e[42]!==Y||e[43]!==Q||e[44]!==d?(A=o.jsxs("button",{type:"button",onClick:x,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[T,U,q,Y,Q,d]}),e[38]=x,e[39]=T,e[40]=U,e[41]=q,e[42]=Y,e[43]=Q,e[44]=d,e[45]=A):A=e[45];let G;e[46]!==r||e[47]!==S?(G=S&&o.jsx("div",{className:je("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:S}),e[46]=r,e[47]=S,e[48]=G):G=e[48];let $;return e[49]!==A||e[50]!==G||e[51]!==_||e[52]!==O?($=o.jsxs("div",{className:_,children:[O,A,G]}),e[49]=A,e[50]=G,e[51]=_,e[52]=O,e[53]=$):$=e[53],$}function Xp(t){return t.stopPropagation()}const Qp={loaders:Na,actions:Va},Jp={analytics:Zl,blog:Ma,commerce:Jl,site:Ql,website:rn};function Zp(t,e){return e===0?Jp[t.toLowerCase()]??So:So}function Ks(t,e){return e===0?Pl(t):t}function ef(t){const e=ce.c(120),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,kind:l,initialSavedKey:d,onBack:u}=t,g=Ee();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[f,p]=F.useState(m);let y;e[1]!==d?(y=()=>d?{mode:"saved",key:d}:null,e[1]=d,e[2]=y):y=e[2];const[j,E]=F.useState(y),[x,S]=F.useState(""),[C,b]=F.useState(cf),[v,T]=F.useState(l);v!==l&&(T(l),p([]),E(null),S(""),b(new Set));let w;e[3]===Symbol.for("react.memo_cache_sentinel")?(w=ue=>{b(te=>{const le=new Set(te);return le.has(ue)?le.delete(ue):le.add(ue),le})},e[3]=w):w=e[3];const _=w;let O;e[4]!==a||e[5]!==s||e[6]!==n?(O={orgSlug:s,virtualMcpId:n,branch:a},e[4]=a,e[5]=s,e[6]=n,e[7]=O):O=e[7];const R=vn(O);let K;e[8]!==R?(K=ya((ue,te)=>R.mutate({blockKey:ue,data:te})),e[8]=R,e[9]=K):K=e[9];const k=K;let z;e[10]!==l?(z=Al(l),e[10]=l,e[11]=z):z=e[11];const P=z,I=Qp[l],U=l==="loaders"?"sandbox.collectionsSidebar.loaders":"sandbox.collectionsSidebar.actions";let q;e[12]!==g||e[13]!==U?(q=g(U),e[12]=g,e[13]=U,e[14]=q):q=e[14];const Y=q;let Q,A,G,$,N,L,de;if(e[15]!==I||e[16]!==a||e[17]!==Y||e[18]!==c||e[19]!==l||e[20]!==r||e[21]!==u||e[22]!==C||e[23]!==s||e[24]!==f||e[25]!==i||e[26]!==R||e[27]!==k||e[28]!==x||e[29]!==j||e[30]!==P||e[31]!==g||e[32]!==n){L=Symbol.for("react.early_return_sentinel");e:{const ue=[...Cl(r,c,l).map(rf),...Nl(r,l).map(lf)],te=x.trim().toLowerCase(),le=te.length>0,oe=le?ue.filter(X=>X.title.toLowerCase().includes(te)||X.resolveType.toLowerCase().includes(te)):[],be=new Map,M=[],re=new Map;if(!le){for(const X of ue){const Ne=X.folderPath;if(!(Ne.length<f.length)&&f.every((Ce,Oe)=>Ne[Oe]===Ce))if(Ne.length===f.length)if(X.savedKey!==void 0){const Ce=re.get(X.resolveType);Ce?Ce.push(X):re.set(X.resolveType,[X])}else M.push(X);else{const Ce=Ne[f.length],Oe=be.get(Ce)??{count:0,savedCount:0};X.savedKey!==void 0?Oe.savedCount=Oe.savedCount+1:Oe.count=Oe.count+1,be.set(Ce,Oe)}}M.sort(af);for(const X of re.values())X.sort(of)}const me=[...re.entries()].filter(X=>{const[Ne]=X;return!M.some(Ce=>Ce.resolveType===Ne)}).flatMap(nf).sort(sf);let J;e[40]!==f.length?(J=(X,Ne)=>Ks(X.name,f.length).localeCompare(Ks(Ne.name,f.length)),e[40]=f.length,e[41]=J):J=e[41];const D=[...be.entries()].map(tf).sort(J);let Z;e[42]===Symbol.for("react.memo_cache_sentinel")?(Z=X=>{E(X.savedKey!==void 0?{mode:"saved",key:X.savedKey}:{mode:"available",resolveType:X.resolveType,title:X.title})},e[42]=Z):Z=e[42];const ae=Z;let ye;e[43]!==R||e[44]!==P||e[45]!==g?(ye=async(X,Ne)=>{const Ce=await R.mutateAsync({blockKey:X,data:Ne,create:!0});et(Ce)||ke.success(g("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:P,blockId:X})),E({mode:"saved",key:X})},e[43]=R,e[44]=P,e[45]=g,e[46]=ye):ye=e[46];const Se=ye;let _e;e[47]!==c||e[48]!==j?(_e=df(j,c),e[47]=c,e[48]=j,e[49]=_e):_e=e[49];const we=_e,Be=f[f.length-1];let W;e[50]!==Y||e[51]!==Be||e[52]!==f.length||e[53]!==le?(W=!le&&Be!==void 0?Ks(Be,f.length-1):Y,e[50]=Y,e[51]=Be,e[52]=f.length,e[53]=le,e[54]=W):W=e[54];const se=W;if(we){const X=`${we.mode}:${we.mode==="saved"?we.blockKey:we.resolveType}`,Ne=we.mode==="saved"&&we.blockKey||"";let Ce;e[55]!==u?(Ce=u??(()=>E(null)),e[55]=u,e[56]=Ce):Ce=e[56];const Oe=u?void 0:se;let He;e[57]!==a||e[58]!==c||e[59]!==X||e[60]!==Se||e[61]!==l||e[62]!==r||e[63]!==s||e[64]!==i||e[65]!==R.isPending||e[66]!==k||e[67]!==Ce||e[68]!==Oe||e[69]!==we.editorTarget||e[70]!==we.initialValue||e[71]!==n?(He=o.jsx(Tl,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,kind:l,target:we.editorTarget,initialValue:we.initialValue,isCreating:R.isPending,onCreate:Se,onSaveReferencedBlock:k,onBack:Ce,backLabel:Oe},X),e[57]=a,e[58]=c,e[59]=X,e[60]=Se,e[61]=l,e[62]=r,e[63]=s,e[64]=i,e[65]=R.isPending,e[66]=k,e[67]=Ce,e[68]=Oe,e[69]=we.editorTarget,e[70]=we.initialValue,e[71]=n,e[72]=He):He=e[72];let Ft;e[73]!==a||e[74]!==X||e[75]!==s||e[76]!==Ne||e[77]!==He||e[78]!==n?(Ft=o.jsx(va,{orgSlug:s,virtualMcpId:n,branch:a,blockKey:Ne,present:void 0,children:He},X),e[73]=a,e[74]=X,e[75]=s,e[76]=Ne,e[77]=He,e[78]=n,e[79]=Ft):Ft=e[79],L=Ft;break e}$="flex h-full w-full min-w-0 flex-col";let he;e[80]!==g?(he=g("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[80]=g,e[81]=he):he=e[81];let xe;e[82]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>p([]),e[82]=xe):xe=e[82];const Re=f.length===0?"font-medium text-foreground":"text-muted-foreground";let Ke;e[83]!==Re?(Ke=je("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",Re),e[83]=Re,e[84]=Ke):Ke=e[84];let Ge;e[85]!==Y||e[86]!==Ke?(Ge=o.jsx("button",{type:"button",onClick:xe,className:Ke,children:Y}),e[85]=Y,e[86]=Ke,e[87]=Ge):Ge=e[87];let $e;e[88]!==f?($e=f.map((X,Ne)=>{const Ce=Ne===f.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(ln,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>p(f.slice(0,Ne+1)),className:je("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",Ce?"font-medium text-foreground":"text-muted-foreground"),children:Ks(X,Ne)})]},`${X}-${Ne}`)}),e[88]=f,e[89]=$e):$e=e[89];let qe;e[90]!==he||e[91]!==Ge||e[92]!==$e?(qe=o.jsxs("nav",{"aria-label":he,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[Ge,$e]}),e[90]=he,e[91]=Ge,e[92]=$e,e[93]=qe):qe=e[93];let Nt;e[94]===Symbol.for("react.memo_cache_sentinel")?(Nt=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[94]=Nt):Nt=e[94];let Pe;e[95]===Symbol.for("react.memo_cache_sentinel")?(Pe=X=>S(X.target.value),e[95]=Pe):Pe=e[95];let st;e[96]!==l||e[97]!==g?(st=g("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:l}),e[96]=l,e[97]=g,e[98]=st):st=e[98];let it;e[99]!==l||e[100]!==g?(it=g("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:l}),e[99]=l,e[100]=g,e[101]=it):it=e[101];let Ie;e[102]!==x||e[103]!==st||e[104]!==it?(Ie=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Nt,o.jsx("input",{type:"text",value:x,onChange:Pe,placeholder:st,"aria-label":it,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[102]=x,e[103]=st,e[104]=it,e[105]=Ie):Ie=e[105],e[106]!==qe||e[107]!==Ie?(N=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[qe,Ie]}),e[106]=qe,e[107]=Ie,e[108]=N):N=e[108],Q=qs,G="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",de="mx-auto w-full max-w-4xl px-6 py-5",A=le?oe.length===0?o.jsx(ft,{title:g("sandbox.runnableBlocksBrowser.noSearchResults",{kind:l,query:x.trim()}),description:g("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:oe.map(X=>o.jsx(jt,{icon:I,accent:X.savedKey!==void 0?"global":void 0,title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)},X.savedKey??X.resolveType))}):D.length===0&&M.length===0&&me.length===0?o.jsx(ft,{title:g("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:l}),description:f.length===0?g("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):g("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[D.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:D.map(X=>{const Ne=Zp(X.name,f.length);return o.jsxs("button",{type:"button",onClick:()=>p([...f,X.name]),className:"flex items-center gap-2.5 rounded-lg border px-3 py-2.5 text-left transition-colors hover:bg-accent cursor-pointer",children:[o.jsx(Ne,{size:18,className:"shrink-0 text-muted-foreground"}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block truncate text-sm font-medium",children:Ks(X.name,f.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[X.count," ",X.count===1?P:l,X.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",g("sandbox.runnableBlocksBrowser.savedCountLabel",{count:X.savedCount})]})]})]})]},X.name)})}),(M.length>0||me.length>0)&&o.jsxs("div",{className:je("flex flex-col gap-1",D.length>0&&"mt-4"),children:[M.map(X=>{const Ne=re.get(X.resolveType)??[],Ce=C.has(X.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(jt,{icon:I,title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)}),Ne.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>_(X.resolveType),"aria-expanded":Ce,className:"flex items-center gap-1 self-start rounded-lg px-2.5 py-1 text-xs font-medium transition-colors hover:bg-global-section/10 cursor-pointer ml-11",style:{color:Jn},children:[Ce?o.jsx(Us,{size:12,className:"shrink-0"}):o.jsx(ln,{size:12,className:"shrink-0"}),g(Ce?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",Ne.length,")"]}),Ce&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:Ne.map(Oe=>o.jsx(jt,{icon:I,accent:"global",title:Oe.title,subtitle:Oe.resolveType,active:!1,onClick:()=>ae(Oe)},Oe.savedKey))})]})]},X.resolveType)}),me.map(X=>o.jsx(jt,{icon:I,accent:"global",title:X.title,subtitle:X.resolveType,active:!1,onClick:()=>ae(X)},X.savedKey))]})]})}e[15]=I,e[16]=a,e[17]=Y,e[18]=c,e[19]=l,e[20]=r,e[21]=u,e[22]=C,e[23]=s,e[24]=f,e[25]=i,e[26]=R,e[27]=k,e[28]=x,e[29]=j,e[30]=P,e[31]=g,e[32]=n,e[33]=Q,e[34]=A,e[35]=G,e[36]=$,e[37]=N,e[38]=L,e[39]=de}else Q=e[33],A=e[34],G=e[35],$=e[36],N=e[37],L=e[38],de=e[39];if(L!==Symbol.for("react.early_return_sentinel"))return L;let ne;e[109]!==A||e[110]!==de?(ne=o.jsx("div",{className:de,children:A}),e[109]=A,e[110]=de,e[111]=ne):ne=e[111];let ie;e[112]!==Q||e[113]!==G||e[114]!==ne?(ie=o.jsx(Q,{className:G,children:ne}),e[112]=Q,e[113]=G,e[114]=ne,e[115]=ie):ie=e[115];let fe;return e[116]!==$||e[117]!==N||e[118]!==ie?(fe=o.jsxs("div",{className:$,children:[N,ie]}),e[116]=$,e[117]=N,e[118]=ie,e[119]=fe):fe=e[119],fe}function tf(t){const[e,s]=t;return{name:e,...s}}function sf(t,e){return t.title.localeCompare(e.title)}function nf(t){const[,e]=t;return e}function of(t,e){return t.title.localeCompare(e.title)}function af(t,e){return t.title.localeCompare(e.title)}function lf(t){return{resolveType:t.resolveType,title:t.title,folderPath:ba(t.resolveType)}}function rf(t){return{resolveType:t.resolveType,title:t.title,folderPath:ba(t.resolveType),savedKey:t.key}}function cf(){return new Set}function df(t,e){if(!t)return null;if(t.mode==="available")return{mode:"available",resolveType:t.resolveType,editorTarget:{mode:"available",resolveType:t.resolveType,title:t.title},initialValue:{}};const{resolveType:s,props:n,title:a}=El(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function uf(t){const e=ce.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:c,resolveType:l,title:d,defaultBlockId:u,isCreating:g,onCreate:m,onSaveReferencedBlock:f}=t,p=Ee(),y=yn(),j=y?.virtualMcpId,x=Ka(j===n?n:null)?.metadata?.siteSlug??null;let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={},e[0]=S):S=e[0];const[C,b]=F.useState(S);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=[],e[1]=v):v=e[1];const[T,w]=F.useState(v),[_,O]=F.useState(0),[R,K]=F.useState(!1);let k;e[2]!==r||e[3]!==l?(k=$a(l,r),e[2]=r,e[3]=l,e[4]=k):k=e[4];const z=k;let P,I,U,q,Y,Q,A,G;if(e[5]!==x||e[6]!==a||e[7]!==c||e[8]!==T||e[9]!==C||e[10]!==g||e[11]!==m||e[12]!==s||e[13]!==i||e[14]!==l||e[15]!==p||e[16]!==y?.taskId||e[17]!==d||e[18]!==n){const fe=l.split("/").pop()?.replace(/\.tsx?$/,"")??l,ue=y?.taskId??null,te=i??void 0;let le;e[27]!==x||e[28]!==a||e[29]!==s||e[30]!==te||e[31]!==ue||e[32]!==n?(le={orgSlug:s,virtualMcpId:n,branch:a,threadId:ue,previewUrl:te,siteSlug:x},e[27]=x,e[28]=a,e[29]=s,e[30]=te,e[31]=ue,e[32]=n,e[33]=le):le=e[33],I=le;let oe,be,M,re;if(e[34]!==c||e[35]!==T||e[36]!==C||e[37]!==m||e[38]!==p||e[39]!==d){const we=[d,...T],Be=se=>{w(T.slice(0,se)),O(pf)};let W;e[48]!==c||e[49]!==C||e[50]!==m?(W=async se=>{const he=Dl(se,c);if(he){ke.error(he);return}await m(se,C),K(!1)},e[48]=c,e[49]=C,e[50]=m,e[51]=W):W=e[51],P=W,G="flex h-full w-full min-w-0",A="flex min-w-0 flex-1 flex-col",Y="shrink-0 border-b px-3 py-2.5",re="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==p?(oe=p("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=p,e[53]=oe):oe=e[53],be="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",M=we.map((se,he)=>{const xe=he===we.length-1,Re=_l(se);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[he>0&&o.jsx(ln,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>Be(he),title:Re,className:je("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",xe?"font-medium text-foreground":"text-muted-foreground"),children:Re})]},`${Re}-${he}`)}),e[34]=c,e[35]=T,e[36]=C,e[37]=m,e[38]=p,e[39]=d,e[40]=P,e[41]=oe,e[42]=be,e[43]=M,e[44]=re,e[45]=Y,e[46]=A,e[47]=G}else P=e[40],oe=e[41],be=e[42],M=e[43],re=e[44],Y=e[45],A=e[46],G=e[47];let me;e[54]!==oe||e[55]!==be||e[56]!==M?(me=o.jsx("nav",{"aria-label":oe,className:be,children:M}),e[54]=oe,e[55]=be,e[56]=M,e[57]=me):me=e[57];let J;e[58]===Symbol.for("react.memo_cache_sentinel")?(J=()=>K(!0),e[58]=J):J=e[58];let D;e[59]!==p?(D=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=p,e[60]=D):D=e[60];let Z;e[61]===Symbol.for("react.memo_cache_sentinel")?(Z=o.jsx(er,{size:14}),e[61]=Z):Z=e[61];let ae;e[62]!==g||e[63]!==D?(ae=o.jsx(wt,{asChild:!0,children:o.jsx(De,{size:"icon",className:"shrink-0",disabled:g,onClick:J,"aria-label":D,children:Z})}),e[62]=g,e[63]=D,e[64]=ae):ae=e[64];let ye;e[65]!==p?(ye=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=p,e[66]=ye):ye=e[66];let Se;e[67]!==ye?(Se=o.jsx(St,{side:"bottom",children:ye}),e[67]=ye,e[68]=Se):Se=e[68];let _e;e[69]!==ae||e[70]!==Se?(_e=o.jsxs(Ct,{children:[ae,Se]}),e[69]=ae,e[70]=Se,e[71]=_e):_e=e[71],e[72]!==re||e[73]!==me||e[74]!==_e?(Q=o.jsxs("div",{className:re,children:[me,_e]}),e[72]=re,e[73]=me,e[74]=_e,e[75]=Q):Q=e[75],U="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",q=p("sandbox.availableSectionEditor.localEditsHint",{typeLabel:fe}),e[5]=x,e[6]=a,e[7]=c,e[8]=T,e[9]=C,e[10]=g,e[11]=m,e[12]=s,e[13]=i,e[14]=l,e[15]=p,e[16]=y?.taskId,e[17]=d,e[18]=n,e[19]=P,e[20]=I,e[21]=U,e[22]=q,e[23]=Y,e[24]=Q,e[25]=A,e[26]=G}else P=e[19],I=e[20],U=e[21],q=e[22],Y=e[23],Q=e[24],A=e[25],G=e[26];let $;e[76]!==U||e[77]!==q?($=o.jsx("p",{className:U,children:q}),e[76]=U,e[77]=q,e[78]=$):$=e[78];let N;e[79]!==$||e[80]!==Y||e[81]!==Q?(N=o.jsxs("div",{className:Y,children:[Q,$]}),e[79]=$,e[80]=Y,e[81]=Q,e[82]=N):N=e[82];let L;e[83]!==c||e[84]!==T||e[85]!==_||e[86]!==C||e[87]!==r||e[88]!==f||e[89]!==I||e[90]!==z||e[91]!==p?(L=o.jsx(qs,{className:"min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:z?o.jsx(ka,{schema:z,value:C,onChange:fe=>b(fe),basePath:"",breadcrumbPath:T,onBreadcrumbChange:w,meta:r,decofile:c,onSaveReferencedBlock:f,sandbox:I},_):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=c,e[84]=T,e[85]=_,e[86]=C,e[87]=r,e[88]=f,e[89]=I,e[90]=z,e[91]=p,e[92]=L):L=e[92];let de;e[93]!==N||e[94]!==L||e[95]!==A?(de=o.jsxs("div",{className:A,children:[N,L]}),e[93]=N,e[94]=L,e[95]=A,e[96]=de):de=e[96];let ne;e[97]!==u||e[98]!==P||e[99]!==g||e[100]!==R?(ne=o.jsx(Bl,{open:R,onOpenChange:K,defaultBlockId:u,isPending:g,onSubmit:P}),e[97]=u,e[98]=P,e[99]=g,e[100]=R,e[101]=ne):ne=e[101];let ie;return e[102]!==de||e[103]!==ne||e[104]!==G?(ie=o.jsxs("div",{className:G,children:[de,ne]}),e[102]=de,e[103]=ne,e[104]=G,e[105]=ie):ie=e[105],ie}function pf(t){return t+1}function ff(t,e,s){const n={__resolveType:t},a=Ol([n],e)[0];return a?sl(n,a,e,s):null}function mf({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:c}){const l=Ee(),d=yn(),u=d?.virtualMcpId,m=Ka(u===e?e:null)?.metadata?.siteSlug??null,[f]=F.useState(()=>ff(r,i,tl(a))),[p,y]=F.useState(f?.data??{}),[j,E]=F.useState([]),[x,S]=F.useState(0),[C,b]=F.useState(!1),[v,T]=F.useState(null),w=v!==null,{save:_,flush:O}=Rl({orgSlug:t,virtualMcpId:e,branch:s},{holdsCopy:!0}),R=f?.resolveType?$a(f.resolveType,a):null,K=io(e,s),k=K.kind==="protocol"&&K.source==="github",z=i[r],P=z?Nr(r,z):r,I=d?.taskId??null,U={orgSlug:t,virtualMcpId:e,branch:s,threadId:I,previewUrl:n??void 0,siteSlug:m},q=$=>{y($),_(r,$)},Y=()=>{w?(T(null),b(!1),S($=>$+1)):T(JSON.stringify(p,null,2))},Q=$=>{const N=$??"";try{const L=JSON.parse(N);if(L&&typeof L=="object"&&!Array.isArray(L)){b(!1),q(L);return}b(!0)}catch{b(!0)}},A=[P,...j],G=$=>{E(j.slice(0,$)),S(N=>N+1)};return o.jsx("div",{className:"flex h-full w-full min-w-0",children:o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx($l,{crumbs:A,onSelect:G}),o.jsxs("div",{className:"shrink-0 border-b px-3 py-2.5",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Jn},"aria-hidden":!0}),k?o.jsx("span",{className:"min-w-0 truncate text-sm font-medium","data-testid":"saved-section-title",children:P}):null,o.jsx("div",{className:"flex-1"}),o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx(De,{variant:w?"default":"ghost",size:"icon",className:"shrink-0",onClick:Y,"aria-label":l(w?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":w,children:w?o.jsx(Qn,{size:14}):o.jsx(Ea,{size:14})})}),o.jsx(St,{side:"bottom",children:l(w?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson")})]})]}),o.jsx("p",{className:"mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",children:l("sandbox.savedSectionEditor.globalSectionDescription")})]}),o.jsxs("div",{className:"relative min-h-0 flex-1",children:[o.jsx(qs,{className:"h-full [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:o.jsx("div",{className:"mx-auto max-w-2xl",children:R?o.jsx(ka,{schema:R,value:p,onChange:$=>q($),basePath:"",breadcrumbPath:j,onBreadcrumbChange:E,meta:a,decofile:i,onSaveReferencedBlock:c,sandbox:U},x):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:l("sandbox.savedSectionEditor.noEditableFields")})})})}),v!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[C&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:l("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(Ua,{language:"json",height:"100%",code:v,onChange:Q,onSave:$=>{Q($),O()}})})]})]})]})})}function gf(t){const e=ce.c(46),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,isCreating:d,onCreateAvailable:u,onSaveReferencedBlock:g}=t,m=Ee();if(!s){let x;e[0]!==m?(x=m("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=m,e[1]=x):x=e[1];let S;e[2]!==m?(S=m("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=m,e[3]=S):S=e[3];let C;return e[4]!==x||e[5]!==S?(C=o.jsx(ft,{title:x,description:S}),e[4]=x,e[5]=S,e[6]=C):C=e[6],C}if(s.collection==="available-section"){const x=`available:${s.resolveType}`,S=s.resolveType,C=s.title;let b;e[7]!==s.title?(b=Ll(s.title),e[7]=s.title,e[8]=b):b=e[8];let v;e[9]!==u||e[10]!==s.resolveType?(v=(w,_)=>u(s.resolveType,w,_),e[9]=u,e[10]=s.resolveType,e[11]=v):v=e[11];let T;return e[12]!==i||e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==g||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==x||e[22]!==b||e[23]!==v||e[24]!==a?(T=o.jsx(uf,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,resolveType:S,title:C,defaultBlockId:b,isCreating:d,onCreate:v,onSaveReferencedBlock:g},x),e[12]=i,e[13]=l,e[14]=d,e[15]=c,e[16]=g,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=x,e[22]=b,e[23]=v,e[24]=a,e[25]=T):T=e[25],T}const f=`saved:${s.key}`,p=s.key;let y;e[26]!==l||e[27]!==s.key?(y=Object.hasOwn(l,s.key),e[26]=l,e[27]=s.key,e[28]=y):y=e[28];let j;e[29]!==i||e[30]!==l||e[31]!==c||e[32]!==g||e[33]!==n||e[34]!==r||e[35]!==s.key||e[36]!==a?(j=o.jsx(mf,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:c,decofile:l,blockKey:s.key,onSaveReferencedBlock:g}),e[29]=i,e[30]=l,e[31]=c,e[32]=g,e[33]=n,e[34]=r,e[35]=s.key,e[36]=a,e[37]=j):j=e[37];let E;return e[38]!==i||e[39]!==n||e[40]!==s.key||e[41]!==f||e[42]!==y||e[43]!==j||e[44]!==a?(E=o.jsx(va,{orgSlug:n,virtualMcpId:a,branch:i,blockKey:p,present:y,children:j},f),e[38]=i,e[39]=n,e[40]=s.key,e[41]=f,e[42]=y,e[43]=j,e[44]=a,e[45]=E):E=e[45],E}function us(t){const e=ce.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:c}=t,l=Ee();let d;e[0]!==l?(d=l("sandbox.itemActions.moreActions"),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(nl,{size:14}),e[2]=u):u=e[2];let g;e[3]!==d?(g=o.jsx(nn,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":d,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer",onClick:hf,children:u})}),e[3]=d,e[4]=g):g=e[4];let m;e[5]!==n||e[6]!==l?(m=n&&o.jsxs(Ot,{onClick:n,children:[o.jsx(bc,{size:14}),l("sandbox.itemActions.rename")]}),e[5]=n,e[6]=l,e[7]=m):m=e[7];let f;e[8]!==s||e[9]!==l?(f=s&&o.jsxs(Ot,{onClick:s,children:[o.jsx(so,{size:14}),l("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=l,e[10]=f):f=e[10];let p;e[11]!==a||e[12]!==l?(p=a&&o.jsxs(o.Fragment,{children:[o.jsx(_n,{}),o.jsxs(Ot,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Ta,{size:14}),l("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=l,e[13]=p):p=e[13];let y;e[14]!==i||e[15]!==r||e[16]!==l?(y=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(_n,{}),i&&o.jsxs(Ot,{onClick:i,children:[o.jsx(Ca,{size:14}),l("sandbox.itemActions.editSeo")]}),r&&o.jsxs(Ot,{onClick:r,children:[o.jsx(Ea,{size:14}),l("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=l,e[17]=y):y=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(_n,{}),e[18]=j):j=e[18];let E;e[19]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(co,{size:14}),e[19]=E):E=e[19];let x;e[20]!==l?(x=l("sandbox.itemActions.delete"),e[20]=l,e[21]=x):x=e[21];let S;e[22]!==c||e[23]!==x?(S=o.jsxs(Ot,{onClick:c,className:"text-destructive focus:text-destructive",children:[E,x]}),e[22]=c,e[23]=x,e[24]=S):S=e[24];let C;e[25]!==S||e[26]!==m||e[27]!==f||e[28]!==p||e[29]!==y?(C=o.jsxs(on,{align:"end",className:"w-44",children:[m,f,p,y,j,S]}),e[25]=S,e[26]=m,e[27]=f,e[28]=p,e[29]=y,e[30]=C):C=e[30];let b;return e[31]!==C||e[32]!==g?(b=o.jsxs(an,{children:[g,C]}),e[31]=C,e[32]=g,e[33]=b):b=e[33],b}function hf(t){return t.stopPropagation()}function na(t,e,{neverPublished:s=!1}={}){return e&&s?t==="post"?"sandbox.postEditor.deletePostConfirmBodyNeverPublished":"sandbox.contentBrowser.deleteDialog.descriptionNeverPublished":t==="section"?e?"sandbox.contentBrowser.deleteDialog.descriptionSectionDraft":"sandbox.contentBrowser.deleteDialog.descriptionSection":t==="post"?e?"sandbox.postEditor.deletePostConfirmBodyDraft":"sandbox.postEditor.deletePostConfirmBody":e?"sandbox.contentBrowser.deleteDialog.descriptionDraft":"sandbox.contentBrowser.deleteDialog.descriptionPermanent"}const Fi=4;function Pn(t){const e=new Map;for(const s of t)s.slug&&!e.has(s.slug)&&e.set(s.slug,s);return e}function An(t,e){const s=t.parentSlug;if(!t.slug||!s||s===t.slug)return;const n=e.get(s);return n===t?void 0:n}function zi(t,e){const s=Pn(e),n=[],a=new Set;let i=s.get(t);for(;i&&!a.has(i.slug??"")&&(a.add(i.slug??""),n.push(i),!(n.length>=Fi));)i=An(i,s);return n.reverse()}function Mi(t,e){const s=new Map;for(const n of t){const a=An(n,e);if(!a?.slug)continue;const i=s.get(a);i?i.push(n):s.set(a,[n])}for(const n of s.values())n.sort((a,i)=>a.label.localeCompare(i.label));return s}function Qg(t,e){const s=Pn(e),n=Mi(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const c=[];for(const l of r)for(const d of n.get(l)??[])d.slug&&!a.has(d.slug)&&(a.add(d.slug),c.push(d));r=c}return a.delete(t),a}function Jg(t,e){if(!t)return[];const s=Pn(e),n=zi(t,e),a=n[0];return!a||An(a,s)?[t]:n.map(i=>i.slug??"")}function xf(t){const e=Pn(t),s=Mi(t,e),n=new Set,a=[],i=(c,l)=>{if(!n.has(c)&&(n.add(c),a.push({entry:c,depth:l}),!(l+1>=Fi)))for(const d of s.get(c)??[])i(d,l+1)},r=t.filter(c=>!An(c,e)).sort((c,l)=>c.label.localeCompare(l.label));for(const c of r)i(c,0);for(const c of t)i(c,0);return a}function bf(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function yf(t){const e=new Map;for(const s of t){const n=bf(s.resolveType),a=e.get(n);a?a.push(s):e.set(n,[s])}return[...e.entries()].map(([s,n])=>({label:s,sections:n})).sort((s,n)=>s.label.localeCompare(n.label))}function oa(t){const e=ce.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=je("flex items-center gap-1.5 px-2.5 pb-1 pt-1 text-xs font-medium text-muted-foreground/70",a),e[0]=a,e[1]=i):i=e[1];let r;e[2]!==s?(r=o.jsx(s,{size:13,className:"shrink-0"}),e[2]=s,e[3]=r):r=e[3];let c;return e[4]!==n||e[5]!==i||e[6]!==r?(c=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=c):c=e[7],c}const Fn=8,vf={page:"Pages",redirect:"Redirects","cms-settings":"Settings"},kf=new Set(["pages","redirects","sections","loaders","matchers","content"]),Vi=new Set(["lazy","multivariate","website/flags/multivariate.ts","website/flags/multivariate/section.ts"]),jf=8;function wf(t){return t?.manifest?.blocks??{}}function Sf(t){const e=t?.aliases;return e&&typeof e=="object"?e:{}}function bn(t,e){const s=Sf(t)[e];return typeof s=="string"&&s?s:e}function xo(t,e){for(const[s,n]of Object.entries(wf(t)))if(n&&Object.hasOwn(n,e))return{group:s,entry:n[e]??{}};return null}function aa(t,e){const s=xo(t,bn(t,e));return s?kf.has(s.group)?s.group:"other":null}function ia(t,e,s){let n=s;for(let a=0;a<jf;a++){const i=n.__resolveType;if(typeof i!="string"||!i)return null;const r=bn(t,i);if(xo(t,r)){if(!Vi.has(r)||!t)return r;const l=Pr(t,n);return l&&l!==i?bn(t,l):r}const c=e[i];if(!c||typeof c!="object"||Array.isArray(c))return r;n=c}return null}function qn(t){const s=(t.split("/").filter(Boolean).pop()??t).replace(/\.(tsx?|jsx?|html?)$/,"").replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[-_\s]+/g," ").trim();return s?s.replace(/\b\w/g,n=>n.toUpperCase()):t}function Cf(t,e){const s=xo(t,e)?.entry.$ref;if(typeof s!="string")return null;const n=s.split("/").pop()??"",i=t?.schema?.definitions?.[n]?.title;return typeof i=="string"&&i.trim()?i.trim():null}function la(t,e){const s=bn(t,e),n=vf[s];if(n)return n;const a=Cf(t,s);return a&&a!==s&&!a.includes("/")?a:qn(s)}function ra(t){return t?t.kind==="delete"?"deleted":t.baseVersion===null?"new":"changed":"published"}function Nf(t){const e=new Map;for(const[s,n]of Object.entries(t??{}))e.set(ma(s),{name:s,change:n});return e}function Ns(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Tf(t){const{blocks:e,meta:s}=t,n=Nf(t.changes),a=new Map,i=(b,v)=>{const T=a.get(b);T?T.push(v):a.set(b,[v])},r=new Set,c=new Map;for(const[b,v]of Object.entries(e)){if(!Ns(v))continue;const T=ia(s,e,v);if(!T)continue;const w=ma(b);r.add(w);const _=ra(n.get(w)?.change);if(v.__resolveType===Oa){for(const[R,K]of Tr(b,v))i(T,{key:R,block:K,status:_});continue}const O={key:b,block:v,status:_};c.set(w,{type:T,entry:O}),i(T,O)}for(const[b,{name:v,change:T}]of n){if(T.kind!=="delete"||r.has(b))continue;const w=t.deleted?.[v];if(!Ns(w))continue;const _=ia(s,e,w);if(!_)continue;const O={key:v,block:w,status:"deleted"};c.set(b,{type:_,entry:O}),i(_,O)}const l=[];for(const[b,v]of a){if(Er(b)||Vi.has(b))continue;const T=aa(s,b)??"other";v.sort(Ef(T)),l.push({id:b,group:T,title:la(s,b),entries:v,changed:v.filter(w=>w.status!=="published").length})}l.sort((b,v)=>b.title.localeCompare(v.title));const d=l.find(b=>b.id===La)??null,u=d?l.filter(b=>b!==d):l,g=b=>u.filter(v=>v.group===b),m=g("pages")[0]??null,f=g("redirects")[0]??null,p=[m,f].filter(b=>!!b),y=u.filter(b=>!p.includes(b)&&b.entries.length===1),j=[...p,...u.filter(b=>!p.includes(b)&&b.entries.length>1).sort((b,v)=>v.entries.length-b.entries.length||b.title.localeCompare(v.title))],E=new Map(l.map(b=>[b.id,b])),x=new Map,S=b=>{const v=E.get(b)??x.get(b);if(v)return v;const T={id:b,group:b?aa(s,b)??"other":"other",title:b?la(s,b):"",entries:[],changed:0};return x.set(b,T),T},C=[];for(const[b,{name:v,change:T}]of n){const w=c.get(b);if(w){C.push({type:S(w.type),entry:w.entry});continue}const _=e[v];C.push({type:S(""),entry:{key:v,block:Ns(_)?_:{},status:ra(T),...Ns(_)?{}:{orphan:!0}}})}return C.sort((b,v)=>+!b.type.title-+!v.type.title||b.type.title.localeCompare(v.type.title)||gt(b.entry).localeCompare(gt(v.entry))),{pages:m,redirects:f,collections:j,singletons:y,all:u,settings:d,changed:C,statusKnown:!!t.changes}}function Ef(t){const e=s=>s.status==="new"?0:s.status==="deleted"?3:t==="pages"&&Kt(Ts(s))==="/"?1:2;return(s,n)=>e(s)-e(n)||gt(s).localeCompare(gt(n))}function Pf(t,e,s){if(e||t.length<=Fn)return{shown:t,hidden:0};const n=t.slice(0,Fn),a=s?t.slice(Fn).find(i=>i.id===s):void 0;return a&&n.push(a),{shown:n,hidden:t.length-n.length}}function Af(t){try{return decodeURIComponent(t)}catch{return t}}function gt(t){const e=t.block.redirect,s=[t.block.name,t.block.from,Ns(e)?e.from:void 0];for(const n of s)if(typeof n=="string"&&n.trim())return n.trim();return Af(t.key)}function Ts(t){return typeof t.block.path=="string"?t.block.path:""}function _f(t){return Fa({[t.key]:t.block},t.key,0).length}function Df(t,e){const s=Kt(t).split("/").filter(Boolean),n=Kt(e.split(/[?#]/)[0]??"").split("/").filter(Boolean);for(let a=0;a<s.length;a++){const i=s[a]??"";if(i==="*"||i.startsWith("*"))return!0;if(a>=n.length)return!1;if(!i.startsWith(":")&&i!==n[a])return!1}return s.length===n.length}function Bf(t,e){if(!e.startsWith("/"))return null;const s=t.filter(i=>i.status!=="deleted"),n=s.find(i=>Kt(Ts(i))===Kt(e));if(n)return n;const a=s.filter(i=>Df(Ts(i),e));return a.find(i=>!Ts(i).includes("*"))??a[0]??null}function gs(t){const e=Ar(t.block);return{from:e.from,to:e.to,kind:e.type}}const Rf=["title","headline","heading","label","subtitle","text","description","href","url"];function Ui(t){const e=s=>t.entries.some(n=>{const a=n.block[s];return typeof a=="string"&&a.trim()!==""});return Rf.filter(s=>s!=="name"&&e(s)).slice(0,2)}function Gi(t,e){const s=t.block[e];return typeof s=="string"?s.replace(/\s+/g," ").trim():""}function Hi(t,e,s=[]){const n=e.trim().toLowerCase();return n?[gt(t),t.key,Ts(t),...Ns(t.block.redirect)||typeof t.block.to=="string"?[gs(t).from,gs(t).to]:[],...s.map(i=>Gi(t,i))].some(i=>i.toLowerCase().includes(n)):!0}function Yi(t){return(gs(t).from.split(/[?#]/)[0]??"").split("/").filter(Boolean)}function $f(t){const e=new Map;for(const r of t){const c=Yi(r);if(c.length<2)continue;const l=c[0]??"";e.set(l,(e.get(l)??0)+1)}const s=[...e].filter(([,r])=>r>1).map(([r,c])=>({segment:r,count:c})).sort((r,c)=>c.count-r.count||r.segment.localeCompare(c.segment)),n=s.reduce((r,c)=>r+c.count,0),a=t.length-n;return s.length+(a>0?1:0)<2?[]:a>0?[...s,{segment:"",count:a}]:s}function Of(t,e,s){const n=Yi(t),a=n.length>=2?n[0]??"":"";return e?a===e:!s.some(i=>i.segment&&i.segment===a)}const Lf=9,If=12;function Kf(t){const e=new Map;for(const c of t){if(c.status!=="published")continue;const l=gs(c).to;e.set(l,(e.get(l)??0)+1)}let s="",n=0;for(const[c,l]of e)l>n&&(s=c,n=l);if(n<=If)return{shown:t,folded:0};const a=[];let i=0,r=0;for(const c of t){const l=c.status==="published"&&gs(c).to===s;if(l&&i>=Lf){r++;continue}l&&i++,a.push(c)}return{shown:a,folded:r}}const Ff={pages:"oklch(0.62 0.17 289)",redirects:"oklch(0.64 0.13 245)",singleton:"oklch(0.66 0.09 75)",content:"oklch(0.6 0.1 270)",seo:"oklch(0.65 0 0)"};function bo(){const t=ce.c(2),e=Ee();let s;return t[0]!==e?(s=n=>n.id==="page"?e("siteEditor.contentTypes.pages"):n.id==="redirect"?e("siteEditor.contentTypes.redirects"):n.id==="cms-settings"?e("siteEditor.contentTypes.settings"):n.title,t[0]=e,t[1]=s):s=t[1],s}function zf(t){const e=ce.c(64),{tree:s,view:n,openTypeId:a,onSelect:i,onOpenEntry:r,settings:c}=t,l=Ee(),d=bo(),[u,g]=F.useState(""),[m,f]=F.useState(!1);let p,y,j,E,x,S,C;if(e[0]!==d||e[1]!==r||e[2]!==i||e[3]!==a||e[4]!==u||e[5]!==m||e[6]!==l||e[7]!==s.changed.length||e[8]!==s.collections||e[9]!==s.pages?.id||e[10]!==s.redirects?.id||e[11]!==s.singletons||e[12]!==n){const w=u.trim().toLowerCase(),_=N=>!w||d(N).toLowerCase().includes(w)||N.entries.some(L=>Hi(L,w,Ui(N))),O=a||(n.kind==="type"?n.id:null);let R;e[20]!==O?(R=N=>O===N.id,e[20]=O,e[21]=R):R=e[21];const K=R;let k;e[22]!==K||e[23]!==d||e[24]!==r||e[25]!==i?(k=(N,L,de)=>{const ne=de===void 0?!1:de;return o.jsx(da,{label:d(N),dot:L,count:ne?void 0:N.entries.length,changed:N.changed>0,active:K(N),onClick:()=>{const ie=N.entries[0];ne&&ie&&ie.status!=="deleted"?r(N,ie):i({kind:"type",id:N.id})}},N.id)},e[22]=K,e[23]=d,e[24]=r,e[25]=i,e[26]=k):k=e[26];const z=k,P=s.collections.filter(_),I=w?{shown:P,hidden:0}:Pf(P,m,O),U=s.singletons.filter(_),q=!w||l("siteEditor.contentTypes.seo").toLowerCase().includes(w);let Y;e[27]!==s.pages?.id||e[28]!==s.redirects?.id?(Y=N=>N.id===s.pages?.id?"pages":N.id===s.redirects?.id?"redirects":"content",e[27]=s.pages?.id,e[28]=s.redirects?.id,e[29]=Y):Y=e[29];const Q=Y;e[30]!==l?(x=l("sandbox.collectionsSidebar.content"),e[30]=l,e[31]=x):x=e[31],S="w-[232px] shrink-0 border-r flex flex-col min-h-0";let A;e[32]===Symbol.for("react.memo_cache_sentinel")?(A=N=>g(N.target.value),e[32]=A):A=e[32];let G;e[33]!==l?(G=l("siteEditor.contentTypes.searchContent"),e[33]=l,e[34]=G):G=e[34];let $;e[35]!==l?($=l("siteEditor.contentTypes.searchContent"),e[35]=l,e[36]=$):$=e[36],e[37]!==u||e[38]!==G||e[39]!==$?(C=o.jsx("div",{className:"px-2.5 pt-3 pb-1 shrink-0",children:o.jsx("input",{type:"search",value:u,onChange:A,placeholder:G,"aria-label":$,className:"w-full rounded-lg bg-muted/60 px-3 py-1.5 text-[13px] outline-none placeholder:text-muted-foreground"})}),e[37]=u,e[38]=G,e[39]=$,e[40]=C):C=e[40],p="flex-1 min-h-0 overflow-y-auto px-2.5 pb-4 flex flex-col gap-px",e[41]!==i||e[42]!==a||e[43]!==l||e[44]!==s.changed.length||e[45]!==n?(y=s.changed.length>0&&o.jsxs("button",{type:"button",onClick:()=>i({kind:"changes"}),className:je("mt-1.5 mb-0.5 flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm font-medium cursor-pointer","bg-warning/10 text-warning hover:bg-warning/15",n.kind==="changes"&&!a&&"ring-1 ring-warning/40"),children:[o.jsx("span",{className:"size-2 shrink-0 rounded-full bg-warning"}),o.jsx("span",{className:"flex-1 truncate",children:l("siteEditor.contentTypes.changesInDraft")}),o.jsx("span",{className:"text-xs tabular-nums",children:s.changed.length})]}),e[41]=i,e[42]=a,e[43]=l,e[44]=s.changed.length,e[45]=n,e[46]=y):y=e[46],j=I.shown.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(ca,{label:l("siteEditor.contentTypes.group.collections")}),I.shown.map(N=>z(N,Q(N))),!w&&(I.hidden>0||m)&&o.jsx("button",{type:"button",onClick:()=>f(Mf),className:"px-2.5 py-1 text-left text-xs text-muted-foreground hover:text-foreground cursor-pointer",children:m?l("siteEditor.contentTypes.showFewer"):l("siteEditor.contentTypes.showAll",{count:s.collections.length})})]}),E=(q||U.length>0)&&o.jsxs(o.Fragment,{children:[o.jsx(ca,{label:l("siteEditor.contentTypes.group.singletons")}),q&&o.jsx(da,{label:l("siteEditor.contentTypes.seo"),dot:"seo",active:n.kind==="seo"&&!a,onClick:()=>i({kind:"seo"})}),U.map(N=>z(N,"singleton",!0))]}),e[0]=d,e[1]=r,e[2]=i,e[3]=a,e[4]=u,e[5]=m,e[6]=l,e[7]=s.changed.length,e[8]=s.collections,e[9]=s.pages?.id,e[10]=s.redirects?.id,e[11]=s.singletons,e[12]=n,e[13]=p,e[14]=y,e[15]=j,e[16]=E,e[17]=x,e[18]=S,e[19]=C}else p=e[13],y=e[14],j=e[15],E=e[16],x=e[17],S=e[18],C=e[19];let b;e[47]!==p||e[48]!==y||e[49]!==j||e[50]!==E?(b=o.jsxs("div",{className:p,children:[y,j,E]}),e[47]=p,e[48]=y,e[49]=j,e[50]=E,e[51]=b):b=e[51];let v;e[52]!==i||e[53]!==a||e[54]!==c||e[55]!==l||e[56]!==n?(v=c&&o.jsx("div",{className:"shrink-0 border-t px-2.5 py-2","data-testid":"content-sidebar-settings",children:o.jsx(Wi,{label:l("siteEditor.contentTypes.settings"),marker:o.jsx(zn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),changed:c.changed,active:n.kind==="settings"&&!a,onClick:()=>i({kind:"settings"})})}),e[52]=i,e[53]=a,e[54]=c,e[55]=l,e[56]=n,e[57]=v):v=e[57];let T;return e[58]!==x||e[59]!==S||e[60]!==C||e[61]!==b||e[62]!==v?(T=o.jsxs("nav",{"aria-label":x,className:S,children:[C,b,v]}),e[58]=x,e[59]=S,e[60]=C,e[61]=b,e[62]=v,e[63]=T):T=e[63],T}function Mf(t){return!t}function ca(t){const e=ce.c(2),{label:s}=t;let n;return e[0]!==s?(n=o.jsx("div",{className:"px-2.5 pt-4 pb-1 text-xs text-muted-foreground/70",children:s}),e[0]=s,e[1]=n):n=e[1],n}function da(t){const e=ce.c(8);let s,n;e[0]!==t?({dot:s,...n}=t,e[0]=t,e[1]=s,e[2]=n):(s=e[1],n=e[2]);const a=Ff[s];let i;e[3]!==a?(i=o.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{background:a}}),e[3]=a,e[4]=i):i=e[4];let r;return e[5]!==n||e[6]!==i?(r=o.jsx(Wi,{...n,marker:i}),e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Wi(t){const e=ce.c(17),{label:s,marker:n,count:a,changed:i,active:r,onClick:c}=t,l=Ee(),d=r?"page":void 0,u=r?"bg-accent text-accent-foreground font-medium":"text-foreground/80 hover:bg-accent hover:text-foreground";let g;e[0]!==u?(g=je("flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-sm transition-colors cursor-pointer",u),e[0]=u,e[1]=g):g=e[1];let m;e[2]!==s?(m=o.jsx("span",{className:"flex-1 truncate",children:s}),e[2]=s,e[3]=m):m=e[3];let f;e[4]!==i||e[5]!==l?(f=i&&o.jsx("span",{title:l("siteEditor.contentTypes.status.changed"),className:"size-1.5 shrink-0 rounded-full bg-warning"}),e[4]=i,e[5]=l,e[6]=f):f=e[6];let p;e[7]!==a?(p=a!==void 0&&o.jsx("span",{className:"shrink-0 text-xs font-normal tabular-nums text-muted-foreground/70",children:a}),e[7]=a,e[8]=p):p=e[8];let y;return e[9]!==n||e[10]!==c||e[11]!==d||e[12]!==g||e[13]!==m||e[14]!==f||e[15]!==p?(y=o.jsxs("button",{type:"button",onClick:c,"aria-current":d,className:g,children:[n,m,f,p]}),e[9]=n,e[10]=c,e[11]=d,e[12]=g,e[13]=m,e[14]=f,e[15]=p,e[16]=y):y=e[16],y}const Vf={published:"success",changed:"warning",new:"info",deleted:"destructive"},Uf={published:"siteEditor.contentTypes.status.published",changed:"siteEditor.contentTypes.status.changed",new:"siteEditor.contentTypes.status.new",deleted:"siteEditor.contentTypes.status.deleted"};function Gf(t){const e=ce.c(82),{tree:s,type:n,onOpen:a,onRestore:i,restoring:r,createLabel:c,onCreate:l,rowMenu:d}=t,u=Ee(),g=bo(),[m,f]=F.useState(""),[p,y]=F.useState("all"),[j,E]=F.useState(!1),x=s.statusKnown;let S,C,b,v,T;if(e[0]!==c||e[1]!==p||e[2]!==x||e[3]!==g||e[4]!==l||e[5]!==a||e[6]!==i||e[7]!==m||e[8]!==r||e[9]!==d||e[10]!==u||e[11]!==s.changed||e[12]!==s.pages?.entries||e[13]!==s.singletons||e[14]!==n||e[15]!==j){const O=n?n.entries.map(W=>({type:n,entry:W})):s.changed,R=n?Ui(n):[],K=O.filter(Jf).length,k=n?.group==="redirects"?$f(n.entries):[],z=p==="changed"&&x,P=p.startsWith("path:")?p.slice(5):null,I=O.filter(W=>(!z||W.entry.status!=="published")&&(P===null||Of(W.entry,P,k))&&Hi(W.entry,m,n?R:[])),U=n?.group==="redirects"&&p==="all"&&!m.trim()&&!j?Kf(I.map(Qf)):null,q=U&&U.folded>0?new Set(U.shown):null,Y=q?I.filter(W=>q.has(W.entry)):I;let Q;e[21]!==s.singletons?(Q=new Set(s.singletons.map(Xf)),e[21]=s.singletons,e[22]=Q):Q=e[22];const A=Q;let G;e[23]!==g||e[24]!==A||e[25]!==u?(G=W=>{const{type:se,entry:he}=W;return se.id===La?u("siteEditor.contentTypes.settings"):A.has(se.id)&&typeof he.block.name!="string"?g(se):gt(he)},e[23]=g,e[24]=A,e[25]=u,e[26]=G):G=e[26];const $=G,N=n?n.group==="pages"?"pages":n.group==="redirects"?"redirects":"other":"changes";let L;e[27]!==s.pages?.entries?(L=s.pages?.entries??[],e[27]=s.pages?.entries,e[28]=L):L=e[28];const de=L;let ne;if(e[29]!==N||e[30]!==g||e[31]!==u||e[32]!==n){const W=n?g(n):u("siteEditor.contentTypes.changesInDraft");ne=N==="redirects"?u("siteEditor.contentTypes.searchRedirects"):u("siteEditor.contentTypes.search",{type:W.toLowerCase()}),e[29]=N,e[30]=g,e[31]=u,e[32]=n,e[33]=ne}else ne=e[33];const ie=ne,fe=qf;let ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue=W=>!fe(W)&&!W.entry.orphan,e[34]=ue):ue=e[34];const te=ue;let le;e[35]===Symbol.for("react.memo_cache_sentinel")?(le=(W,se,he)=>{const xe=he===void 0?!1:he;return o.jsx("span",{className:je((xe||fe(W))&&"text-muted-foreground",fe(W)&&"line-through"),children:se})},e[35]=le):le=e[35];const oe=le,be=Wf,M=[];if(N==="redirects"){let W;e[36]===Symbol.for("react.memo_cache_sentinel")?(W=xe=>oe(xe,be(xe)?.from),e[36]=W):W=e[36];let se;e[37]!==de?(se=xe=>{const Re=be(xe)?.to??"",Ke=Bf(de,Re);return o.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[Ke&&oe(xe,gt(Ke)),oe(xe,Re,!0)]})},e[37]=de,e[38]=se):se=e[38];let he;e[39]!==u?(he=xe=>be(xe)?.kind==="permanent"?u("siteEditor.contentTypes.kind.permanent"):u("siteEditor.contentTypes.kind.temporary"),e[39]=u,e[40]=he):he=e[40],M.push({id:"from",header:u("siteEditor.contentTypes.column.from"),render:W},{id:"to",header:u("siteEditor.contentTypes.column.to"),render:se},{id:"kind",header:u("siteEditor.contentTypes.column.kind"),render:he})}else{let W;if(e[41]!==$?(W=se=>oe(se,$(se)),e[41]=$,e[42]=W):W=e[42],M.push({id:"name",header:u("siteEditor.contentTypes.column.name"),render:W}),N==="pages"){let se;e[43]===Symbol.for("react.memo_cache_sentinel")?(se=he=>oe(he,Ts(he.entry),!0),e[43]=se):se=e[43],M.push({id:"path",header:u("siteEditor.contentTypes.column.path"),render:se},{id:"sections",header:u("siteEditor.contentTypes.column.sections"),render:Yf})}if(N==="changes"){let se;e[44]!==g?(se=he=>he.type.title?g(he.type):"",e[44]=g,e[45]=se):se=e[45],M.push({id:"type",header:u("siteEditor.contentTypes.column.type"),render:se})}if(N==="other")for(const se of R)M.push({id:`field:${se}`,header:qn(se),render:he=>oe(he,Gi(he.entry,se))})}let re;if(e[46]!==x||e[47]!==i||e[48]!==r||e[49]!==u?(re=W=>x?o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(wn,{variant:Vf[W.entry.status],children:u(Uf[W.entry.status])}),fe(W)&&o.jsx(ua,{children:o.jsxs(De,{size:"xs",variant:"outline",disabled:r!==null,onClick:()=>i(W.entry),children:[r===W.entry.key&&o.jsx(mt,{className:"size-3"}),u("siteEditor.contentTypes.restore")]})})]}):o.jsx("span",{className:"text-muted-foreground",children:u("siteEditor.contentTypes.status.checking")}),e[46]=x,e[47]=i,e[48]=r,e[49]=u,e[50]=re):re=e[50],M.push({id:"status",header:u("siteEditor.contentTypes.column.status"),render:re}),d){let W;e[51]!==d?(W=se=>fe(se)?null:o.jsx(ua,{children:d(se.type,se.entry)}),e[51]=d,e[52]=W):W=e[52],M.push({id:"actions",header:"",render:W,cellClassName:"w-12 shrink-0"})}const me=Hf;let J;e[53]!==p||e[54]!==m||e[55]!==u||e[56]!==n?(J=m.trim()?u("siteEditor.contentTypes.noMatch"):u(n?p==="changed"?"siteEditor.contentTypes.noChangedHere":"siteEditor.contentTypes.empty":"siteEditor.contentTypes.noChanges"),e[53]=p,e[54]=m,e[55]=u,e[56]=n,e[57]=J):J=e[57];const D=J;v="flex h-full min-w-0 flex-col overflow-y-auto";let Z;e[58]===Symbol.for("react.memo_cache_sentinel")?(Z=je("flex shrink-0 flex-wrap items-center gap-2",Vl),e[58]=Z):Z=e[58];let ae;e[59]===Symbol.for("react.memo_cache_sentinel")?(ae=W=>{W.key==="Escape"&&(f(""),W.currentTarget.blur())},e[59]=ae):ae=e[59];let ye;e[60]!==m||e[61]!==ie?(ye=o.jsx("div",{ref:me,className:"w-full max-w-[280px]",children:o.jsx(yc,{value:m,onChange:f,placeholder:ie,onKeyDown:ae})}),e[60]=m,e[61]=ie,e[62]=ye):ye=e[62];const Se=n&&o.jsxs(vc,{type:"single",variant:"segmented",size:"sm",value:p,onValueChange:W=>W&&y(W),"aria-label":u("siteEditor.contentTypes.filter"),children:[o.jsx($n,{value:"all",children:u("siteEditor.contentTypes.filter.all",{count:O.length})}),x&&o.jsx($n,{value:"changed",children:u("siteEditor.contentTypes.filter.changed",{count:K})}),k.map(W=>o.jsx($n,{value:`path:${W.segment}`,children:W.segment?`${qn(W.segment)} ${W.count}`:u("siteEditor.contentTypes.filter.otherPaths",{count:W.count})},W.segment||"-"))]});let _e;e[63]!==c||e[64]!==l?(_e=l&&c&&o.jsxs(De,{size:"sm",className:"ml-auto",onClick:l,children:[o.jsx(kn,{size:16}),c]}),e[63]=c,e[64]=l,e[65]=_e):_e=e[65],e[66]!==ye||e[67]!==Se||e[68]!==_e?(T=o.jsxs("div",{className:Z,children:[ye,Se,_e]}),e[66]=ye,e[67]=Se,e[68]=_e,e[69]=T):T=e[69],S="flex flex-1 flex-col px-4 pb-4";let we;e[70]!==a?(we=W=>a(W.type,W.entry),e[70]=a,e[71]=we):we=e[71];let Be;e[72]!==D?(Be=o.jsx(ft,{title:D}),e[72]=D,e[73]=Be):Be=e[73],C=o.jsx(kc,{columns:M,data:Y,onRowClick:we,isRowClickable:te,emptyState:Be}),b=U&&U.folded>0&&o.jsx("div",{className:"py-2",children:o.jsx(De,{variant:"ghost",size:"sm",onClick:()=>E(!0),children:u("siteEditor.contentTypes.folded",{count:U.folded})})}),e[0]=c,e[1]=p,e[2]=x,e[3]=g,e[4]=l,e[5]=a,e[6]=i,e[7]=m,e[8]=r,e[9]=d,e[10]=u,e[11]=s.changed,e[12]=s.pages?.entries,e[13]=s.singletons,e[14]=n,e[15]=j,e[16]=S,e[17]=C,e[18]=b,e[19]=v,e[20]=T}else S=e[16],C=e[17],b=e[18],v=e[19],T=e[20];let w;e[74]!==S||e[75]!==C||e[76]!==b?(w=o.jsxs("div",{className:S,children:[C,b]}),e[74]=S,e[75]=C,e[76]=b,e[77]=w):w=e[77];let _;return e[78]!==v||e[79]!==T||e[80]!==w?(_=o.jsxs("div",{className:v,children:[T,w]}),e[78]=v,e[79]=T,e[80]=w,e[81]=_):_=e[81],_}function Hf(t){const e=t?.querySelector("input");if(!e)return;const s=n=>{if(n.key!=="/"||n.metaKey||n.ctrlKey)return;const a=n.target;a&&(a.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(a.tagName))||(n.preventDefault(),e.focus())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)}function Yf(t){return _f(t.entry)}function Wf(t){return t.type.group==="redirects"?gs(t.entry):null}function qf(t){return t.entry.status==="deleted"}function Xf(t){return t.id}function Qf(t){return t.entry}function Jf(t){return t.entry.status!=="published"}function ua(t){const e=ce.c(2),{children:s}=t;let n;return e[0]!==s?(n=o.jsx("span",{className:"inline-flex",onClick:em,onKeyDown:Zf,children:s}),e[0]=s,e[1]=n):n=e[1],n}function Zf(t){return t.stopPropagation()}function em(t){return t.stopPropagation()}const pa=F.lazy(()=>xt(()=>import("./app-editor-a13s_yZZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139])).then(t=>({default:t.AppEditor}))),fa=F.lazy(()=>xt(()=>import("./cms-settings-editor-CcuLaEnU.js"),__vite__mapDeps([140,1,2,26,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,100,19,10,8,9,11,12,13,14,3,4,5,6,7,15,16,17,18,20,21,22,23,24,51,52,53,54,55,56,101,102,60,103,104,128,0,57,58,59,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,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,129,130,131,132,133,134,135,136,137,138,139])).then(t=>({default:t.CmsSettingsEditor}))),tm=F.lazy(()=>xt(()=>import("./post-editor-CG6NXsGN.js"),__vite__mapDeps([141,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,26,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,68,142,135,52,74,75,20,124,121,112,113,59,60,61,62,63,64,65,66,67,69,70,24,22,23,71,72,73,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,19,21,51,53,54,55,56,101,102,103,104,105,106,107,108,109,110,111,57,114,115,116,117,118,119,120,122,123,125,126,127,143,144,145,146,147,131,148,149,128,129,130,132,133,134,136,137,138,139])).then(t=>({default:t.PostEditor}))),sm=F.lazy(()=>xt(()=>import("./record-editor-OoLxSu9R.js"),__vite__mapDeps([150,1,2,68,53,54,23,34,113,59,60,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,61,62,63,64,65,66,67,69,70,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,24,22,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,19,20,21,51,52,55,56,101,102,103,104,105,106,107,108,109,110,111,112,57,114,115,116,117,118,119,120,121,122,123,124,125,126,127,147,149,128,129,130,131,132,133,134,135,136,137,138,139])).then(t=>({default:t.RecordEditor}))),nm=F.lazy(()=>xt(()=>import("./context-Gpy7m9cw.js"),__vite__mapDeps([151,1,2,106,29,44,74,75,45,68,107,108,54,109,110,111,25,26,27,28,30,31,32,33,34,35,36,37,38,39,40,41,42,43,46,47,48,49,50,99,100,19,10,8,9,11,12,13,14,3,4,5,6,7,15,16,17,18,20,21,22,23,24,51,52,53,55,56,101,102,60,103,104,105,135,112,113,59,61,62,63,64,65,66,67,69,70,71,72,73,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,57,114,115,116,117,118,119,120,121,122,123,124,125,126,127,149,152,144,146,153,154,131,145,128,129,130,132,133,134,136,137,138,139])).then(t=>({default:t.BlogContext}))),om=F.lazy(()=>xt(()=>import("./category-editor-Ctbp0oQy.js"),__vite__mapDeps([155,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,26,30,25,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,68,53,54,23,147,59,60,61,62,63,64,65,66,67,69,70,24,22,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,19,20,21,51,52,55,56,101,102,103,104,105,106,107,108,109,110,111,112,113,57,114,115,116,117,118,119,120,121,122,123,124,125,126,127,143,144,145,146,134,148,149,128,129,130,131,132,133,135,136,137,138,139])).then(t=>({default:t.CategoryEditor}))),am=F.lazy(()=>xt(()=>import("./sections-editor-DwV32_3f.js"),__vite__mapDeps([156,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,59,60,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,61,62,63,64,65,66,67,68,69,70,24,22,23,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,19,20,21,51,52,53,54,55,56,101,102,103,104,105,106,107,108,109,110,111,112,113,57,114,115,116,117,118,119,120,121,122,123,124,125,126,127,131,58,157,158,134,159])).then(t=>({default:t.SectionsEditor}))),im=F.lazy(()=>xt(()=>import("./seo-editor-D1gGpMMF.js").then(t=>t.s),__vite__mapDeps([157,1,2,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,57,54,59,60,61,62,63,64,65,66,67,68,69,70,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,24,22,23,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,19,20,21,51,52,53,55,56,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])).then(t=>({default:t.SeoEditor}))),lm=F.lazy(()=>xt(()=>import("./variant-calendar-C5r0ak32.js"),__vite__mapDeps([160,1,2,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,68,57,54,112,22,23,120,121,133])).then(t=>({default:t.VariantCalendar}))),rm=F.lazy(()=>xt(()=>import("./post-calendar-DVrcXuZq.js"),__vite__mapDeps([161,1,2,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,57,54,133,18,14,13,3,4,5,6,7,8,9,10,11,12,15,16,17,106,74,75,68,107,108,109,110,111,99,100,19,20,21,22,23,24,51,52,53,55,56,101,102,60,103,104,105,59,61,62,63,64,65,66,67,69,70,71,72,73,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,134,135,136,137,138,139])).then(t=>({default:t.PostCalendar}))),cm=F.lazy(()=>xt(()=>import("./redirect-editor-W9B4A_h8.js"),__vite__mapDeps([162,1,2,52,40,68,53,54,23,34,59,60,25,26,27,28,29,30,31,32,33,35,36,37,38,39,41,42,43,44,45,46,47,48,49,50,61,62,63,64,65,66,67,69,70,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,24,22,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,19,20,21,51,55,56,101,102,103,104,105,106,107,108,109,110,111,112,113,57,114,115,116,117,118,119,120,121,122,123,124,125,126,127,149])).then(t=>({default:t.RedirectEditor})));function dm(t){return ii(t)!==null||t===Oa||t==="redirect"||Fr.has(t)}function um(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"pages":t}function pm(t,e){return t&&(ds(t)||e&&t==="sections")?t:null}function fm(t){const e=ce.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=eo(),{org:i}=ol(),r=oc(),c=ac(),{runtime:l,previewServerUrl:d}=lo(a),u=l==="cms",g=io(a,n);let m,f;e[0]!==g||e[1]!==u||e[2]!==c.previewState||e[3]!==r.lifecycle.phase?(m=Ba(g),f=xd({fastPreviewActive:u||m,previewState:c.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=g,e[1]=u,e[2]=c.previewState,e[3]=r.lifecycle.phase,e[4]=m,e[5]=f):(m=e[4],f=e[5]);const p=f;if(p.kind==="sandbox-card"){const x=`/${i.slug}/settings/connections`;let S;return e[6]!==p.state||e[7]!==c.start||e[8]!==x||e[9]!==r.lifecycle||e[10]!==r.phase?(S=o.jsx(gd,{state:p.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:c.start,connectionsHref:x}),e[6]=p.state,e[7]=c.start,e[8]=x,e[9]=r.lifecycle,e[10]=r.phase,e[11]=S):S=e[11],S}if(!a||!n){let x;return e[12]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(ft,{title:"Waiting for sandbox context…"}),e[12]=x):x=e[12],x}if(_r(g)){let x;return e[13]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Rr,{}),e[13]=x):x=e[13],x}if(g.kind==="pending"){let x;return e[14]!==g?(x=o.jsx($r,{backend:g}),e[14]=g,e[15]=x):x=e[15],x}const y=m?null:c.previewUrl;let j;e[16]!==g||e[17]!==u||e[18]!==c.previewUrl||e[19]!==d?(j=g.kind==="protocol"&&g.source==="local"?rr(g):u?d:c.previewUrl,e[16]=g,e[17]=u,e[18]=c.previewUrl,e[19]=d,e[20]=j):j=e[20];let E;return e[21]!==n||e[22]!==s||e[23]!==p.devServerReady||e[24]!==p.sandboxWarming||e[25]!==i.slug||e[26]!==y||e[27]!==j||e[28]!==a?(E=o.jsx(mm,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:y,sitePreviewUrl:j,deepLinkPage:s,devServerReady:p.devServerReady,sandboxWarming:p.sandboxWarming}),e[21]=n,e[22]=s,e[23]=p.devServerReady,e[24]=p.sandboxWarming,e[25]=i.slug,e[26]=y,e[27]=j,e[28]=a,e[29]=E):E=e[29],E}function mm({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:c}){const l=Ee(),d=yn()?.taskId??null,u={orgSlug:t,virtualMcpId:e,branch:s,threadId:d,previewUrl:n},g=io(e,s),m=!Ba(g),f=g.kind==="protocol"&&g.source==="github";al(f);const p=Il({orgSlug:t,virtualMcpId:e,branch:s}),y=f,j=f&&g.kind==="protocol"?g:null,E=j?cr({orgSlug:t,virtualMcpId:e,branch:s},j):null,x=dr(j,E),S=ur(j,E,x.data),C=Yr({orgSlug:t,virtualMcpId:e,branch:s,refresh:()=>x.refetch()}),b=bo(),[v,T]=F.useState(null),[w,_]=F.useState(null),[O,R]=F.useState(null),K=Kl()===void 0,{data:k,isLoading:z}=pr(u,{fetchEnabled:r}),P={orgSlug:t,virtualMcpId:e,branch:s},I=fr(f?P:null,dm);No(f?P:null,I);const U=ga({strict:!1}),[q,Y]=F.useState(()=>pm(U.contentCollection,!m)??"pages"),Q=Ga(),A=um(q,Q,!m),{openPanel:G}=Zr(),$={open:(h,B)=>{h==="campaigns"?G("calendar"):G("experiments",{search:B?ee=>({...ee,test:B}):void 0})}},[N,L]=F.useState(()=>U.contentItem&&(ds(A)||A==="sections")?{collection:A,key:U.contentItem}:null),de=N&&"key"in N?N.key:null,ne=de??w?.key??null,ie=ne===null?[]:[Qs(ne,k??{})?.block??ne],fe=No(f?P:null,ie,{withRefs:!0}),[ue,te]=F.useState(null),le=F.useRef(null),[oe,be]=F.useState(!1),{data:M,isLoading:re}=Dr(u,{fetchEnabled:r,refetchInterval:h=>{const B=h.state.data;let ee;if(A==="apps"&&N&&N.collection==="apps"){const ve=k?.[N.key];ee=typeof ve?.__resolveType=="string"?ve.__resolveType:void 0}else if(A==="site"&&k){const ve=B?Eo(k,B):null,nt=k.site;ee=ve?.resolveType??(typeof nt?.__resolveType=="string"?nt.__resolveType:void 0)}const ge=Cc({resolveType:ee,meta:B,reads:h.state.dataUpdateCount+h.state.errorUpdateCount,window:le.current});le.current=ge.window;const Ae=ge.interval!==!1;return be(ve=>ve===Ae?ve:Ae),ge.interval}}),me=!!(i?.pageId||i?.path||i?.pathTemplate),[J,D]=F.useState(!1);if(me&&!J&&N===null&&k&&!re){D(!0);const h=Br(To(k,M),i??{});h&&(Y("pages"),L({collection:"pages",key:h.key,path:h.path}))}const[Z,ae]=F.useState(""),[ye,Se]=F.useState("list"),_e=h=>{L(h),te(null)},[we,Be]=F.useState(A);we!==A&&(Be(A),ae(""));const{createTask:W}=eo(),se=lo(e),he=cd(e,M??void 0),xe=_a(e).url,Re=Zn("site_apps_install_enabled"),Ke=Re&&he!==null&&!xe,Ge=M&&k?ed(he?Ja(he):[],M,k):[],$e=rd({orgSlug:t,virtualMcpId:e,branch:s}),qe=Re?Ke?se.resolved?se.runtime==="cms"?{reason:l("sandbox.appEditor.installNeedsCodingSession"),action:{label:l("chat.fastPreview.startCodingSession"),onClick:()=>W({runtime:"sandbox"})}}:null:{reason:l("sandbox.appInstallPanel.sessionLoading")}:{reason:l("sandbox.appInstallPanel.unavailable")}:{reason:l("sandbox.appInstallPanel.flagOff")},Nt=h=>{if(se.resolved&&!$e.isPending){if(se.runtime==="cms"){ke.error(l("sandbox.appEditor.installNeedsCodingSession"),{action:{label:l("chat.fastPreview.startCodingSession"),onClick:()=>W({runtime:"sandbox"})}});return}$e.mutate({blockKey:h.id},{onSuccess:B=>_e({collection:"apps",key:B.key}),onError:B=>ke.error(B.message)})}},Pe=vn(u),st=Wr(u),it=op({orgSlug:t,virtualMcpId:e,branch:s,decofile:k??{},onMoved:(h,B)=>L(ee=>ee?.collection==="posts"&&ee.key===h?{collection:"posts",key:B}:ee)}),[Ie,X]=F.useState(null),[Ne,Ce]=F.useState(),[Oe,He]=F.useState(!1),[Ft,Jt]=F.useState(),[Ye,zt]=F.useState(null),[Fe,Ue]=F.useState(null),Bs=Fe?.kind==="blog"?zs[Fe.blogKind]:Fe?.kind??"item",Tt=Fe?.kind==="section"?l(na("section",f,{neverPublished:p(Fe.key)}),{label:Fe.label}):Fe?l(na("block",f,{neverPublished:p(Fe.key)}),{label:Fe.label}):null,Zt=l("sandbox.contentBrowser.deleteDialog.title",{noun:Bs}),Et=_d(Tt===null?null:{title:Zt,description:Tt},f),[bt,es]=F.useState(null),ts=!k||!M;if(z||re||K||ts&&c)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})});if(ts)return o.jsx(ft,{title:"Could not load site data."});if(mr(M))return o.jsx(Fl,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k});const Xe=To(k,M).sort((h,B)=>h.name.localeCompare(B.name)),ss=Or(k).sort((h,B)=>h.from.localeCompare(B.from)),lt=Lr(k,M),Mt=A==="sections"?Ir(M):[],yt=Eo(k,M),Qe=li(k),Pt=uo.some(h=>Qe[h].length>0),Vt=ds(A)?Qe[A]:[],At=wo(M,"loaders"),vt=wo(M,"actions"),Ut=m?["settings"]:["calendar","apps",...yt?[]:["site"],...vt===0?["actions"]:[],...Po(M)?[]:["settings"]];if(!Kr(k,M)&&!Pt&&At===0&&vt===0)return o.jsx(ft,{icon:Vs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const hs={pages:Xe.length,sections:lt.length,apps:m?Ge.length:0,loaders:At,actions:vt,redirects:ss.length,posts:Qe.posts.length,authors:Qe.authors.length,categories:Qe.categories.length},ns=new Set(Xe.map(h=>Kt(h.path))),Gt=new Set(Xe.map(h=>h.name)),Ht=new Set(lt.map(h=>h.name)),Ve=y?Tf({blocks:k,meta:M,changes:x.data?.changes,deleted:S.data}):null,_t=Ve?.pages??Ve?.all[0]??null,Dt=_t?{kind:"type",id:_t.id}:{kind:"seo"},rt=h=>h?.kind==="type"?Ve?.all.find(B=>B.id===h.id)??null:null,os=Po(M),Je=v&&(v.kind==="type"?rt(v):v.kind!=="settings"||os)?v:Dt,kt=rt(Je);if(y&&N){const h=N.collection==="available-section"?"sections":N.collection==="available-app"?"apps":N.collection;q!==h&&Y(h)}const ct=y&&(N!==null||w!==null&&(A==="loaders"||A==="settings")),dt=w?w.from:Je,Ze=dt&&dt.kind==="type"&&!rt(dt)?Dt:dt,xs=h=>{if(w?.key!==h)return;const B=Ve?.all.find(ge=>ge.id===w.typeId),ee=B?.entries.find(ge=>ge.key===h);if(!(!B||!ee||B.entries.length<2))return`${b(B)} · ${gt(ee)}`},as=()=>{_(null),L(null),te(null)},is=(h,B,ee)=>{te(null),_({typeId:h.id,key:B.key,from:ee}),h.group==="pages"?L({collection:"pages",key:B.key,path:typeof B.block.path=="string"?B.block.path:"/"}):h.group==="redirects"?L({collection:"redirects",key:B.key}):h.group==="sections"?L({collection:"sections",key:B.key}):h.group==="loaders"?(L(null),Y("loaders")):h.id==="cms-settings"?(_(null),L(null),T({kind:"settings"})):L({collection:"apps",key:B.key})},Yt=async h=>{const B=x.data?.changes[h.key];if(!(!j||!B)){R(h.key);try{await C(j,[{name:h.key,version:B.version}],l("siteEditor.contentTypes.restored",{name:gt(h)}))}finally{R(null)}}},ls=h=>{if(!h)return null;if(h.group==="pages")return{label:l("siteEditor.contentTypes.new.page"),onCreate:Bt};if(h.group==="redirects")return{label:l("siteEditor.contentTypes.new.redirect"),onCreate:$t};if(h.group==="sections"){const B=b(h);return{label:l("siteEditor.contentTypes.new.other",{type:B.toLowerCase()}),onCreate:()=>L({collection:"available-section",resolveType:h.id,title:B})}}return null},bs=(h,B)=>{if(h.group==="pages"){const ee={key:B.key,name:gt(B),path:typeof B.block.path=="string"?B.block.path:""};return o.jsx(us,{onDuplicate:()=>Rt(ee),onRename:()=>rs(ee),onDelete:()=>Ue({kind:"page",key:ee.key,label:ee.name})})}return h.group==="redirects"?o.jsx(us,{onDelete:()=>Ue({kind:"redirect",key:B.key,label:gs(B).from||B.key})}):h.group==="sections"?o.jsx(us,{onDelete:()=>Ue({kind:"section",key:B.key,label:gt(B)})}):null},ys=async h=>{const B=k[h.key];if(!B)return;const ee=za(k,h.key),ge=Fa(k,h.key,Math.max(0,ee-1)),Ae=ec(B.sections,ge,M,!m);if(Ae)try{const ve=await Pe.mutateAsync({blockKey:h.key,data:{...B,sections:Ae.sections}});et(ve)||ke.success(`Variant added to "${h.name}"`),L({collection:"pages",key:h.key,path:h.path})}catch(ve){ke.error(ve instanceof Error?ve.message:"Could not add variant")}},Bt=()=>{Ce(void 0),X({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},Rt=h=>{Ce(void 0),X({mode:"duplicate",sourceKey:h.key,initialName:Io(Gt,h.name),initialPath:bd(ns,h.path)})},rs=h=>{Ce(void 0),X({mode:"rename",sourceKey:h.key,initialName:h.name,initialPath:h.path})},vs=async h=>{if(!Ie)return;const{mode:B,sourceKey:ee}=Ie;try{if(B==="create"){let ge;if(h.templateKey){const nt=k[h.templateKey];if(!nt)throw new Error("Selected template no longer exists.");ge={...nt,name:h.name,path:h.path}}else ge=kd(h.name,h.path,m?void 0:M);const Ae=wd(k,h.name),ve=await Pe.mutateAsync({blockKey:Ae,data:ge});et(ve)||ke.success(`Created "${h.name}"`),L({collection:"pages",key:Ae,path:h.path})}else if(B==="duplicate"&&ee){const ge=k[ee];if(!ge)throw new Error("Source page not found");const{key:Ae,data:ve}=vd({source:ge,pages:Xe,newName:h.name,newPath:h.path}),nt=await Pe.mutateAsync({blockKey:Ae,data:ve});et(nt)||ke.success(`Duplicated as "${h.name}"`),L({collection:"pages",key:Ae,path:h.path})}else if(B==="rename"&&ee){const ge=k[ee];if(!ge)throw new Error("Page not found");const Ae={...ge,name:h.name,path:h.path},ve=await Pe.mutateAsync({blockKey:ee,data:Ae});et(ve)||ke.success("Page updated"),N?.collection==="pages"&&N.key===ee&&L({collection:"pages",key:ee,path:h.path})}X(null)}catch(ge){Ce(ge instanceof Error?ge.message:"Save failed")}},ks=({path:h})=>{if(!Ie)return null;const B=Kt(h);return(Ie.mode==="rename"?Kt(Ie.initialPath):null)!==B&&ns.has(B)?`A page with path "${h}" already exists.`:null},js=async(h,B,ee)=>{const ge=await Pe.mutateAsync({blockKey:B,data:{...ee,name:B,__resolveType:h},create:!0});et(ge)||ke.success(l("sandbox.contentBrowser.createdSection",{name:B})),L({collection:"sections",key:B})},ws=ya((h,B)=>Pe.mutate({blockKey:h,data:B})),Rs=async h=>{const B=k[h.key];if(!B){ke.error(l("sandbox.contentBrowser.sectionNotFound"));return}const ee=yd(k,h.key),ge=Io(Ht,h.name),Ae={...B,name:ge};try{const ve=await Pe.mutateAsync({blockKey:ee,data:Ae,create:!0});et(ve)||ke.success(l("sandbox.contentBrowser.duplicatedSection",{name:h.name})),L({collection:"sections",key:ee})}catch(ve){ke.error(ve instanceof Error?ve.message:l("sandbox.contentBrowser.duplicateFailed"))}},Wt=async h=>{if(!Ye)return;const B=k[Ye];if(!B){ke.error(l("sandbox.contentBrowser.sectionNotFound"));return}try{const ee=await Pe.mutateAsync({blockKey:Ye,data:{...B,name:h}});et(ee)||ke.success(l("sandbox.contentBrowser.sectionRenamed")),zt(null)}catch(ee){ke.error(ee instanceof Error?ee.message:l("sandbox.contentBrowser.renameFailed"))}},$t=()=>{Jt(void 0),He(!0)},qt=async h=>{const B=f?zr(k):null,ee=B===null?null:Mr(k,B).length,ge=B===null?Vr(k,h.from):B,Ae=B===null?Ur(h):Gr(k[B],h);try{const ve=await Pe.mutateAsync({blockKey:ge,data:Ae});et(ve)||ke.success("Created redirect"),He(!1),L({collection:"redirects",key:ee===null?ge:`${ge}#${ee}`})}catch(ve){Jt(ve instanceof Error?ve.message:"Could not create redirect")}},Xt=async h=>{const B=Kn(k,h),ee=Cs(B,h,hi(h));try{const ge=await Pe.mutateAsync({blockKey:B,data:ee});et(ge)||ke.success(`Created ${zs[h]}`),L({collection:h,key:B})}catch(ge){ke.error(ge instanceof Error?ge.message:"Could not create")}},Qt=async h=>{const B=Kn(k,"posts"),ee=Cs(B,"posts",ep(h));try{const ge=await Pe.mutateAsync({blockKey:B,data:ee});et(ge)||ke.success(l("sandbox.postCalendar.createdScheduledPost")),Y("posts"),Be("posts"),L({collection:"posts",key:B}),te(null)}catch(ge){ke.error(ge instanceof Error?ge.message:l("sandbox.postCalendar.couldNotCreate"))}},Ss=async(h,B)=>{const ee=k[h],ge=ee?sp(ps(ee,"posts"),B):null;if(!ge){ke.error(l("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await Pe.mutateAsync({blockKey:h,data:Cs(h,"posts",ge)})}catch(Ae){ke.error(Ae instanceof Error?Ae.message:l("sandbox.postCalendar.couldNotReschedule"))}},H=async h=>{const B=k[h.key];if(!B){ke.error("Record not found.");return}const ee=Kn(k,h.kind),ge=h.kind==="posts"?"title":"name",Ae={...structuredClone(ps(B,h.kind)),[ge]:`${h.label} (copy)`};if(h.kind==="categories"){const ve=Qe.categories.map(nt=>nt.slug??"").filter(Boolean);Ae.slug=Ju(String(Ae.slug??""),ve)}try{const ve=await Pe.mutateAsync({blockKey:ee,data:Cs(ee,h.kind,Ae)});et(ve)||ke.success(`Duplicated "${h.label}"`),L({collection:h.kind,key:ee})}catch(ve){ke.error(ve instanceof Error?ve.message:"Duplicate failed")}},pe=()=>{Y("posts"),Be("posts"),L(null),te(null),ae("")},Le=async()=>{if(!Fe)return;let h;try{const{kind:B,key:ee,label:ge}=Fe;if(B==="blog"){if(Fe.blogKind==="categories"){const Ae=ps(k[ee],"categories").slug,ve=typeof Ae=="string"?Ae:"";if(ve)for(const{key:nt,payload:yo}of gi(k)){const vo=ru(yo,ve);vo!==yo&&await Pe.mutateAsync({blockKey:nt,data:ou(nt,cu(vo))})}}h=await st.mutateAsync({blockKey:ee})}else if(Qs(ee,k)){const Ae=Qs(ee,k);h=await Pe.mutateAsync({blockKey:Ae.block,data:Hr(k[Ae.block],Ae.index)})}else h=await st.mutateAsync({blockKey:ee});if(Ue(null),et(h))return;ke.success(`Deleted "${ge}"`),N&&"key"in N&&N.key===ee&&L(null),Ue(null)}catch(B){ke.error(B instanceof Error?B.message:"Delete failed")}},ut=de===null?null:Qs(de,k),ze=fe.failed?o.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center",children:[o.jsx(ft,{title:l("sectionsEditor.hosted.blockLoadFailed"),description:l("sectionsEditor.hosted.blockLoadFailedHint")}),o.jsx(De,{variant:"outline",size:"sm",onClick:fe.retry,children:l("sectionsEditor.namedRules.tryAgain")})]}):fe.ready?o.jsx(o.Fragment,{children:A==="loaders"||A==="actions"?o.jsx(ef,{initialSavedKey:y?w?.key:void 0,onBack:y?as:void 0,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:M,decofile:k,kind:A},y?`types:${w?.key??""}`:void 0):o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),children:A==="calendar"?o.jsx(lm,{decofile:k}):A==="post-schedule"?o.jsx(rm,{decofile:k,isCreating:Pe.isPending,onCreate:h=>{Qt(h)},onReschedule:(h,B)=>{Ss(h,B)},onSelect:h=>{Y("posts"),Be("posts"),L({collection:"posts",key:h}),te(null)}}):A==="site"?yt?o.jsx(pa,{schemaWaiting:oe,orgSlug:t,virtualMcpId:e,branch:s,blockKey:yt.key,block:k[yt.key],decofile:k,meta:M,title:"Site",excludeFields:["seo"],previewBaseUrl:n},`site:${yt.key}`):o.jsx(ft,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):A==="settings"?o.jsx(fa,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,persistDefaults:y?!1:void 0}):A==="context"?o.jsx(nm,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M}):A==="seo"?o.jsx(im,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,target:{kind:"site"},previewBaseUrl:a}):A==="sections"?o.jsx(gf,{selection:N?.collection==="sections"||N?.collection==="available-section"?N:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:M,decofile:k,isCreating:Pe.isPending,onCreateAvailable:js,onSaveReferencedBlock:ws}):A==="posts"?o.jsx(zp,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,view:ye,selectedKey:N?.collection==="posts"?N.key:null,onViewChange:h=>{Se(h),L(null)},onClose:()=>L(null),onOpen:h=>{L({collection:"posts",key:h}),te(null)},move:it,meta:M,renderDetail:(h,B)=>o.jsx(tm,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:h,block:k[h],decofile:k,meta:M,previewBaseUrl:a,move:it,onClose:B?.onClose,expanded:B?.expanded,onToggleExpand:B?.onToggleExpand},`post:${Ms(h)}`)}):N?.collection==="available-app"?(()=>{const h=Ge.find(B=>B.id===N.id);return h?o.jsx(sd,{entry:h,technology:he,blocked:$e.isPending&&$e.variables?.blockKey!==h.id?{reason:l("sandbox.appInstallPanel.oneAtATime")}:qe,isInstalling:$e.isPending&&$e.variables?.blockKey===h.id,installError:$e.isError&&$e.variables?.blockKey===h.id?$e.error.message:null,onInstall:()=>Nt(h)},`available-app:${h.id}`):o.jsx(ft,{title:"App not found in this catalogue."})})():N&&N.collection!=="available-section"?N.collection==="apps"?o.jsx(pa,{schemaWaiting:oe,orgSlug:t,virtualMcpId:e,branch:s,blockKey:N.key,block:k[N.key],decofile:k,meta:M,previewBaseUrl:n,...y?{persistDefaults:!1,title:xs(N.key)}:{}},`app:${N.key}`):N.collection==="categories"?o.jsx(om,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:N.key,block:k[N.key],decofile:k,meta:M,onManagePosts:()=>pe(),onOpenPost:h=>{Y("posts"),Be("posts"),L({collection:"posts",key:h}),te(null)},previewBaseUrl:a},`category:${N.key}`):N.collection==="authors"?o.jsx(sm,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:N.key,block:k[N.key],meta:M,decofile:k},`authors:${N.key}`):N.collection==="redirects"?o.jsx(cm,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:ut?.block??N.key,rule:ut?.index??null,block:k[ut?.block??N.key]},`redirect:${N.key}`):o.jsx(hl,{value:$,children:o.jsx(am,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:N.collection==="pages"?N.path:"/",activePageBlockKey:N.collection==="pages"?N.key:null,activeGlobalBlockKey:N.collection==="sections"?N.key:null,initialEditSeo:N.collection==="pages"&&ue===N.key,onExitSeo:()=>te(null),onSelectRoot:()=>{L(null),te(null)}},N.collection==="pages"?`page:${N.key}`:`section:${N.key}`)}):o.jsx(ft,{title:`Select ${ds(A)?`a ${zs[A]}`:A==="pages"?"a page":A==="apps"?"an app":A==="redirects"?"a redirect":"a section"} to edit`,description:A==="apps"?"Browse all apps: select an installed one to edit its settings, or any other to install it.":'Pick an item from the list, or click "+" to create one.'})})}):o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),Xs=st.isPending||Pe.isPending;return o.jsx(zl,{value:!m,children:o.jsxs("div",{className:"flex h-full w-full",children:[Ve?o.jsx(zf,{tree:Ve,view:Je,openTypeId:ct?w?.typeId??null:null,onSelect:h=>{T(h),as(),h.kind==="seo"&&Y("seo")},onOpenEntry:(h,B)=>is(h,B,null),settings:os?{changed:(Ve.settings?.changed??0)>0}:null}):o.jsx(fd,{active:A,counts:hs,hidden:Ut,showBlog:Pt,showContext:Q,onSelect:h=>{Y(h),L(null),te(null)}}),!Ve&&A!=="seo"&&A!=="site"&&A!=="settings"&&A!=="context"&&A!=="calendar"&&A!=="post-schedule"&&A!=="posts"&&A!=="loaders"&&A!=="actions"&&o.jsx(gm,{activeCollection:A,pages:Xe,redirects:ss,sections:lt,availableSections:Mt,appCatalog:Ge,canInstallApps:Ke,installingAppId:$e.isPending?$e.variables?.blockKey??null:null,blogEntries:Vt,decofile:k,searchQuery:Z,onSearchChange:ae,selection:N,onSelect:_e,onCreate:()=>{A==="pages"?Bt():A==="redirects"?$t():ds(A)&&Xt(A)},onDuplicatePage:Rt,onRenamePage:rs,onAddPageVariant:ys,onDeletePage:h=>Ue({kind:"page",key:h.key,label:h.name}),onEditPageSeo:h=>{const B={collection:"pages",key:h.key,path:h.path};L(B),te(h.key)},onViewPageJson:h=>es(h.key),onDuplicateSection:Rs,onRenameSection:h=>zt(h.key),onDeleteSection:h=>Ue({kind:"section",key:h.key,label:h.name}),onDeleteRedirect:h=>Ue({kind:"redirect",key:h.key,label:h.from||h.key}),onDuplicateBlog:H,onDeleteBlog:h=>Ue({kind:"blog",blogKind:h.kind,key:h.key,label:h.label})}),Ve&&Je.kind==="settings"&&!ct?o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(F.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(mt,{className:"size-5 text-muted-foreground"})}),children:o.jsx(fa,{orgSlug:t,virtualMcpId:e,branch:s,decofile:k,meta:M,standalone:!0,persistDefaults:!1})})}):Ve&&Je.kind!=="seo"&&!ct?o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Gf,{tree:Ve,type:kt,onOpen:(h,B)=>is(h,B,Je),onRestore:h=>{Yt(h)},restoring:O,createLabel:ls(kt)?.label,onCreate:ls(kt)?.onCreate,rowMenu:bs},Je.kind==="type"?Je.id:"changes")}):ct&&Ze?o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[o.jsx(Ul,{back:{label:l("siteEditor.contentTypes.back",{type:Ze.kind==="seo"?l("siteEditor.contentTypes.seo"):Ze.kind==="settings"?l("siteEditor.contentTypes.settings"):Ze.kind==="changes"?l("siteEditor.contentTypes.changesInDraft"):b(rt(Ze)??{id:"",title:""})}),onClick:()=>{T(Ze),as()}}}),o.jsx("div",{className:"flex-1 min-h-0",children:ze})]}):o.jsx("div",{className:"flex-1 min-w-0",children:ze}),Ie&&o.jsx(Td,{open:!!Ie,mode:Ie.mode,initialName:Ie.initialName,initialPath:Ie.initialPath,isPending:Pe.isPending,error:Ne,templates:Xe,validate:ks,onSubmit:vs,onOpenChange:h=>{h||(X(null),Ce(void 0))}}),o.jsx(Pd,{open:Oe,isPending:Pe.isPending,error:Ft,onSubmit:qt,onOpenChange:h=>{h||(He(!1),Jt(void 0))}}),Ye&&o.jsx(Ad,{open:!!Ye,blockKey:Ye,initialName:lt.find(h=>h.key===Ye)?.name??Ye,isPending:Pe.isPending,onSubmit:Wt,onOpenChange:h=>{h||zt(null)}}),bt&&o.jsx(qr,{open:!!bt,onOpenChange:h=>{h||es(null)},pageKey:bt,decofile:k,params:u}),o.jsx(il,{open:!!Fe,onOpenChange:h=>{!h&&!Xs&&Ue(null)},children:o.jsxs(ll,{children:[o.jsxs(rl,{children:[o.jsx(cl,{children:Et?.title??Zt}),o.jsx(dl,{children:Et?.description??null})]}),o.jsxs(ul,{children:[o.jsx(pl,{disabled:Xs,children:l("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(fl,{onClick:h=>{h.preventDefault(),Le()},disabled:Xs,className:je(ml({variant:"destructive"})),children:Xs?o.jsxs(o.Fragment,{children:[o.jsx(mt,{className:"size-3.5"}),l("sandbox.contentBrowser.deleteDialog.deleting")]}):l("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function gm(t){const e=ce.c(59),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:c,canInstallApps:l,installingAppId:d,blogEntries:u,decofile:g,searchQuery:m,onSearchChange:f,selection:p,onSelect:y,onCreate:j,onDuplicatePage:E,onRenamePage:x,onAddPageVariant:S,onDeletePage:C,onEditPageSeo:b,onViewPageJson:v,onDuplicateSection:T,onRenameSection:w,onDeleteSection:_,onDeleteRedirect:O,onDuplicateBlog:R,onDeleteBlog:K}=t,k=Ee();let z,P,I,U,q,Y;if(e[0]!==s||e[1]!==c||e[2]!==r||e[3]!==u||e[4]!==l||e[5]!==g||e[6]!==d||e[7]!==S||e[8]!==j||e[9]!==K||e[10]!==C||e[11]!==O||e[12]!==_||e[13]!==R||e[14]!==E||e[15]!==T||e[16]!==b||e[17]!==x||e[18]!==w||e[19]!==f||e[20]!==y||e[21]!==v||e[22]!==n||e[23]!==a||e[24]!==m||e[25]!==i||e[26]!==p||e[27]!==k){const $=m.toLowerCase(),N=n.filter(D=>!$||D.name.toLowerCase().includes($)||D.path.toLowerCase().includes($)),L=a.filter(D=>!$||D.from.toLowerCase().includes($)||D.to.toLowerCase().includes($)),de=i.filter(D=>!$||D.name.toLowerCase().includes($)||D.key.toLowerCase().includes($)||D.resolveType.toLowerCase().includes($)),ne=r.filter(D=>!$||D.title.toLowerCase().includes($)||D.resolveType.toLowerCase().includes($)||(D.description?.toLowerCase().includes($)??!1)),ie=yf(de),fe=c.filter(D=>!$||D.title.toLowerCase().includes($)||D.app.toLowerCase().includes($)||D.vendor.toLowerCase().includes($)||D.category.toLowerCase().includes($)),ue=u.filter(D=>!$||D.label.toLowerCase().includes($)||D.subtitle.toLowerCase().includes($)),te=s==="categories"&&!$?xf(ue):ue.map(xm),le=`Search ${s}…`,oe=ds(s)?`Create new ${zs[s]}`:s==="redirects"?"Create new redirect":"Create new page",be=s!=="apps"&&s!=="sections";q="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(no,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[34]=M):M=e[34];let re;e[35]!==f?(re=D=>f(D.target.value),e[35]=f,e[36]=re):re=e[36];let me;e[37]!==le||e[38]!==m||e[39]!==re?(me=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[M,o.jsx("input",{type:"text",value:m,onChange:re,placeholder:le,"aria-label":le,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[37]=le,e[38]=m,e[39]=re,e[40]=me):me=e[40];let J;e[41]!==oe||e[42]!==j||e[43]!==be?(J=be&&o.jsxs(Ct,{children:[o.jsx(wt,{asChild:!0,children:o.jsx(De,{variant:"ghost",size:"icon",onClick:j,"aria-label":oe,children:o.jsx(kn,{size:14})})}),o.jsx(St,{side:"bottom",children:oe})]}),e[41]=oe,e[42]=j,e[43]=be,e[44]=J):J=e[44],e[45]!==me||e[46]!==J?(Y=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[me,J]}),e[45]=me,e[46]=J,e[47]=Y):Y=e[47],z=qs,U="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",P="flex flex-col gap-1 p-1.5",I=s==="pages"?N.length===0?o.jsx(Os,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):N.map(D=>{const Z=p?.collection==="pages"&&p.key===D.key,ae=za(g,D.key);return o.jsx(jt,{icon:Pa,title:D.name,subtitle:D.path,active:Z,variantCount:ae,onClick:()=>y({collection:"pages",key:D.key,path:D.path}),menu:o.jsx(us,{onDuplicate:()=>E(D),onRename:()=>x(D),onAddVariant:()=>S(D),onEditSeo:()=>b(D),onViewJson:()=>v(D),onDelete:()=>C(D)})},D.key)}):s==="sections"?de.length===0&&ne.length===0?o.jsx(Os,{hasItems:i.length>0||r.length>0,emptyLabel:"No sections yet.",emptyHint:"Save a section from a page, or start the preview dev server."}):o.jsxs(o.Fragment,{children:[ie.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(oa,{icon:rn,label:"Saved sections"}),ie.map(D=>o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("div",{className:"px-2.5 pt-1 pb-0.5 text-2xs font-medium text-muted-foreground/60",children:D.label}),D.sections.map(Z=>{const ae=p?.collection==="sections"&&p.key===Z.key;return o.jsx(jt,{icon:rn,accent:"global",title:Z.name,subtitle:D.label,active:ae,onClick:()=>y({collection:"sections",key:Z.key}),menu:o.jsx(us,{onDuplicate:()=>T(Z),onRename:()=>w(Z),onDelete:()=>_(Z)})},Z.key)})]},D.label))]}),ne.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(oa,{icon:Co,label:"Available sections",className:je(ie.length>0&&"mt-3")}),ne.map(D=>{const Z=p?.collection==="available-section"&&p.resolveType===D.resolveType,ae=D.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(jt,{icon:Co,title:D.title,subtitle:ae??D.resolveType,active:Z,onClick:()=>y({collection:"available-section",resolveType:D.resolveType,title:D.title})},D.resolveType)})]})]}):s==="apps"?fe.length===0?o.jsx(Os,{hasItems:c.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):fe.map(D=>{const Z=p?.collection==="apps"&&D.blockKey!==null&&p.key===D.blockKey||p?.collection==="available-app"&&p.id===D.id,ae=d===D.id;return o.jsx(jt,{icon:oo,logoUrl:D.logo,title:D.title,subtitle:D.category,active:Z,trailing:D.installed?o.jsx("span",{className:"shrink-0 rounded-full bg-success/15 px-1.5 py-0.5 text-2xs font-medium text-success",children:"Installed"}):ae?o.jsx(mt,{className:"size-3.5 shrink-0 text-muted-foreground"}):D.installable&&l?o.jsx("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-2xs font-medium text-muted-foreground",children:"Install"}):void 0,onClick:()=>y(D.installed&&D.blockKey?{collection:"apps",key:D.blockKey}:{collection:"available-app",id:D.id})},D.id)}):s==="redirects"?L.length===0?o.jsx(Os,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):L.map(D=>o.jsx(jt,{icon:ja,title:D.from||"(no source)",subtitle:`→ ${D.to||"(no target)"}`,active:p?.collection==="redirects"&&p.key===D.key,trailing:o.jsx(Dd,{redirect:D}),onClick:()=>y({collection:"redirects",key:D.key}),menu:o.jsx(us,{onDelete:()=>O(D)})},D.key)):ue.length===0?o.jsx(Os,{hasItems:u.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${ds(s)?zs[s]:"item"}.`}):te.map(D=>{const{entry:Z,depth:ae}=D,ye=p?.collection===Z.kind&&p.key===Z.key;return o.jsx("div",{style:{paddingLeft:ae*16},children:o.jsx(jt,{icon:Z.kind==="posts"?wa:Z.kind==="authors"?Aa:Sa,title:Z.label,invalid:Z.missing.length>0,invalidReason:Z.missing.length>0?k("sandbox.itemRow.missingFields",{fields:Zd(Z.missing,k)}):void 0,warning:Z.duplicateName,warningReason:k("sandbox.itemRow.duplicateName"),subtitle:ae>0?zi(Z.slug??"",ue).map(hm).join(" / "):Z.subtitle,active:ye,onClick:()=>y({collection:Z.kind,key:Z.key}),menu:o.jsx(us,{onDuplicate:()=>R(Z),onDelete:()=>K(Z)})})},Z.key)}),e[0]=s,e[1]=c,e[2]=r,e[3]=u,e[4]=l,e[5]=g,e[6]=d,e[7]=S,e[8]=j,e[9]=K,e[10]=C,e[11]=O,e[12]=_,e[13]=R,e[14]=E,e[15]=T,e[16]=b,e[17]=x,e[18]=w,e[19]=f,e[20]=y,e[21]=v,e[22]=n,e[23]=a,e[24]=m,e[25]=i,e[26]=p,e[27]=k,e[28]=z,e[29]=P,e[30]=I,e[31]=U,e[32]=q,e[33]=Y}else z=e[28],P=e[29],I=e[30],U=e[31],q=e[32],Y=e[33];let Q;e[48]!==P||e[49]!==I?(Q=o.jsx("div",{className:P,children:I}),e[48]=P,e[49]=I,e[50]=Q):Q=e[50];let A;e[51]!==z||e[52]!==U||e[53]!==Q?(A=o.jsx(z,{className:U,children:Q}),e[51]=z,e[52]=U,e[53]=Q,e[54]=A):A=e[54];let G;return e[55]!==q||e[56]!==Y||e[57]!==A?(G=o.jsxs("div",{className:q,children:[Y,A]}),e[55]=q,e[56]=Y,e[57]=A,e[58]=G):G=e[58],G}function hm(t){return t.slug}function xm(t){return{entry:t,depth:0}}function Zg(t){const e=ce.c(25),{virtualMcpId:s}=t,n=Ee(),[a,i]=F.useState(!1),r=Ia(s),{connection:c}=gr(s),{activeTask:l}=eo();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=ga(d);if(!(_o(r?.metadata)||_o(l?.metadata))&&!c){let f;e[1]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(Do,{className:"size-7 text-foreground"})}),e[1]=f):f=e[1];let p;e[2]!==n?(p=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=p):p=e[3];let y;e[4]!==n?(y=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=y):y=e[5];let j,E;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>i(!0),E=o.jsx(Do,{className:"size-4"}),e[6]=j,e[7]=E):(j=e[6],E=e[7]);let x;e[8]!==n?(x=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=x):x=e[9];let S;e[10]!==x?(S=o.jsxs(De,{onClick:j,children:[E,x]}),e[10]=x,e[11]=S):S=e[11];let C;e[12]!==p||e[13]!==y||e[14]!==S?(C=o.jsx(jc,{className:"h-full",image:f,title:p,description:y,actions:S}),e[12]=p,e[13]=y,e[14]=S,e[15]=C):C=e[15];let b;e[16]!==a?(b=o.jsx(wc,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=b):b=e[17];let v;return e[18]!==b||e[19]!==C?(v=o.jsxs(o.Fragment,{children:[C,b]}),e[18]=b,e[19]=C,e[20]=v):v=e[20],v}let m;return e[21]!==u.contentPageId||e[22]!==u.contentPath||e[23]!==u.contentPathTemplate?(m=o.jsx(Ml,{children:o.jsx(fm,{deepLinkPage:{pageId:u.contentPageId,path:u.contentPath,pathTemplate:u.contentPathTemplate}})}),e[21]=u.contentPageId,e[22]=u.contentPath,e[23]=u.contentPathTemplate,e[24]=m):m=e[24],m}export{Wo as $,Hg as A,Ud as B,Zg as C,fu as D,Gg as E,Wg as F,gu as G,Ng as H,ap as I,Xg as J,Bi as K,bi as L,ai as M,Cs as N,Og as O,po as P,Pu as Q,Yg as R,ju as S,Lg as T,Rg as U,Nu as V,Nn as W,Eu as X,Bd as Y,Rd as Z,$d as _,ou as a,Od as a0,tt as a1,Ld as a2,Dg as a3,_g as a4,Bg as a5,$g as a6,yu as a7,vu as a8,Au as a9,Ug as aA,mn as aB,Tg as aa,Du as ab,fo as ac,Ag as ad,vi as ae,ki as af,ot as ag,Kg as ah,Eg as ai,pn as aj,Pg as ak,Ig as al,Gs as am,Hn as an,fn as ao,Fg as ap,zg as aq,au as ar,Qg as as,xf as at,Fi as au,lu as av,Ju as aw,gi as ax,Sg as ay,Cg as az,En as b,pt as c,wg as d,Zd as e,na as f,ps as g,Mg as h,ht as i,Pi as j,_i as k,di as l,Tn as m,yd as n,Vg as o,Ds as p,hn as q,jg as r,cu as s,li as t,Ga as u,Jg as v,xu as w,ji as x,qg as y,kg as z};
|