decocms 4.518.0 → 4.518.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/{ActiveShapeUtils-DC4ySNWR.js → ActiveShapeUtils-Bis8M8cE.js} +1 -1
- package/dist/client/assets/{AlertCircle-DgnxHqxe.js → AlertCircle-CF7oV00-.js} +1 -1
- package/dist/client/assets/{AreaChart-Ccsbdjec.js → AreaChart-rRgwbDdY.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BJ1448l4.js → ArrowLeft-BYRX2oWU.js} +1 -1
- package/dist/client/assets/{ArrowUp-723TVuFG.js → ArrowUp-C-Wi5Wp-.js} +1 -1
- package/dist/client/assets/{BarChart-BdOKvWnK.js → BarChart-B-Yzzi8V.js} +1 -1
- package/dist/client/assets/{Building02-DU823ZCw.js → Building02-BTo5ALb8.js} +1 -1
- package/dist/client/assets/{CartesianChart-3-g5kX2i.js → CartesianChart-D4q-R38l.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CinaMpxG.js → CategoricalChart-DTvqZVLo.js} +1 -1
- package/dist/client/assets/{CheckCircle-C7csYE-y.js → CheckCircle-B7DLXg5D.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-B0Z7parR.js → ChevronSelectorVertical-ByVW2vd8.js} +1 -1
- package/dist/client/assets/{ChevronUp-DiTVmUiH.js → ChevronUp-i4o2LTaN.js} +1 -1
- package/dist/client/assets/{Copy01-DRNuKy-h.js → Copy01-Ck9G4OUr.js} +1 -1
- package/dist/client/assets/{CreditCard01-C3f2i_qY.js → CreditCard01-DBL8NXSk.js} +1 -1
- package/dist/client/assets/{DotsVertical-eX97dPc6.js → DotsVertical-DGS_x5nz.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CCb5UZ88.js → ErrorBarContext-ClwVJba6.js} +1 -1
- package/dist/client/assets/{Globe04-ByvV2bPX.js → Globe04-lKXBAfc3.js} +1 -1
- package/dist/client/assets/{Image01-QuVxFosz.js → Image01-Cwrowq3c.js} +1 -1
- package/dist/client/assets/{Key01-C-QXsN23.js → Key01-CEbPGYnm.js} +1 -1
- package/dist/client/assets/{Link01-CbpFxbNY.js → Link01-DXqb71Uu.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DDgMbBWJ.js → LinkBroken01-DhWTb9MO.js} +1 -1
- package/dist/client/assets/{Minus-DnJ8wbLv.js → Minus-C9yYSfDR.js} +1 -1
- package/dist/client/assets/{Monitor01-DD5_JCl8.js → Monitor01-BL3DAm_1.js} +1 -1
- package/dist/client/assets/{Play-BgEaB30r.js → Play-CZ7QKkqf.js} +1 -1
- package/dist/client/assets/{Plus-BnqPSlPj.js → Plus-BRxUqR_F.js} +1 -1
- package/dist/client/assets/{ReferenceLine-PgVE-Dmr.js → ReferenceLine-D1hjyX4I.js} +1 -1
- package/dist/client/assets/{SearchMd-GQAKwnQD.js → SearchMd-DiO3q0AT.js} +1 -1
- package/dist/client/assets/{Sector-DG1U_Qdd.js → Sector-XuiRQ9ct.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DVHnZchK.js → ShoppingBag01-B4aQ0-ny.js} +1 -1
- package/dist/client/assets/{Sun-Ct5gftPt.js → Sun-DqiY7Z2B.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-_kdH1ete.js → SwitchHorizontal01-BbdJtypW.js} +1 -1
- package/dist/client/assets/{Tool01-rTZNmFct.js → Tool01-C0vFHYhV.js} +1 -1
- package/dist/client/assets/{Trash01-TPK4gSsp.js → Trash01-bhcUMroB.js} +1 -1
- package/dist/client/assets/{Upload01-D6tRQTgc.js → Upload01-BwEuXdMa.js} +1 -1
- package/dist/client/assets/{User01-1q78INo2.js → User01-DSs11bSF.js} +1 -1
- package/dist/client/assets/{UserSquare-B_yRFcN6.js → UserSquare-DXYtKMfd.js} +1 -1
- package/dist/client/assets/{Users01-D5MhP5r0.js → Users01-CTqd0ZAH.js} +1 -1
- package/dist/client/assets/{XClose-DOXmYMF_.js → XClose-CxYwKo3k.js} +1 -1
- package/dist/client/assets/{ZoomOut-DLICjI1h.js → ZoomOut-D-Ww048N.js} +1 -1
- package/dist/client/assets/{access-gate-p2OBWc28.js → access-gate-Bq22oyfg.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BluC5xOJ.js → add-connection-dialog-CQYwaYCv.js} +1 -1
- package/dist/client/assets/agent-analytics-B-zaohtV.js +1 -0
- package/dist/client/assets/agent-app-BbV2xIu_.js +1 -0
- package/dist/client/assets/{agent-assets-CsYWD2CR.js → agent-assets-4YMODB__.js} +1 -1
- package/dist/client/assets/{agent-automation-J7szToQ3.js → agent-automation-CmK6_mc6.js} +1 -1
- package/dist/client/assets/{agent-automations-tGwSufFx.js → agent-automations-BCX_o1aB.js} +1 -1
- package/dist/client/assets/agent-calendar-Ddf3r2JM.js +1 -0
- package/dist/client/assets/{agent-connect-sources-Bf7YpJtB.js → agent-connect-sources-Bxy4Jo7k.js} +1 -1
- package/dist/client/assets/agent-deck-UP8oQtvT.js +1 -0
- package/dist/client/assets/{agent-e2e-B01kqUsN.js → agent-e2e-BdqM7Rx1.js} +1 -1
- package/dist/client/assets/agent-experiments-CrVBOIKR.js +1 -0
- package/dist/client/assets/{agent-file-_hkGq1Y2.js → agent-file-Cb4leotK.js} +1 -1
- package/dist/client/assets/{agent-hosting-8jYjdLhJ.js → agent-hosting-yUCKeG5I.js} +1 -1
- package/dist/client/assets/{agent-icon-g2PIrjzs.js → agent-icon-CCDPFoN-.js} +1 -1
- package/dist/client/assets/agent-library-DMqKWgMi.js +1 -0
- package/dist/client/assets/agent-library-file-DOe-l166.js +1 -0
- package/dist/client/assets/{agent-monitor-Dtdyok8Z.js → agent-monitor-DpSfxETg.js} +1 -1
- package/dist/client/assets/{agent-overview-uVNzU6d3.js → agent-overview-D27q04-k.js} +1 -1
- package/dist/client/assets/{agent-releases-DVFEJ-Ad.js → agent-releases-DhOHbzAx.js} +1 -1
- package/dist/client/assets/agent-settings-D_kjSJft.js +1 -0
- package/dist/client/assets/{agent-site-editor-DI9lfD7X.js → agent-site-editor-CoubOLH6.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CdfJCg4-.js +2 -0
- package/dist/client/assets/agent-site-editor-content-C-o-blM5.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-D1F79zUW.js +1 -0
- package/dist/client/assets/agent-view-PuW3-X6q.js +1 -0
- package/dist/client/assets/{agent-view-guard-Bhzmxyux.js → agent-view-guard-BIS7z4mW.js} +1 -1
- package/dist/client/assets/{agents-list-CbFcTa4A.js → agents-list-CpVGk57l.js} +1 -1
- package/dist/client/assets/{ai-providers-Da7yjmwG.js → ai-providers-C8dIcjWL.js} +1 -1
- package/dist/client/assets/{alert-kpgdNVxk.js → alert-CmByshZi.js} +1 -1
- package/dist/client/assets/{alert-dialog-KKnJELoX.js → alert-dialog-BcRtAren.js} +1 -1
- package/dist/client/assets/{analytics-sections-DlComRmC.js → analytics-sections-CTEkK2Tf.js} +1 -1
- package/dist/client/assets/{analytics-tab-B_HbOlqF.js → analytics-tab-DPVT4KOA.js} +1 -1
- package/dist/client/assets/api-keys-CNy2dZat.js +1 -0
- package/dist/client/assets/{api-keys-DNrkQCkt.js → api-keys-DYTxKYWP.js} +1 -1
- package/dist/client/assets/{app-editor-CKdeak5r.js → app-editor-C1ZA1u8T.js} +1 -1
- package/dist/client/assets/{asset-utils-CYyNDrFK.js → asset-utils-DIN0M3zp.js} +1 -1
- package/dist/client/assets/{auth-catchall-BS8FAipd.js → auth-catchall-vhsgYqnn.js} +1 -1
- package/dist/client/assets/{auth-entry-34SQAdx9.js → auth-entry-C6zNerIy.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DF-Z-sUB.js → auth-split-layout-DKwsje6s.js} +1 -1
- package/dist/client/assets/{auth-DHZfBLZ5.js → auth-vu0NBiVX.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CbgraxNg.js → authenticate-and-persist-oauth-Dj1wDkpb.js} +1 -1
- package/dist/client/assets/{automation-list-row-DtCSZcdc.js → automation-list-row-DucKF7kG.js} +1 -1
- package/dist/client/assets/{automation-runs-Lelpmww0.js → automation-runs-Ui7o3JfN.js} +1 -1
- package/dist/client/assets/{automations-CV4vMVkc.js → automations-CmK0evd4.js} +1 -1
- package/dist/client/assets/{autosend-Cwww7_9j.js → autosend-ClHP6mj3.js} +1 -1
- package/dist/client/assets/{avatar-BRRGslVN.js → avatar-BfW8_V1B.js} +1 -1
- package/dist/client/assets/{badge-DmeqGssZ.js → badge-CqxA0I5-.js} +1 -1
- package/dist/client/assets/{block-document-DtA_3M8z.js → block-document-l9rZniOP.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context--o78Y3yp.js → blocks-preview-workspace-context-DIzgwExA.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Dps89GrH.js → blocks-tab-states-D014yZyw.js} +1 -1
- package/dist/client/assets/{blog-schema-CEYO8j-N.js → blog-schema-p025Q_3k.js} +1 -1
- package/dist/client/assets/{buckets-CXMlDLcD.js → buckets-C4799eWK.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-C7S9lWPM.js → build-improve-prompt-doc-C9nuC795.js} +1 -1
- package/dist/client/assets/{calendar-B6BpOXfC.js → calendar-C7UsyFmW.js} +1 -1
- package/dist/client/assets/{campaigns-view-DtQvcOC6.js → campaigns-view-Cz4ACJMm.js} +1 -1
- package/dist/client/assets/{capability-load-error-CDC4LjDf.js → capability-load-error-rgxsCr8U.js} +1 -1
- package/dist/client/assets/{category-editor-BvoAtPRs.js → category-editor-CldKargp.js} +1 -1
- package/dist/client/assets/{chart-CTinHp-8.js → chart-7lusH4mk.js} +1 -1
- package/dist/client/assets/{chat-context-DLezfYEa.js → chat-context-DaG-xhpe.js} +1 -1
- package/dist/client/assets/{chat-draft-BlRnwK9v.js → chat-draft-B4qXFQ20.js} +1 -1
- package/dist/client/assets/{checkbox-BlB_jfat.js → checkbox-k3S7hbYo.js} +1 -1
- package/dist/client/assets/{choose-editor-DHZGPvHu.js → choose-editor-DhoxAjmj.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DFaLHvgO.js → cli-auth-success-9cwHK6DP.js} +1 -1
- package/dist/client/assets/{client-icons-CpqRIiQr.js → client-icons-XJM50Gvn.js} +1 -1
- package/dist/client/assets/cms-settings-editor-VytgeION.js +1 -0
- package/dist/client/assets/{collapsible-DZTt-UAc.js → collapsible-CCUbGddy.js} +1 -1
- package/dist/client/assets/{collection-detail-BjUkXIkv.js → collection-detail-BQphYH0i.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dmr1DpXh.js → collection-display-button-DtypHbWr.js} +1 -1
- package/dist/client/assets/{collection-search-DcBOG84t.js → collection-search-DFZiZHgj.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CBLUEZ5z.js → collection-table-wrapper-D5vvhE9_.js} +1 -1
- package/dist/client/assets/{collection-tabs-D5lfCRgo.js → collection-tabs-5oBppmJp.js} +1 -1
- package/dist/client/assets/{column-rules-B3eVnEiY.js → column-rules-DikbPDpl.js} +1 -1
- package/dist/client/assets/{combobox-CVTULN6N.js → combobox--wUI1bJn.js} +1 -1
- package/dist/client/assets/{command-R1e1yMQ9.js → command-A6J0_nSj.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-hGQWfzwk.js → companion-mcps-section-DHW4_WEu.js} +1 -1
- package/dist/client/assets/{config-BWrcU7H3.js → config-0cyLL49J.js} +1 -1
- package/dist/client/assets/{connect-CNN0l2XT.js → connect-Bi8fTNRc.js} +1 -1
- package/dist/client/assets/{connect-layout-DiWD8YTg.js → connect-layout-BXupI1uo.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-xgaD8LgG.js → connect-source-dialog-DUESoily.js} +1 -1
- package/dist/client/assets/{connection-WJRbuDz1.js → connection-DP0Tkqpu.js} +1 -1
- package/dist/client/assets/{connection-card-DnICQFn9.js → connection-card-SGeLl-3V.js} +1 -1
- package/dist/client/assets/{connection-detail-C0OJOuef.js → connection-detail-8iT2pzkA.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CBYCAzPl.js → connection-form-helpers-5dAreg1i.js} +1 -1
- package/dist/client/assets/{connections-DjwbhWNZ.js → connections-Ba0FzDee.js} +1 -1
- package/dist/client/assets/{content-tab-CAJ559-P.js → content-tab-Co7UZ0ue.js} +3 -3
- package/dist/client/assets/{context-BkZJrbqd.js → context-DSH71GyO.js} +1 -1
- package/dist/client/assets/{context-menu-B7wqDsW2.js → context-menu-m7JMy9Ts.js} +1 -1
- package/dist/client/assets/{context-shell-DkaK_BOn.js → context-shell-CHo3-a1U.js} +3 -3
- package/dist/client/assets/{core.esm-DHAYYfZu.js → core.esm-BT3eS5hh.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-u0Ud2kaY.js → create-organization-dialog-t8CuAC-D.js} +1 -1
- package/dist/client/assets/{daily-pulse-DRJB1hcS.js → daily-pulse-EoXIBNAG.js} +1 -1
- package/dist/client/assets/{discover-gZu3Sfan.js → discover-r5fXEWQj.js} +1 -1
- package/dist/client/assets/{domain-settings-USbT8NUs.js → domain-settings-Zd079_oe.js} +1 -1
- package/dist/client/assets/{drawer-C9bfrQZ2.js → drawer-BfInv3z-.js} +1 -1
- package/dist/client/assets/{editor-4LyrkCqm.js → editor-CpWj2GSL.js} +1 -1
- package/dist/client/assets/{editor-classes-_dczAbCq.js → editor-classes-5vsxGGPA.js} +1 -1
- package/dist/client/assets/{empty-state-4Hlytpdt.js → empty-state-BThdzdI0.js} +1 -1
- package/dist/client/assets/{empty-state-_a1QMwjl.js → empty-state-C97rGNTx.js} +1 -1
- package/dist/client/assets/{experiments-tab-DdHl8yk7.js → experiments-tab-BQyQ_6Nt.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-C9wWsYd4.js → experiments-tab-choice-CJxPrnzq.js} +1 -1
- package/dist/client/assets/{extract-connection-data-mbA-zNaE.js → extract-connection-data-BJcueAXf.js} +1 -1
- package/dist/client/assets/{feature-gate-iJnsMeBr.js → feature-gate-DOUh8nVg.js} +1 -1
- package/dist/client/assets/{feature-paywall-DcguOiJA.js → feature-paywall-skggPdmN.js} +1 -1
- package/dist/client/assets/{file-explorer-B_iKC9bp.js → file-explorer-BB5wuYW2.js} +1 -1
- package/dist/client/assets/{file-preview-Dy07kmgf.js → file-preview-DYLPzEi6.js} +1 -1
- package/dist/client/assets/{file-share-button-DOM1SplI.js → file-share-button-B1svbxuR.js} +1 -1
- package/dist/client/assets/{file-type-icon-CP6Bm0Pm.js → file-type-icon-Dh-YpP4t.js} +1 -1
- package/dist/client/assets/{folder-icon-D_8O1LWU.js → folder-icon-CPXfYDTX.js} +1 -1
- package/dist/client/assets/{form-B2fhil9l.js → form-Diz2j79C.js} +1 -1
- package/dist/client/assets/{general-BE0anzP1.js → general-5pQPx87d.js} +1 -1
- package/dist/client/assets/{home-Bb5YZQHS.js → home-Dnlsm-wz.js} +1 -1
- package/dist/client/assets/{icon-button-BQwa115u.js → icon-button-DuuXKRCk.js} +1 -1
- package/dist/client/assets/{index-Ccma-e_l.js → index-5O453B2L.js} +1 -1
- package/dist/client/assets/index-BMri_gPt.js +1 -0
- package/dist/client/assets/{index-B4yeJC5N.js → index-Bpjyo8cb.js} +1 -1
- package/dist/client/assets/{index-DXMlJvYf.js → index-BvwkkTca.js} +8 -8
- package/dist/client/assets/{index-Cs4qaYPX.js → index-Bw7ZdG0V.js} +1 -1
- package/dist/client/assets/{index-R_qB4INp.js → index-CH_rHFJ7.js} +1 -1
- package/dist/client/assets/{index-CeLGzS5y.js → index-CjCEGRSu.js} +1 -1
- package/dist/client/assets/{index-rKWXOhdZ.js → index-CtJ5bSic.js} +1 -1
- package/dist/client/assets/{index-CYHGIatu.js → index-D2_QRuAQ.js} +1 -1
- package/dist/client/assets/{index-CXWqnDP7.js → index-DPyR1fyZ.js} +1 -1
- package/dist/client/assets/{index-D2MFYEzD.js → index-DY9jv8u5.js} +37 -37
- package/dist/client/assets/{index-DiVZA6vr.js → index-fElQwNzQ.js} +1 -1
- package/dist/client/assets/{index-BWgOKGMR.js → index-hWaEVFzi.js} +1 -1
- package/dist/client/assets/{index-redirect-D2LQ3n9D.js → index-redirect-BF2Ze6CX.js} +1 -1
- package/dist/client/assets/{index-DU8BFhZD.js → index-u06bTyUt.js} +1 -1
- package/dist/client/assets/{index-CK40JGB6.js → index-vOiCoekF.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CaSjeDsE.js → infiniteQueryObserver-Glyohd4p.js} +1 -1
- package/dist/client/assets/{infra-billing-_cCsUnUO.js → infra-billing-Bd2bFoZ5.js} +1 -1
- package/dist/client/assets/{input-D43D11gI.js → input-Ca18CK1P.js} +1 -1
- package/dist/client/assets/{input-D9iDAvwy.js → input-F0XP3M77.js} +3 -3
- package/dist/client/assets/{integration-icon-CqbOWyvX.js → integration-icon-BZ0SYBCb.js} +1 -1
- package/dist/client/assets/{jira-icon-Y_2uACKb.js → jira-icon-66RPgyoE.js} +1 -1
- package/dist/client/assets/{label-3hTmrxoy.js → label-CUbZuKc3.js} +1 -1
- package/dist/client/assets/{layout-EYuYXIPk.js → layout-Cedqx0JP.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-Y0g29rl5.js → legacy-agents-deep-D41zNkt6.js} +1 -1
- package/dist/client/assets/legacy-main-redirect-B7bd3WDG.js +1 -0
- package/dist/client/assets/library-D71H_oBI.js +1 -0
- package/dist/client/assets/{login-DTF43M9h.js → login-BEUSAD5h.js} +1 -1
- package/dist/client/assets/{markdown-BeKN4MPt.js → markdown-CQTrkEJG.js} +3 -3
- package/dist/client/assets/{mcp-app-renderer-DcbWj_cd.js → mcp-app-renderer-CfeFa2D0.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BVLnM3ir.js → mcp-oauth-DqI-dLnK.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DQ__DCEs.js → mcp-oauth-dZFQnVjg.js} +1 -1
- package/dist/client/assets/{members-DdYed_-G.js → members-D8letp2p.js} +1 -1
- package/dist/client/assets/{memory-CbDGJpdj.js → memory-C9mu7Zkb.js} +1 -1
- package/dist/client/assets/{mini-report-page-I5w2A9ue.js → mini-report-page-JqpGP2GL.js} +1 -1
- package/dist/client/assets/{mock-board-D64wFJ9x.js → mock-board-BGHy2qG4.js} +3 -3
- package/dist/client/assets/{monaco-editor-DEU78sxw.js → monaco-editor-nJc5wgpu.js} +1 -1
- package/dist/client/assets/{monitoring-Bklr39Mh.js → monitoring-BtZh6NEX.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BLFmMtG4.js → monitoring-stats-row-BAFX8tUf.js} +1 -1
- package/dist/client/assets/{multi-select-DxNv8sxt.js → multi-select-DpaHzZAz.js} +1 -1
- package/dist/client/assets/{mustache-Cm6mC1mo.js → mustache-CewpKCP1.js} +1 -1
- package/dist/client/assets/{named-rule-uses-BBN_5zyZ.js → named-rule-uses-939Puzgt.js} +1 -1
- package/dist/client/assets/{named-rule-view-Dgj56LCZ.js → named-rule-view-CML2JnRp.js} +1 -1
- package/dist/client/assets/{new-project-dialog-qMTAvOP0.js → new-project-dialog-BDUYA1Q9.js} +1 -1
- package/dist/client/assets/{oauth-callback-DzKW1jLM.js → oauth-callback-ClogQ-NW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BhTg9J9_.js → oauth-callback-ai-provider-aAWOChDT.js} +1 -1
- package/dist/client/assets/{onboarding-CcHHvf_v.js → onboarding-DkM2lBLt.js} +1 -1
- package/dist/client/assets/{openai-conversation-X6iReX5A.js → openai-conversation-CnNyoZHy.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-Wa4vMG32.js → optimistic-project-sidebar-views-Dd9HCPLE.js} +1 -1
- package/dist/client/assets/{order-monitor-day-d8yh4cv8.js → order-monitor-day-D7yGjq7b.js} +1 -1
- package/dist/client/assets/{organization-choice-DKOeafiU.js → organization-choice-CVq2K-mi.js} +1 -1
- package/dist/client/assets/{orgs-CReR2HvS.js → orgs-riRdPSVS.js} +1 -1
- package/dist/client/assets/{page-seo-form-BTZBPUqn.js → page-seo-form-DHiOVvvv.js} +1 -1
- package/dist/client/assets/{pair-DSps2zoM.js → pair-BiwOJOFx.js} +1 -1
- package/dist/client/assets/{parse-sections-Bc_lvOtq.js → parse-sections-Ce8e3CyM.js} +1 -1
- package/dist/client/assets/{plan-CxnMa3En.js → plan-Cpl6bs6l.js} +1 -1
- package/dist/client/assets/{plan-ladder-7wUcVwfI.js → plan-ladder-DJwAssQD.js} +1 -1
- package/dist/client/assets/{popover-Dm_x8CV9.js → popover-B1ABR0kS.js} +1 -1
- package/dist/client/assets/{post-calendar-BtFE-61n.js → post-calendar-CtSEncUE.js} +1 -1
- package/dist/client/assets/{post-editor-QChnOq6Y.js → post-editor-Cxxxfb0r.js} +1 -1
- package/dist/client/assets/{preview-content-BUlAqj-X.js → preview-content-ULOD_UZt.js} +1 -1
- package/dist/client/assets/{preview-dialog-39V6ZO2Y.js → preview-dialog-CZYisvNu.js} +1 -1
- package/dist/client/assets/{preview-panel-BvoYfTNF.js → preview-panel-ItJi6Jc0.js} +1 -1
- package/dist/client/assets/{preview-tab-jmFSMM-R.js → preview-tab-B6Q-8P-_.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-iaXbdjia.js → product-picker-dialog-BHrHoQQK.js} +1 -1
- package/dist/client/assets/{profile-IgWNvITK.js → profile-B6Cd5Dxw.js} +1 -1
- package/dist/client/assets/{project-app-view-Bc-wof7y.js → project-app-view-B1-HxYgX.js} +1 -1
- package/dist/client/assets/{project-apps-DVzn0z1g.js → project-apps-Dler5z99.js} +1 -1
- package/dist/client/assets/{project-feed-BIwmxSQY.js → project-feed-BwWFdPBj.js} +1 -1
- package/dist/client/assets/{project-icon-CJmvnLdz.js → project-icon-BtGD--7Z.js} +1 -1
- package/dist/client/assets/project-reports-DigBj5UN.js +1 -0
- package/dist/client/assets/project-tasks-ckZ9YIhp.js +1 -0
- package/dist/client/assets/{projects-D8Cbhxnj.js → projects-BbyUgZdk.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CmtOjsbv.js → projects-empty-state-cl5VGT1T.js} +1 -1
- package/dist/client/assets/{prompts-BFb-SeSC.js → prompts-C7IgVGhQ.js} +1 -1
- package/dist/client/assets/record-editor-DulCdbwX.js +1 -0
- package/dist/client/assets/{redirect-editor-XmMaGVJV.js → redirect-editor-DGmg8IhI.js} +1 -1
- package/dist/client/assets/{releases-api-AYZ93qlv.js → releases-api-CS8wgmr5.js} +1 -1
- package/dist/client/assets/reports-ChrL-50F.js +1 -0
- package/dist/client/assets/{reports-AyOb4hhI.js → reports-J6WeamZr.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BDPMVaDo.js → reports-onboarding-BskSIDus.js} +1 -1
- package/dist/client/assets/{reports-tab-D2iADtiN.js → reports-tab-a3KJftGt.js} +2 -2
- package/dist/client/assets/repositories-BS-pBlSH.js +1 -0
- package/dist/client/assets/{repositories-BNDNB0vE.js → repositories-BZocQhoR.js} +1 -1
- package/dist/client/assets/{repository-binding-4nTgXz1S.js → repository-binding-DEE5HjOP.js} +1 -1
- package/dist/client/assets/{repository-import-picker-De4sf2Gs.js → repository-import-picker-WAot3Ghn.js} +1 -1
- package/dist/client/assets/{repository-picker-HOHNvmaE.js → repository-picker-DKd6y_Vd.js} +1 -1
- package/dist/client/assets/{require-capability-ChTCz2WH.js → require-capability-BdR5kRbu.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BZllo6Io.js → required-auth-layout-CXS5DXAp.js} +1 -1
- package/dist/client/assets/{reset-password-Ui3G6CJw.js → reset-password-Br9V0wHS.js} +1 -1
- package/dist/client/assets/{resizable-DAXTAODq.js → resizable-CkWJ6g0G.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-CAixh6_W.js → resolve-tab-icon-BXRYZg2i.js} +1 -1
- package/dist/client/assets/{review-settings-BDP4bMe5.js → review-settings-CfpCP4zo.js} +1 -1
- package/dist/client/assets/{roles-Clx4HYW_.js → roles-D-ySNiDm.js} +1 -1
- package/dist/client/assets/{route-CaI6hSyT.js → route-Bor9ph6H.js} +1 -1
- package/dist/client/assets/{route-B9jYymiu.js → route-DIJ9is23.js} +1 -1
- package/dist/client/assets/route-DTfdE-p1.js +1 -0
- package/dist/client/assets/{runnable-block-editor-LQjhwiX1.js → runnable-block-editor-D1duQp0J.js} +3 -3
- package/dist/client/assets/{sandbox-lifecycle-context-CJodiAqU.js → sandbox-lifecycle-context-DJrMSxNE.js} +1 -1
- package/dist/client/assets/{schema-DrNvzI26.js → schema-BXxpoJF8.js} +1 -1
- package/dist/client/assets/{schema-xPkTs0YZ.js → schema-BiVd-UM7.js} +1 -1
- package/dist/client/assets/{scroll-area-BBBDJLpH.js → scroll-area-DdvxCYsk.js} +1 -1
- package/dist/client/assets/{search-input-DSx8LWNe.js → search-input-UGzUEySU.js} +1 -1
- package/dist/client/assets/{search-toggle-B9X5GBEJ.js → search-toggle-09QkRcdu.js} +1 -1
- package/dist/client/assets/{secret-ciphertext-qv17emf3.js → secret-ciphertext-D7Z8GkTt.js} +1 -1
- package/dist/client/assets/{secret-picker-DBs-gr5P.js → secret-picker-jW2RoOXq.js} +1 -1
- package/dist/client/assets/{secrets-5nLK_pSH.js → secrets--oDOIL-g.js} +1 -1
- package/dist/client/assets/{sections-ALAbnAYY.js → sections-Cktygxsr.js} +1 -1
- package/dist/client/assets/{sections-editor-DVqxZTWF.js → sections-editor-Ykrd9ksj.js} +1 -1
- package/dist/client/assets/{select-C9_0SSgH.js → select-C48ly-p-.js} +1 -1
- package/dist/client/assets/{select-model-BaxH4IRV.js → select-model-qC-ddNWu.js} +1 -1
- package/dist/client/assets/{seo-editor-Cd-ANp55.js → seo-editor-vkCR941s.js} +1 -1
- package/dist/client/assets/{separator-DXuISWBW.js → separator-CfwhkXab.js} +1 -1
- package/dist/client/assets/settings-tab-BR68FSDQ.js +1 -0
- package/dist/client/assets/{sheet-BQCLSAhw.js → sheet-C78dW_OW.js} +1 -1
- package/dist/client/assets/{shell-layout-CnXya3zZ.js → shell-layout-7jtYUd9L.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BG_Fzxj9.js → site-draft-actions-DyZ1f4ik.js} +1 -1
- package/dist/client/assets/site-draft-view-BRWWuiN5.js +2 -0
- package/dist/client/assets/site-editor-JG7QILYD.js +1 -0
- package/dist/client/assets/{site-editor-toast-BKVRfpA8.js → site-editor-toast-C_UZBEd9.js} +1 -1
- package/dist/client/assets/{skills-mFhfnuy4.js → skills-CHltBKqG.js} +1 -1
- package/dist/client/assets/{slider-DTKLr6aL.js → slider-DueO9EFe.js} +1 -1
- package/dist/client/assets/{sortable.esm-D2---7Ab.js → sortable.esm-D411R8sQ.js} +1 -1
- package/dist/client/assets/{sso-DrhiuaNt.js → sso-C7rH2Jsc.js} +1 -1
- package/dist/client/assets/{suggestion-B0A7rwRG.js → suggestion-_sJX1Xs_.js} +1 -1
- package/dist/client/assets/{switch-CESJ2RZK.js → switch-Wb17Bg4i.js} +1 -1
- package/dist/client/assets/{symbol-CYXY7_SE.js → symbol-CN-EQDYU.js} +1 -1
- package/dist/client/assets/{synced-repos--pWS_C_z.js → synced-repos-BRIUeky9.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Cjt9sANI.js → tab-icon-glyph-BeHT1AU_.js} +1 -1
- package/dist/client/assets/{table-BkZK8rXZ.js → table-ChqbkXkJ.js} +1 -1
- package/dist/client/assets/{tabs-B6EQUSl_.js → tabs-D-bShRzz.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-Dodx9W4w.js → task-assignee-avatar-Db7T5j33.js} +1 -1
- package/dist/client/assets/{task-board-6nf7vbPi.js → task-board-NNGstnYy.js} +1 -1
- package/dist/client/assets/{task-route-BvbHuTGP.js → task-route-BYz8Txhc.js} +1 -1
- package/dist/client/assets/{task-status-GUWtXwyC.js → task-status-BtnjgBne.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BXSTC1m2.js → taskboard-analytics-BiCEJijC.js} +1 -1
- package/dist/client/assets/tasks-CtzEjcDR.js +1 -0
- package/dist/client/assets/{tasks-DEvPbHif.js → tasks-DscpmhWw.js} +1 -1
- package/dist/client/assets/{textarea-DG3FcnmS.js → textarea-DXNX9E30.js} +1 -1
- package/dist/client/assets/{thread-analytics-BUqostwA.js → thread-analytics-BxM1u9ID.js} +1 -1
- package/dist/client/assets/{thread-intent-Ds79TVrW.js → thread-intent-BYXYhdV9.js} +1 -1
- package/dist/client/assets/{thread-route-UuA5SD5X.js → thread-route--lOZYDN5.js} +1 -1
- package/dist/client/assets/{thread-route-Cf5GTfDW.js → thread-route-EPwO0Tp5.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-p9veuPgz.js → thread-sheet-body-Doh4mgo7.js} +1 -1
- package/dist/client/assets/{time-range-picker-Bo0eqMw9.js → time-range-picker-bYUcsgps.js} +1 -1
- package/dist/client/assets/{toggle-group-C7NFln-0.js → toggle-group-C__89QW8.js} +1 -1
- package/dist/client/assets/{tool-namespace-CMW8ZB5L.js → tool-namespace-CjWGrg1d.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BiR5ntfC.js → toolbar-icon-button-Bn0QMDhj.js} +1 -1
- package/dist/client/assets/{tooltip-bQVm_Ope.js → tooltip-CjIqGzku.js} +1 -1
- package/dist/client/assets/{tooltipContext-CMDZ9J9X.js → tooltipContext-BlJpYj2n.js} +1 -1
- package/dist/client/assets/{track-COIlf0dl.js → track-DiwbUXrF.js} +1 -1
- package/dist/client/assets/{types-DLna4BAB.js → types-2FdJQAcI.js} +1 -1
- package/dist/client/assets/{url-slug-BWq-dgp6.js → url-slug-SgUmhnUm.js} +1 -1
- package/dist/client/assets/{usage-stats-CvT3PVJT.js → usage-stats-mjbSmunu.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CzmKfSB9.js → use-ai-providers-Ui8zDguo.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-BLEqLp1R.js → use-apply-named-rule-DqZvErCE.js} +1 -1
- package/dist/client/assets/{use-automations-DHA5_uZh.js → use-automations-C1_nM6XA.js} +1 -1
- package/dist/client/assets/{use-autosave-BlShc4A-.js → use-autosave-DUE5eTHe.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-BV7ldzPe.js → use-chat-layout-state-Civkwlwx.js} +1 -1
- package/dist/client/assets/{use-clock-tick-C61VlTs_.js → use-clock-tick-BglfF91b.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DxCCqNf4.js → use-connect-companion-DXE20Cit.js} +1 -1
- package/dist/client/assets/{use-connection-DTSe3r1K.js → use-connection-DjG9Ar0-.js} +1 -1
- package/dist/client/assets/{use-content-sync-Dj6rb1LD.js → use-content-sync-UBduiNPN.js} +1 -1
- package/dist/client/assets/{use-copy-Bc8JMSws.js → use-copy-D-ZUZJVe.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Dpe8iA_9.js → use-create-virtual-mcp-zb51VTao.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BGkTB4Mm.js → use-date-fns-locale-DDB69sAw.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BhCHbQGN.js → use-debounced-autosave-sMVb1_hn.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Cm7nwcam.js → use-debounced-value-0e-te_rl.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BgLGkCcl.js → use-deco-credits-zw0Jw-tt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C_BQo06W.js → use-decopilot-events-BQLXDAAl.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BEv8pmzy.js → use-delete-connection-CcIoRjhU.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Ck9xx8zz.js → use-deployment-admin-s7tGTRS4.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-B7ECUHMP.js → use-fast-preview-draft-url-B9Iu3h_6.js} +1 -1
- package/dist/client/assets/{use-file-configs-C7kUU5_U.js → use-file-configs-CDeU2xvZ.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-U2BOY_0m.js → use-inbox-feed-CFSuERBJ.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CpvqXWve.js → use-infinite-scroll-BopUCEp4.js} +1 -1
- package/dist/client/assets/{use-join-requests-ldwvbhU3.js → use-join-requests-D2jJesnC.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-BvDesOKd.js → use-main-panel-tabs--2YvNIZr.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-D6FLEMEz.js → use-mcp-auth-status-DEXNa6Oz.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cby5XqT6.js → use-mcp-client-owuI-9F9.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DpGHOlEI.js → use-mcp-prompts-8FxF45h0.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-7EpnWJvB.js → use-mcp-tools-qNpUlzik.js} +1 -1
- package/dist/client/assets/{use-members-oF45MDF1.js → use-members-VmpszULL.js} +1 -1
- package/dist/client/assets/{use-mobile-h4hHhZkm.js → use-mobile-CqyBz8Dx.js} +1 -1
- package/dist/client/assets/{use-move-blocks-DFQHiQ1n.js → use-move-blocks-Cnva5RwQ.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DwJfjSMG.js → use-navigate-to-agent-DdSspEm5.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CjWCFQM1.js → use-open-billing-url-CO2ZloNb.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BFDehTsp.js → use-org-auth-client-BQ7kloKy.js} +1 -1
- package/dist/client/assets/{use-org-fs-CyxFz8rw.js → use-org-fs-CvYQh_B2.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BsUWjWH7.js → use-org-repo-syncs-BtFmt_qd.js} +1 -1
- package/dist/client/assets/{use-org-sso-D5M4Sxwu.js → use-org-sso-B9p-4KH7.js} +1 -1
- package/dist/client/assets/{use-organization-roles-t12r77qZ.js → use-organization-roles-Cu4J92yA.js} +1 -1
- package/dist/client/assets/{use-organization-settings-NOur1Lvu.js → use-organization-settings-BcSo4teS.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DxGjTjIo.js → use-panel-navigate-Co0XZmSD.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-USh7_bNt.js → use-project-native-view-presence-BRsKjCEJ.js} +1 -1
- package/dist/client/assets/{use-project-scope-CBw0FSEz.js → use-project-scope-BL3NRFI4.js} +1 -1
- package/dist/client/assets/{use-recent-apps-B2LVD6z4.js → use-recent-apps-RjVee3Pq.js} +1 -1
- package/dist/client/assets/{use-releases-x9nrIfuE.js → use-releases-vjl0fUb-.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-qSw4HttT.js → use-reports-diagnostic-B0L8y4wc.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-D98uWMd_.js → use-sandbox-events-Bjcn7PU6.js} +1 -1
- package/dist/client/assets/{use-secrets-CvBGDTuP.js → use-secrets-D9Bq6nE_.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DmjOJ885.js → use-section-preview-base-Vjigvtig.js} +1 -1
- package/dist/client/assets/{use-session-runtime-BrkTaSa6.js → use-session-runtime-C-ErRuug.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-Bijbdhqq.js → use-sidebar-collapsed-oSws9nsi.js} +1 -1
- package/dist/client/assets/{use-tags-BMQZw2TW.js → use-tags-pfCDbF9Z.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-DdtvZ4ju.js → use-task-board-analytics-CopE-4zr.js} +1 -1
- package/dist/client/assets/{use-task-board-events-B5yNhg5i.js → use-task-board-events-C280-Zim.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-D9gfgNig.js → use-task-board-item-prs-x7ZAMu8t.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DuF2rBuH.js → use-task-metadata-CDV-25sQ.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-B03W7aQi.js → use-thread-analytics-RcDxA37Q.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-D_k8NizM.js → use-thread-outputs-orGxjs9L.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C3FB4QSd.js +1 -0
- package/dist/client/assets/{useQueries-BSehCBUp.js → useQueries-M-H4-oNf.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-zAujesU3.js +1 -0
- package/dist/client/assets/{users-Cej3U7P5.js → users-Yugcw0oy.js} +1 -1
- package/dist/client/assets/{utils-CkwBhBMS.js → utils-Cwt2fdOd.js} +1 -1
- package/dist/client/assets/{variant-calendar-kJB8Qi3I.js → variant-calendar-r5D0JiAM.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-XY7K79P5.js → variant-matcher-override-Dcw_0UNB.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BzmRbmfQ.js → virtual-mcp-D9lu2UG3.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CmsmQLFo.js → watch-sse-pool-BEBGvoea.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +417 -417
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-D7PovqhV.js +0 -1
- package/dist/client/assets/agent-app-DEsjnzHy.js +0 -1
- package/dist/client/assets/agent-calendar-Co4HNR_x.js +0 -1
- package/dist/client/assets/agent-deck-Bra-oqcr.js +0 -1
- package/dist/client/assets/agent-experiments-W5vP2PHw.js +0 -1
- package/dist/client/assets/agent-library-BTKjZMW2.js +0 -1
- package/dist/client/assets/agent-library-file-ClGbfS7a.js +0 -1
- package/dist/client/assets/agent-settings-DQDpgZ05.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CiWALb3j.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BrDlLQPy.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Da7g0LlC.js +0 -1
- package/dist/client/assets/agent-view-l1LYqbmp.js +0 -1
- package/dist/client/assets/api-keys-kxUaur7Y.js +0 -1
- package/dist/client/assets/cms-settings-editor-Dh-qBReE.js +0 -1
- package/dist/client/assets/index-CO7uP6ut.js +0 -1
- package/dist/client/assets/legacy-main-redirect-Pt1vRyf-.js +0 -1
- package/dist/client/assets/library-DJ51ehEw.js +0 -1
- package/dist/client/assets/project-reports-DnaQ9nW_.js +0 -1
- package/dist/client/assets/project-tasks-cwxXGcyN.js +0 -1
- package/dist/client/assets/record-editor-hWJJMGCG.js +0 -1
- package/dist/client/assets/reports-BQij5juA.js +0 -1
- package/dist/client/assets/repositories-BiNU-Xfn.js +0 -1
- package/dist/client/assets/route-BjK3qzB4.js +0 -1
- package/dist/client/assets/settings-tab-D_D1vl9t.js +0 -1
- package/dist/client/assets/site-draft-view-BYdCjysm.js +0 -2
- package/dist/client/assets/site-editor-B7kc0tIQ.js +0 -1
- package/dist/client/assets/tasks-Cd3DKWnU.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Dobhsojg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CqyfVE9R.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-editor-
|
|
2
|
-
import{c as ce,j as o,o as oi,e as ai,K as ii,b as _e,l as ve,r as L,h as vt,s as ms,v as Yt,I as jt,B as $e,w as fs,q as Wt,D as Xt,aM as Tn,t as me,an as ri,aS as is,aZ as ss,T as $s,aT as Xn,V as Ls,X as Is,aU as En,aN as li,U as et,av as Ks,ag as pn,aq as ci,a2 as di,u as Ro,a_ as Jn,aX as Ve,a$ as ui}from"./index-D2MFYEzD.js";import{a as Bn}from"./use-organization-settings-NOur1Lvu.js";import{u as Xs,c as Dn}from"./chat-context-DLezfYEa.js";import{i as pi,u as mi,S as fi,C as gi,N as hi}from"./blocks-tab-states-Dps89GrH.js";import{f as mn,e as xi,c as bi,g as $o,B as fn,P as yi,h as vi,i as Lo,j as ki,k as Si,n as ji,L as wi,u as Js,l as Ci,o as Ni,R as _i,p as Io,r as Pi,q as Ai,a as Ko,s as Ti,t as Ei,v as Fo,w as Bi,M as Di,d as Oi,x as Ri,y as $i,z as Li,b as Ii,S as Ki,A as Qn,C as Fi,N as zi}from"./runnable-block-editor-LQjhwiX1.js";import{i as cs}from"./AlertCircle-DgnxHqxe.js";import{a1 as zo,F as Zn,r as eo,a2 as Mo,a3 as On,a4 as Vo,b as Fs,X as Uo,a5 as Mi,a6 as Vi,a7 as Ui,a8 as Gi,a9 as Sn,n as Hi,aa as Go,ab as qi,ac as Yi,ad as Wi,k as to,ae as Xi,a0 as Ho}from"./agent-icon-g2PIrjzs.js";import{a as qo,s as zs,i as Rn,d as Ji,e as so}from"./UserSquare-B_yRFcN6.js";import{b as Yo,i as Wo}from"./ZoomOut-DLICjI1h.js";import{c as Xo,i as Qi}from"./SwitchHorizontal01-_kdH1ete.js";import{s as $n}from"./Plus-BnqPSlPj.js";import{t as Jo}from"./Users01-D5MhP5r0.js";import{f as Zi,e as er,b as tr,A as sr,a as nr,d as or,c as ar,g as ir}from"./alert-dialog-KKnJELoX.js";import{S as Qs}from"./scroll-area-BBBDJLpH.js";import{T as Xe,a as Je,c as Qe}from"./tooltip-bQVm_Ope.js";import{o as rr,c as Qo,F as lr,G as cr,H as dr,I as ur,q as Zo,J as ea,u as ta,m as sa,v as pr,l as mr,n as fr,b as gr}from"./site-editor-toast-BKVRfpA8.js";import{q as Ln,S as hr,t as xr,u as br,w as yr,x as na,n as Ds,d as vr,R as kr,y as Sr,z as jr,G as In,A as wr,p as Cr,B as Nr,e as no,C as oo,D as _r,g as Pr,E as Ar,h as Tr,F as oa,k as Er,H as Br,I as Dr,J as Or}from"./parse-sections-Bc_lvOtq.js";import{u as Rr,P as $r}from"./mustache-Cm6mC1mo.js";import{u as Lr}from"./use-content-sync-Dj6rb1LD.js";import{s as Ir}from"./sandbox-git-api-CH_-QFpD.js";import{u as Kn}from"./use-session-runtime-BrkTaSa6.js";import{b as aa}from"./sandbox-url-D3mC8qhT.js";import{d as Kr}from"./utils-CkwBhBMS.js";import{a as Fr}from"./use-panel-navigate-DxGjTjIo.js";import{a as ia,c as ra}from"./repository-binding-4nTgXz1S.js";import{n as la}from"./ShoppingBag01-DVHnZchK.js";import{t as ds}from"./ChevronUp-DiTVmUiH.js";import{C as zr,a as Mr,b as Vr}from"./collapsible-DZTt-UAc.js";import{u as Ur}from"./use-sandbox-events-D98uWMd_.js";import{a as Gr}from"./sandbox-lifecycle-context-CJodiAqU.js";import{C as Zs}from"./checkbox-BlB_jfat.js";import{L as bt}from"./label-3hTmrxoy.js";import{c as Hr,b as qr,a as Yr,d as Wr,S as Xr}from"./select-C9_0SSgH.js";import{s as Jr,i as Qr}from"./thread-intent-Ds79TVrW.js";import{s as Zr}from"./date-utils-CrvIKg-s.js";import{u as el}from"./use-move-blocks-DFQHiQ1n.js";import{i as tl}from"./CheckCircle-C7csYE-y.js";import{a as Fn}from"./Copy01-DRNuKy-h.js";import{s as zn}from"./Trash01-TPK4gSsp.js";import{i as gn}from"./Upload01-D6tRQTgc.js";import{B as Mn}from"./badge-DmeqGssZ.js";import{E as sl}from"./empty-state-4Hlytpdt.js";import{u as nl}from"./use-ai-providers-CzmKfSB9.js";import{T as ao}from"./textarea-DG3FcnmS.js";import{u as ol}from"./use-file-configs-C7kUU5_U.js";import{MonacoCodeEditor as ca}from"./monaco-editor-DEU78sxw.js";import"./core.esm-DHAYYfZu.js";import"./sortable.esm-D2---7Ab.js";import{b as al}from"./Tool01-rTZNmFct.js";import{a as io}from"./experiments-tab-choice-C9wWsYd4.js";import{E as il}from"./empty-state-_a1QMwjl.js";import{G as ro}from"./repository-picker-HOHNvmaE.js";import{R as rl}from"./repository-import-picker-De4sf2Gs.js";function da(){return Bn("blog_ai_enabled")}function ll(t,e){if(!t||!e?.length)return t;const s=Object.fromEntries(Object.entries(t.properties??{}).filter(([n])=>!e.includes(n)));return Object.keys(s).length>0?{...t,properties:s}:t}function cl(t,e,s){return typeof t!="string"?null:ll(Ln(t,e),s)}function ua(t,e,s){if(!e||typeof t!="string")return!1;const n=cl(t,e,s);return!!n&&Object.keys(n.properties??{}).length>0}const lo="CMS",jn="cms-settings";function dl(t){const e=t?.manifest?.blocks??{};return Object.values(e).some(s=>!!s&&Object.hasOwn(s,jn))}function gm(t){const e=Object.hasOwn(t,lo)?t[lo]:void 0;if(e==null)return{kind:"absent",block:{__resolveType:jn}};const s=typeof e=="object"&&!Array.isArray(e)?e.__resolveType:void 0;return s!==jn?{kind:"conflict",resolveType:typeof s=="string"?s:""}:{kind:"saved",block:e}}const ul=[{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"}],pl=[{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 en(t,e){return`${t}-${e}`}function Vn(t,e){return`site/apps/${t}/${e}.ts`}const ml="@decocms/",fl=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function gl(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const hl={"tanstack-start":"tanstack"};function xl(t){return t?hl[t]??null:"deno"}function pa(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 ma(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 bl=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function fa(t){return bl.test(t)}function yl(t){const e=pa(t);if(!e)return null;const s=ma(e),n=[...fl,...Object.keys(s).filter(i=>i.startsWith(ml)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!fa(r))return r;a??=r}}return a}function vl(t,e){const s=pa(t);return s?ma(s)[e]??null:null}function kl(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:yl(t.packageJson)}:null}class Ke extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function Sl(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return`${/^[0-9]/.test(s)?`app${s}`:s}Mod`}function jl(t){const e=`apps/${t.app}/mod.ts`;return{path:`apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${e}";
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/app-editor-C1ZA1u8T.js","assets/index-DY9jv8u5.js","assets/index-DjdMnw7p.css","assets/chat-context-DaG-xhpe.js","assets/use-panel-navigate-Co0XZmSD.js","assets/thread-route--lOZYDN5.js","assets/use-project-scope-BL3NRFI4.js","assets/repository-binding-DEE5HjOP.js","assets/use-mcp-client-owuI-9F9.js","assets/auth-vu0NBiVX.js","assets/autosend-ClHP6mj3.js","assets/thread-intent-BYXYhdV9.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-BEBGvoea.js","assets/task-board-NNGstnYy.js","assets/schema-BXxpoJF8.js","assets/slugify-CEUa2lfQ.js","assets/use-decopilot-events-BQLXDAAl.js","assets/use-ai-providers-Ui8zDguo.js","assets/location-V0VwTJTt.js","assets/use-organization-settings-BcSo4teS.js","assets/scroll-area-DdvxCYsk.js","assets/index-BdQq_4o_.js","assets/use-section-preview-base-Vjigvtig.js","assets/UserSquare-DXYtKMfd.js","assets/agent-icon-CCDPFoN-.js","assets/AlertCircle-CF7oV00-.js","assets/Tool01-C0vFHYhV.js","assets/ArrowUp-C-Wi5Wp-.js","assets/ArrowLeft-BYRX2oWU.js","assets/LinkBroken01-DhWTb9MO.js","assets/ShoppingBag01-B4aQ0-ny.js","assets/ZoomOut-D-Ww048N.js","assets/Building02-BTo5ALb8.js","assets/CheckCircle-B7DLXg5D.js","assets/ChevronUp-i4o2LTaN.js","assets/ChevronSelectorVertical-ByVW2vd8.js","assets/Copy01-Ck9G4OUr.js","assets/CreditCard01-DBL8NXSk.js","assets/DotsVertical-DGS_x5nz.js","assets/Image01-Cwrowq3c.js","assets/Globe04-lKXBAfc3.js","assets/SwitchHorizontal01-BbdJtypW.js","assets/Key01-CEbPGYnm.js","assets/Link01-DXqb71Uu.js","assets/Minus-C9yYSfDR.js","assets/Monitor01-BL3DAm_1.js","assets/Sun-DqiY7Z2B.js","assets/Play-CZ7QKkqf.js","assets/Plus-BRxUqR_F.js","assets/SearchMd-DiO3q0AT.js","assets/Trash01-bhcUMroB.js","assets/Upload01-BwEuXdMa.js","assets/User01-DSs11bSF.js","assets/Users01-CTqd0ZAH.js","assets/XClose-CxYwKo3k.js","assets/runnable-block-editor-D1duQp0J.js","assets/utils-Cwt2fdOd.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-BiwOJOFx.js","assets/format-time-Cq80KKvY.js","assets/differenceInSeconds-C3x8sHUj.js","assets/collapsible-CCUbGddy.js","assets/use-copy-D-ZUZJVe.js","assets/usage-stats-mjbSmunu.js","assets/tool-namespace-CjWGrg1d.js","assets/form-Diz2j79C.js","assets/label-CUbZuKc3.js","assets/utils-CVEq3hMx.js","assets/markdown-CQTrkEJG.js","assets/use-mobile-CqyBz8Dx.js","assets/tooltip-CjIqGzku.js","assets/index-DPyR1fyZ.js","assets/use-clock-tick-BglfF91b.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CfeFa2D0.js","assets/types-2FdJQAcI.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/shell-layout-7jtYUd9L.js","assets/avatar-BfW8_V1B.js","assets/command-A6J0_nSj.js","assets/index-CH_rHFJ7.js","assets/integration-icon-BZ0SYBCb.js","assets/project-icon-BtGD--7Z.js","assets/new-project-dialog-BDUYA1Q9.js","assets/repository-import-picker-WAot3Ghn.js","assets/use-navigate-to-agent-DdSspEm5.js","assets/repository-picker-DKd6y_Vd.js","assets/useInfiniteQuery-C3FB4QSd.js","assets/infiniteQueryObserver-Glyohd4p.js","assets/collection-search-DFZiZHgj.js","assets/use-debounced-value-0e-te_rl.js","assets/required-auth-layout-CXS5DXAp.js","assets/use-org-sso-B9p-4KH7.js","assets/shell-layout-CE2Eihra.css","assets/sheet-C78dW_OW.js","assets/use-connection-DjG9Ar0-.js","assets/use-mcp-prompts-8FxF45h0.js","assets/use-thread-outputs-orGxjs9L.js","assets/file-type-icon-Dh-YpP4t.js","assets/secret-ciphertext-D7Z8GkTt.js","assets/alert-CmByshZi.js","assets/parse-sections-Ce8e3CyM.js","assets/switch-Wb17Bg4i.js","assets/textarea-DXNX9E30.js","assets/site-editor-toast-C_UZBEd9.js","assets/use-session-runtime-C-ErRuug.js","assets/experiments-tab-choice-CJxPrnzq.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-Bjcn7PU6.js","assets/sandbox-git-api-CH_-QFpD.js","assets/popover-B1ABR0kS.js","assets/blocks-tab-states-D014yZyw.js","assets/slider-DueO9EFe.js","assets/index-hWaEVFzi.js","assets/tooltipContext-BlJpYj2n.js","assets/CategoricalChart-DTvqZVLo.js","assets/index-CjCEGRSu.js","assets/ActiveShapeUtils-Bis8M8cE.js","assets/Sector-XuiRQ9ct.js","assets/symbol-CN-EQDYU.js","assets/empty-state-C97rGNTx.js","assets/monaco-editor-nJc5wgpu.js","assets/editor-CpWj2GSL.js","assets/calendar-C7UsyFmW.js","assets/select-C48ly-p-.js","assets/editor-classes-5vsxGGPA.js","assets/core.esm-BT3eS5hh.js","assets/sortable.esm-D411R8sQ.js","assets/toggle-group-C__89QW8.js","assets/active-indicator-CCMhAsc_.js","assets/combobox--wUI1bJn.js","assets/alert-dialog-BcRtAren.js","assets/search-input-UGzUEySU.js","assets/tabs-D-bShRzz.js","assets/use-file-configs-CDeU2xvZ.js","assets/asset-utils-DIN0M3zp.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/section-preview-url-7zfngvgW.js","assets/mustache-CewpKCP1.js","assets/use-content-sync-UBduiNPN.js","assets/sandbox-lifecycle-context-DJrMSxNE.js","assets/checkbox-k3S7hbYo.js","assets/date-utils-CrvIKg-s.js","assets/use-move-blocks-Cnva5RwQ.js","assets/badge-CqxA0I5-.js","assets/empty-state-BThdzdI0.js","assets/cms-settings-editor-VytgeION.js","assets/post-editor-Cxxxfb0r.js","assets/multi-select-DpaHzZAz.js","assets/block-document-l9rZniOP.js","assets/suggestion-_sJX1Xs_.js","assets/product-picker-dialog-BHrHoQQK.js","assets/index-5O453B2L.js","assets/blog-schema-p025Q_3k.js","assets/use-fast-preview-draft-url-B9Iu3h_6.js","assets/preview-link-C762yHOt.js","assets/variant-draft-pointer-BeAKcq_c.js","assets/use-autosave-DUE5eTHe.js","assets/record-editor-DulCdbwX.js","assets/context-DSH71GyO.js","assets/index-BvwkkTca.js","assets/use-org-fs-CvYQh_B2.js","assets/use-org-auth-client-BQ7kloKy.js","assets/icon-button-DuuXKRCk.js","assets/category-editor-CldKargp.js","assets/sections-editor-Ykrd9ksj.js","assets/use-members-VmpszULL.js","assets/page-seo-form-DHiOVvvv.js","assets/use-apply-named-rule-DqZvErCE.js","assets/variant-matcher-override-Dcw_0UNB.js","assets/seo-editor-vkCR941s.js","assets/variant-calendar-r5D0JiAM.js","assets/campaigns-view-Cz4ACJMm.js","assets/named-rule-view-CML2JnRp.js","assets/named-rule-uses-939Puzgt.js","assets/post-calendar-CtSEncUE.js","assets/redirect-editor-DGmg8IhI.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as ce,j as o,o as oi,e as ai,K as ii,b as _e,l as ve,r as L,h as vt,s as ms,v as Yt,I as jt,B as $e,w as fs,q as Wt,D as Xt,aM as Tn,t as me,an as ri,aS as is,aZ as ss,T as $s,aT as Xn,V as Ls,X as Is,aU as En,aN as li,U as et,av as Ks,ag as pn,aq as ci,a2 as di,u as Ro,a_ as Jn,aX as Ve,a$ as ui}from"./index-DY9jv8u5.js";import{a as Bn}from"./use-organization-settings-BcSo4teS.js";import{u as Xs,c as Dn}from"./chat-context-DaG-xhpe.js";import{i as pi,u as mi,S as fi,C as gi,N as hi}from"./blocks-tab-states-D014yZyw.js";import{f as mn,e as xi,c as bi,g as $o,B as fn,P as yi,h as vi,i as Lo,j as ki,k as Si,n as ji,L as wi,u as Js,l as Ci,o as Ni,R as _i,p as Io,r as Pi,q as Ai,a as Ko,s as Ti,t as Ei,v as Fo,w as Bi,M as Di,d as Oi,x as Ri,y as $i,z as Li,b as Ii,S as Ki,A as Qn,C as Fi,N as zi}from"./runnable-block-editor-D1duQp0J.js";import{i as cs}from"./AlertCircle-CF7oV00-.js";import{a1 as zo,F as Zn,r as eo,a2 as Mo,a3 as On,a4 as Vo,b as Fs,X as Uo,a5 as Mi,a6 as Vi,a7 as Ui,a8 as Gi,a9 as Sn,n as Hi,aa as Go,ab as qi,ac as Yi,ad as Wi,k as to,ae as Xi,a0 as Ho}from"./agent-icon-CCDPFoN-.js";import{a as qo,s as zs,i as Rn,d as Ji,e as so}from"./UserSquare-DXYtKMfd.js";import{b as Yo,i as Wo}from"./ZoomOut-D-Ww048N.js";import{c as Xo,i as Qi}from"./SwitchHorizontal01-BbdJtypW.js";import{s as $n}from"./Plus-BRxUqR_F.js";import{t as Jo}from"./Users01-CTqd0ZAH.js";import{f as Zi,e as er,b as tr,A as sr,a as nr,d as or,c as ar,g as ir}from"./alert-dialog-BcRtAren.js";import{S as Qs}from"./scroll-area-DdvxCYsk.js";import{T as Xe,a as Je,c as Qe}from"./tooltip-CjIqGzku.js";import{o as rr,c as Qo,F as lr,G as cr,H as dr,I as ur,q as Zo,J as ea,u as ta,m as sa,v as pr,l as mr,n as fr,b as gr}from"./site-editor-toast-C_UZBEd9.js";import{q as Ln,S as hr,t as xr,u as br,w as yr,x as na,n as Ds,d as vr,R as kr,y as Sr,z as jr,G as In,A as wr,p as Cr,B as Nr,e as no,C as oo,D as _r,g as Pr,E as Ar,h as Tr,F as oa,k as Er,H as Br,I as Dr,J as Or}from"./parse-sections-Ce8e3CyM.js";import{u as Rr,P as $r}from"./mustache-CewpKCP1.js";import{u as Lr}from"./use-content-sync-UBduiNPN.js";import{s as Ir}from"./sandbox-git-api-CH_-QFpD.js";import{u as Kn}from"./use-session-runtime-C-ErRuug.js";import{b as aa}from"./sandbox-url-D3mC8qhT.js";import{d as Kr}from"./utils-Cwt2fdOd.js";import{a as Fr}from"./use-panel-navigate-Co0XZmSD.js";import{a as ia,c as ra}from"./repository-binding-DEE5HjOP.js";import{n as la}from"./ShoppingBag01-B4aQ0-ny.js";import{t as ds}from"./ChevronUp-i4o2LTaN.js";import{C as zr,a as Mr,b as Vr}from"./collapsible-CCUbGddy.js";import{u as Ur}from"./use-sandbox-events-Bjcn7PU6.js";import{a as Gr}from"./sandbox-lifecycle-context-DJrMSxNE.js";import{C as Zs}from"./checkbox-k3S7hbYo.js";import{L as bt}from"./label-CUbZuKc3.js";import{c as Hr,b as qr,a as Yr,d as Wr,S as Xr}from"./select-C48ly-p-.js";import{s as Jr,i as Qr}from"./thread-intent-BYXYhdV9.js";import{s as Zr}from"./date-utils-CrvIKg-s.js";import{u as el}from"./use-move-blocks-Cnva5RwQ.js";import{i as tl}from"./CheckCircle-B7DLXg5D.js";import{a as Fn}from"./Copy01-Ck9G4OUr.js";import{s as zn}from"./Trash01-bhcUMroB.js";import{i as gn}from"./Upload01-BwEuXdMa.js";import{B as Mn}from"./badge-CqxA0I5-.js";import{E as sl}from"./empty-state-BThdzdI0.js";import{u as nl}from"./use-ai-providers-Ui8zDguo.js";import{T as ao}from"./textarea-DXNX9E30.js";import{u as ol}from"./use-file-configs-CDeU2xvZ.js";import{MonacoCodeEditor as ca}from"./monaco-editor-nJc5wgpu.js";import"./core.esm-BT3eS5hh.js";import"./sortable.esm-D411R8sQ.js";import{b as al}from"./Tool01-C0vFHYhV.js";import{a as io}from"./experiments-tab-choice-CJxPrnzq.js";import{E as il}from"./empty-state-C97rGNTx.js";import{G as ro}from"./repository-picker-DKd6y_Vd.js";import{R as rl}from"./repository-import-picker-WAot3Ghn.js";function da(){return Bn("blog_ai_enabled")}function ll(t,e){if(!t||!e?.length)return t;const s=Object.fromEntries(Object.entries(t.properties??{}).filter(([n])=>!e.includes(n)));return Object.keys(s).length>0?{...t,properties:s}:t}function cl(t,e,s){return typeof t!="string"?null:ll(Ln(t,e),s)}function ua(t,e,s){if(!e||typeof t!="string")return!1;const n=cl(t,e,s);return!!n&&Object.keys(n.properties??{}).length>0}const lo="CMS",jn="cms-settings";function dl(t){const e=t?.manifest?.blocks??{};return Object.values(e).some(s=>!!s&&Object.hasOwn(s,jn))}function gm(t){const e=Object.hasOwn(t,lo)?t[lo]:void 0;if(e==null)return{kind:"absent",block:{__resolveType:jn}};const s=typeof e=="object"&&!Array.isArray(e)?e.__resolveType:void 0;return s!==jn?{kind:"conflict",resolveType:typeof s=="string"?s:""}:{kind:"saved",block:e}}const ul=[{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"}],pl=[{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 en(t,e){return`${t}-${e}`}function Vn(t,e){return`site/apps/${t}/${e}.ts`}const ml="@decocms/",fl=["@decocms/blocks","@decocms/tanstack","@decocms/blocks-admin"];function gl(t){switch(t){case"deno":return"deno";case"bun":case"npm":case"pnpm":case"yarn":return"tanstack";default:return null}}const hl={"tanstack-start":"tanstack"};function xl(t){return t?hl[t]??null:"deno"}function pa(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 ma(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 bl=/^(?:workspace|catalog|link|file|portal|npm|git|github):/;function fa(t){return bl.test(t)}function yl(t){const e=pa(t);if(!e)return null;const s=ma(e),n=[...fl,...Object.keys(s).filter(i=>i.startsWith(ml)).sort()];let a=null;for(const i of n){const r=s[i];if(r){if(!fa(r))return r;a??=r}}return a}function vl(t,e){const s=pa(t);return s?ma(s)[e]??null:null}function kl(t){return t.denoJson!==null?{technology:"deno",decocmsVersion:null}:t.packageJson!==null?{technology:"tanstack",decocmsVersion:yl(t.packageJson)}:null}class Ke extends Error{constructor(e){super(e),this.name="SiteAppInstallError"}}function Sl(t){const s=t.replace(/[-_.]+(.)/g,(n,a)=>a.toUpperCase()).replace(/[^A-Za-z0-9$_]/g,"");return`${/^[0-9]/.test(s)?`app${s}`:s}Mod`}function jl(t){const e=`apps/${t.app}/mod.ts`;return{path:`apps/${t.vendor}/${t.app}.ts`,content:`export { default } from "${e}";
|
|
3
3
|
export * from "${e}";
|
|
4
4
|
`}}function wl(t,e){return{path:`src/apps/${t.vendor}/${t.app}.ts`,content:`export * from "${e}/mod";
|
|
5
5
|
`}}function Cl(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 Ke("package.json: unbalanced braces")}function co(t,e){let s=e;for(;s<t.length&&` \r
|
|
@@ -19,4 +19,4 @@ ${m.replace(/^\s*\]/,"]")}`:m].join("")}function El(t){const{entry:e,technology:
|
|
|
19
19
|
<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"]]'}},Sd=600;function jd(t,e){for(const{payload:s}of Ye(e,"posts"))for(const n of Me(s.sections)){const a=Se(n);if(!a||a.__resolveType!==t)continue;const{__resolveType:i,...r}=a;if(Object.keys(r).length!==0&&!(JSON.stringify(r).length>Sd))return r}}function wd(t,e,s,n){const a=cd(e,n),i=Hn(e,n),r=new Set(Fa(t.value,i)),l=a.filter(f=>r.has(f.resolveType)),c=l.length>0?l:a,u=new Set,m=[];for(const f of c){if(u.has(f.name)||i[f.name]!==f.resolveType)continue;u.add(f.name);const g=jd(f.resolveType,s)??kd[f.name];m.push({name:f.name,title:f.title,description:f.description??"",schema:vd(bd(f.resolveType,e),g),example:g})}return m}function Hn(t,e){const s={};for(const n of Oa(t,e)){const a=nn(n.resolveType);a in s||(s[a]=n.resolveType)}return s}function Cd(t,e,s={}){const n=[];for(const a of t){const i=e[a.type];if(!i)continue;const r=Pd(a.props,a.productIds??[],s[a.type]);n.push({__resolveType:i,...r})}return n}const Nd=["product","products"];function _d(t){const e=Se(t);return e?Nd.find(s=>s in e)??null:null}function Pd(t,e,s){const n=e.filter(Boolean),a=_d(s);if(n.length===0||!a)return t;const i=s[a];return{...t,[a]:jc(i,n)}}const qn=80;function Ua(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,qn)}function Lm(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+/,"").slice(0,qn)}function ko(t,e){const s=qn-e.length-1;return`${t.slice(0,s).replace(/-+$/,"")}-${e}`}function Ga(t,e,s){const n=Ua(t)||`${s}-${Jt(6)}`,a=new Set(e);if(!a.has(n))return n;for(let i=2;i<100;i++){const r=ko(n,String(i));if(!a.has(r))return r}return ko(n,Jt(4))}function Ha(t,e){return Ga(t,e,"post")}function Ad(t,e){return Ga(t,e,"category")}function Td({draft:t,resolveTypes:e,productShapes:s,categories:n,authors:a,planning:i,takenSlugs:r,now:l}){const c=new Set(t.categorySlugs),u=new Set(t.authorEmails),m={title:t.title,slug:Ha(t.title,r),date:l.toISOString().slice(0,10),excerpt:t.excerpt,image:t.cover.url,alt:t.cover.alt,authors:a.filter(f=>u.has(f.email)),categories:n.filter(f=>c.has(f.slug)),seo:{title:t.seo.title,description:t.seo.description,image:t.cover.url},sections:Cd(t.sections,e,s),planning:i??{}};return Ms(m,"awaiting_review",l)}function Hs(t){const e=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0");return`${t.getFullYear()}-${e}-${s}`}const qa=/^(\d{4})-(\d{2})-(\d{2})$/;function qs(t){const e=t.trim();if(!e)return null;const s=qa.exec(e);if(s){const a=Number(s[1]),i=Number(s[2])-1,r=Number(s[3]),l=new Date(a,i,r);return l.getMonth()===i&&l.getDate()===r?l:null}const n=new Date(e);return Number.isNaN(n.getTime())?null:Zr(n)}function Ed(t){const e=new Date(t.getFullYear(),t.getMonth(),t.getDate(),Ca);return{...Ba("posts"),status:"scheduled",scheduledDatetime:e.toISOString(),date:Hs(t)}}function Bd(t){if(typeof t!="string")return null;const e=t.trim();if(!e)return null;if(qa.test(e))return qs(e);const s=new Date(e);return Number.isNaN(s.getTime())?null:s}function Dd(t,e){const s=Bd(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:"")===Hs(s)&&(a.date=Hs(n)),a}function Od(t){return qs(t.scheduledDatetime)??qs(t.date)}function Im(t){const e=new Map,s=[];for(const a of t){const i={post:a,scheduled:qs(a.scheduledDatetime)!==null},r=Od(a);if(!r){s.push(i);continue}const l=Hs(r),c=e.get(l);c?c.push(i):e.set(l,[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 Ys={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 Rd({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,onMoved:a}){const i=_e(),r=el({orgSlug:t,virtualMcpId:e,branch:s}),[l,c]=L.useState(new Set),u=d=>kt(n[d],"posts"),m=(d,p,x=u(d))=>p==="generating"?{kind:"not-a-target"}:l.has(ls(d))?{kind:"in-flight"}:Oc(x,p)?{kind:"incomplete"}:null,f=d=>{switch(d.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(d)}};return{apply:async(d,p,x)=>{const k=x??u(d);if(Qt(k)===p)return null;const j=m(d,p,k);if(j)return j.kind!=="in-flight"&&me.error(f(j)),null;const v=ls(d);c(_=>new Set(_).add(v));const b=Fc({key:d,payload:k},p,new Date),N=Object.keys(b.writes)[0]??d;N!==d&&a?.(d,N);try{return await r.move(b),N}catch(_){return N!==d&&a?.(N,d),me.error(_ instanceof Error?_.message:i("sandbox.postBoard.moveFailed")),null}finally{c(_=>{const y=new Set(_);return y.delete(v),y})}},refuse:m,reasonText:f,isMoving:d=>l.has(ls(d))}}function Ya(){return Bn("hide_default_blog_blocks")}function $d(t){const e=ce.c(15),{value:s,onChange:n,placeholder:a,className:i,onFocus:r,onBlur:l,onKeyDown:c,spellCheck:u,readOnly:m,inputRef:f}=t,g=u===void 0?!0:u;let d;e[0]!==n?(d=k=>n(k.target.value),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==i?(p=ve("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 x;return e[4]!==f||e[5]!==l||e[6]!==r||e[7]!==c||e[8]!==a||e[9]!==m||e[10]!==g||e[11]!==d||e[12]!==p||e[13]!==s?(x=o.jsx("textarea",{ref:f,value:s,onChange:d,onInput:Ld,onFocus:r,onBlur:l,onKeyDown:c,placeholder:a,spellCheck:g,readOnly:m,rows:1,className:p}),e[4]=f,e[5]=l,e[6]=r,e[7]=c,e[8]=a,e[9]=m,e[10]=g,e[11]=d,e[12]=p,e[13]=s,e[14]=x):x=e[14],x}function Ld(t){const e=t.currentTarget;e.style.height="auto",e.style.height=`${e.scrollHeight}px`}function qe(t){return typeof t=="string"?t:""}function Km(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=ve(s,"pr-9"),e[3]=s,e[4]=a):a=e[4];let i;e[5]!==n||e[6]!==a?(i=o.jsx($d,{...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(Vi,{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 l;return e[9]!==i?(l=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]=l):l=e[10],l}function Fm(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($n,{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 zm(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(zn,{className:"size-3.25"}),e[0]=a):a=e[0];let i;return e[1]!==s||e[2]!==n?(i=o.jsx($e,{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 Mm(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 Vm(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 So(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(jo,{active:!n,onClick:()=>i(""),children:a}),e[0]=a,e[1]=i,e[2]=n,e[3]=r):r=e[3];let l;if(e[4]!==i||e[5]!==s||e[6]!==n){let u;e[8]!==i||e[9]!==n?(u=m=>o.jsx(jo,{active:m===n,onClick:()=>i(m),children:m},m),e[8]=i,e[9]=n,e[10]=u):u=e[10],l=s.filter(Boolean).map(u),e[4]=i,e[5]=s,e[6]=n,e[7]=l}else l=e[7];let c;return e[11]!==r||e[12]!==l?(c=o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,l]}),e[11]=r,e[12]=l,e[13]=c):c=e[13],c}function jo(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=ve("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 l;return e[2]!==s||e[3]!==a||e[4]!==n||e[5]!==r?(l=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]=l):l=e[6],l}function Um(t,e=[]){return typeof t=="string"?t:JSON.stringify(t??e)}const As=[{id:"campaign",label:"sandbox.generatePost.stepCampaign"},{id:"format",label:"sandbox.generatePost.stepFormat"},{id:"extra",label:"sandbox.generatePost.stepExtra"}],Id=[1,2,3],Kd={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 Fd({open:t,onOpenChange:e,decofile:s,hasAi:n,onGenerate:a}){const i=_e(),r=ol(),[l,c]=L.useState("campaign"),[u,m]=L.useState(""),[f,g]=L.useState(""),[d,p]=L.useState(""),[x,k]=L.useState(""),[j,v]=L.useState(1),{merged:b}=La(s),N=pd(b),_=id(s).filter(P=>P.status!=="finished"),y=_.find(P=>P.key===u),w=s[rd],S=ze(Fe(w?.formats)),E=()=>{c("campaign"),m(""),g(""),p(""),k(""),v(1)},D=P=>{e(P),P||E()},T=As.findIndex(P=>P.id===l),B=l==="campaign"?!!y:l==="format"?f.trim().length>0&&d.trim().length>0:!0,C=l==="extra",F=()=>{y&&(a({campaign:y,format:{name:f.trim(),value:d.trim()},extraInstructions:x.trim()||void 0,count:j,fileConfigId:ji(r.data?.configs??[],null,typeof window<"u"?window.localStorage.getItem(wi):null)??void 0}),D(!1))};return o.jsx(Xt,{open:t,onOpenChange:D,children:o.jsxs(Wt,{className:"flex max-h-[85vh] flex-col sm:max-w-2xl",children:[o.jsxs(ms,{children:[o.jsx(Yt,{children:i("sandbox.generatePost.title")}),o.jsx(Tn,{children:i("sandbox.generatePost.subtitle")})]}),N.length>0?o.jsx("p",{className:"text-sm text-muted-foreground",children:i("sandbox.generatePost.blockedBrand",{fields:N.map(P=>i(Kd[P])).join(", ")})}):o.jsxs(o.Fragment,{children:[o.jsx("ol",{className:"flex shrink-0 items-center gap-1.5 text-xs",children:As.map((P,$)=>o.jsx("li",{className:ve("rounded-md px-2 py-1",$===T?"bg-primary text-primary-foreground":$<T?"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:[l==="campaign"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.campaignHint")}),_.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(zd,{campaigns:_,chosen:u,onChoose:m})]}),l==="format"&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:"text-xs text-muted-foreground",children:i("sandbox.generatePost.formatHint")}),o.jsx(So,{options:S.map(P=>P.name),value:f,onChange:P=>{g(P),p(S.find($=>$.name===P)?.value??"")}}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(bt,{htmlFor:"generate-format-name",children:i("sandbox.generatePost.formatNameLabel")}),o.jsx(jt,{id:"generate-format-name",value:f,onChange:P=>g(P.target.value),placeholder:i("sandbox.generatePost.formatNamePlaceholder")})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(bt,{htmlFor:"generate-format-value",children:i("sandbox.generatePost.formatValueLabel")}),o.jsx(ao,{id:"generate-format-value",value:d,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")})]}),l==="extra"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(bt,{htmlFor:"generate-extra",children:i("sandbox.generatePost.extraLabel")}),o.jsx(ao,{id:"generate-extra",value:x,onChange:P=>k(P.target.value),placeholder:i("sandbox.generatePost.extraPlaceholder"),rows:4})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(bt,{children:i("sandbox.generatePost.countLabel")}),o.jsx(So,{options:Id.map(String),value:String(j),onChange:P=>v(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(fs,{className:"shrink-0 sm:justify-between",children:[o.jsx($e,{type:"button",variant:"outline",disabled:T===0,onClick:()=>c(As[T-1].id),children:i("sandbox.generatePost.back")}),C?o.jsxs($e,{type:"button",disabled:!n,onClick:F,children:[o.jsx(zs,{size:14}),i("sandbox.generatePost.generate",{count:String(j)})]}):o.jsx($e,{type:"button",disabled:!B,onClick:()=>c(As[T+1].id),children:i("sandbox.generatePost.next")})]})]})]})})}function zd(t){const e=ce.c(11),{campaigns:s,chosen:n,onChoose:a}=t,i=_e();let r;if(e[0]!==s||e[1]!==n||e[2]!==a||e[3]!==i){let c;e[5]!==n||e[6]!==a||e[7]!==i?(c=u=>o.jsx("li",{children:o.jsxs("button",{type:"button",onClick:()=>a(u.key),className:ve("w-full cursor-pointer rounded-lg border bg-card p-2.5 text-left transition-colors hover:border-primary/40",n===u.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:u.name||i("sandbox.campaigns.untitled")}),o.jsx(Mn,{variant:"outline",size:"sm",className:"shrink-0",children:u.intent.products.length>0?i("sandbox.generatePost.campaignProducts",{count:String(u.intent.products.length)}):i("sandbox.generatePost.campaignNoProducts")})]}),u.trigger.note&&o.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:u.trigger.note})]})},u.key),e[5]=n,e[6]=a,e[7]=i,e[8]=c):c=e[8],r=s.map(c),e[0]=s,e[1]=n,e[2]=a,e[3]=i,e[4]=r}else r=e[4];let l;return e[9]!==r?(l=o.jsx("ul",{className:"space-y-1.5",children:r}),e[9]=r,e[10]=l):l=e[10],l}function Md(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 Vd={"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 Ud({orgSlug:t,virtualMcpId:e,branch:s,decofile:n,meta:a,onStarted:i}){const r=_e(),l=ri(),c=Ya(),u=Js({orgSlug:t,virtualMcpId:e,branch:s});return async m=>{const f={campaignKey:m.campaign.key,format:m.format,brief:m.campaign.trigger.note},g=Ms(Aa({title:m.campaign.name,planning:f,now:new Date}),"generating",new Date),d=Array.from({length:m.count},()=>Vs(Nn())),{merged:p}=La(n),x=Zc(p),k=Ye(n,"categories").map(({payload:S})=>({name:qe(S.name),slug:qe(S.slug)})).filter(S=>S.slug),j=Ec(n),v=wd(m.format,a,n,{hideDefaults:c}),b=Object.fromEntries(v.map(S=>[S.name,S.example])),N=async(S,E=d.length)=>{for(const D of d.slice(S,E))try{await u.mutateAsync({blockKey:D,data:St(D,Ms(g,"draft",new Date))})}catch(T){console.warn("[generatePost] could not reset a card",T)}},_=async(S,E)=>{if(!E.fileConfigId||S.length===0)return new Map;try{const D=await l.call("BLOG_POST_ILLUSTRATE",{requests:S.map((T,B)=>({id:String(B),prompt:T.cover.prompt,alt:T.cover.alt})),productImages:Md(E.campaign.intent.products),companyName:x.companyName??"",fileConfigId:E.fileConfigId});return new Map(D.images.map(T=>[T.id,T.url]))}catch(D){return console.warn("[generatePost] illustrating failed",D),new Map}};let y=0;try{for(const S of d)await u.mutateAsync({blockKey:S,data:St(S,g)}),y+=1}catch(S){await N(0,y),me.error(S instanceof Error?S.message:r("sandbox.generatePost.failed"));return}i?.(d);let w=0;try{const S=await l.call("BLOG_SITE_GROUND",{virtualMcpId:e,purpose:"post",focus:`${m.campaign.name}: ${m.campaign.trigger.note}`,language:x.language}).catch(C=>{console.warn("[generatePost] grounding failed",C)}),E=await l.call("BLOG_POST_DRAFT",{virtualMcpId:e,grounding:S?{report:S.report,outcome:S.outcome}:void 0,brand:{companyName:x.companyName,description:x.description,language:x.language,storeUrl:x.storeUrl,targetAudience:x.targetAudience,tone:x.tone,dos:x.dos,avoid:x.avoid,vocabulary:x.vocabulary,voiceExamples:x.voiceExamples},campaign:{name:m.campaign.name,period:m.campaign.period,trigger:m.campaign.trigger,intent:{objective:m.campaign.intent.objective,targets:m.campaign.intent.targets,products:m.campaign.intent.products,keywords:m.campaign.intent.keywords},guardrails:m.campaign.guardrails},format:m.format,blocks:v,categories:k,authors:j.map(({name:C,email:F})=>({name:C,email:F})),extraInstructions:m.extraInstructions?.trim()||void 0,count:m.count}),D=await _(E.posts,m),T=Hn(a,{hideDefaults:c}),B=Na(n).map(C=>C.slug);for(const[C,F]of E.posts.entries()){const P=d[C];if(!P)break;const $=Td({draft:{...F,cover:{...F.cover,url:D.get(String(C))??""}},resolveTypes:T,productShapes:b,categories:k,authors:j,planning:f,takenSlugs:B,now:new Date});B.push(qe($.slug)),await u.mutateAsync({blockKey:P,data:St(P,$)}),w=C+1}await N(w),E.posts.length>0&&me.success(r("sandbox.generatePost.done",{count:String(E.posts.length)}));for(const C of E.gaps)me.warning(r(Vd[C.code],{count:C.count??0}))}catch(S){await N(w),me.error(S instanceof Error?S.message:r("sandbox.generatePost.failed"))}}}const Gd=/<(h[1-6]|p|ul|ol|div|img|br|blockquote|section|article|figure)\b|<\/[a-z]/i;function Wa(t){return Gd.test(t)}function Hd(t){const e=t.trim();return e?Wa(e)?eu(e):su(e):{title:"",sections:[]}}function Yn(t){return t.replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/�?39;|'/gi,"'").replace(/&/gi,"&")}function as(t){let e=t,s;do s=e,e=e.replace(/<[^>]+>/g,"");while(e!==s);return Yn(e).replace(/\s+/g," ").trim()}function qd(t){let e=t,s;do s=e,e=e.replace(/<!--[\s\S]*?-->/g,"");while(e!==s);return e}function Yd(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 Xa(t){let e=t,s;do s=e,e=Yd(qd(e));while(e!==s);return e}const Wd=/^(a|b|strong|i|em|u|s|code|br|span|sub|sup)$/;function Ws(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 Xd(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}const Jd=/^<\/?([a-z][a-z0-9]*)\b([^>]*)>/i;function Qd(t,e,s){const n=e.toLowerCase();if(!Wd.test(n))return"";if(t.startsWith("</"))return`</${n}>`;if(n!=="a")return`<${n}>`;const a=Yn(s.match(/href\s*=\s*"([^"]*)"/i)?.[1]??"");return Ws(a)&&a?`<a href="${Xd(a)}">`:"<a>"}function Ja(t){const e=Xa(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=Jd.exec(e.slice(a));if(!i){s+="<",n=a+1;continue}s+=Qd(i[0],i[1]??"",i[2]??""),n=a+i[0].length}return s}function Ts(t,e){const s=t.match(new RegExp(`${e}\\s*=\\s*"([^"]*)"`,"i"));return s?.[1]?Yn(s[1]):""}const Zd=/<(h[1-6]|p|ul|ol|blockquote|figure)\b[^>]*>([\s\S]*?)<\/\1\s*>|<hr\b[^>]*\/?>|<img\b[^>]*>/gi;function eu(t){const e=Xa(t);let s="";const n=[];for(const a of e.matchAll(Zd)){const i=a[1]?.toLowerCase(),r=a[2]??"",l=a[0];if(!i){if(/^<img/i.test(l)){const c=Ts(l,"src");c&&Ws(c)&&n.push({kind:"image",url:c,alt:Ts(l,"alt"),caption:""})}else n.push({kind:"divider"});continue}if(/^h[1-6]$/.test(i)){const c=as(r);if(!c)continue;if(i==="h1"&&!s){s=c;continue}n.push({kind:"heading",text:c,level:i.slice(1)})}else if(i==="p"){const c=Ja(r.trim());as(c)&&n.push({kind:"paragraph",html:c})}else if(i==="ul"||i==="ol"){const c=[...r.matchAll(/<li\b[^>]*>([\s\S]*?)<\/li\s*>/gi)].map(u=>as(u[1]??"")).filter(Boolean);c.length&&n.push({kind:"list",items:c,ordered:i==="ol"})}else if(i==="blockquote"){const c=as(r);c&&n.push({kind:"quote",text:c})}else if(i==="figure"){const c=r.match(/<img\b[^>]*>/i)?.[0],u=c?Ts(c,"src"):"",m=as(r.match(/<figcaption\b[^>]*>([\s\S]*?)<\/figcaption\s*>/i)?.[1]??"");u&&Ws(u)&&n.push({kind:"image",url:u,alt:c?Ts(c,"alt"):"",caption:m})}}return{title:s,sections:n}}function tu(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 su(t){const e=t.replace(/\r\n?/g,`
|
|
20
20
|
`).split(`
|
|
21
21
|
`);let s="";const n=[];let a=[],i=null,r=[];const l=()=>{a.length&&(n.push({kind:"paragraph",html:Ja(tu(a.join(" ")))}),a=[])},c=()=>{i&&(n.push({kind:"list",items:i.items,ordered:i.ordered}),i=null)},u=()=>{r.length&&(n.push({kind:"quote",text:r.join(" ")}),r=[])},m=()=>{l(),c(),u()};for(const f of e){const g=f.trimEnd(),d=g.match(/^(#{1,6})\s+(.*)$/),p=g.match(/^!\[([^\]]*)\]\(([^)\s]+)\)\s*$/),x=g.match(/^\s*(?:[-*+]|\d+\.)\s+(.*)$/),k=/^\s*\d+\./.test(g),j=g.match(/^>\s?(.*)$/);if(!g.trim())m();else if(d){m();const v=d[2]?.trim()??"",b=String(d[1]?.length??1);b==="1"&&!s?s=v:v&&n.push({kind:"heading",text:v,level:b})}else if(/^(-{3,}|\*{3,}|_{3,})$/.test(g.trim()))m(),n.push({kind:"divider"});else if(p){m();const v=p[2]??"";Ws(v)&&n.push({kind:"image",url:v,alt:p[1]??"",caption:""})}else x?(l(),u(),i||(i={items:[],ordered:k}),i.items.push(x[1]?.trim()??"")):j?(l(),c(),r.push(j[1]?.trim()??"")):(c(),u(),a.push(g.trim()))}return m(),{title:s,sections:n}}const nu={heading:"Heading",paragraph:"Paragraph",list:"List",quote:"Quote",divider:"Divider",image:"BlockImage"};function ou(t,e){const s=[];for(const n of t){const a=e[nu[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(`
|
|
22
|
-
`),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 au({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?Ha(a,s):Ua(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const wo="__all__",Co={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},iu={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},No="status:";function _o(t){if(!t.startsWith(No))return null;const e=t.slice(No.length);return Gn.includes(e)?e:null}const Po=L.forwardRef(function(e,s){const n=ce.c(20);let a,i,r,l,c;n[0]!==e?({icon:a,active:i,value:c,className:r,...l}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=l,n[5]=c):(a=n[1],i=n[2],r=n[3],l=n[4],c=n[5]);const u=i?"text-foreground":"text-muted-foreground";let m;n[6]!==r||n[7]!==u?(m=ve("gap-1 px-1.5 text-xs",u,r),n[6]=r,n[7]=u,n[8]=m):m=n[8];let f;n[9]!==a?(f=o.jsx(a,{size:14,className:"shrink-0"}),n[9]=a,n[10]=f):f=n[10];let g;n[11]!==c?(g=c&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),n[11]=c,n[12]=g):g=n[12];let d;n[13]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(ds,{size:12,className:"shrink-0 opacity-60"}),n[13]=d):d=n[13];let p;return n[14]!==l||n[15]!==s||n[16]!==m||n[17]!==f||n[18]!==g?(p=o.jsxs($e,{ref:s,type:"button",variant:"ghost",size:"sm",className:m,...l,children:[f,g,d]}),n[14]=l,n[15]=s,n[16]=m,n[17]=f,n[18]=g,n[19]=p):p=n[19],p});function Wn(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 ru(t){const e=ce.c(19),{value:s,onChange:n}=t,a=_e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(Rn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=g=>n(g.target.value),e[1]=n,e[2]=r):r=e[2];let l;e[3]!==a?(l=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=l):l=e[4];let c;e[5]!==a?(c=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=c):c=e[6];let u;e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==s?(u=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:l,"aria-label":c,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=l,e[9]=c,e[10]=s,e[11]=u):u=e[11];let m;e[12]!==n||e[13]!==a||e[14]!==s?(m=s&&o.jsx(Qa,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=m):m=e[15];let f;return e[16]!==u||e[17]!==m?(f=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,u,m]}),e[16]=u,e[17]=m,e[18]=f):f=e[18],f}function lu(t){const e=ce.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:l,sort:c,onCategoryFilterChange:u,onAuthorFilterChange:m,onStatusFilterChange:f,onSortChange:g}=t,d=_e();let p;if(e[0]!==s||e[1]!==i){let q;e[3]!==i?(q=se=>se.slug===i,e[3]=i,e[4]=q):q=e[4],p=s.find(q),e[0]=s,e[1]=i,e[2]=p}else p=e[2];const x=p;let k;if(e[5]!==r||e[6]!==n){let q;e[8]!==r?(q=se=>se.email===r,e[8]=r,e[9]=q):q=e[9],k=n.find(q),e[5]=r,e[6]=n,e[7]=k}else k=e[7];const j=k,v=!!(i||r||l);let b;e[10]!==j?.name||e[11]!==x?.name||e[12]!==l||e[13]!==d?(b=x?.name??j?.name??d(l?Ys[l]:"sandbox.postToolbar.filterLabel"),e[10]=j?.name,e[11]=x?.name,e[12]=l,e[13]=d,e[14]=b):b=e[14];const N=b,_=i?`cat:${i}`:r?`author:${r}`:l?`status:${l}`:wo;let y;e[15]!==m||e[16]!==u||e[17]!==f?(y=()=>{u(null),m(null),f(null)},e[15]=m,e[16]=u,e[17]=f,e[18]=y):y=e[18];const w=y;let S;e[19]!==w||e[20]!==m||e[21]!==u||e[22]!==f?(S=q=>{q.startsWith("cat:")?(m(null),f(null),u(q.slice(4))):q.startsWith("author:")?(u(null),f(null),m(q.slice(7))):_o(q)?(u(null),m(null),f(_o(q))):w()},e[19]=w,e[20]=m,e[21]=u,e[22]=f,e[23]=S):S=e[23];const E=S;let D;e[24]!==N||e[25]!==v?(D=o.jsx($s,{asChild:!0,children:o.jsx(Po,{icon:Ui,active:v,value:N,className:"min-w-0 shrink"})}),e[24]=N,e[25]=v,e[26]=D):D=e[26];let T;e[27]!==d?(T=d("sandbox.postToolbar.filterBy"),e[27]=d,e[28]=T):T=e[28];let B;e[29]!==T?(B=o.jsx(ss,{children:T}),e[29]=T,e[30]=B):B=e[30];let C;e[31]!==d?(C=d("sandbox.postToolbar.allPosts"),e[31]=d,e[32]=C):C=e[32];let F;e[33]!==C?(F=o.jsx(is,{value:wo,children:C}),e[33]=C,e[34]=F):F=e[34];let P;e[35]!==d?(P=d("sandbox.postToolbar.statusLabel"),e[35]=d,e[36]=P):P=e[36];let $;e[37]!==P?($=o.jsx(ss,{className:"text-muted-foreground/70",children:P}),e[37]=P,e[38]=$):$=e[38];let G;e[39]!==a||e[40]!==d?(G=Gn.map(q=>o.jsxs(is,{value:`status:${q}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:d(Ys[q])}),o.jsx(Wn,{count:a[q]??0})]},`status:${q}`)),e[39]=a,e[40]=d,e[41]=G):G=e[41];let V;e[42]!==s.length||e[43]!==d?(V=s.length>0&&o.jsx(ss,{className:"text-muted-foreground/70",children:d("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=d,e[44]=V):V=e[44];let J;e[45]!==s?(J=s.map(du),e[45]=s,e[46]=J):J=e[46];let H;e[47]!==n.length||e[48]!==d?(H=n.length>0&&o.jsx(ss,{className:"text-muted-foreground/70",children:d("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=d,e[49]=H):H=e[49];let K;e[50]!==n?(K=n.map(cu),e[50]=n,e[51]=K):K=e[51];let U;e[52]!==_||e[53]!==E||e[54]!==F||e[55]!==$||e[56]!==G||e[57]!==V||e[58]!==J||e[59]!==H||e[60]!==K?(U=o.jsxs(Xn,{value:_,onValueChange:E,children:[F,$,G,V,J,H,K]}),e[52]=_,e[53]=E,e[54]=F,e[55]=$,e[56]=G,e[57]=V,e[58]=J,e[59]=H,e[60]=K,e[61]=U):U=e[61];let Y;e[62]!==U||e[63]!==B?(Y=o.jsxs(Ls,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[B,U]}),e[62]=U,e[63]=B,e[64]=Y):Y=e[64];let z;e[65]!==Y||e[66]!==D?(z=o.jsxs(Is,{children:[D,Y]}),e[65]=Y,e[66]=D,e[67]=z):z=e[67];let Q;e[68]!==w||e[69]!==v||e[70]!==d?(Q=v&&o.jsx(Qa,{label:d("sandbox.postToolbar.clearFilter"),onClick:w}),e[68]=w,e[69]=v,e[70]=d,e[71]=Q):Q=e[71];const re=iu[c];let fe;e[72]!==d||e[73]!==re?(fe=d(re),e[72]=d,e[73]=re,e[74]=fe):fe=e[74];let pe;e[75]!==fe?(pe=o.jsx($s,{asChild:!0,children:o.jsx(Po,{icon:Gi,active:!0,value:fe})}),e[75]=fe,e[76]=pe):pe=e[76];let ae;e[77]!==d?(ae=d("sandbox.postToolbar.sortBy"),e[77]=d,e[78]=ae):ae=e[78];let ge;e[79]!==ae?(ge=o.jsx(ss,{children:ae}),e[79]=ae,e[80]=ge):ge=e[80];let de;e[81]!==g?(de=q=>g(q),e[81]=g,e[82]=de):de=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=Object.keys(Co),e[83]=xe):xe=e[83];let ee;e[84]!==d?(ee=xe.map(q=>o.jsx(is,{value:q,children:d(Co[q])},q)),e[84]=d,e[85]=ee):ee=e[85];let X;e[86]!==c||e[87]!==de||e[88]!==ee?(X=o.jsx(Xn,{value:c,onValueChange:de,children:ee}),e[86]=c,e[87]=de,e[88]=ee,e[89]=X):X=e[89];let ne;e[90]!==ge||e[91]!==X?(ne=o.jsxs(Ls,{align:"end",className:"w-44",children:[ge,X]}),e[90]=ge,e[91]=X,e[92]=ne):ne=e[92];let le;e[93]!==pe||e[94]!==ne?(le=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(Is,{children:[pe,ne]})}),e[93]=pe,e[94]=ne,e[95]=le):le=e[95];let Z;return e[96]!==z||e[97]!==Q||e[98]!==le?(Z=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[z,Q,le]}),e[96]=z,e[97]=Q,e[98]=le,e[99]=Z):Z=e[99],Z}function cu(t){return o.jsxs(is,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Wn,{count:t.count})]},`author:${t.email}`)}function du(t){return o.jsxs(is,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Wn,{count:t.count})]},`cat:${t.slug}`)}function Qa(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(En,{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 uu(t){const e=ce.c(18),{checked:s,disabled:n,onToggle:a}=t,i=_e();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==s||e[3]!==i?(l=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==l?(c=o.jsx(Xe,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:pu,children:o.jsx(Zs,{checked:s,disabled:n,onCheckedChange:r,"aria-label":l})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=l,e[9]=c):c=e[9];let u;e[10]!==s||e[11]!==i?(u=i(s?"sandbox.postToolbar.deselectAll":"sandbox.postToolbar.selectAll"),e[10]=s,e[11]=i,e[12]=u):u=e[12];let m;e[13]!==u?(m=o.jsx(Je,{side:"bottom",children:u}),e[13]=u,e[14]=m):m=e[14];let f;return e[15]!==c||e[16]!==m?(f=o.jsxs(Qe,{children:[c,m]}),e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function pu(t){return t.stopPropagation()}function mu(t){const e=ce.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,l=_e();let c;e[0]!==n||e[1]!==a?(c=o.jsx(uu,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=c):c=e[2];let u;e[3]!==s||e[4]!==l?(u=l("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=l,e[5]=u):u=e[5];let m;e[6]!==u?(m=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:u}),e[6]=u,e[7]=m):m=e[7];const f=s===0;let g;e[8]!==l?(g=l("sandbox.postToolbar.archiveSelectedPosts"),e[8]=l,e[9]=g):g=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(li,{size:14}),e[10]=d):d=e[10];let p;e[11]!==i||e[12]!==f||e[13]!==g?(p=o.jsx(Xe,{asChild:!0,children:o.jsx($e,{type:"button",variant:"ghost",size:"icon-sm",disabled:f,onClick:i,"aria-label":g,children:d})}),e[11]=i,e[12]=f,e[13]=g,e[14]=p):p=e[14];let x;e[15]!==l?(x=l("sandbox.postToolbar.archiveSelected"),e[15]=l,e[16]=x):x=e[16];let k;e[17]!==x?(k=o.jsx(Je,{side:"bottom",children:x}),e[17]=x,e[18]=k):k=e[18];let j;e[19]!==p||e[20]!==k?(j=o.jsxs(Qe,{children:[p,k]}),e[19]=p,e[20]=k,e[21]=j):j=e[21];let v;e[22]!==l?(v=l("sandbox.postToolbar.exitSelection"),e[22]=l,e[23]=v):v=e[23];let b;e[24]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(En,{size:14}),e[24]=b):b=e[24];let N;e[25]!==r||e[26]!==v?(N=o.jsx(Xe,{asChild:!0,children:o.jsx($e,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":v,children:b})}),e[25]=r,e[26]=v,e[27]=N):N=e[27];let _;e[28]!==l?(_=l("sandbox.postToolbar.exitSelection"),e[28]=l,e[29]=_):_=e[29];let y;e[30]!==_?(y=o.jsx(Je,{side:"bottom",children:_}),e[30]=_,e[31]=y):y=e[31];let w;e[32]!==N||e[33]!==y?(w=o.jsxs(Qe,{children:[N,y]}),e[32]=N,e[33]=y,e[34]=w):w=e[34];let S;e[35]!==j||e[36]!==w?(S=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[j,w]}),e[35]=j,e[36]=w,e[37]=S):S=e[37];let E;return e[38]!==c||e[39]!==S||e[40]!==m?(E=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[c,m,S]}),e[38]=c,e[39]=S,e[40]=m,e[41]=E):E=e[41],E}const fu={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},An="generating",gu=[An,...Gn.filter(t=>t!==An)],Ao=t=>t.scheduledDatetime||t.date||"",hu=(t,e)=>Ao(e).localeCompare(Ao(t)),xu=t=>t==="scheduled"||t==="published",Za="application/x-post-key";function bu(t){const e=ce.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:l,onViewChange:c,onOpen:u,onClose:m,move:f,meta:g,renderDetail:d}=t,p=_e();let x;e[0]!==a||e[1]!==s||e[2]!==n?(x={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=x):x=e[3];const k=Js(x),j=nl().length>0,v=da(),b=Ya(),[N,_]=L.useState(null),[y,w]=L.useState(!1),[S,E]=L.useState(!1),[D,T]=L.useState(!1),[B,C]=L.useState(""),F=L.useRef(null);let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P={},e[4]=P):P=e[4];const[$,G]=L.useState(P);let V;e[5]!==$?(V=(I,oe)=>$[I]??oe,e[5]=$,e[6]=V):V=e[6];const J=V;let H;e[7]===Symbol.for("react.memo_cache_sentinel")?(H=(I,oe)=>G(Re=>({...Re,[I]:oe})),e[7]=H):H=e[7];const K=H;let U;e[8]!==u?(U=I=>{const oe=I[0];oe&&u(oe)},e[8]=u,e[9]=U):U=e[9];let Y;e[10]!==a||e[11]!==i||e[12]!==g||e[13]!==s||e[14]!==U||e[15]!==n?(Y={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:g,onStarted:U},e[10]=a,e[11]=i,e[12]=g,e[13]=s,e[14]=U,e[15]=n,e[16]=Y):Y=e[16];const z=Ud(Y),Q=Kc(i);let re;e[17]!==i?(re=I=>kt(i[I],"posts"),e[17]=i,e[18]=re):re=e[18];const fe=re,pe=l&&Q.some(I=>I.key===l)?l:Q[0]?.key??null;let ae;e[19]!==f||e[20]!==p?(ae=async I=>{await f.apply(I.key,"archived")&&me.success(p("sandbox.postBoard.archived"))},e[19]=f,e[20]=p,e[21]=ae):ae=e[21];const ge=ae,[de,xe]=L.useState(null),[ee,X]=L.useState(null),[ne,le]=L.useState(null),[Z,q]=L.useState("date-desc"),[se,A]=L.useState("");let W;e[22]===Symbol.for("react.memo_cache_sentinel")?(W=new Set,e[22]=W):W=e[22];const[ie,be]=L.useState(W),Te=Q.reduce(ju,{}),je=I=>{const oe=new Map;for(const Re of Q)for(const xt of I(Re))oe.set(xt,(oe.get(xt)??0)+1);return oe},De=je(Su),ke=je(ku),Ne=Ye(i,"categories").map(I=>{const{payload:oe}=I;return{slug:qe(oe.slug),name:qe(oe.name)||qe(oe.slug),count:De.get(qe(oe.slug))??0}}),Ae=Ye(i,"authors").map(I=>{const{payload:oe}=I;return{email:qe(oe.email),name:qe(oe.name)||qe(oe.email),count:ke.get(qe(oe.email))??0}}),ye=se.trim().toLowerCase();let Ee;e[23]!==de?(Ee=I=>!de||I.categorySlugs.includes(de),e[23]=de,e[24]=Ee):Ee=e[24];let Oe;e[25]!==ee?(Oe=I=>!ee||I.authorEmails.includes(ee),e[25]=ee,e[26]=Oe):Oe=e[26];let M;e[27]!==ne?(M=I=>!ne||I.status===ne,e[27]=ne,e[28]=M):M=e[28];let he;e[29]!==Z?(he=(I,oe)=>{if(Z==="az")return I.title.localeCompare(oe.title);if(Z==="za")return oe.title.localeCompare(I.title);const Re=(I.scheduledDatetime||I.date).localeCompare(oe.scheduledDatetime||oe.date);return Z==="date-asc"?Re:-Re},e[29]=Z,e[30]=he):he=e[30];const we=Q.filter(Ee).filter(Oe).filter(M).filter(I=>!ye||I.title.toLowerCase().includes(ye)||I.slug.toLowerCase().includes(ye)).sort(he),Be=ie.size>0;let Ue;e[31]===Symbol.for("react.memo_cache_sentinel")?(Ue=I=>be(oe=>{const Re=new Set(oe);return Re.delete(I)||Re.add(I),Re}),e[31]=Ue):Ue=e[31];const gs=Ue,rn=()=>be(I=>we.every(oe=>I.has(oe.key))?new Set:new Set(we.map(vu)));let gt;e[32]!==f||e[33]!==ie||e[34]!==p?(gt=async()=>{let I=0;for(const oe of ie)await f.apply(oe,"archived")&&(I=I+1);be(new Set),I>0&&me.success(p("sandbox.postBoard.archived"))},e[32]=f,e[33]=ie,e[34]=p,e[35]=gt):gt=e[35];const Zt=gt;let wt;e[36]!==f?(wt=(I,oe)=>{_(null),f.apply(oe,I)},e[36]=f,e[37]=wt):wt=e[37];const ln=wt;let ht;e[38]!==u||e[39]!==k?(ht=()=>{const I=Vs(Nn()),oe=Aa({title:"",now:new Date});k.mutate({blockKey:I,data:St(I,oe)}),u(I)},e[38]=u,e[39]=k,e[40]=ht):ht=e[40];const Ct=ht,cn=()=>{const I=Hd(B),oe=ou(I.sections,Hn(g,{hideDefaults:b}));if(oe.length===0&&!I.title.trim()){me.error(p("sandbox.postBoard.importEmpty"));return}const Re=Vs(Nn()),xt=au({title:I.title,blocks:oe,takenSlugs:Q.map(yu).filter(Boolean),now:new Date});k.mutate({blockKey:Re,data:St(Re,xt)}),T(!1),C(""),me.success(p("sandbox.postBoard.imported")),u(Re)},es=r==="list";let nt;e[41]!==c?(nt=()=>c("list"),e[41]=c,e[42]=nt):nt=e[42];let Nt;e[43]===Symbol.for("react.memo_cache_sentinel")?(Nt=o.jsx(Qi,{size:14}),e[43]=Nt):Nt=e[43];let ot;e[44]!==p?(ot=p("sandbox.postBoard.viewList"),e[44]=p,e[45]=ot):ot=e[45];let at;e[46]!==es||e[47]!==nt||e[48]!==ot?(at=o.jsx(To,{active:es,onClick:nt,icon:Nt,label:ot}),e[46]=es,e[47]=nt,e[48]=ot,e[49]=at):at=e[49];const ts=r==="board";let it;e[50]!==c?(it=()=>c("board"),e[50]=c,e[51]=it):it=e[51];let _t;e[52]===Symbol.for("react.memo_cache_sentinel")?(_t=o.jsx(Hi,{size:14}),e[52]=_t):_t=e[52];let rt;e[53]!==p?(rt=p("sandbox.postBoard.viewBoard"),e[53]=p,e[54]=rt):rt=e[54];let lt;e[55]!==ts||e[56]!==it||e[57]!==rt?(lt=o.jsx(To,{active:ts,onClick:it,icon:_t,label:rt}),e[55]=ts,e[56]=it,e[57]=rt,e[58]=lt):lt=e[58];let Pt;e[59]!==at||e[60]!==lt?(Pt=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:[at,lt]})}),e[59]=at,e[60]=lt,e[61]=Pt):Pt=e[61];let At;e[62]===Symbol.for("react.memo_cache_sentinel")?(At=o.jsx($n,{size:14}),e[62]=At):At=e[62];let ct;e[63]!==p?(ct=p("sandbox.postBoard.newPost"),e[63]=p,e[64]=ct):ct=e[64];let Tt;e[65]===Symbol.for("react.memo_cache_sentinel")?(Tt=o.jsx(ds,{size:14}),e[65]=Tt):Tt=e[65];let dt;e[66]!==ct?(dt=o.jsx($s,{asChild:!0,children:o.jsxs($e,{type:"button",size:"sm",children:[At,ct,Tt]})}),e[66]=ct,e[67]=dt):dt=e[67];let ut;e[68]!==v||e[69]!==p?(ut=v&&o.jsxs(et,{onClick:()=>E(!0),children:[o.jsx(zs,{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]=v,e[69]=p,e[70]=ut):ut=e[70];let Et;e[71]===Symbol.for("react.memo_cache_sentinel")?(Et=o.jsx(Ji,{size:14}),e[71]=Et):Et=e[71];let pt;e[72]!==p?(pt=p("sandbox.postBoard.newPostWrite"),e[72]=p,e[73]=pt):pt=e[73];let Ge;e[74]!==pt?(Ge=o.jsx("span",{children:pt}),e[74]=pt,e[75]=Ge):Ge=e[75];let mt;e[76]!==p?(mt=p("sandbox.postBoard.newPostWriteHint"),e[76]=p,e[77]=mt):mt=e[77];let h;e[78]!==mt?(h=o.jsx("span",{className:"text-xs text-muted-foreground",children:mt}),e[78]=mt,e[79]=h):h=e[79];let R;e[80]!==Ge||e[81]!==h?(R=o.jsxs("div",{className:"flex flex-col",children:[Ge,h]}),e[80]=Ge,e[81]=h,e[82]=R):R=e[82];let te;e[83]!==R||e[84]!==Ct?(te=o.jsxs(et,{onClick:Ct,children:[Et,R]}),e[83]=R,e[84]=Ct,e[85]=te):te=e[85];let ue,Ce;e[86]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>T(!0),Ce=o.jsx(gn,{size:14}),e[86]=ue,e[87]=Ce):(ue=e[86],Ce=e[87]);let Pe;e[88]!==p?(Pe=p("sandbox.postBoard.importContent"),e[88]=p,e[89]=Pe):Pe=e[89];let He;e[90]!==Pe?(He=o.jsx("span",{children:Pe}),e[90]=Pe,e[91]=He):He=e[91];let Ze;e[92]!==p?(Ze=p("sandbox.postBoard.importContentHint"),e[92]=p,e[93]=Ze):Ze=e[93];let Bt;e[94]!==Ze?(Bt=o.jsx("span",{className:"text-xs text-muted-foreground",children:Ze}),e[94]=Ze,e[95]=Bt):Bt=e[95];let Dt;e[96]!==He||e[97]!==Bt?(Dt=o.jsxs(et,{onClick:ue,children:[Ce,o.jsxs("div",{className:"flex flex-col",children:[He,Bt]})]}),e[96]=He,e[97]=Bt,e[98]=Dt):Dt=e[98];let Ot;e[99]!==ut||e[100]!==te||e[101]!==Dt?(Ot=o.jsxs(Ls,{align:"end",className:"w-56",children:[ut,te,Dt]}),e[99]=ut,e[100]=te,e[101]=Dt,e[102]=Ot):Ot=e[102];let hs;e[103]!==dt||e[104]!==Ot?(hs=o.jsxs(Is,{children:[dt,Ot]}),e[103]=dt,e[104]=Ot,e[105]=hs):hs=e[105];let xs;e[106]!==v||e[107]!==i||e[108]!==S||e[109]!==z||e[110]!==j?(xs=v&&o.jsx(Fd,{open:S,onOpenChange:E,decofile:i,hasAi:j,onGenerate:I=>{z(I)}}),e[106]=v,e[107]=i,e[108]=S,e[109]=z,e[110]=j,e[111]=xs):xs=e[111];let Rt;e[112]!==p?(Rt=p("sandbox.postBoard.importTitle"),e[112]=p,e[113]=Rt):Rt=e[113];let $t;e[114]!==Rt?($t=o.jsx(Yt,{children:Rt}),e[114]=Rt,e[115]=$t):$t=e[115];let Lt;e[116]!==p?(Lt=p("sandbox.postBoard.importDescription"),e[116]=p,e[117]=Lt):Lt=e[117];let It;e[118]!==Lt?(It=o.jsx(Tn,{children:Lt}),e[118]=Lt,e[119]=It):It=e[119];let bs;e[120]!==$t||e[121]!==It?(bs=o.jsxs(ms,{children:[$t,It]}),e[120]=$t,e[121]=It,e[122]=bs):bs=e[122];const dn=Wa(B)?"html":"markdown";let ys;e[123]===Symbol.for("react.memo_cache_sentinel")?(ys=I=>C(I??""),e[123]=ys):ys=e[123];let Kt;e[124]!==B||e[125]!==dn?(Kt=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(ca,{code:B,language:dn,height:"100%",autoFocus:!0,onChange:ys})}),e[124]=B,e[125]=dn,e[126]=Kt):Kt=e[126];let vs;e[127]===Symbol.for("react.memo_cache_sentinel")?(vs=o.jsx("input",{ref:F,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async I=>{const oe=I.target.files?.[0];oe&&C(await oe.text()),I.target.value=""}}),e[127]=vs):vs=e[127];let ks,Ss;e[128]===Symbol.for("react.memo_cache_sentinel")?(ks=()=>F.current?.click(),Ss=o.jsx(gn,{size:14}),e[128]=ks,e[129]=Ss):(ks=e[128],Ss=e[129]);let Ft;e[130]!==p?(Ft=p("sandbox.postBoard.importUpload"),e[130]=p,e[131]=Ft):Ft=e[131];let zt;e[132]!==Ft?(zt=o.jsxs($e,{type:"button",variant:"outline",size:"sm",onClick:ks,children:[Ss,Ft]}),e[132]=Ft,e[133]=zt):zt=e[133];let js;e[134]!==Kt||e[135]!==zt?(js=o.jsxs("div",{className:"space-y-3",children:[Kt,vs,zt]}),e[134]=Kt,e[135]=zt,e[136]=js):js=e[136];let ws;e[137]!==B?(ws=B.trim(),e[137]=B,e[138]=ws):ws=e[138];let Cs;e[139]===Symbol.for("react.memo_cache_sentinel")?(Cs=o.jsx(gn,{size:14}),e[139]=Cs):Cs=e[139];let Ns;e[140]!==p?(Ns=p("sandbox.postBoard.importRun"),e[140]=p,e[141]=Ns):Ns=e[141];let _s;e[142]!==y||e[143]!==m||e[144]!==d||e[145]!==l||e[146]!==r?(_s=r==="board"&&l&&y&&d&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:d(l,{expanded:!0,onToggleExpand:()=>w(!1),onClose:()=>{w(!1),m?.()}})}),e[142]=y,e[143]=m,e[144]=d,e[145]=l,e[146]=r,e[147]=_s):_s=e[147];const un=r==="board"&&!!l&&!y;let Mt;e[148]!==m?(Mt=I=>{I||(w(!1),m?.())},e[148]=m,e[149]=Mt):Mt=e[149];let Vt;e[150]!==p?(Vt=p("sandbox.collectionsSidebar.posts"),e[150]=p,e[151]=Vt):Vt=e[151];let Ut;e[152]!==Vt?(Ut=o.jsx(Yt,{className:"sr-only",children:Vt}),e[152]=Vt,e[153]=Ut):Ut=e[153];let Gt;e[154]!==m||e[155]!==d||e[156]!==l?(Gt=l&&d?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Sn,{size:20,className:"animate-spin text-muted-foreground"})}),children:d(l,{expanded:!1,onToggleExpand:()=>w(!0),onClose:()=>m?.()})}):null,e[154]=m,e[155]=d,e[156]=l,e[157]=Gt):Gt=e[157];let Ht;e[158]!==Ut||e[159]!==Gt?(Ht=o.jsxs(Wt,{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:[Ut,Gt]}),e[158]=Ut,e[159]=Gt,e[160]=Ht):Ht=e[160];let Ps;return e[161]!==un||e[162]!==Mt||e[163]!==Ht?(Ps=o.jsx(Xt,{open:un,onOpenChange:Mt,children:Ht}),e[161]=un,e[162]=Mt,e[163]=Ht,e[164]=Ps):Ps=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:[Pt,o.jsxs("div",{className:"flex items-center gap-2",children:[hs,xs,o.jsx(Xt,{open:D,onOpenChange:T,children:o.jsxs(Wt,{className:"max-h-[85vh] sm:max-w-2xl",children:[bs,js,o.jsx(fs,{children:o.jsxs($e,{type:"button",disabled:!ws,onClick:cn,children:[Cs,Ns]})})]})})]})]}),Q.length===0?o.jsx(sl,{className:"flex-1",icon:o.jsx(zs,{size:22}),title:p("sandbox.postBoard.emptyTitle"),description:p("sandbox.postBoard.emptyDescription"),buttonProps:{children:p("sandbox.postBoard.newPost"),onClick:Ct}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:gu.map(I=>{const oe=p(Ys[I]),Re=Q.filter(Le=>Le.status===I);xu(I)&&Re.sort(hu);const xt=J(I,Re.length===0);return o.jsxs(L.Fragment,{children:[o.jsx("div",{onDragOver:Le=>{Le.preventDefault(),_(I)},onDragLeave:()=>_(Le=>Le===I?null:Le),onDrop:Le=>{Le.preventDefault(),ln(I,Le.dataTransfer.getData(Za))},className:ve("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",xt?"w-11":"w-72",N===I&&"border-primary bg-primary/5"),children:xt?o.jsxs("button",{type:"button",onClick:()=>K(I,!1),"aria-label":p("sandbox.postBoard.expandLane",{lane:oe}),"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(Ks,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:Re.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:oe})]}):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:()=>K(I,!0),"aria-label":p("sandbox.postBoard.collapseLane",{lane:oe}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(ds,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:oe})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:Re.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:Re.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.postBoard.laneEmpty")}):Re.map(Le=>o.jsx(Nu,{post:Le,payload:fe(Le.key),moving:f.isMoving(Le.key),onOpen:()=>u(Le.key),onArchive:Le.status==="archived"?void 0:()=>{ge(Le)}},Le.key))})]})}),I===An&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},I)})}):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(ru,{value:se,onChange:A}),Be?o.jsx(mu,{count:ie.size,allSelected:we.length>0&&we.every(I=>ie.has(I.key)),onToggleSelectAll:rn,onArchive:()=>{Zt()},onExit:()=>be(new Set)}):o.jsx(lu,{categories:Ne,authors:Ae,statusCounts:Te,categoryFilter:de,authorFilter:ee,statusFilter:ne,sort:Z,onCategoryFilterChange:xe,onAuthorFilterChange:X,onStatusFilterChange:le,onSortChange:q}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(wu,{posts:we,selectedKey:pe,selectionActive:Be,selectedKeys:ie,onToggleSelect:gs,onOpen:u,isMoving:f.isMoving,onArchive:I=>{ge(I)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:pe&&d?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Sn,{size:20,className:"animate-spin text-muted-foreground"})}),children:d(pe)}):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")})})]}),_s,Ps]})}function yu(t){return t.slug}function vu(t){return t.key}function ku(t){return t.authorEmails}function Su(t){return t.categorySlugs}function ju(t,e){return t[e.status]=(t[e.status]??0)+1,t}function To(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 l;e[0]!==r?(l=ve("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]=l):l=e[1];let c;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==l?(c=o.jsxs("button",{type:"button",onClick:n,className:l,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=c):c=e[6],c}function wu(t){const e=ce.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:l,isMoving:c,onArchive:u}=t,m=_e();if(s.length===0){let d;e[0]!==m?(d=m("sandbox.postList.noMatches"),e[0]=m,e[1]=d):d=e[1];let p;return e[2]!==d?(p=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:d}),e[2]=d,e[3]=p):p=e[3],p}let f;if(e[4]!==c||e[5]!==u||e[6]!==l||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let d;e[13]!==c||e[14]!==u||e[15]!==l||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(d=p=>o.jsx(Cu,{post:p,selected:p.key===n,selectionActive:a,checked:i.has(p.key),onToggleSelect:()=>r(p.key),moving:c(p.key),onOpen:()=>l(p.key),onArchive:p.status==="archived"?void 0:()=>u(p)},p.key),e[13]=c,e[14]=u,e[15]=l,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=d):d=e[20],f=s.map(d),e[4]=c,e[5]=u,e[6]=l,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=f}else f=e[12];let g;return e[21]!==f?(g=o.jsx("ul",{className:"divide-y",children:f}),e[21]=f,e[22]=g):g=e[22],g}function Cu(t){const e=ce.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:l,onOpen:c,onArchive:u}=t,m=_e(),f=s.status==="awaiting_review"&&s.missing.length>0,g=s.status==="scheduled"||s.status==="published",d=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let p;e[0]!==d?(p=ve("absolute left-3 top-3 z-10 transition-opacity",d),e[0]=d,e[1]=p):p=e[1];let x;e[2]!==r?(x=()=>r(),e[2]=r,e[3]=x):x=e[3];let k;e[4]!==s.title||e[5]!==m?(k=s.title||m("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=m,e[6]=k):k=e[6];let j;e[7]!==i||e[8]!==x||e[9]!==k?(j=o.jsx(Zs,{checked:i,onCheckedChange:x,"aria-label":k}),e[7]=i,e[8]=x,e[9]=k,e[10]=j):j=e[10];let v;e[11]!==p||e[12]!==j?(v=o.jsx("span",{className:p,children:j}),e[11]=p,e[12]=j,e[13]=v):v=e[13];let b;e[14]!==l||e[15]!==u||e[16]!==a?(b=u&&!a&&o.jsx(ei,{onArchive:u,disabled:l,className:"top-2.5"}),e[14]=l,e[15]=u,e[16]=a,e[17]=b):b=e[17];let N;e[18]!==c||e[19]!==r||e[20]!==a?(N=()=>a?r():c(),e[18]=c,e[19]=r,e[20]=a,e[21]=N):N=e[21];const _=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let y;e[22]!==_?(y=ve("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",_),e[22]=_,e[23]=y):y=e[23];let w;e[24]!==s.title||e[25]!==m?(w=s.title||m("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=m,e[26]=w):w=e[26];let S;e[27]!==w?(S=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:w}),e[27]=w,e[28]=S):S=e[28];const E=fu[s.status],D=Ys[s.status];let T;e[29]!==m||e[30]!==D?(T=m(D),e[29]=m,e[30]=D,e[31]=T):T=e[31];let B;e[32]!==E||e[33]!==T?(B=o.jsx(Mn,{variant:E,className:"shrink-0",children:T}),e[32]=E,e[33]=T,e[34]=B):B=e[34];let C;e[35]!==f||e[36]!==s.missing?(C=f&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(cs,{size:12}),s.missing.length]}),e[35]=f,e[36]=s.missing,e[37]=C):C=e[37];let F;e[38]!==s.duplicateTitle||e[39]!==m?(F=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:m("sandbox.postBoard.duplicateTitle"),children:[o.jsx(Fn,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:m("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=m,e[40]=F):F=e[40];let P;e[41]!==g||e[42]!==s.date||e[43]!==s.scheduledDatetime?(P=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx(On,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=g,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=P):P=e[44];let $;e[45]!==B||e[46]!==C||e[47]!==F||e[48]!==P?($=o.jsxs("div",{className:"flex items-center gap-2",children:[B,C,F,P]}),e[45]=B,e[46]=C,e[47]=F,e[48]=P,e[49]=$):$=e[49];let G;e[50]!==n||e[51]!==y||e[52]!==S||e[53]!==$||e[54]!==N?(G=o.jsxs("button",{type:"button",onClick:N,"aria-current":n,className:y,children:[S,$]}),e[50]=n,e[51]=y,e[52]=S,e[53]=$,e[54]=N,e[55]=G):G=e[55];let V;return e[56]!==G||e[57]!==v||e[58]!==b?(V=o.jsxs("li",{className:"group/row relative",children:[v,b,G]}),e[56]=G,e[57]=v,e[58]=b,e[59]=V):V=e[59],V}function Nu(t){const e=ce.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,l=_e(),c=s.status!=="generating"&&!a;let u;e[0]!==n?(u=Lc(n),e[0]=n,e[1]=u):u=e[1];const m=u,f=!c&&"opacity-80";let g;e[2]!==f?(g=ve("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",f),e[2]=f,e[3]=g):g=e[3];let d;e[4]!==a||e[5]!==r?(d=r&&o.jsx(ei,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=d):d=e[6];let p;e[7]!==s.key?(p=T=>T.dataTransfer.setData(Za,s.key),e[7]=s.key,e[8]=p):p=e[8];const x=c?"cursor-grab active:cursor-grabbing":"cursor-pointer";let k;e[9]!==x?(k=ve("block w-full p-3 text-left",x),e[9]=x,e[10]=k):k=e[10];let j;e[11]!==s.title||e[12]!==l?(j=s.title||l("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=l,e[13]=j):j=e[13];let v;e[14]!==j?(v=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:j}),e[14]=j,e[15]=v):v=e[15];let b;e[16]!==m||e[17]!==s.status?(b=s.status==="draft"&&m.format?.name&&o.jsx(Mn,{variant:"outline",className:"max-w-full truncate",children:m.format.name}),e[16]=m,e[17]=s.status,e[18]=b):b=e[18];let N;e[19]!==s.status||e[20]!==l?(N=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(Sn,{size:12,className:"animate-spin"}),l("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=l,e[21]=N):N=e[21];let _;e[22]!==s.missing||e[23]!==s.status||e[24]!==l?(_=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(cs,{size:12}),l("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(tl,{size:12}),l("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=l,e[25]=_):_=e[25];let y;e[26]!==s.date||e[27]!==s.scheduledDatetime||e[28]!==s.status?(y=(s.status==="scheduled"||s.status==="published")&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[o.jsx(On,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[26]=s.date,e[27]=s.scheduledDatetime,e[28]=s.status,e[29]=y):y=e[29];let w;e[30]!==s.duplicateTitle||e[31]!==l?(w=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Fn,{size:12,"aria-hidden":!0}),l("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=l,e[32]=w):w=e[32];let S;e[33]!==b||e[34]!==N||e[35]!==_||e[36]!==y||e[37]!==w?(S=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[b,N,_,y,w]}),e[33]=b,e[34]=N,e[35]=_,e[36]=y,e[37]=w,e[38]=S):S=e[38];let E;e[39]!==c||e[40]!==i||e[41]!==S||e[42]!==p||e[43]!==k||e[44]!==v?(E=o.jsxs("button",{type:"button",draggable:c,onDragStart:p,onClick:i,className:k,children:[v,S]}),e[39]=c,e[40]=i,e[41]=S,e[42]=p,e[43]=k,e[44]=v,e[45]=E):E=e[45];let D;return e[46]!==E||e[47]!==g||e[48]!==d?(D=o.jsxs("div",{className:g,children:[d,E]}),e[46]=E,e[47]=g,e[48]=d,e[49]=D):D=e[49],D}function ei(t){const e=ce.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=_e();let l;e[0]!==s||e[1]!==r?(l=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=l):l=e[2];const c=l;let u;e[3]!==n?(u=d=>{d.stopPropagation(),n()},e[3]=n,e[4]=u):u=e[4];let m;e[5]!==i?(m=ve("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]=m):m=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(zn,{className:"size-3.25"}),e[7]=f):f=e[7];let g;return e[8]!==a||e[9]!==u||e[10]!==m||e[11]!==c?(g=o.jsx($e,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":c,title:c,onClick:u,className:m,children:f}),e[8]=a,e[9]=u,e[10]=m,e[11]=c,e[12]=g):g=e[12],g}function We(t){const e=ce.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:l,variantCount:c,trailing:u,selectable:m,selectionActive:f,selected:g,invalid:d,invalidReason:p,warning:x,warningReason:k,onToggleSelect:j,onClick:v,menu:b}=t,N=_e(),_=l==="global";let y;e[0]!==s||e[1]!==r||e[2]!==_||e[3]!==n?(y=n?o.jsx("img",{src:n,alt:"",className:"size-8 shrink-0 rounded-lg object-cover bg-muted"}):o.jsx("span",{className:ve("flex size-8 shrink-0 items-center justify-center rounded-lg",_?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:ve("shrink-0",!_&&(r?"text-accent-foreground":"text-muted-foreground")),style:_?{color:In}:void 0})}),e[0]=s,e[1]=r,e[2]=_,e[3]=n,e[4]=y):y=e[4];const w=y,S=r?_?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":_?"hover:bg-global-section/10":"hover:bg-accent";let E;e[5]!==S?(E=ve("group relative flex min-w-0 items-center rounded-md transition-colors",S),e[5]=S,e[6]=E):E=e[6];let D;e[7]!==j||e[8]!==m||e[9]!==g||e[10]!==f||e[11]!==N||e[12]!==a?(D=m&&o.jsx("span",{className:ve("flex shrink-0 items-center pl-2.5 transition-opacity",g||f?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:_u,children:o.jsx(Zs,{checked:g,onCheckedChange:()=>j?.(),"aria-label":N("sandbox.itemRow.selectItem",{title:a})})}),e[7]=j,e[8]=m,e[9]=g,e[10]=f,e[11]=N,e[12]=a,e[13]=D):D=e[13];const T=d&&!r&&"text-destructive";let B;e[14]!==T?(B=ve("block truncate text-sm font-medium",T),e[14]=T,e[15]=B):B=e[15];let C;e[16]!==B||e[17]!==a?(C=o.jsx("span",{className:B,children:a}),e[16]=B,e[17]=a,e[18]=C):C=e[18];const F=r?"text-accent-foreground/70":"text-muted-foreground";let P;e[19]!==F?(P=ve("block truncate text-xs",F),e[19]=F,e[20]=P):P=e[20];let $;e[21]!==i||e[22]!==P?($=o.jsx("span",{className:P,children:i}),e[21]=i,e[22]=P,e[23]=$):$=e[23];let G;e[24]!==$||e[25]!==C?(G=o.jsxs("span",{className:"min-w-0 flex-1",children:[C,$]}),e[24]=$,e[25]=C,e[26]=G):G=e[26];let V;e[27]!==r||e[28]!==N||e[29]!==c?(V=c!==void 0&&c>1&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsxs("span",{className:ve("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Go,{size:14}),c]})}),o.jsx(Je,{side:"bottom",children:N("sandbox.itemRow.variantCount",{count:c})})]}),e[27]=r,e[28]=N,e[29]=c,e[30]=V):V=e[30];let J;e[31]!==x||e[32]!==k?(J=x&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(cs,{size:14})})}),k&&o.jsx(Je,{side:"bottom",children:k})]}),e[31]=x,e[32]=k,e[33]=J):J=e[33];let H;e[34]!==r||e[35]!==d||e[36]!==p?(H=d&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx("span",{className:ve("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(cs,{size:14})})}),p&&o.jsx(Je,{side:"bottom",children:p})]}),e[34]=r,e[35]=d,e[36]=p,e[37]=H):H=e[37];let K;e[38]!==v||e[39]!==w||e[40]!==G||e[41]!==V||e[42]!==J||e[43]!==H||e[44]!==u?(K=o.jsxs("button",{type:"button",onClick:v,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[w,G,V,J,H,u]}),e[38]=v,e[39]=w,e[40]=G,e[41]=V,e[42]=J,e[43]=H,e[44]=u,e[45]=K):K=e[45];let U;e[46]!==r||e[47]!==b?(U=b&&o.jsx("div",{className:ve("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:b}),e[46]=r,e[47]=b,e[48]=U):U=e[48];let Y;return e[49]!==K||e[50]!==U||e[51]!==E||e[52]!==D?(Y=o.jsxs("div",{className:E,children:[D,K,U]}),e[49]=K,e[50]=U,e[51]=E,e[52]=D,e[53]=Y):Y=e[53],Y}function _u(t){return t.stopPropagation()}function ft(t){const e=ce.c(10),{icon:s,title:n,description:a}=t;let i;e[0]!==s?(i=s&&o.jsx(s,{size:24,className:"text-muted-foreground/60"}),e[0]=s,e[1]=i):i=e[1];let r;e[2]!==n?(r=o.jsx("div",{children:n}),e[2]=n,e[3]=r):r=e[3];let l;e[4]!==a?(l=a&&o.jsx("div",{className:"text-xs text-muted-foreground/80 max-w-sm",children:a}),e[4]=a,e[5]=l):l=e[5];let c;return e[6]!==i||e[7]!==r||e[8]!==l?(c=o.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 p-6 text-center text-sm text-muted-foreground",children:[i,r,l]}),e[6]=i,e[7]=r,e[8]=l,e[9]=c):c=e[9],c}const Pu={loaders:Uo,actions:Wo},Au={loaders:"Loaders",actions:"Actions"},Tu={analytics:Wi,blog:la,commerce:Yi,site:qi,website:Fs};function Eu(t,e){return e===0?Tu[t.toLowerCase()]??to:to}function Es(t,e){return e===0?Ai(t):t}function Bu(t){const e=ce.c(98),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c}=t,u=_e();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[f,g]=L.useState(m),[d,p]=L.useState(null),[x,k]=L.useState(""),[j,v]=L.useState(Fu),[b,N]=L.useState(c);b!==c&&(N(c),g([]),p(null),k(""),v(new Set));let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=z=>{v(Q=>{const re=new Set(Q);return re.has(z)?re.delete(z):re.add(z),re})},e[1]=_):_=e[1];const y=_;let w;e[2]!==a||e[3]!==s||e[4]!==n?(w={orgSlug:s,virtualMcpId:n,branch:a},e[2]=a,e[3]=s,e[4]=n,e[5]=w):w=e[5];const S=Js(w);let E;e[6]!==S?(E=Ko((z,Q)=>S.mutate({blockKey:z,data:Q})),e[6]=S,e[7]=E):E=e[7];const D=E;let T;e[8]!==c?(T=Ti(c),e[8]=c,e[9]=T):T=e[9];const B=T,C=Pu[c];let F,P,$,G,V,J,H;if(e[10]!==C||e[11]!==a||e[12]!==l||e[13]!==c||e[14]!==r||e[15]!==j||e[16]!==s||e[17]!==f||e[18]!==i||e[19]!==S||e[20]!==D||e[21]!==x||e[22]!==d||e[23]!==B||e[24]!==u||e[25]!==n){$=Symbol.for("react.early_return_sentinel");e:{const z=[...Ci(r,l,c).map(Ku),...Ni(r,c).map(Iu)],Q=x.trim().toLowerCase(),re=Q.length>0,fe=re?z.filter(M=>M.title.toLowerCase().includes(Q)||M.resolveType.toLowerCase().includes(Q)):[],pe=new Map,ae=[],ge=new Map;if(!re){for(const M of z){const he=M.folderPath;if(!(he.length<f.length)&&f.every((we,Be)=>he[Be]===we))if(he.length===f.length)if(M.savedKey!==void 0){const we=ge.get(M.resolveType);we?we.push(M):ge.set(M.resolveType,[M])}else ae.push(M);else{const we=he[f.length],Be=pe.get(we)??{count:0,savedCount:0};M.savedKey!==void 0?Be.savedCount=Be.savedCount+1:Be.count=Be.count+1,pe.set(we,Be)}}ae.sort(Lu);for(const M of ge.values())M.sort($u)}const de=[...ge.entries()].filter(M=>{const[he]=M;return!ae.some(we=>we.resolveType===he)}).flatMap(Ru).sort(Ou);let xe;e[33]!==f?(xe=(M,he)=>Es(M.name,f.length).localeCompare(Es(he.name,f.length)),e[33]=f,e[34]=xe):xe=e[34];const ee=[...pe.entries()].map(Du).sort(xe);let X;e[35]===Symbol.for("react.memo_cache_sentinel")?(X=M=>{p(M.savedKey!==void 0?{mode:"saved",key:M.savedKey}:{mode:"available",resolveType:M.resolveType,title:M.title})},e[35]=X):X=e[35];const ne=X;let le;e[36]!==S||e[37]!==B||e[38]!==u?(le=async(M,he)=>{await S.mutateAsync({blockKey:M,data:he}),me.success(u("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:B,blockId:M})),p({mode:"saved",key:M})},e[36]=S,e[37]=B,e[38]=u,e[39]=le):le=e[39];const Z=le;let q;e[40]!==l||e[41]!==d?(q=zu(d,l),e[40]=l,e[41]=d,e[42]=q):q=e[42];const se=q;if(se){const M=`${se.mode}:${se.mode==="saved"?se.blockKey:se.resolveType}`;let he;e[43]===Symbol.for("react.memo_cache_sentinel")?(he=()=>p(null),e[43]=he):he=e[43];let we;e[44]!==a||e[45]!==l||e[46]!==Z||e[47]!==c||e[48]!==r||e[49]!==s||e[50]!==i||e[51]!==S.isPending||e[52]!==D||e[53]!==M||e[54]!==se.editorTarget||e[55]!==se.initialValue||e[56]!==n?(we=o.jsx(_i,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c,target:se.editorTarget,initialValue:se.initialValue,isCreating:S.isPending,onCreate:Z,onSaveReferencedBlock:D,onBack:he},M),e[44]=a,e[45]=l,e[46]=Z,e[47]=c,e[48]=r,e[49]=s,e[50]=i,e[51]=S.isPending,e[52]=D,e[53]=M,e[54]=se.editorTarget,e[55]=se.initialValue,e[56]=n,e[57]=we):we=e[57],$=we;break e}H="flex h-full w-full min-w-0 flex-col";let A;e[58]!==u?(A=u("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[58]=u,e[59]=A):A=e[59];let W;e[60]===Symbol.for("react.memo_cache_sentinel")?(W=()=>g([]),e[60]=W):W=e[60];const ie=f.length===0?"font-medium text-foreground":"text-muted-foreground";let be;e[61]!==ie?(be=ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",ie),e[61]=ie,e[62]=be):be=e[62];const Te=Au[c];let je;e[63]!==be||e[64]!==Te?(je=o.jsx("button",{type:"button",onClick:W,className:be,children:Te}),e[63]=be,e[64]=Te,e[65]=je):je=e[65];let De;e[66]!==f?(De=f.map((M,he)=>{const we=he===f.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(Ks,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>g(f.slice(0,he+1)),className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",we?"font-medium text-foreground":"text-muted-foreground"),children:Es(M,he)})]},`${M}-${he}`)}),e[66]=f,e[67]=De):De=e[67];let ke;e[68]!==A||e[69]!==je||e[70]!==De?(ke=o.jsxs("nav",{"aria-label":A,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[je,De]}),e[68]=A,e[69]=je,e[70]=De,e[71]=ke):ke=e[71];let Ne;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ne=o.jsx(Rn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[72]=Ne):Ne=e[72];let Ae;e[73]===Symbol.for("react.memo_cache_sentinel")?(Ae=M=>k(M.target.value),e[73]=Ae):Ae=e[73];let ye;e[74]!==c||e[75]!==u?(ye=u("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:c}),e[74]=c,e[75]=u,e[76]=ye):ye=e[76];let Ee;e[77]!==c||e[78]!==u?(Ee=u("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:c}),e[77]=c,e[78]=u,e[79]=Ee):Ee=e[79];let Oe;e[80]!==x||e[81]!==ye||e[82]!==Ee?(Oe=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Ne,o.jsx("input",{type:"text",value:x,onChange:Ae,placeholder:ye,"aria-label":Ee,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[80]=x,e[81]=ye,e[82]=Ee,e[83]=Oe):Oe=e[83],e[84]!==ke||e[85]!==Oe?(P=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[ke,Oe]}),e[84]=ke,e[85]=Oe,e[86]=P):P=e[86],F=Qs,J="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",G="mx-auto w-full max-w-4xl px-6 py-5",V=re?fe.length===0?o.jsx(ft,{title:u("sandbox.runnableBlocksBrowser.noSearchResults",{kind:c,query:x.trim()}),description:u("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:fe.map(M=>o.jsx(We,{icon:C,accent:M.savedKey!==void 0?"global":void 0,title:M.title,subtitle:M.resolveType,active:!1,onClick:()=>ne(M)},M.savedKey??M.resolveType))}):ee.length===0&&ae.length===0&&de.length===0?o.jsx(ft,{title:u("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:c}),description:f.length===0?u("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):u("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[ee.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:ee.map(M=>{const he=Eu(M.name,f.length);return o.jsxs("button",{type:"button",onClick:()=>g([...f,M.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(he,{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:Es(M.name,f.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[M.count," ",M.count===1?B:c,M.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",u("sandbox.runnableBlocksBrowser.savedCountLabel",{count:M.savedCount})]})]})]})]},M.name)})}),(ae.length>0||de.length>0)&&o.jsxs("div",{className:ve("flex flex-col gap-1",ee.length>0&&"mt-4"),children:[ae.map(M=>{const he=ge.get(M.resolveType)??[],we=j.has(M.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(We,{icon:C,title:M.title,subtitle:M.resolveType,active:!1,onClick:()=>ne(M)}),he.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>y(M.resolveType),"aria-expanded":we,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:In},children:[we?o.jsx(ds,{size:12,className:"shrink-0"}):o.jsx(Ks,{size:12,className:"shrink-0"}),u(we?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",he.length,")"]}),we&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:he.map(Be=>o.jsx(We,{icon:C,accent:"global",title:Be.title,subtitle:Be.resolveType,active:!1,onClick:()=>ne(Be)},Be.savedKey))})]})]},M.resolveType)}),de.map(M=>o.jsx(We,{icon:C,accent:"global",title:M.title,subtitle:M.resolveType,active:!1,onClick:()=>ne(M)},M.savedKey))]})]})}e[10]=C,e[11]=a,e[12]=l,e[13]=c,e[14]=r,e[15]=j,e[16]=s,e[17]=f,e[18]=i,e[19]=S,e[20]=D,e[21]=x,e[22]=d,e[23]=B,e[24]=u,e[25]=n,e[26]=F,e[27]=P,e[28]=$,e[29]=G,e[30]=V,e[31]=J,e[32]=H}else F=e[26],P=e[27],$=e[28],G=e[29],V=e[30],J=e[31],H=e[32];if($!==Symbol.for("react.early_return_sentinel"))return $;let K;e[87]!==G||e[88]!==V?(K=o.jsx("div",{className:G,children:V}),e[87]=G,e[88]=V,e[89]=K):K=e[89];let U;e[90]!==F||e[91]!==K||e[92]!==J?(U=o.jsx(F,{className:J,children:K}),e[90]=F,e[91]=K,e[92]=J,e[93]=U):U=e[93];let Y;return e[94]!==P||e[95]!==U||e[96]!==H?(Y=o.jsxs("div",{className:H,children:[P,U]}),e[94]=P,e[95]=U,e[96]=H,e[97]=Y):Y=e[97],Y}function Du(t){const[e,s]=t;return{name:e,...s}}function Ou(t,e){return t.title.localeCompare(e.title)}function Ru(t){const[,e]=t;return e}function $u(t,e){return t.title.localeCompare(e.title)}function Lu(t,e){return t.title.localeCompare(e.title)}function Iu(t){return{resolveType:t.resolveType,title:t.title,folderPath:Io(t.resolveType)}}function Ku(t){return{resolveType:t.resolveType,title:t.title,folderPath:Io(t.resolveType),savedKey:t.key}}function Fu(){return new Set}function zu(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}=Pi(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function Mu(t){const e=ce.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,resolveType:c,title:u,defaultBlockId:m,isCreating:f,onCreate:g,onSaveReferencedBlock:d}=t,p=_e(),x=Xs(),k=x?.virtualMcpId,v=ra(k===n?n:null)?.metadata?.siteSlug??null;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={},e[0]=b):b=e[0];const[N,_]=L.useState(b);let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[1]=y):y=e[1];const[w,S]=L.useState(y),[E,D]=L.useState(0),[T,B]=L.useState(!1);let C;e[2]!==r||e[3]!==c?(C=Ln(c,r),e[2]=r,e[3]=c,e[4]=C):C=e[4];const F=C;let P,$,G,V,J,H,K,U;if(e[5]!==v||e[6]!==a||e[7]!==l||e[8]!==w||e[9]!==N||e[10]!==f||e[11]!==g||e[12]!==s||e[13]!==i||e[14]!==c||e[15]!==p||e[16]!==x?.taskId||e[17]!==u||e[18]!==n){const ae=c.split("/").pop()?.replace(/\.tsx?$/,"")??c,ge=x?.taskId??null,de=i??void 0;let xe;e[27]!==v||e[28]!==a||e[29]!==s||e[30]!==de||e[31]!==ge||e[32]!==n?(xe={orgSlug:s,virtualMcpId:n,branch:a,threadId:ge,previewUrl:de,siteSlug:v},e[27]=v,e[28]=a,e[29]=s,e[30]=de,e[31]=ge,e[32]=n,e[33]=xe):xe=e[33],$=xe;let ee,X,ne,le;if(e[34]!==l||e[35]!==w||e[36]!==N||e[37]!==g||e[38]!==p||e[39]!==u){const je=[u,...w],De=Ne=>{S(w.slice(0,Ne)),D(Vu)};let ke;e[48]!==l||e[49]!==N||e[50]!==g?(ke=async Ne=>{const Ae=Bi(Ne,l);if(Ae){me.error(Ae);return}await g(Ne,N),B(!1)},e[48]=l,e[49]=N,e[50]=g,e[51]=ke):ke=e[51],P=ke,U="flex h-full w-full min-w-0",K="flex min-w-0 flex-1 flex-col",J="shrink-0 border-b px-3 py-2.5",le="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==p?(ee=p("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=p,e[53]=ee):ee=e[53],X="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",ne=je.map((Ne,Ae)=>{const ye=Ae===je.length-1,Ee=Ei(Ne);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[Ae>0&&o.jsx(Ks,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>De(Ae),title:Ee,className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",ye?"font-medium text-foreground":"text-muted-foreground"),children:Ee})]},`${Ee}-${Ae}`)}),e[34]=l,e[35]=w,e[36]=N,e[37]=g,e[38]=p,e[39]=u,e[40]=P,e[41]=ee,e[42]=X,e[43]=ne,e[44]=le,e[45]=J,e[46]=K,e[47]=U}else P=e[40],ee=e[41],X=e[42],ne=e[43],le=e[44],J=e[45],K=e[46],U=e[47];let Z;e[54]!==ee||e[55]!==X||e[56]!==ne?(Z=o.jsx("nav",{"aria-label":ee,className:X,children:ne}),e[54]=ee,e[55]=X,e[56]=ne,e[57]=Z):Z=e[57];let q;e[58]===Symbol.for("react.memo_cache_sentinel")?(q=()=>B(!0),e[58]=q):q=e[58];let se;e[59]!==p?(se=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=p,e[60]=se):se=e[60];let A;e[61]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(Xi,{size:14}),e[61]=A):A=e[61];let W;e[62]!==f||e[63]!==se?(W=o.jsx(Xe,{asChild:!0,children:o.jsx($e,{size:"icon",className:"shrink-0",disabled:f,onClick:q,"aria-label":se,children:A})}),e[62]=f,e[63]=se,e[64]=W):W=e[64];let ie;e[65]!==p?(ie=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=p,e[66]=ie):ie=e[66];let be;e[67]!==ie?(be=o.jsx(Je,{side:"bottom",children:ie}),e[67]=ie,e[68]=be):be=e[68];let Te;e[69]!==W||e[70]!==be?(Te=o.jsxs(Qe,{children:[W,be]}),e[69]=W,e[70]=be,e[71]=Te):Te=e[71],e[72]!==le||e[73]!==Z||e[74]!==Te?(H=o.jsxs("div",{className:le,children:[Z,Te]}),e[72]=le,e[73]=Z,e[74]=Te,e[75]=H):H=e[75],G="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",V=p("sandbox.availableSectionEditor.localEditsHint",{typeLabel:ae}),e[5]=v,e[6]=a,e[7]=l,e[8]=w,e[9]=N,e[10]=f,e[11]=g,e[12]=s,e[13]=i,e[14]=c,e[15]=p,e[16]=x?.taskId,e[17]=u,e[18]=n,e[19]=P,e[20]=$,e[21]=G,e[22]=V,e[23]=J,e[24]=H,e[25]=K,e[26]=U}else P=e[19],$=e[20],G=e[21],V=e[22],J=e[23],H=e[24],K=e[25],U=e[26];let Y;e[76]!==G||e[77]!==V?(Y=o.jsx("p",{className:G,children:V}),e[76]=G,e[77]=V,e[78]=Y):Y=e[78];let z;e[79]!==Y||e[80]!==J||e[81]!==H?(z=o.jsxs("div",{className:J,children:[H,Y]}),e[79]=Y,e[80]=J,e[81]=H,e[82]=z):z=e[82];let Q;e[83]!==l||e[84]!==w||e[85]!==E||e[86]!==N||e[87]!==r||e[88]!==d||e[89]!==$||e[90]!==F||e[91]!==p?(Q=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:F?o.jsx(Fo,{schema:F,value:N,onChange:ae=>_(ae),basePath:"",breadcrumbPath:w,onBreadcrumbChange:S,meta:r,decofile:l,onSaveReferencedBlock:d,sandbox:$},E):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=l,e[84]=w,e[85]=E,e[86]=N,e[87]=r,e[88]=d,e[89]=$,e[90]=F,e[91]=p,e[92]=Q):Q=e[92];let re;e[93]!==z||e[94]!==Q||e[95]!==K?(re=o.jsxs("div",{className:K,children:[z,Q]}),e[93]=z,e[94]=Q,e[95]=K,e[96]=re):re=e[96];let fe;e[97]!==m||e[98]!==P||e[99]!==f||e[100]!==T?(fe=o.jsx(Di,{open:T,onOpenChange:B,defaultBlockId:m,isPending:f,onSubmit:P}),e[97]=m,e[98]=P,e[99]=f,e[100]=T,e[101]=fe):fe=e[101];let pe;return e[102]!==re||e[103]!==fe||e[104]!==U?(pe=o.jsxs("div",{className:U,children:[re,fe]}),e[102]=re,e[103]=fe,e[104]=U,e[105]=pe):pe=e[105],pe}function Vu(t){return t+1}function Uu(t,e,s){const n={__resolveType:t},a=Cr([n],e)[0];return a?$i(n,a,e,s):null}function Gu({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:l}){const c=_e(),u=Xs(),m=u?.virtualMcpId,g=ra(m===e?e:null)?.metadata?.siteSlug??null,[d]=L.useState(()=>Uu(r,i,Qr(a))),[p,x]=L.useState(d?.data??{}),[k,j]=L.useState([]),[v,b]=L.useState(0),[N,_]=L.useState(!1),[y,w]=L.useState(null),S=y!==null,{save:E,flush:D}=Oi({orgSlug:t,virtualMcpId:e,branch:s}),T=d?.resolveType?Ln(d.resolveType,a):null,B=i[r],C=B?wr(r,B):r,F=u?.taskId??null,P={orgSlug:t,virtualMcpId:e,branch:s,threadId:F,previewUrl:n??void 0,siteSlug:g},$=K=>{x(K),E(r,K)},G=()=>{S?(w(null),_(!1),b(K=>K+1)):w(JSON.stringify(p,null,2))},V=K=>{const U=K??"";try{const Y=JSON.parse(U);if(Y&&typeof Y=="object"&&!Array.isArray(Y)){_(!1),$(Y);return}_(!0)}catch{_(!0)}},J=[C,...k],H=K=>{j(k.slice(0,K)),b(U=>U+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(Ri,{crumbs:J,onSelect:H}),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:In},"aria-hidden":!0}),o.jsx("div",{className:"flex-1"}),o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx($e,{variant:S?"default":"ghost",size:"icon",className:"shrink-0",onClick:G,"aria-label":c(S?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":S,children:S?o.jsx(En,{size:14}):o.jsx(Ho,{size:14})})}),o.jsx(Je,{side:"bottom",children:c(S?"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:c("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:T?o.jsx(Fo,{schema:T,value:p,onChange:K=>$(K),basePath:"",breadcrumbPath:k,onBreadcrumbChange:j,meta:a,decofile:i,onSaveReferencedBlock:l,sandbox:P},v):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sandbox.savedSectionEditor.noEditableFields")})})})}),y!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[N&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(ca,{language:"json",height:"100%",code:y,onChange:V,onSave:K=>{V(K),D()}})})]})]})]})})}function Hu(t){const e=ce.c(36),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,isCreating:u,onCreateAvailable:m,onSaveReferencedBlock:f}=t,g=_e();if(!s){let x;e[0]!==g?(x=g("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=g,e[1]=x):x=e[1];let k;e[2]!==g?(k=g("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=g,e[3]=k):k=e[3];let j;return e[4]!==x||e[5]!==k?(j=o.jsx(ft,{title:x,description:k}),e[4]=x,e[5]=k,e[6]=j):j=e[6],j}if(s.collection==="available-section"){const x=`available:${s.resolveType}`,k=s.resolveType,j=s.title;let v;e[7]!==s.title?(v=Li(s.title),e[7]=s.title,e[8]=v):v=e[8];let b;e[9]!==m||e[10]!==s.resolveType?(b=(_,y)=>m(s.resolveType,_,y),e[9]=m,e[10]=s.resolveType,e[11]=b):b=e[11];let N;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==l||e[16]!==f||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==x||e[22]!==v||e[23]!==b||e[24]!==a?(N=o.jsx(Mu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,resolveType:k,title:j,defaultBlockId:v,isCreating:u,onCreate:b,onSaveReferencedBlock:f},x),e[12]=i,e[13]=c,e[14]=u,e[15]=l,e[16]=f,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=x,e[22]=v,e[23]=b,e[24]=a,e[25]=N):N=e[25],N}const d=`saved:${s.key}`;let p;return e[26]!==i||e[27]!==c||e[28]!==l||e[29]!==f||e[30]!==n||e[31]!==r||e[32]!==s.key||e[33]!==d||e[34]!==a?(p=o.jsx(Gu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,blockKey:s.key,onSaveReferencedBlock:f},d),e[26]=i,e[27]=c,e[28]=l,e[29]=f,e[30]=n,e[31]=r,e[32]=s.key,e[33]=d,e[34]=a,e[35]=p):p=e[35],p}function Bs(t){const e=ce.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:l}=t,c=_e();let u;e[0]!==c?(u=c("sandbox.itemActions.moreActions"),e[0]=c,e[1]=u):u=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ci,{size:14}),e[2]=m):m=e[2];let f;e[3]!==u?(f=o.jsx($s,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":u,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer",onClick:qu,children:m})}),e[3]=u,e[4]=f):f=e[4];let g;e[5]!==n||e[6]!==c?(g=n&&o.jsxs(et,{onClick:n,children:[o.jsx(al,{size:14}),c("sandbox.itemActions.rename")]}),e[5]=n,e[6]=c,e[7]=g):g=e[7];let d;e[8]!==s||e[9]!==c?(d=s&&o.jsxs(et,{onClick:s,children:[o.jsx(Fn,{size:14}),c("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=c,e[10]=d):d=e[10];let p;e[11]!==a||e[12]!==c?(p=a&&o.jsxs(o.Fragment,{children:[o.jsx(pn,{}),o.jsxs(et,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Go,{size:14}),c("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=c,e[13]=p):p=e[13];let x;e[14]!==i||e[15]!==r||e[16]!==c?(x=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(pn,{}),i&&o.jsxs(et,{onClick:i,children:[o.jsx(Vo,{size:14}),c("sandbox.itemActions.editSeo")]}),r&&o.jsxs(et,{onClick:r,children:[o.jsx(Ho,{size:14}),c("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=c,e[17]=x):x=e[17];let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(pn,{}),e[18]=k):k=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(zn,{size:14}),e[19]=j):j=e[19];let v;e[20]!==c?(v=c("sandbox.itemActions.delete"),e[20]=c,e[21]=v):v=e[21];let b;e[22]!==l||e[23]!==v?(b=o.jsxs(et,{onClick:l,className:"text-destructive focus:text-destructive",children:[j,v]}),e[22]=l,e[23]=v,e[24]=b):b=e[24];let N;e[25]!==b||e[26]!==g||e[27]!==d||e[28]!==p||e[29]!==x?(N=o.jsxs(Ls,{align:"end",className:"w-44",children:[g,d,p,x,k,b]}),e[25]=b,e[26]=g,e[27]=d,e[28]=p,e[29]=x,e[30]=N):N=e[30];let _;return e[31]!==N||e[32]!==f?(_=o.jsxs(Is,{children:[f,N]}),e[31]=N,e[32]=f,e[33]=_):_=e[33],_}function qu(t){return t.stopPropagation()}const ti=4;function on(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 si(t,e){const s=on(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>=ti));)i=an(i,s);return n.reverse()}function ni(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 Gm(t,e){const s=on(e),n=ni(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const l=[];for(const c of r)for(const u of n.get(c)??[])u.slug&&!a.has(u.slug)&&(a.add(u.slug),l.push(u));r=l}return a.delete(t),a}function Hm(t,e){if(!t)return[];const s=on(e),n=si(t,e),a=n[0];return!a||an(a,s)?[t]:n.map(i=>i.slug??"")}function Yu(t){const e=on(t),s=ni(t,e),n=new Set,a=[],i=(l,c)=>{if(!n.has(l)&&(n.add(l),a.push({entry:l,depth:c}),!(c+1>=ti)))for(const u of s.get(l)??[])i(u,c+1)},r=t.filter(l=>!an(l,e)).sort((l,c)=>l.label.localeCompare(c.label));for(const l of r)i(l,0);for(const l of t)i(l,0);return a}function Wu(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function Xu(t){const e=new Map;for(const s of t){const n=Wu(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 Eo(t){const e=ce.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=ve("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 l;return e[4]!==n||e[5]!==i||e[6]!==r?(l=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=l):l=e[7],l}const Bo=L.lazy(()=>Ve(()=>import("./app-editor-CKdeak5r.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147])).then(t=>({default:t.AppEditor}))),Ju=L.lazy(()=>Ve(()=>import("./cms-settings-editor-Dh-qBReE.js"),__vite__mapDeps([148,1,2,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,106,107,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,108,109,58,110,111,0,22,23,24,57,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,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147])).then(t=>({default:t.CmsSettingsEditor}))),Qu=L.lazy(()=>Ve(()=>import("./post-editor-QChnOq6Y.js"),__vite__mapDeps([149,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,133,68,150,146,143,81,82,112,135,131,104,105,57,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,106,107,108,109,110,111,113,114,115,23,116,117,118,119,120,121,122,22,123,124,125,126,127,128,129,130,132,134,136,137,138,151,152,139,153,154,155,140,156,157,158,159,141,142,144,145,147])).then(t=>({default:t.PostEditor}))),Zu=L.lazy(()=>Ve(()=>import("./record-editor-hWJJMGCG.js"),__vite__mapDeps([160,1,2,68,126,23,73,36,105,57,58,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,69,70,20,71,4,5,6,7,8,9,72,18,11,12,13,14,15,16,17,3,10,19,21,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,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,22,123,124,125,127,128,129,130,131,132,133,134,135,136,137,138,155,159,140,141,142,143,144,145,146,147])).then(t=>({default:t.RecordEditor}))),ep=L.lazy(()=>Ve(()=>import("./context-BkZJrbqd.js"),__vite__mapDeps([161,1,2,11,8,9,12,13,14,15,16,17,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,146,68,104,105,112,19,57,58,59,60,61,62,63,64,65,66,67,69,70,20,71,4,5,6,7,72,73,18,3,10,21,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,106,107,108,109,110,111,113,114,115,23,116,117,118,119,120,121,122,22,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,159,162,152,154,163,164,165,140,153,141,142,143,144,145,147])).then(t=>({default:t.BlogContext}))),tp=L.lazy(()=>Ve(()=>import("./category-editor-BvoAtPRs.js"),__vite__mapDeps([166,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,31,33,25,133,68,126,23,73,36,155,26,28,29,30,32,34,35,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,69,70,71,72,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,22,123,124,125,127,128,129,130,131,132,134,135,136,137,138,151,152,139,153,154,145,156,157,158,159,140,141,142,143,144,146,147])).then(t=>({default:t.CategoryEditor}))),sp=L.lazy(()=>Ve(()=>import("./sections-editor-DVqxZTWF.js"),__vite__mapDeps([167,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,57,58,33,41,26,27,28,29,30,31,32,34,35,36,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,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,23,116,117,118,119,120,121,122,22,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,140,24,139,168,164,169,170,145,171,158])).then(t=>({default:t.SectionsEditor}))),np=L.lazy(()=>Ve(()=>import("./seo-editor-Cd-ANp55.js"),__vite__mapDeps([172,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,22,23,57,58,59,60,61,62,63,64,65,66,67,68,69,70,20,71,4,5,6,7,8,9,72,73,18,11,12,13,14,15,16,17,3,10,19,21,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,169])).then(t=>({default:t.SeoEditor}))),op=L.lazy(()=>Ve(()=>import("./variant-calendar-kJB8Qi3I.js"),__vite__mapDeps([173,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,68,22,23,104,72,73,130,131,144])).then(t=>({default:t.VariantCalendar}))),ap=L.lazy(()=>Ve(()=>import("./campaigns-view-DtQvcOC6.js"),__vite__mapDeps([174,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,146,22,23,130,131,72,73,175,68,103,11,8,9,12,13,14,15,16,17,113,81,82,114,115,116,117,118,119,120,121,106,107,3,4,5,6,7,10,18,19,20,21,108,109,58,110,111,122,176,170,145,144])).then(t=>({default:t.CampaignsView}))),ip=L.lazy(()=>Ve(()=>import("./post-calendar-BtFE-61n.js"),__vite__mapDeps([177,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,22,23,144,21,16,15,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,113,81,82,68,114,115,116,117,118,119,120,121,103,106,107,108,109,58,110,111,122,57,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,104,105,112,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,140,141,142,143,145,146,147])).then(t=>({default:t.PostCalendar}))),rp=L.lazy(()=>Ve(()=>import("./redirect-editor-XmMaGVJV.js"),__vite__mapDeps([178,1,2,143,46,68,126,23,73,36,57,58,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,47,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,69,70,20,71,4,5,6,7,8,9,72,18,11,12,13,14,15,16,17,3,10,19,21,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,22,123,124,125,127,128,129,130,131,132,133,134,135,136,137,138,159])).then(t=>({default:t.RedirectEditor})));function lp(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"campaigns":!s&&t==="campaigns"?"calendar":t}function cp(t,e){return t&&(yt(t)||e&&(t==="sections"||t==="campaigns"))?t:null}function dp(t){const e=ce.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=Dn(),{org:i}=di(),r=Ur(),l=Gr(),{runtime:c,previewServerUrl:u}=Kn(a),m=c==="cms",f=ta(a,n);let g,d;e[0]!==f||e[1]!==m||e[2]!==l.previewState||e[3]!==r.lifecycle.phase?(g=sa(f),d=Jl({fastPreviewActive:m||g,previewState:l.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=f,e[1]=m,e[2]=l.previewState,e[3]=r.lifecycle.phase,e[4]=g,e[5]=d):(g=e[4],d=e[5]);const p=d;if(p.kind==="sandbox-card"){const v=`/${i.slug}/settings/connections`;let b;return e[6]!==p.state||e[7]!==l.start||e[8]!==v||e[9]!==r.lifecycle||e[10]!==r.phase?(b=o.jsx(Wl,{state:p.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:l.start,connectionsHref:v}),e[6]=p.state,e[7]=l.start,e[8]=v,e[9]=r.lifecycle,e[10]=r.phase,e[11]=b):b=e[11],b}if(!a||!n){let v;return e[12]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(ft,{title:"Waiting for sandbox context…"}),e[12]=v):v=e[12],v}if(pi(f)){let v;return e[13]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(fi,{}),e[13]=v):v=e[13],v}if(f.kind==="pending"){let v;return e[14]!==f?(v=o.jsx(gi,{backend:f}),e[14]=f,e[15]=v):v=e[15],v}const x=g?null:l.previewUrl;let k;e[16]!==f||e[17]!==m||e[18]!==l.previewUrl||e[19]!==u?(k=f.kind==="protocol"&&f.source==="local"?pr(f):m?u:l.previewUrl,e[16]=f,e[17]=m,e[18]=l.previewUrl,e[19]=u,e[20]=k):k=e[20];let j;return e[21]!==n||e[22]!==s||e[23]!==p.devServerReady||e[24]!==p.sandboxWarming||e[25]!==i.slug||e[26]!==x||e[27]!==k||e[28]!==a?(j=o.jsx(pp,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:x,sitePreviewUrl:k,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]=x,e[27]=k,e[28]=a,e[29]=j):j=e[29],j}const Do=2e3,up=15;function Oo(t,e,s,n){return typeof e!="string"||s&&(ua(e,s,n)||t.state.dataUpdateCount>=up)?!1:Do}function pp({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:l}){const c=_e(),u=Xs()?.taskId??null,m={orgSlug:t,virtualMcpId:e,branch:s,threadId:u,previewUrl:n},f=!sa(ta(e,s)),g=Ii()===void 0,{data:d,isLoading:p}=mr(m,{fetchEnabled:r}),x=Ro({strict:!1}),[k,j]=L.useState(()=>cp(x.contentCollection,!f)??"pages"),v=da(),b=lp(k,v,!f),{openPanel:N}=Fr(),_={open:h=>{if(h==="campaigns"){w(null),j("campaigns");return}N("experiments")}},[y,w]=L.useState(()=>x.contentItem&&(yt(b)||b==="sections")?{collection:b,key:x.contentItem}:null),[S,E]=L.useState(()=>{const h=f?null:Jn(x);return h&&x.contentItem&&y?{blockKey:x.contentItem,focus:h,seq:1}:null}),D=y&&"key"in y?y.key:null;S&&S.blockKey!==D&&E(null);const[T,B]=L.useState(null),{data:C,isLoading:F,isFetching:P}=mi(m,{fetchEnabled:r,refetchInterval:h=>{const R=h.state.data;if(b==="apps"&&y&&y.collection==="apps"){const te=d?.[y.key];return Oo(h,typeof te?.__resolveType=="string"?te.__resolveType:void 0,R)}if(b==="site"&&d){const te=R?oo(d,R):null,ue=d.site,Ce=te?.resolveType??(typeof ue?.__resolveType=="string"?ue.__resolveType:void 0);return Oo(h,Ce,R,["seo"])}return!1}}),$=!!(i?.pageId||i?.path||i?.pathTemplate),[G,V]=L.useState(!1);if($&&!G&&y===null&&d&&!F){V(!0);const h=Nr(no(d,C),i??{});if(h){j("pages"),w({collection:"pages",key:h.key,path:h.path});const R=f?null:Jn(x);R&&E({blockKey:h.key,focus:R,seq:1})}}const[J,H]=L.useState(""),[K,U]=L.useState("list"),Y=h=>{w(h),B(null)},[z,Q]=L.useState(b);z!==b&&(Q(b),H(""));const re=(h,R)=>!ua(h,C,R)&&(F||P),{createTask:fe}=Dn(),pe=Kn(e),ae=Ul(e,C??void 0),ge=Qo(e).url,de=Bn("site_apps_install_enabled")&&ae!==null&&!ge,xe=C&&d?Kl(ae?ha(ae):[],C,d):[],ee=zl({orgSlug:t,virtualMcpId:e,branch:s}),X=Js(m),ne=Rr(m),le=Rd({orgSlug:t,virtualMcpId:e,branch:s,decofile:d??{},onMoved:(h,R)=>w(te=>te?.collection==="posts"&&te.key===h?{collection:"posts",key:R}:te)}),[Z,q]=L.useState(null),[se,A]=L.useState(),[W,ie]=L.useState(!1),[be,Te]=L.useState(),[je,De]=L.useState(null),[ke,Ne]=L.useState(null),[Ae,ye]=L.useState(null),Ee=!d||!C;if(p||F||g||Ee&&l)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(vt,{className:"size-5 text-muted-foreground"})});if(Ee)return o.jsx(ft,{title:"Could not load site data."});if(fr(C))return o.jsx(Ki,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d});const Oe=no(d,C).sort((h,R)=>h.name.localeCompare(R.name)),M=_r(d).sort((h,R)=>h.from.localeCompare(R.from)),he=Pr(d,C),we=b==="sections"?Ar(C):[],Be=oo(d,C),Ue=ja(d),gs=Un.some(h=>Ue[h].length>0),rn=yt(b)?Ue[b]:[],gt=Qn(C,"loaders"),Zt=Qn(C,"actions"),wt=f?["settings","campaigns"]:["calendar","apps",...Be?[]:["site"],...Zt===0?["actions"]:[],...dl(C)?[]:["settings"]];if(!Tr(d,C)&&!gs&>===0&&Zt===0)return o.jsx(ft,{icon:cs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const ln={pages:Oe.length,sections:he.length,apps:f?xe.length:0,loaders:gt,actions:Zt,redirects:M.length,posts:Ue.posts.length,authors:Ue.authors.length,categories:Ue.categories.length},ht=new Set(Oe.map(h=>Ds(h.path))),Ct=new Set(Oe.map(h=>h.name)),cn=new Set(he.map(h=>h.name)),es=async h=>{const R=d[h.key];if(!R)return;const te=oa(d,h.key),ue=Er(d,h.key,Math.max(0,te-1)),Ce=Br(R.sections,ue,C,!f);if(Ce)try{await X.mutateAsync({blockKey:h.key,data:{...R,sections:Ce.sections}}),me.success(`Variant added to "${h.name}"`),w({collection:"pages",key:h.key,path:h.path})}catch(Pe){me.error(Pe instanceof Error?Pe.message:"Could not add variant")}},nt=()=>{A(void 0),q({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},Nt=h=>{A(void 0),q({mode:"duplicate",sourceKey:h.key,initialName:po(Ct,h.name),initialPath:Ql(ht,h.path)})},ot=h=>{A(void 0),q({mode:"rename",sourceKey:h.key,initialName:h.name,initialPath:h.path})},at=async h=>{if(!Z)return;const{mode:R,sourceKey:te}=Z;try{if(R==="create"){let ue;if(h.templateKey){const Pe=d[h.templateKey];if(!Pe)throw new Error("Selected template no longer exists.");ue={...Pe,name:h.name,path:h.path}}else ue=tc(h.name,h.path,f?void 0:C);const Ce=nc(d,h.name);await X.mutateAsync({blockKey:Ce,data:ue}),me.success(`Created "${h.name}"`),w({collection:"pages",key:Ce,path:h.path})}else if(R==="duplicate"&&te){const ue=d[te];if(!ue)throw new Error("Source page not found");const{key:Ce,data:Pe}=ec({source:ue,pages:Oe,newName:h.name,newPath:h.path});await X.mutateAsync({blockKey:Ce,data:Pe}),me.success(`Duplicated as "${h.name}"`),w({collection:"pages",key:Ce,path:h.path})}else if(R==="rename"&&te){const ue=d[te];if(!ue)throw new Error("Page not found");const Ce={...ue,name:h.name,path:h.path};await X.mutateAsync({blockKey:te,data:Ce}),me.success("Page updated"),y?.collection==="pages"&&y.key===te&&w({collection:"pages",key:te,path:h.path})}q(null)}catch(ue){A(ue instanceof Error?ue.message:"Save failed")}},ts=({path:h})=>{if(!Z)return null;const R=Ds(h);return(Z.mode==="rename"?Ds(Z.initialPath):null)!==R&&ht.has(R)?`A page with path "${h}" already exists.`:null},it=async(h,R,te)=>{await X.mutateAsync({blockKey:R,data:{...te,name:R,__resolveType:h}}),me.success(c("sandbox.contentBrowser.createdSection",{name:R})),w({collection:"sections",key:R})},_t=Ko((h,R)=>X.mutate({blockKey:h,data:R})),rt=async h=>{const R=d[h.key];if(!R){me.error(c("sandbox.contentBrowser.sectionNotFound"));return}const te=Zl(d,h.key),ue=po(cn,h.name),Ce={...R,name:ue};try{await X.mutateAsync({blockKey:te,data:Ce}),me.success(c("sandbox.contentBrowser.duplicatedSection",{name:h.name})),w({collection:"sections",key:te})}catch(Pe){me.error(Pe instanceof Error?Pe.message:c("sandbox.contentBrowser.duplicateFailed"))}},lt=async h=>{if(!je)return;const R=d[je];if(!R){me.error(c("sandbox.contentBrowser.sectionNotFound"));return}try{await X.mutateAsync({blockKey:je,data:{...R,name:h}}),me.success(c("sandbox.contentBrowser.sectionRenamed")),De(null)}catch(te){me.error(te instanceof Error?te.message:c("sandbox.contentBrowser.renameFailed"))}},Pt=()=>{Te(void 0),ie(!0)},At=async h=>{const R=Dr(d,h.from),te=Or(h);try{await X.mutateAsync({blockKey:R,data:te}),me.success("Created redirect"),ie(!1),w({collection:"redirects",key:R})}catch(ue){Te(ue instanceof Error?ue.message:"Could not create redirect")}},ct=async h=>{const R=kn(d,h),te=qt(R,h,Ba(h));try{await X.mutateAsync({blockKey:R,data:te}),me.success(`Created ${rs[h]}`),w({collection:h,key:R})}catch(ue){me.error(ue instanceof Error?ue.message:"Could not create")}},Tt=async h=>{const R=kn(d,"posts"),te=qt(R,"posts",Ed(h));try{await X.mutateAsync({blockKey:R,data:te}),me.success(c("sandbox.postCalendar.createdScheduledPost")),j("posts"),Q("posts"),w({collection:"posts",key:R}),B(null)}catch(ue){me.error(ue instanceof Error?ue.message:c("sandbox.postCalendar.couldNotCreate"))}},dt=async(h,R)=>{const te=d[h],ue=te?Dd(kt(te,"posts"),R):null;if(!ue){me.error(c("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await X.mutateAsync({blockKey:h,data:qt(h,"posts",ue)})}catch(Ce){me.error(Ce instanceof Error?Ce.message:c("sandbox.postCalendar.couldNotReschedule"))}},ut=async h=>{const R=d[h.key];if(!R){me.error("Record not found.");return}const te=kn(d,h.kind),ue=h.kind==="posts"?"title":"name",Ce={...structuredClone(kt(R,h.kind)),[ue]:`${h.label} (copy)`};if(h.kind==="categories"){const Pe=Ue.categories.map(He=>He.slug??"").filter(Boolean);Ce.slug=Ad(String(Ce.slug??""),Pe)}try{await X.mutateAsync({blockKey:te,data:qt(te,h.kind,Ce)}),me.success(`Duplicated "${h.label}"`),w({collection:h.kind,key:te})}catch(Pe){me.error(Pe instanceof Error?Pe.message:"Duplicate failed")}},Et=()=>{j("posts"),Q("posts"),w(null),B(null),H("")},pt=async()=>{if(ke)try{const{kind:h,key:R,label:te}=ke;if(h==="blog"){if(ke.blogKind==="categories"){const ue=kt(d[R],"categories").slug,Ce=typeof ue=="string"?ue:"";if(Ce)for(const{key:Pe,payload:He}of Ea(d)){const Ze=Mc(He,Ce);Ze!==He&&await X.mutateAsync({blockKey:Pe,data:Ic(Pe,Vc(Ze))})}}await ne.mutateAsync({blockKey:R})}else await ne.mutateAsync({blockKey:R});me.success(`Deleted "${te}"`),y&&y.collection!=="available-section"&&y.key===R&&w(null),Ne(null)}catch(h){me.error(h instanceof Error?h.message:"Delete failed")}},Ge=ne.isPending||X.isPending,mt=ke?.kind==="blog"?rs[ke.blogKind]:ke?.kind??"item";return o.jsx(Fi,{value:!f,children:o.jsxs("div",{className:"flex h-full w-full",children:[o.jsx(ql,{active:b,counts:ln,hidden:wt,showBlog:gs,showContext:v,onSelect:h=>{j(h),w(null),B(null)}}),b!=="seo"&&b!=="site"&&b!=="settings"&&b!=="context"&&b!=="calendar"&&b!=="campaigns"&&b!=="post-schedule"&&b!=="posts"&&b!=="loaders"&&b!=="actions"&&o.jsx(mp,{activeCollection:b,pages:Oe,redirects:M,sections:he,availableSections:we,appCatalog:xe,canInstallApps:de,installingAppId:ee.isPending?ee.variables?.blockKey??null:null,onInstallApp:h=>{if(pe.resolved){if(pe.runtime==="cms"){me.error(c("sandbox.appEditor.installNeedsCodingSession"),{action:{label:c("chat.fastPreview.startCodingSession"),onClick:()=>fe({runtime:"sandbox"})}});return}ee.mutate({blockKey:h.id},{onSuccess:R=>Y({collection:"apps",key:R.key}),onError:R=>me.error(R.message)})}},blogEntries:rn,decofile:d,searchQuery:J,onSearchChange:H,selection:y,onSelect:Y,onCreate:()=>{b==="pages"?nt():b==="redirects"?Pt():yt(b)&&ct(b)},onDuplicatePage:Nt,onRenamePage:ot,onAddPageVariant:es,onDeletePage:h=>Ne({kind:"page",key:h.key,label:h.name}),onEditPageSeo:h=>{const R={collection:"pages",key:h.key,path:h.path};w(R),B(h.key)},onViewPageJson:h=>ye(h.key),onDuplicateSection:rt,onRenameSection:h=>De(h.key),onDeleteSection:h=>Ne({kind:"section",key:h.key,label:h.name}),onDeleteRedirect:h=>Ne({kind:"redirect",key:h.key,label:h.from||h.key}),onDuplicateBlog:ut,onDeleteBlog:h=>Ne({kind:"blog",blogKind:h.kind,key:h.key,label:h.label})}),o.jsx("div",{className:"flex-1 min-w-0",children:b==="loaders"||b==="actions"?o.jsx(Bu,{orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:C,decofile:d,kind:b}):o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(vt,{className:"size-5 text-muted-foreground"})}),children:b==="calendar"?o.jsx(op,{decofile:d}):b==="campaigns"?o.jsx(ap,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C,onOpenUse:h=>{E(R=>({blockKey:h.blockKey,focus:h.focus??{},seq:(R?.seq??0)+1})),h.blockKind==="page"&&h.path!==void 0?(j("pages"),Y({collection:"pages",key:h.blockKey,path:h.path})):(j("sections"),Y({collection:"sections",key:h.blockKey}))}}):b==="post-schedule"?o.jsx(ip,{decofile:d,isCreating:X.isPending,onCreate:h=>{Tt(h)},onReschedule:(h,R)=>{dt(h,R)},onSelect:h=>{j("posts"),Q("posts"),w({collection:"posts",key:h}),B(null)}}):b==="site"?Be?o.jsx(Bo,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:Be.key,block:d[Be.key],decofile:d,meta:C,title:"Site",excludeFields:["seo"],schemaPending:re(Be.resolveType,["seo"]),previewBaseUrl:n},`site:${Be.key}`):o.jsx(ft,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):b==="settings"?o.jsx(Ju,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C}):b==="context"?o.jsx(ep,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C}):b==="seo"?o.jsx(np,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C,target:{kind:"site"},previewBaseUrl:a}):b==="sections"?o.jsx(Hu,{selection:y?.collection==="sections"||y?.collection==="available-section"?y:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:C,decofile:d,isCreating:X.isPending,onCreateAvailable:it,onSaveReferencedBlock:_t}):b==="posts"?o.jsx(bu,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,view:K,selectedKey:y?.collection==="posts"?y.key:null,onViewChange:h=>{U(h),w(null)},onClose:()=>w(null),onOpen:h=>{w({collection:"posts",key:h}),B(null)},move:le,meta:C,renderDetail:(h,R)=>o.jsx(Qu,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:h,block:d[h],decofile:d,meta:C,previewBaseUrl:a,move:le,onClose:R?.onClose,expanded:R?.expanded,onToggleExpand:R?.onToggleExpand},`post:${ls(h)}`)}):y&&y.collection!=="available-section"?y.collection==="apps"?o.jsx(Bo,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:y.key,block:d[y.key],decofile:d,meta:C,previewBaseUrl:n,schemaPending:re(typeof d[y.key]?.__resolveType=="string"?String(d[y.key].__resolveType):void 0)},`app:${y.key}`):y.collection==="categories"?o.jsx(tp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:y.key,block:d[y.key],decofile:d,meta:C,onManagePosts:()=>Et(),onOpenPost:h=>{j("posts"),Q("posts"),w({collection:"posts",key:h}),B(null)},previewBaseUrl:a},`category:${y.key}`):y.collection==="authors"?o.jsx(Zu,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:y.key,block:d[y.key],meta:C,decofile:d},`authors:${y.key}`):y.collection==="redirects"?o.jsx(rp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:y.key,block:d[y.key]},`redirect:${y.key}`):o.jsx(hi,{value:_,children:o.jsx(sp,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:y.collection==="pages"?y.path:"/",activePageBlockKey:y.collection==="pages"?y.key:null,activeGlobalBlockKey:y.collection==="sections"?y.key:null,initialEditSeo:y.collection==="pages"&&T===y.key,onExitSeo:()=>B(null),focusVariant:S?.blockKey===y.key?{...S.focus,seq:S.seq}:null,onSelectRoot:()=>{w(null),B(null)}},y.collection==="pages"?`page:${y.key}`:`section:${y.key}`)}):o.jsx(ft,{title:`Select ${yt(b)?`a ${rs[b]}`:b==="pages"?"a page":b==="apps"?"an app":b==="redirects"?"a redirect":"a section"} to edit`,description:b==="apps"?"Browse all apps and select an installed one to edit its settings.":'Pick an item from the list, or click "+" to create one.'})})}),Z&&o.jsx(rc,{open:!!Z,mode:Z.mode,initialName:Z.initialName,initialPath:Z.initialPath,isPending:X.isPending,error:se,templates:Oe,validate:ts,onSubmit:at,onOpenChange:h=>{h||(q(null),A(void 0))}}),o.jsx(cc,{open:W,isPending:X.isPending,error:be,onSubmit:At,onOpenChange:h=>{h||(ie(!1),Te(void 0))}}),je&&o.jsx(dc,{open:!!je,blockKey:je,initialName:he.find(h=>h.key===je)?.name??je,isPending:X.isPending,onSubmit:lt,onOpenChange:h=>{h||De(null)}}),Ae&&o.jsx($r,{open:!!Ae,onOpenChange:h=>{h||ye(null)},pageKey:Ae,decofile:d,onSave:h=>X.mutateAsync({blockKey:Ae,data:h})}),o.jsx(Zi,{open:!!ke,onOpenChange:h=>{!h&&!Ge&&Ne(null)},children:o.jsxs(er,{children:[o.jsxs(tr,{children:[o.jsx(sr,{children:c("sandbox.contentBrowser.deleteDialog.title",{noun:mt})}),o.jsx(nr,{children:ke?.kind==="section"?c("sandbox.contentBrowser.deleteDialog.descriptionSection",{label:ke.label}):ke?c("sandbox.contentBrowser.deleteDialog.descriptionPermanent",{label:ke.label}):null})]}),o.jsxs(or,{children:[o.jsx(ar,{disabled:Ge,children:c("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(ir,{onClick:h=>{h.preventDefault(),pt()},disabled:Ge,className:ve(ui({variant:"destructive"})),children:Ge?o.jsxs(o.Fragment,{children:[o.jsx(vt,{className:"size-3.5"}),c("sandbox.contentBrowser.deleteDialog.deleting")]}):c("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function mp(t){const e=ce.c(60),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:l,canInstallApps:c,installingAppId:u,onInstallApp:m,blogEntries:f,decofile:g,searchQuery:d,onSearchChange:p,selection:x,onSelect:k,onCreate:j,onDuplicatePage:v,onRenamePage:b,onAddPageVariant:N,onDeletePage:_,onEditPageSeo:y,onViewPageJson:w,onDuplicateSection:S,onRenameSection:E,onDeleteSection:D,onDeleteRedirect:T,onDuplicateBlog:B,onDeleteBlog:C}=t,F=_e();let P,$,G,V,J,H;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==f||e[4]!==c||e[5]!==g||e[6]!==u||e[7]!==N||e[8]!==j||e[9]!==C||e[10]!==_||e[11]!==T||e[12]!==D||e[13]!==B||e[14]!==v||e[15]!==S||e[16]!==y||e[17]!==m||e[18]!==b||e[19]!==E||e[20]!==p||e[21]!==k||e[22]!==w||e[23]!==n||e[24]!==a||e[25]!==d||e[26]!==i||e[27]!==x||e[28]!==F){const z=d.toLowerCase(),Q=n.filter(A=>!z||A.name.toLowerCase().includes(z)||A.path.toLowerCase().includes(z)),re=a.filter(A=>!z||A.from.toLowerCase().includes(z)||A.to.toLowerCase().includes(z)),fe=i.filter(A=>!z||A.name.toLowerCase().includes(z)||A.key.toLowerCase().includes(z)||A.resolveType.toLowerCase().includes(z)),pe=r.filter(A=>!z||A.title.toLowerCase().includes(z)||A.resolveType.toLowerCase().includes(z)||(A.description?.toLowerCase().includes(z)??!1)),ae=Xu(fe),ge=l.filter(A=>!z||A.title.toLowerCase().includes(z)||A.app.toLowerCase().includes(z)||A.vendor.toLowerCase().includes(z)||A.category.toLowerCase().includes(z)),de=f.filter(A=>!z||A.label.toLowerCase().includes(z)||A.subtitle.toLowerCase().includes(z)),xe=s==="categories"&&!z?Yu(de):de.map(gp),ee=`Search ${s}…`,X=yt(s)?`Create new ${rs[s]}`:s==="redirects"?"Create new redirect":"Create new page",ne=s!=="apps"&&s!=="sections";J="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let le;e[35]===Symbol.for("react.memo_cache_sentinel")?(le=o.jsx(Rn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[35]=le):le=e[35];let Z;e[36]!==p?(Z=A=>p(A.target.value),e[36]=p,e[37]=Z):Z=e[37];let q;e[38]!==ee||e[39]!==d||e[40]!==Z?(q=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[le,o.jsx("input",{type:"text",value:d,onChange:Z,placeholder:ee,"aria-label":ee,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[38]=ee,e[39]=d,e[40]=Z,e[41]=q):q=e[41];let se;e[42]!==X||e[43]!==j||e[44]!==ne?(se=ne&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx($e,{variant:"ghost",size:"icon",onClick:j,"aria-label":X,children:o.jsx($n,{size:14})})}),o.jsx(Je,{side:"bottom",children:X})]}),e[42]=X,e[43]=j,e[44]=ne,e[45]=se):se=e[45],e[46]!==q||e[47]!==se?(H=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[q,se]}),e[46]=q,e[47]=se,e[48]=H):H=e[48],P=Qs,V="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",$="flex flex-col gap-1 p-1.5",G=s==="pages"?Q.length===0?o.jsx(ns,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):Q.map(A=>{const W=x?.collection==="pages"&&x.key===A.key,ie=oa(g,A.key);return o.jsx(We,{icon:qo,title:A.name,subtitle:A.path,active:W,variantCount:ie,onClick:()=>k({collection:"pages",key:A.key,path:A.path}),menu:o.jsx(Bs,{onDuplicate:()=>v(A),onRename:()=>b(A),onAddVariant:()=>N(A),onEditSeo:()=>y(A),onViewJson:()=>w(A),onDelete:()=>_(A)})},A.key)}):s==="sections"?fe.length===0&&pe.length===0?o.jsx(ns,{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:[ae.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Eo,{icon:Fs,label:"Saved sections"}),ae.map(A=>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:A.label}),A.sections.map(W=>{const ie=x?.collection==="sections"&&x.key===W.key;return o.jsx(We,{icon:Fs,accent:"global",title:W.name,subtitle:A.label,active:ie,onClick:()=>k({collection:"sections",key:W.key}),menu:o.jsx(Bs,{onDuplicate:()=>S(W),onRename:()=>E(W),onDelete:()=>D(W)})},W.key)})]},A.label))]}),pe.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Eo,{icon:so,label:"Available sections",className:ve(ae.length>0&&"mt-3")}),pe.map(A=>{const W=x?.collection==="available-section"&&x.resolveType===A.resolveType,ie=A.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(We,{icon:so,title:A.title,subtitle:ie??A.resolveType,active:W,onClick:()=>k({collection:"available-section",resolveType:A.resolveType,title:A.title})},A.resolveType)})]})]}):s==="apps"?ge.length===0?o.jsx(ns,{hasItems:l.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):ge.map(A=>{const W=x?.collection==="apps"&&A.blockKey!==null&&x.key===A.blockKey,ie=u===A.id;return o.jsx(We,{icon:Xo,logoUrl:A.logo,title:A.title,subtitle:A.category,active:W,trailing:A.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"}):ie?o.jsx(vt,{className:"size-3.5 shrink-0 text-muted-foreground"}):A.installable&&c?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:()=>{if(A.installed&&A.blockKey){k({collection:"apps",key:A.blockKey});return}if(!A.installable||!c){me.message(`${A.title} is not installed on this site.`);return}u===null&&m(A)}},A.id)}):s==="redirects"?re.length===0?o.jsx(ns,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):re.map(A=>o.jsx(We,{icon:zo,title:A.from||"(no source)",subtitle:`→ ${A.to||"(no target)"}`,active:x?.collection==="redirects"&&x.key===A.key,trailing:o.jsx(uc,{redirect:A}),onClick:()=>k({collection:"redirects",key:A.key}),menu:o.jsx(Bs,{onDelete:()=>T(A)})},A.key)):de.length===0?o.jsx(ns,{hasItems:f.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${yt(s)?rs[s]:"item"}.`}):xe.map(A=>{const{entry:W,depth:ie}=A,be=x?.collection===W.kind&&x.key===W.key;return o.jsx("div",{style:{paddingLeft:ie*16},children:o.jsx(We,{icon:W.kind==="posts"?Yo:W.kind==="authors"?Jo:Mo,title:W.label,invalid:W.missing.length>0,invalidReason:W.missing.length>0?F("sandbox.itemRow.missingFields",{fields:Dc(W.missing,F)}):void 0,warning:W.duplicateName,warningReason:F("sandbox.itemRow.duplicateName"),subtitle:ie>0?si(W.slug??"",de).map(fp).join(" / "):W.subtitle,active:be,onClick:()=>k({collection:W.kind,key:W.key}),menu:o.jsx(Bs,{onDuplicate:()=>B(W),onDelete:()=>C(W)})})},W.key)}),e[0]=s,e[1]=l,e[2]=r,e[3]=f,e[4]=c,e[5]=g,e[6]=u,e[7]=N,e[8]=j,e[9]=C,e[10]=_,e[11]=T,e[12]=D,e[13]=B,e[14]=v,e[15]=S,e[16]=y,e[17]=m,e[18]=b,e[19]=E,e[20]=p,e[21]=k,e[22]=w,e[23]=n,e[24]=a,e[25]=d,e[26]=i,e[27]=x,e[28]=F,e[29]=P,e[30]=$,e[31]=G,e[32]=V,e[33]=J,e[34]=H}else P=e[29],$=e[30],G=e[31],V=e[32],J=e[33],H=e[34];let K;e[49]!==$||e[50]!==G?(K=o.jsx("div",{className:$,children:G}),e[49]=$,e[50]=G,e[51]=K):K=e[51];let U;e[52]!==P||e[53]!==V||e[54]!==K?(U=o.jsx(P,{className:V,children:K}),e[52]=P,e[53]=V,e[54]=K,e[55]=U):U=e[55];let Y;return e[56]!==J||e[57]!==H||e[58]!==U?(Y=o.jsxs("div",{className:J,children:[H,U]}),e[56]=J,e[57]=H,e[58]=U,e[59]=Y):Y=e[59],Y}function fp(t){return t.slug}function gp(t){return{entry:t,depth:0}}function qm(t){const e=ce.c(25),{virtualMcpId:s}=t,n=_e(),[a,i]=L.useState(!1),r=ia(s),{connection:l}=gr(s),{activeTask:c}=Dn();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},e[0]=u):u=e[0];const m=Ro(u);if(!(io(r?.metadata)||io(c?.metadata))&&!l){let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(ro,{className:"size-7 text-foreground"})}),e[1]=d):d=e[1];let p;e[2]!==n?(p=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=p):p=e[3];let x;e[4]!==n?(x=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=x):x=e[5];let k,j;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=()=>i(!0),j=o.jsx(ro,{className:"size-4"}),e[6]=k,e[7]=j):(k=e[6],j=e[7]);let v;e[8]!==n?(v=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=v):v=e[9];let b;e[10]!==v?(b=o.jsxs($e,{onClick:k,children:[j,v]}),e[10]=v,e[11]=b):b=e[11];let N;e[12]!==p||e[13]!==x||e[14]!==b?(N=o.jsx(il,{className:"h-full",image:d,title:p,description:x,actions:b}),e[12]=p,e[13]=x,e[14]=b,e[15]=N):N=e[15];let _;e[16]!==a?(_=o.jsx(rl,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=_):_=e[17];let y;return e[18]!==_||e[19]!==N?(y=o.jsxs(o.Fragment,{children:[N,_]}),e[18]=_,e[19]=N,e[20]=y):y=e[20],y}let g;return e[21]!==m.contentPageId||e[22]!==m.contentPath||e[23]!==m.contentPathTemplate?(g=o.jsx(zi,{children:o.jsx(dp,{deepLinkPage:{pageId:m.contentPageId,path:m.contentPath,pathTemplate:m.contentPathTemplate}})}),e[21]=m.contentPageId,e[22]=m.contentPath,e[23]=m.contentPathTemplate,e[24]=g):g=e[24],g}export{fc as $,Fm as A,Vm as B,qm as C,hm as D,ft as E,Mm as F,jc as G,qc as H,$d as I,Wc as J,Um as K,Ya as L,Oa as M,Sa as N,qt as O,Gn as P,Tm as Q,zm as R,id as S,Zc as T,Em as U,Pm as V,tn as W,nd as X,ad as Y,pc as Z,mc as _,gm as a,So as a0,gc as a1,Fe as a2,hc as a3,Nm as a4,Cm as a5,_m as a6,Am as a7,km as a8,Xc as a9,vm as aA,Im as aB,Hs as aC,Jc as aa,rd as ab,cd as ac,Hn as ad,wm as ae,Ra as af,$a as ag,ze as ah,Dm as ai,Sm as aj,Us as ak,jm as al,Bm as am,us as an,_n as ao,Gs as ap,Om as aq,Rm as ar,Kc as as,Gm as at,Yu as au,ti as av,zc as aw,Ad as ax,Ea as ay,ym as az,lo as b,nn as c,Ic as d,qe as e,bm as f,kt as g,$m as h,Dc as i,Km as j,xm as k,Na as l,sn as m,Zl as n,Ye as o,Qt as p,Ua as q,cl as r,Vc as s,Ha as t,da as u,Lm as v,Ys as w,ja as x,Hm as y,La as z};
|
|
22
|
+
`),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 au({title:t,blocks:e,takenSlugs:s,now:n}){const a=t.trim();return{title:a,slug:a?Ha(a,s):Ua(""),date:n.toISOString().slice(0,10),excerpt:"",image:"",alt:"",authors:[],categories:[],sections:e,status:"in_review"}}const wo="__all__",Co={"date-desc":"sandbox.postToolbar.sortNewestFirst","date-asc":"sandbox.postToolbar.sortOldestFirst",az:"sandbox.postToolbar.sortTitleAZ",za:"sandbox.postToolbar.sortTitleZA"},iu={"date-desc":"sandbox.postToolbar.sortNewest","date-asc":"sandbox.postToolbar.sortOldest",az:"sandbox.postToolbar.sortAZ",za:"sandbox.postToolbar.sortZA"},No="status:";function _o(t){if(!t.startsWith(No))return null;const e=t.slice(No.length);return Gn.includes(e)?e:null}const Po=L.forwardRef(function(e,s){const n=ce.c(20);let a,i,r,l,c;n[0]!==e?({icon:a,active:i,value:c,className:r,...l}=e,n[0]=e,n[1]=a,n[2]=i,n[3]=r,n[4]=l,n[5]=c):(a=n[1],i=n[2],r=n[3],l=n[4],c=n[5]);const u=i?"text-foreground":"text-muted-foreground";let m;n[6]!==r||n[7]!==u?(m=ve("gap-1 px-1.5 text-xs",u,r),n[6]=r,n[7]=u,n[8]=m):m=n[8];let f;n[9]!==a?(f=o.jsx(a,{size:14,className:"shrink-0"}),n[9]=a,n[10]=f):f=n[10];let g;n[11]!==c?(g=c&&o.jsx("span",{className:"min-w-0 flex-1 truncate",children:c}),n[11]=c,n[12]=g):g=n[12];let d;n[13]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(ds,{size:12,className:"shrink-0 opacity-60"}),n[13]=d):d=n[13];let p;return n[14]!==l||n[15]!==s||n[16]!==m||n[17]!==f||n[18]!==g?(p=o.jsxs($e,{ref:s,type:"button",variant:"ghost",size:"sm",className:m,...l,children:[f,g,d]}),n[14]=l,n[15]=s,n[16]=m,n[17]=f,n[18]=g,n[19]=p):p=n[19],p});function Wn(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 ru(t){const e=ce.c(19),{value:s,onChange:n}=t,a=_e();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(Rn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[0]=i):i=e[0];let r;e[1]!==n?(r=g=>n(g.target.value),e[1]=n,e[2]=r):r=e[2];let l;e[3]!==a?(l=a("sandbox.postToolbar.searchPlaceholder"),e[3]=a,e[4]=l):l=e[4];let c;e[5]!==a?(c=a("sandbox.postToolbar.searchAriaLabel"),e[5]=a,e[6]=c):c=e[6];let u;e[7]!==r||e[8]!==l||e[9]!==c||e[10]!==s?(u=o.jsx("input",{type:"text",value:s,onChange:r,placeholder:l,"aria-label":c,className:"min-w-0 flex-1 bg-transparent py-0.5 text-sm outline-none placeholder:text-muted-foreground"}),e[7]=r,e[8]=l,e[9]=c,e[10]=s,e[11]=u):u=e[11];let m;e[12]!==n||e[13]!==a||e[14]!==s?(m=s&&o.jsx(Qa,{label:a("sandbox.postToolbar.clearSearch"),onClick:()=>n("")}),e[12]=n,e[13]=a,e[14]=s,e[15]=m):m=e[15];let f;return e[16]!==u||e[17]!==m?(f=o.jsxs("div",{className:"flex items-center gap-2 border-b px-2.5 py-1.5",children:[i,u,m]}),e[16]=u,e[17]=m,e[18]=f):f=e[18],f}function lu(t){const e=ce.c(100),{categories:s,authors:n,statusCounts:a,categoryFilter:i,authorFilter:r,statusFilter:l,sort:c,onCategoryFilterChange:u,onAuthorFilterChange:m,onStatusFilterChange:f,onSortChange:g}=t,d=_e();let p;if(e[0]!==s||e[1]!==i){let q;e[3]!==i?(q=se=>se.slug===i,e[3]=i,e[4]=q):q=e[4],p=s.find(q),e[0]=s,e[1]=i,e[2]=p}else p=e[2];const x=p;let k;if(e[5]!==r||e[6]!==n){let q;e[8]!==r?(q=se=>se.email===r,e[8]=r,e[9]=q):q=e[9],k=n.find(q),e[5]=r,e[6]=n,e[7]=k}else k=e[7];const j=k,v=!!(i||r||l);let b;e[10]!==j?.name||e[11]!==x?.name||e[12]!==l||e[13]!==d?(b=x?.name??j?.name??d(l?Ys[l]:"sandbox.postToolbar.filterLabel"),e[10]=j?.name,e[11]=x?.name,e[12]=l,e[13]=d,e[14]=b):b=e[14];const N=b,_=i?`cat:${i}`:r?`author:${r}`:l?`status:${l}`:wo;let y;e[15]!==m||e[16]!==u||e[17]!==f?(y=()=>{u(null),m(null),f(null)},e[15]=m,e[16]=u,e[17]=f,e[18]=y):y=e[18];const w=y;let S;e[19]!==w||e[20]!==m||e[21]!==u||e[22]!==f?(S=q=>{q.startsWith("cat:")?(m(null),f(null),u(q.slice(4))):q.startsWith("author:")?(u(null),f(null),m(q.slice(7))):_o(q)?(u(null),m(null),f(_o(q))):w()},e[19]=w,e[20]=m,e[21]=u,e[22]=f,e[23]=S):S=e[23];const E=S;let D;e[24]!==N||e[25]!==v?(D=o.jsx($s,{asChild:!0,children:o.jsx(Po,{icon:Ui,active:v,value:N,className:"min-w-0 shrink"})}),e[24]=N,e[25]=v,e[26]=D):D=e[26];let T;e[27]!==d?(T=d("sandbox.postToolbar.filterBy"),e[27]=d,e[28]=T):T=e[28];let B;e[29]!==T?(B=o.jsx(ss,{children:T}),e[29]=T,e[30]=B):B=e[30];let C;e[31]!==d?(C=d("sandbox.postToolbar.allPosts"),e[31]=d,e[32]=C):C=e[32];let F;e[33]!==C?(F=o.jsx(is,{value:wo,children:C}),e[33]=C,e[34]=F):F=e[34];let P;e[35]!==d?(P=d("sandbox.postToolbar.statusLabel"),e[35]=d,e[36]=P):P=e[36];let $;e[37]!==P?($=o.jsx(ss,{className:"text-muted-foreground/70",children:P}),e[37]=P,e[38]=$):$=e[38];let G;e[39]!==a||e[40]!==d?(G=Gn.map(q=>o.jsxs(is,{value:`status:${q}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:d(Ys[q])}),o.jsx(Wn,{count:a[q]??0})]},`status:${q}`)),e[39]=a,e[40]=d,e[41]=G):G=e[41];let V;e[42]!==s.length||e[43]!==d?(V=s.length>0&&o.jsx(ss,{className:"text-muted-foreground/70",children:d("sandbox.postToolbar.categoryLabel")}),e[42]=s.length,e[43]=d,e[44]=V):V=e[44];let J;e[45]!==s?(J=s.map(du),e[45]=s,e[46]=J):J=e[46];let H;e[47]!==n.length||e[48]!==d?(H=n.length>0&&o.jsx(ss,{className:"text-muted-foreground/70",children:d("sandbox.postToolbar.authorLabel")}),e[47]=n.length,e[48]=d,e[49]=H):H=e[49];let K;e[50]!==n?(K=n.map(cu),e[50]=n,e[51]=K):K=e[51];let U;e[52]!==_||e[53]!==E||e[54]!==F||e[55]!==$||e[56]!==G||e[57]!==V||e[58]!==J||e[59]!==H||e[60]!==K?(U=o.jsxs(Xn,{value:_,onValueChange:E,children:[F,$,G,V,J,H,K]}),e[52]=_,e[53]=E,e[54]=F,e[55]=$,e[56]=G,e[57]=V,e[58]=J,e[59]=H,e[60]=K,e[61]=U):U=e[61];let Y;e[62]!==U||e[63]!==B?(Y=o.jsxs(Ls,{align:"start",className:"max-h-96 w-60 overflow-y-auto",children:[B,U]}),e[62]=U,e[63]=B,e[64]=Y):Y=e[64];let z;e[65]!==Y||e[66]!==D?(z=o.jsxs(Is,{children:[D,Y]}),e[65]=Y,e[66]=D,e[67]=z):z=e[67];let Q;e[68]!==w||e[69]!==v||e[70]!==d?(Q=v&&o.jsx(Qa,{label:d("sandbox.postToolbar.clearFilter"),onClick:w}),e[68]=w,e[69]=v,e[70]=d,e[71]=Q):Q=e[71];const re=iu[c];let fe;e[72]!==d||e[73]!==re?(fe=d(re),e[72]=d,e[73]=re,e[74]=fe):fe=e[74];let pe;e[75]!==fe?(pe=o.jsx($s,{asChild:!0,children:o.jsx(Po,{icon:Gi,active:!0,value:fe})}),e[75]=fe,e[76]=pe):pe=e[76];let ae;e[77]!==d?(ae=d("sandbox.postToolbar.sortBy"),e[77]=d,e[78]=ae):ae=e[78];let ge;e[79]!==ae?(ge=o.jsx(ss,{children:ae}),e[79]=ae,e[80]=ge):ge=e[80];let de;e[81]!==g?(de=q=>g(q),e[81]=g,e[82]=de):de=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=Object.keys(Co),e[83]=xe):xe=e[83];let ee;e[84]!==d?(ee=xe.map(q=>o.jsx(is,{value:q,children:d(Co[q])},q)),e[84]=d,e[85]=ee):ee=e[85];let X;e[86]!==c||e[87]!==de||e[88]!==ee?(X=o.jsx(Xn,{value:c,onValueChange:de,children:ee}),e[86]=c,e[87]=de,e[88]=ee,e[89]=X):X=e[89];let ne;e[90]!==ge||e[91]!==X?(ne=o.jsxs(Ls,{align:"end",className:"w-44",children:[ge,X]}),e[90]=ge,e[91]=X,e[92]=ne):ne=e[92];let le;e[93]!==pe||e[94]!==ne?(le=o.jsx("div",{className:"ml-auto shrink-0",children:o.jsxs(Is,{children:[pe,ne]})}),e[93]=pe,e[94]=ne,e[95]=le):le=e[95];let Z;return e[96]!==z||e[97]!==Q||e[98]!==le?(Z=o.jsxs("div",{className:"flex min-w-0 items-center gap-1 overflow-hidden border-b px-2 py-1.5",children:[z,Q,le]}),e[96]=z,e[97]=Q,e[98]=le,e[99]=Z):Z=e[99],Z}function cu(t){return o.jsxs(is,{value:`author:${t.email}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Wn,{count:t.count})]},`author:${t.email}`)}function du(t){return o.jsxs(is,{value:`cat:${t.slug}`,children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:t.name}),o.jsx(Wn,{count:t.count})]},`cat:${t.slug}`)}function Qa(t){const e=ce.c(4),{label:s,onClick:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(En,{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 uu(t){const e=ce.c(18),{checked:s,disabled:n,onToggle:a}=t,i=_e();let r;e[0]!==a?(r=()=>a(),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==s||e[3]!==i?(l=i(s?"sandbox.postToolbar.deselectAllPosts":"sandbox.postToolbar.selectAllPosts"),e[2]=s,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s||e[6]!==n||e[7]!==r||e[8]!==l?(c=o.jsx(Xe,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center px-1.5",onClick:pu,children:o.jsx(Zs,{checked:s,disabled:n,onCheckedChange:r,"aria-label":l})})}),e[5]=s,e[6]=n,e[7]=r,e[8]=l,e[9]=c):c=e[9];let u;e[10]!==s||e[11]!==i?(u=i(s?"sandbox.postToolbar.deselectAll":"sandbox.postToolbar.selectAll"),e[10]=s,e[11]=i,e[12]=u):u=e[12];let m;e[13]!==u?(m=o.jsx(Je,{side:"bottom",children:u}),e[13]=u,e[14]=m):m=e[14];let f;return e[15]!==c||e[16]!==m?(f=o.jsxs(Qe,{children:[c,m]}),e[15]=c,e[16]=m,e[17]=f):f=e[17],f}function pu(t){return t.stopPropagation()}function mu(t){const e=ce.c(42),{count:s,allSelected:n,onToggleSelectAll:a,onArchive:i,onExit:r}=t,l=_e();let c;e[0]!==n||e[1]!==a?(c=o.jsx(uu,{checked:n,onToggle:a}),e[0]=n,e[1]=a,e[2]=c):c=e[2];let u;e[3]!==s||e[4]!==l?(u=l("sandbox.postToolbar.itemsSelected",{count:s}),e[3]=s,e[4]=l,e[5]=u):u=e[5];let m;e[6]!==u?(m=o.jsx("span",{className:"text-xs font-medium tabular-nums",children:u}),e[6]=u,e[7]=m):m=e[7];const f=s===0;let g;e[8]!==l?(g=l("sandbox.postToolbar.archiveSelectedPosts"),e[8]=l,e[9]=g):g=e[9];let d;e[10]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(li,{size:14}),e[10]=d):d=e[10];let p;e[11]!==i||e[12]!==f||e[13]!==g?(p=o.jsx(Xe,{asChild:!0,children:o.jsx($e,{type:"button",variant:"ghost",size:"icon-sm",disabled:f,onClick:i,"aria-label":g,children:d})}),e[11]=i,e[12]=f,e[13]=g,e[14]=p):p=e[14];let x;e[15]!==l?(x=l("sandbox.postToolbar.archiveSelected"),e[15]=l,e[16]=x):x=e[16];let k;e[17]!==x?(k=o.jsx(Je,{side:"bottom",children:x}),e[17]=x,e[18]=k):k=e[18];let j;e[19]!==p||e[20]!==k?(j=o.jsxs(Qe,{children:[p,k]}),e[19]=p,e[20]=k,e[21]=j):j=e[21];let v;e[22]!==l?(v=l("sandbox.postToolbar.exitSelection"),e[22]=l,e[23]=v):v=e[23];let b;e[24]===Symbol.for("react.memo_cache_sentinel")?(b=o.jsx(En,{size:14}),e[24]=b):b=e[24];let N;e[25]!==r||e[26]!==v?(N=o.jsx(Xe,{asChild:!0,children:o.jsx($e,{type:"button",variant:"ghost",size:"icon-sm",onClick:r,"aria-label":v,children:b})}),e[25]=r,e[26]=v,e[27]=N):N=e[27];let _;e[28]!==l?(_=l("sandbox.postToolbar.exitSelection"),e[28]=l,e[29]=_):_=e[29];let y;e[30]!==_?(y=o.jsx(Je,{side:"bottom",children:_}),e[30]=_,e[31]=y):y=e[31];let w;e[32]!==N||e[33]!==y?(w=o.jsxs(Qe,{children:[N,y]}),e[32]=N,e[33]=y,e[34]=w):w=e[34];let S;e[35]!==j||e[36]!==w?(S=o.jsxs("div",{className:"ml-auto flex items-center gap-0.5",children:[j,w]}),e[35]=j,e[36]=w,e[37]=S):S=e[37];let E;return e[38]!==c||e[39]!==S||e[40]!==m?(E=o.jsxs("div",{className:"flex items-center gap-0.5 border-b bg-accent/40 px-2 py-1.5",children:[c,m,S]}),e[38]=c,e[39]=S,e[40]=m,e[41]=E):E=e[41],E}const fu={draft:"outline",generating:"secondary",awaiting_review:"warning",scheduled:"secondary",published:"success",archived:"outline"},An="generating",gu=[An,...Gn.filter(t=>t!==An)],Ao=t=>t.scheduledDatetime||t.date||"",hu=(t,e)=>Ao(e).localeCompare(Ao(t)),xu=t=>t==="scheduled"||t==="published",Za="application/x-post-key";function bu(t){const e=ce.c(165),{orgSlug:s,virtualMcpId:n,branch:a,decofile:i,view:r,selectedKey:l,onViewChange:c,onOpen:u,onClose:m,move:f,meta:g,renderDetail:d}=t,p=_e();let x;e[0]!==a||e[1]!==s||e[2]!==n?(x={orgSlug:s,virtualMcpId:n,branch:a},e[0]=a,e[1]=s,e[2]=n,e[3]=x):x=e[3];const k=Js(x),j=nl().length>0,v=da(),b=Ya(),[N,_]=L.useState(null),[y,w]=L.useState(!1),[S,E]=L.useState(!1),[D,T]=L.useState(!1),[B,C]=L.useState(""),F=L.useRef(null);let P;e[4]===Symbol.for("react.memo_cache_sentinel")?(P={},e[4]=P):P=e[4];const[$,G]=L.useState(P);let V;e[5]!==$?(V=(I,oe)=>$[I]??oe,e[5]=$,e[6]=V):V=e[6];const J=V;let H;e[7]===Symbol.for("react.memo_cache_sentinel")?(H=(I,oe)=>G(Re=>({...Re,[I]:oe})),e[7]=H):H=e[7];const K=H;let U;e[8]!==u?(U=I=>{const oe=I[0];oe&&u(oe)},e[8]=u,e[9]=U):U=e[9];let Y;e[10]!==a||e[11]!==i||e[12]!==g||e[13]!==s||e[14]!==U||e[15]!==n?(Y={orgSlug:s,virtualMcpId:n,branch:a,decofile:i,meta:g,onStarted:U},e[10]=a,e[11]=i,e[12]=g,e[13]=s,e[14]=U,e[15]=n,e[16]=Y):Y=e[16];const z=Ud(Y),Q=Kc(i);let re;e[17]!==i?(re=I=>kt(i[I],"posts"),e[17]=i,e[18]=re):re=e[18];const fe=re,pe=l&&Q.some(I=>I.key===l)?l:Q[0]?.key??null;let ae;e[19]!==f||e[20]!==p?(ae=async I=>{await f.apply(I.key,"archived")&&me.success(p("sandbox.postBoard.archived"))},e[19]=f,e[20]=p,e[21]=ae):ae=e[21];const ge=ae,[de,xe]=L.useState(null),[ee,X]=L.useState(null),[ne,le]=L.useState(null),[Z,q]=L.useState("date-desc"),[se,A]=L.useState("");let W;e[22]===Symbol.for("react.memo_cache_sentinel")?(W=new Set,e[22]=W):W=e[22];const[ie,be]=L.useState(W),Te=Q.reduce(ju,{}),je=I=>{const oe=new Map;for(const Re of Q)for(const xt of I(Re))oe.set(xt,(oe.get(xt)??0)+1);return oe},De=je(Su),ke=je(ku),Ne=Ye(i,"categories").map(I=>{const{payload:oe}=I;return{slug:qe(oe.slug),name:qe(oe.name)||qe(oe.slug),count:De.get(qe(oe.slug))??0}}),Ae=Ye(i,"authors").map(I=>{const{payload:oe}=I;return{email:qe(oe.email),name:qe(oe.name)||qe(oe.email),count:ke.get(qe(oe.email))??0}}),ye=se.trim().toLowerCase();let Ee;e[23]!==de?(Ee=I=>!de||I.categorySlugs.includes(de),e[23]=de,e[24]=Ee):Ee=e[24];let Oe;e[25]!==ee?(Oe=I=>!ee||I.authorEmails.includes(ee),e[25]=ee,e[26]=Oe):Oe=e[26];let M;e[27]!==ne?(M=I=>!ne||I.status===ne,e[27]=ne,e[28]=M):M=e[28];let he;e[29]!==Z?(he=(I,oe)=>{if(Z==="az")return I.title.localeCompare(oe.title);if(Z==="za")return oe.title.localeCompare(I.title);const Re=(I.scheduledDatetime||I.date).localeCompare(oe.scheduledDatetime||oe.date);return Z==="date-asc"?Re:-Re},e[29]=Z,e[30]=he):he=e[30];const we=Q.filter(Ee).filter(Oe).filter(M).filter(I=>!ye||I.title.toLowerCase().includes(ye)||I.slug.toLowerCase().includes(ye)).sort(he),Be=ie.size>0;let Ue;e[31]===Symbol.for("react.memo_cache_sentinel")?(Ue=I=>be(oe=>{const Re=new Set(oe);return Re.delete(I)||Re.add(I),Re}),e[31]=Ue):Ue=e[31];const gs=Ue,rn=()=>be(I=>we.every(oe=>I.has(oe.key))?new Set:new Set(we.map(vu)));let gt;e[32]!==f||e[33]!==ie||e[34]!==p?(gt=async()=>{let I=0;for(const oe of ie)await f.apply(oe,"archived")&&(I=I+1);be(new Set),I>0&&me.success(p("sandbox.postBoard.archived"))},e[32]=f,e[33]=ie,e[34]=p,e[35]=gt):gt=e[35];const Zt=gt;let wt;e[36]!==f?(wt=(I,oe)=>{_(null),f.apply(oe,I)},e[36]=f,e[37]=wt):wt=e[37];const ln=wt;let ht;e[38]!==u||e[39]!==k?(ht=()=>{const I=Vs(Nn()),oe=Aa({title:"",now:new Date});k.mutate({blockKey:I,data:St(I,oe)}),u(I)},e[38]=u,e[39]=k,e[40]=ht):ht=e[40];const Ct=ht,cn=()=>{const I=Hd(B),oe=ou(I.sections,Hn(g,{hideDefaults:b}));if(oe.length===0&&!I.title.trim()){me.error(p("sandbox.postBoard.importEmpty"));return}const Re=Vs(Nn()),xt=au({title:I.title,blocks:oe,takenSlugs:Q.map(yu).filter(Boolean),now:new Date});k.mutate({blockKey:Re,data:St(Re,xt)}),T(!1),C(""),me.success(p("sandbox.postBoard.imported")),u(Re)},es=r==="list";let nt;e[41]!==c?(nt=()=>c("list"),e[41]=c,e[42]=nt):nt=e[42];let Nt;e[43]===Symbol.for("react.memo_cache_sentinel")?(Nt=o.jsx(Qi,{size:14}),e[43]=Nt):Nt=e[43];let ot;e[44]!==p?(ot=p("sandbox.postBoard.viewList"),e[44]=p,e[45]=ot):ot=e[45];let at;e[46]!==es||e[47]!==nt||e[48]!==ot?(at=o.jsx(To,{active:es,onClick:nt,icon:Nt,label:ot}),e[46]=es,e[47]=nt,e[48]=ot,e[49]=at):at=e[49];const ts=r==="board";let it;e[50]!==c?(it=()=>c("board"),e[50]=c,e[51]=it):it=e[51];let _t;e[52]===Symbol.for("react.memo_cache_sentinel")?(_t=o.jsx(Hi,{size:14}),e[52]=_t):_t=e[52];let rt;e[53]!==p?(rt=p("sandbox.postBoard.viewBoard"),e[53]=p,e[54]=rt):rt=e[54];let lt;e[55]!==ts||e[56]!==it||e[57]!==rt?(lt=o.jsx(To,{active:ts,onClick:it,icon:_t,label:rt}),e[55]=ts,e[56]=it,e[57]=rt,e[58]=lt):lt=e[58];let Pt;e[59]!==at||e[60]!==lt?(Pt=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:[at,lt]})}),e[59]=at,e[60]=lt,e[61]=Pt):Pt=e[61];let At;e[62]===Symbol.for("react.memo_cache_sentinel")?(At=o.jsx($n,{size:14}),e[62]=At):At=e[62];let ct;e[63]!==p?(ct=p("sandbox.postBoard.newPost"),e[63]=p,e[64]=ct):ct=e[64];let Tt;e[65]===Symbol.for("react.memo_cache_sentinel")?(Tt=o.jsx(ds,{size:14}),e[65]=Tt):Tt=e[65];let dt;e[66]!==ct?(dt=o.jsx($s,{asChild:!0,children:o.jsxs($e,{type:"button",size:"sm",children:[At,ct,Tt]})}),e[66]=ct,e[67]=dt):dt=e[67];let ut;e[68]!==v||e[69]!==p?(ut=v&&o.jsxs(et,{onClick:()=>E(!0),children:[o.jsx(zs,{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]=v,e[69]=p,e[70]=ut):ut=e[70];let Et;e[71]===Symbol.for("react.memo_cache_sentinel")?(Et=o.jsx(Ji,{size:14}),e[71]=Et):Et=e[71];let pt;e[72]!==p?(pt=p("sandbox.postBoard.newPostWrite"),e[72]=p,e[73]=pt):pt=e[73];let Ge;e[74]!==pt?(Ge=o.jsx("span",{children:pt}),e[74]=pt,e[75]=Ge):Ge=e[75];let mt;e[76]!==p?(mt=p("sandbox.postBoard.newPostWriteHint"),e[76]=p,e[77]=mt):mt=e[77];let h;e[78]!==mt?(h=o.jsx("span",{className:"text-xs text-muted-foreground",children:mt}),e[78]=mt,e[79]=h):h=e[79];let R;e[80]!==Ge||e[81]!==h?(R=o.jsxs("div",{className:"flex flex-col",children:[Ge,h]}),e[80]=Ge,e[81]=h,e[82]=R):R=e[82];let te;e[83]!==R||e[84]!==Ct?(te=o.jsxs(et,{onClick:Ct,children:[Et,R]}),e[83]=R,e[84]=Ct,e[85]=te):te=e[85];let ue,Ce;e[86]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>T(!0),Ce=o.jsx(gn,{size:14}),e[86]=ue,e[87]=Ce):(ue=e[86],Ce=e[87]);let Pe;e[88]!==p?(Pe=p("sandbox.postBoard.importContent"),e[88]=p,e[89]=Pe):Pe=e[89];let He;e[90]!==Pe?(He=o.jsx("span",{children:Pe}),e[90]=Pe,e[91]=He):He=e[91];let Ze;e[92]!==p?(Ze=p("sandbox.postBoard.importContentHint"),e[92]=p,e[93]=Ze):Ze=e[93];let Bt;e[94]!==Ze?(Bt=o.jsx("span",{className:"text-xs text-muted-foreground",children:Ze}),e[94]=Ze,e[95]=Bt):Bt=e[95];let Dt;e[96]!==He||e[97]!==Bt?(Dt=o.jsxs(et,{onClick:ue,children:[Ce,o.jsxs("div",{className:"flex flex-col",children:[He,Bt]})]}),e[96]=He,e[97]=Bt,e[98]=Dt):Dt=e[98];let Ot;e[99]!==ut||e[100]!==te||e[101]!==Dt?(Ot=o.jsxs(Ls,{align:"end",className:"w-56",children:[ut,te,Dt]}),e[99]=ut,e[100]=te,e[101]=Dt,e[102]=Ot):Ot=e[102];let hs;e[103]!==dt||e[104]!==Ot?(hs=o.jsxs(Is,{children:[dt,Ot]}),e[103]=dt,e[104]=Ot,e[105]=hs):hs=e[105];let xs;e[106]!==v||e[107]!==i||e[108]!==S||e[109]!==z||e[110]!==j?(xs=v&&o.jsx(Fd,{open:S,onOpenChange:E,decofile:i,hasAi:j,onGenerate:I=>{z(I)}}),e[106]=v,e[107]=i,e[108]=S,e[109]=z,e[110]=j,e[111]=xs):xs=e[111];let Rt;e[112]!==p?(Rt=p("sandbox.postBoard.importTitle"),e[112]=p,e[113]=Rt):Rt=e[113];let $t;e[114]!==Rt?($t=o.jsx(Yt,{children:Rt}),e[114]=Rt,e[115]=$t):$t=e[115];let Lt;e[116]!==p?(Lt=p("sandbox.postBoard.importDescription"),e[116]=p,e[117]=Lt):Lt=e[117];let It;e[118]!==Lt?(It=o.jsx(Tn,{children:Lt}),e[118]=Lt,e[119]=It):It=e[119];let bs;e[120]!==$t||e[121]!==It?(bs=o.jsxs(ms,{children:[$t,It]}),e[120]=$t,e[121]=It,e[122]=bs):bs=e[122];const dn=Wa(B)?"html":"markdown";let ys;e[123]===Symbol.for("react.memo_cache_sentinel")?(ys=I=>C(I??""),e[123]=ys):ys=e[123];let Kt;e[124]!==B||e[125]!==dn?(Kt=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(ca,{code:B,language:dn,height:"100%",autoFocus:!0,onChange:ys})}),e[124]=B,e[125]=dn,e[126]=Kt):Kt=e[126];let vs;e[127]===Symbol.for("react.memo_cache_sentinel")?(vs=o.jsx("input",{ref:F,type:"file",accept:".html,.htm,.md,.markdown,.txt",className:"hidden",onChange:async I=>{const oe=I.target.files?.[0];oe&&C(await oe.text()),I.target.value=""}}),e[127]=vs):vs=e[127];let ks,Ss;e[128]===Symbol.for("react.memo_cache_sentinel")?(ks=()=>F.current?.click(),Ss=o.jsx(gn,{size:14}),e[128]=ks,e[129]=Ss):(ks=e[128],Ss=e[129]);let Ft;e[130]!==p?(Ft=p("sandbox.postBoard.importUpload"),e[130]=p,e[131]=Ft):Ft=e[131];let zt;e[132]!==Ft?(zt=o.jsxs($e,{type:"button",variant:"outline",size:"sm",onClick:ks,children:[Ss,Ft]}),e[132]=Ft,e[133]=zt):zt=e[133];let js;e[134]!==Kt||e[135]!==zt?(js=o.jsxs("div",{className:"space-y-3",children:[Kt,vs,zt]}),e[134]=Kt,e[135]=zt,e[136]=js):js=e[136];let ws;e[137]!==B?(ws=B.trim(),e[137]=B,e[138]=ws):ws=e[138];let Cs;e[139]===Symbol.for("react.memo_cache_sentinel")?(Cs=o.jsx(gn,{size:14}),e[139]=Cs):Cs=e[139];let Ns;e[140]!==p?(Ns=p("sandbox.postBoard.importRun"),e[140]=p,e[141]=Ns):Ns=e[141];let _s;e[142]!==y||e[143]!==m||e[144]!==d||e[145]!==l||e[146]!==r?(_s=r==="board"&&l&&y&&d&&o.jsx("div",{className:"absolute inset-0 z-30 flex flex-col bg-background",children:d(l,{expanded:!0,onToggleExpand:()=>w(!1),onClose:()=>{w(!1),m?.()}})}),e[142]=y,e[143]=m,e[144]=d,e[145]=l,e[146]=r,e[147]=_s):_s=e[147];const un=r==="board"&&!!l&&!y;let Mt;e[148]!==m?(Mt=I=>{I||(w(!1),m?.())},e[148]=m,e[149]=Mt):Mt=e[149];let Vt;e[150]!==p?(Vt=p("sandbox.collectionsSidebar.posts"),e[150]=p,e[151]=Vt):Vt=e[151];let Ut;e[152]!==Vt?(Ut=o.jsx(Yt,{className:"sr-only",children:Vt}),e[152]=Vt,e[153]=Ut):Ut=e[153];let Gt;e[154]!==m||e[155]!==d||e[156]!==l?(Gt=l&&d?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Sn,{size:20,className:"animate-spin text-muted-foreground"})}),children:d(l,{expanded:!1,onToggleExpand:()=>w(!0),onClose:()=>m?.()})}):null,e[154]=m,e[155]=d,e[156]=l,e[157]=Gt):Gt=e[157];let Ht;e[158]!==Ut||e[159]!==Gt?(Ht=o.jsxs(Wt,{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:[Ut,Gt]}),e[158]=Ut,e[159]=Gt,e[160]=Ht):Ht=e[160];let Ps;return e[161]!==un||e[162]!==Mt||e[163]!==Ht?(Ps=o.jsx(Xt,{open:un,onOpenChange:Mt,children:Ht}),e[161]=un,e[162]=Mt,e[163]=Ht,e[164]=Ps):Ps=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:[Pt,o.jsxs("div",{className:"flex items-center gap-2",children:[hs,xs,o.jsx(Xt,{open:D,onOpenChange:T,children:o.jsxs(Wt,{className:"max-h-[85vh] sm:max-w-2xl",children:[bs,js,o.jsx(fs,{children:o.jsxs($e,{type:"button",disabled:!ws,onClick:cn,children:[Cs,Ns]})})]})})]})]}),Q.length===0?o.jsx(sl,{className:"flex-1",icon:o.jsx(zs,{size:22}),title:p("sandbox.postBoard.emptyTitle"),description:p("sandbox.postBoard.emptyDescription"),buttonProps:{children:p("sandbox.postBoard.newPost"),onClick:Ct}}):r==="board"?o.jsx("div",{className:"flex min-h-0 flex-1 gap-3 overflow-x-auto p-4",children:gu.map(I=>{const oe=p(Ys[I]),Re=Q.filter(Le=>Le.status===I);xu(I)&&Re.sort(hu);const xt=J(I,Re.length===0);return o.jsxs(L.Fragment,{children:[o.jsx("div",{onDragOver:Le=>{Le.preventDefault(),_(I)},onDragLeave:()=>_(Le=>Le===I?null:Le),onDrop:Le=>{Le.preventDefault(),ln(I,Le.dataTransfer.getData(Za))},className:ve("flex shrink-0 flex-col rounded-xl border bg-muted/30 transition-colors",xt?"w-11":"w-72",N===I&&"border-primary bg-primary/5"),children:xt?o.jsxs("button",{type:"button",onClick:()=>K(I,!1),"aria-label":p("sandbox.postBoard.expandLane",{lane:oe}),"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(Ks,{size:14,className:"shrink-0"}),o.jsx("span",{className:"text-xs tabular-nums",children:Re.length}),o.jsx("span",{className:"[writing-mode:vertical-rl] text-sm font-medium",children:oe})]}):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:()=>K(I,!0),"aria-label":p("sandbox.postBoard.collapseLane",{lane:oe}),"aria-expanded":!0,className:"flex min-w-0 cursor-pointer items-center gap-1.5 text-left hover:text-muted-foreground",children:[o.jsx(ds,{size:14,className:"shrink-0"}),o.jsx("span",{className:"truncate",children:oe})]}),o.jsx("span",{className:"text-xs tabular-nums text-muted-foreground",children:Re.length})]}),o.jsx("div",{className:"min-h-0 flex-1 space-y-2 overflow-y-auto px-2 pb-2",children:Re.length===0?o.jsx("p",{className:"px-1 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.postBoard.laneEmpty")}):Re.map(Le=>o.jsx(Nu,{post:Le,payload:fe(Le.key),moving:f.isMoving(Le.key),onOpen:()=>u(Le.key),onArchive:Le.status==="archived"?void 0:()=>{ge(Le)}},Le.key))})]})}),I===An&&o.jsx("div",{"aria-hidden":!0,className:"my-1 w-px shrink-0 self-stretch bg-border"})]},I)})}):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(ru,{value:se,onChange:A}),Be?o.jsx(mu,{count:ie.size,allSelected:we.length>0&&we.every(I=>ie.has(I.key)),onToggleSelectAll:rn,onArchive:()=>{Zt()},onExit:()=>be(new Set)}):o.jsx(lu,{categories:Ne,authors:Ae,statusCounts:Te,categoryFilter:de,authorFilter:ee,statusFilter:ne,sort:Z,onCategoryFilterChange:xe,onAuthorFilterChange:X,onStatusFilterChange:le,onSortChange:q}),o.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:o.jsx(wu,{posts:we,selectedKey:pe,selectionActive:Be,selectedKeys:ie,onToggleSelect:gs,onOpen:u,isMoving:f.isMoving,onArchive:I=>{ge(I)}})})]}),o.jsx("div",{className:"min-w-0 flex-1 overflow-hidden",children:pe&&d?o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Sn,{size:20,className:"animate-spin text-muted-foreground"})}),children:d(pe)}):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")})})]}),_s,Ps]})}function yu(t){return t.slug}function vu(t){return t.key}function ku(t){return t.authorEmails}function Su(t){return t.categorySlugs}function ju(t,e){return t[e.status]=(t[e.status]??0)+1,t}function To(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 l;e[0]!==r?(l=ve("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]=l):l=e[1];let c;return e[2]!==a||e[3]!==i||e[4]!==n||e[5]!==l?(c=o.jsxs("button",{type:"button",onClick:n,className:l,children:[a,i]}),e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=c):c=e[6],c}function wu(t){const e=ce.c(23),{posts:s,selectedKey:n,selectionActive:a,selectedKeys:i,onToggleSelect:r,onOpen:l,isMoving:c,onArchive:u}=t,m=_e();if(s.length===0){let d;e[0]!==m?(d=m("sandbox.postList.noMatches"),e[0]=m,e[1]=d):d=e[1];let p;return e[2]!==d?(p=o.jsx("p",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:d}),e[2]=d,e[3]=p):p=e[3],p}let f;if(e[4]!==c||e[5]!==u||e[6]!==l||e[7]!==r||e[8]!==s||e[9]!==n||e[10]!==i||e[11]!==a){let d;e[13]!==c||e[14]!==u||e[15]!==l||e[16]!==r||e[17]!==n||e[18]!==i||e[19]!==a?(d=p=>o.jsx(Cu,{post:p,selected:p.key===n,selectionActive:a,checked:i.has(p.key),onToggleSelect:()=>r(p.key),moving:c(p.key),onOpen:()=>l(p.key),onArchive:p.status==="archived"?void 0:()=>u(p)},p.key),e[13]=c,e[14]=u,e[15]=l,e[16]=r,e[17]=n,e[18]=i,e[19]=a,e[20]=d):d=e[20],f=s.map(d),e[4]=c,e[5]=u,e[6]=l,e[7]=r,e[8]=s,e[9]=n,e[10]=i,e[11]=a,e[12]=f}else f=e[12];let g;return e[21]!==f?(g=o.jsx("ul",{className:"divide-y",children:f}),e[21]=f,e[22]=g):g=e[22],g}function Cu(t){const e=ce.c(60),{post:s,selected:n,selectionActive:a,checked:i,onToggleSelect:r,moving:l,onOpen:c,onArchive:u}=t,m=_e(),f=s.status==="awaiting_review"&&s.missing.length>0,g=s.status==="scheduled"||s.status==="published",d=a||i?"opacity-100":"opacity-0 focus-within:opacity-100 group-hover/row:opacity-100";let p;e[0]!==d?(p=ve("absolute left-3 top-3 z-10 transition-opacity",d),e[0]=d,e[1]=p):p=e[1];let x;e[2]!==r?(x=()=>r(),e[2]=r,e[3]=x):x=e[3];let k;e[4]!==s.title||e[5]!==m?(k=s.title||m("sandbox.postBoard.untitled"),e[4]=s.title,e[5]=m,e[6]=k):k=e[6];let j;e[7]!==i||e[8]!==x||e[9]!==k?(j=o.jsx(Zs,{checked:i,onCheckedChange:x,"aria-label":k}),e[7]=i,e[8]=x,e[9]=k,e[10]=j):j=e[10];let v;e[11]!==p||e[12]!==j?(v=o.jsx("span",{className:p,children:j}),e[11]=p,e[12]=j,e[13]=v):v=e[13];let b;e[14]!==l||e[15]!==u||e[16]!==a?(b=u&&!a&&o.jsx(ei,{onArchive:u,disabled:l,className:"top-2.5"}),e[14]=l,e[15]=u,e[16]=a,e[17]=b):b=e[17];let N;e[18]!==c||e[19]!==r||e[20]!==a?(N=()=>a?r():c(),e[18]=c,e[19]=r,e[20]=a,e[21]=N):N=e[21];const _=n?"bg-accent text-accent-foreground":"bg-card hover:bg-accent";let y;e[22]!==_?(y=ve("flex w-full cursor-pointer flex-col gap-1.5 py-2.5 pl-10 pr-3 text-left text-sm transition-colors",_),e[22]=_,e[23]=y):y=e[23];let w;e[24]!==s.title||e[25]!==m?(w=s.title||m("sandbox.postBoard.untitled"),e[24]=s.title,e[25]=m,e[26]=w):w=e[26];let S;e[27]!==w?(S=o.jsx("span",{className:"min-w-0 truncate pr-6 font-medium",children:w}),e[27]=w,e[28]=S):S=e[28];const E=fu[s.status],D=Ys[s.status];let T;e[29]!==m||e[30]!==D?(T=m(D),e[29]=m,e[30]=D,e[31]=T):T=e[31];let B;e[32]!==E||e[33]!==T?(B=o.jsx(Mn,{variant:E,className:"shrink-0",children:T}),e[32]=E,e[33]=T,e[34]=B):B=e[34];let C;e[35]!==f||e[36]!==s.missing?(C=f&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(cs,{size:12}),s.missing.length]}),e[35]=f,e[36]=s.missing,e[37]=C):C=e[37];let F;e[38]!==s.duplicateTitle||e[39]!==m?(F=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",title:m("sandbox.postBoard.duplicateTitle"),children:[o.jsx(Fn,{size:12,"aria-hidden":!0}),o.jsx("span",{className:"sr-only",children:m("sandbox.postBoard.duplicateTitle")})]}),e[38]=s.duplicateTitle,e[39]=m,e[40]=F):F=e[40];let P;e[41]!==g||e[42]!==s.date||e[43]!==s.scheduledDatetime?(P=g&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs tabular-nums text-muted-foreground",children:[o.jsx(On,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[41]=g,e[42]=s.date,e[43]=s.scheduledDatetime,e[44]=P):P=e[44];let $;e[45]!==B||e[46]!==C||e[47]!==F||e[48]!==P?($=o.jsxs("div",{className:"flex items-center gap-2",children:[B,C,F,P]}),e[45]=B,e[46]=C,e[47]=F,e[48]=P,e[49]=$):$=e[49];let G;e[50]!==n||e[51]!==y||e[52]!==S||e[53]!==$||e[54]!==N?(G=o.jsxs("button",{type:"button",onClick:N,"aria-current":n,className:y,children:[S,$]}),e[50]=n,e[51]=y,e[52]=S,e[53]=$,e[54]=N,e[55]=G):G=e[55];let V;return e[56]!==G||e[57]!==v||e[58]!==b?(V=o.jsxs("li",{className:"group/row relative",children:[v,b,G]}),e[56]=G,e[57]=v,e[58]=b,e[59]=V):V=e[59],V}function Nu(t){const e=ce.c(50),{post:s,payload:n,moving:a,onOpen:i,onArchive:r}=t,l=_e(),c=s.status!=="generating"&&!a;let u;e[0]!==n?(u=Lc(n),e[0]=n,e[1]=u):u=e[1];const m=u,f=!c&&"opacity-80";let g;e[2]!==f?(g=ve("group/card relative rounded-lg bg-card shadow-edge transition-shadow hover:shadow-lift",f),e[2]=f,e[3]=g):g=e[3];let d;e[4]!==a||e[5]!==r?(d=r&&o.jsx(ei,{onArchive:r,disabled:a,className:"top-2"}),e[4]=a,e[5]=r,e[6]=d):d=e[6];let p;e[7]!==s.key?(p=T=>T.dataTransfer.setData(Za,s.key),e[7]=s.key,e[8]=p):p=e[8];const x=c?"cursor-grab active:cursor-grabbing":"cursor-pointer";let k;e[9]!==x?(k=ve("block w-full p-3 text-left",x),e[9]=x,e[10]=k):k=e[10];let j;e[11]!==s.title||e[12]!==l?(j=s.title||l("sandbox.postBoard.untitled"),e[11]=s.title,e[12]=l,e[13]=j):j=e[13];let v;e[14]!==j?(v=o.jsx("p",{className:"line-clamp-2 pr-6 text-sm font-medium",children:j}),e[14]=j,e[15]=v):v=e[15];let b;e[16]!==m||e[17]!==s.status?(b=s.status==="draft"&&m.format?.name&&o.jsx(Mn,{variant:"outline",className:"max-w-full truncate",children:m.format.name}),e[16]=m,e[17]=s.status,e[18]=b):b=e[18];let N;e[19]!==s.status||e[20]!==l?(N=s.status==="generating"&&o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground",children:[o.jsx(Sn,{size:12,className:"animate-spin"}),l("sandbox.postBoard.generatingLabel")]}),e[19]=s.status,e[20]=l,e[21]=N):N=e[21];let _;e[22]!==s.missing||e[23]!==s.status||e[24]!==l?(_=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(cs,{size:12}),l("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(tl,{size:12}),l("sandbox.postBoard.readyToSchedule")]})),e[22]=s.missing,e[23]=s.status,e[24]=l,e[25]=_):_=e[25];let y;e[26]!==s.date||e[27]!==s.scheduledDatetime||e[28]!==s.status?(y=(s.status==="scheduled"||s.status==="published")&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[o.jsx(On,{size:12}),(s.scheduledDatetime||s.date||"").slice(0,10)]}),e[26]=s.date,e[27]=s.scheduledDatetime,e[28]=s.status,e[29]=y):y=e[29];let w;e[30]!==s.duplicateTitle||e[31]!==l?(w=s.duplicateTitle&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-warning",children:[o.jsx(Fn,{size:12,"aria-hidden":!0}),l("sandbox.postBoard.duplicateTitle")]}),e[30]=s.duplicateTitle,e[31]=l,e[32]=w):w=e[32];let S;e[33]!==b||e[34]!==N||e[35]!==_||e[36]!==y||e[37]!==w?(S=o.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[b,N,_,y,w]}),e[33]=b,e[34]=N,e[35]=_,e[36]=y,e[37]=w,e[38]=S):S=e[38];let E;e[39]!==c||e[40]!==i||e[41]!==S||e[42]!==p||e[43]!==k||e[44]!==v?(E=o.jsxs("button",{type:"button",draggable:c,onDragStart:p,onClick:i,className:k,children:[v,S]}),e[39]=c,e[40]=i,e[41]=S,e[42]=p,e[43]=k,e[44]=v,e[45]=E):E=e[45];let D;return e[46]!==E||e[47]!==g||e[48]!==d?(D=o.jsxs("div",{className:g,children:[d,E]}),e[46]=E,e[47]=g,e[48]=d,e[49]=D):D=e[49],D}function ei(t){const e=ce.c(13),{label:s,onArchive:n,disabled:a,className:i}=t,r=_e();let l;e[0]!==s||e[1]!==r?(l=s??r("sandbox.postBoard.delete"),e[0]=s,e[1]=r,e[2]=l):l=e[2];const c=l;let u;e[3]!==n?(u=d=>{d.stopPropagation(),n()},e[3]=n,e[4]=u):u=e[4];let m;e[5]!==i?(m=ve("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]=m):m=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(zn,{className:"size-3.25"}),e[7]=f):f=e[7];let g;return e[8]!==a||e[9]!==u||e[10]!==m||e[11]!==c?(g=o.jsx($e,{variant:"ghost-destructive",size:"icon-xs",type:"button",disabled:a,"aria-label":c,title:c,onClick:u,className:m,children:f}),e[8]=a,e[9]=u,e[10]=m,e[11]=c,e[12]=g):g=e[12],g}function We(t){const e=ce.c(54),{icon:s,logoUrl:n,title:a,subtitle:i,active:r,accent:l,variantCount:c,trailing:u,selectable:m,selectionActive:f,selected:g,invalid:d,invalidReason:p,warning:x,warningReason:k,onToggleSelect:j,onClick:v,menu:b}=t,N=_e(),_=l==="global";let y;e[0]!==s||e[1]!==r||e[2]!==_||e[3]!==n?(y=n?o.jsx("img",{src:n,alt:"",className:"size-8 shrink-0 rounded-lg object-cover bg-muted"}):o.jsx("span",{className:ve("flex size-8 shrink-0 items-center justify-center rounded-lg",_?"bg-global-section/15":"bg-muted"),children:o.jsx(s,{size:16,className:ve("shrink-0",!_&&(r?"text-accent-foreground":"text-muted-foreground")),style:_?{color:In}:void 0})}),e[0]=s,e[1]=r,e[2]=_,e[3]=n,e[4]=y):y=e[4];const w=y,S=r?_?"bg-global-section/15 text-global-section-fg dark:text-global-section-fg-dark":"bg-accent text-accent-foreground":_?"hover:bg-global-section/10":"hover:bg-accent";let E;e[5]!==S?(E=ve("group relative flex min-w-0 items-center rounded-md transition-colors",S),e[5]=S,e[6]=E):E=e[6];let D;e[7]!==j||e[8]!==m||e[9]!==g||e[10]!==f||e[11]!==N||e[12]!==a?(D=m&&o.jsx("span",{className:ve("flex shrink-0 items-center pl-2.5 transition-opacity",g||f?"opacity-100":"opacity-0 group-hover:opacity-100 focus-within:opacity-100"),onClick:_u,children:o.jsx(Zs,{checked:g,onCheckedChange:()=>j?.(),"aria-label":N("sandbox.itemRow.selectItem",{title:a})})}),e[7]=j,e[8]=m,e[9]=g,e[10]=f,e[11]=N,e[12]=a,e[13]=D):D=e[13];const T=d&&!r&&"text-destructive";let B;e[14]!==T?(B=ve("block truncate text-sm font-medium",T),e[14]=T,e[15]=B):B=e[15];let C;e[16]!==B||e[17]!==a?(C=o.jsx("span",{className:B,children:a}),e[16]=B,e[17]=a,e[18]=C):C=e[18];const F=r?"text-accent-foreground/70":"text-muted-foreground";let P;e[19]!==F?(P=ve("block truncate text-xs",F),e[19]=F,e[20]=P):P=e[20];let $;e[21]!==i||e[22]!==P?($=o.jsx("span",{className:P,children:i}),e[21]=i,e[22]=P,e[23]=$):$=e[23];let G;e[24]!==$||e[25]!==C?(G=o.jsxs("span",{className:"min-w-0 flex-1",children:[C,$]}),e[24]=$,e[25]=C,e[26]=G):G=e[26];let V;e[27]!==r||e[28]!==N||e[29]!==c?(V=c!==void 0&&c>1&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsxs("span",{className:ve("flex shrink-0 items-center gap-1 text-xs font-medium",r?"text-accent-foreground/70":"text-muted-foreground"),children:[o.jsx(Go,{size:14}),c]})}),o.jsx(Je,{side:"bottom",children:N("sandbox.itemRow.variantCount",{count:c})})]}),e[27]=r,e[28]=N,e[29]=c,e[30]=V):V=e[30];let J;e[31]!==x||e[32]!==k?(J=x&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx("span",{className:"flex shrink-0 items-center text-warning",children:o.jsx(cs,{size:14})})}),k&&o.jsx(Je,{side:"bottom",children:k})]}),e[31]=x,e[32]=k,e[33]=J):J=e[33];let H;e[34]!==r||e[35]!==d||e[36]!==p?(H=d&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx("span",{className:ve("flex shrink-0 items-center",r?"text-accent-foreground":"text-destructive"),children:o.jsx(cs,{size:14})})}),p&&o.jsx(Je,{side:"bottom",children:p})]}),e[34]=r,e[35]=d,e[36]=p,e[37]=H):H=e[37];let K;e[38]!==v||e[39]!==w||e[40]!==G||e[41]!==V||e[42]!==J||e[43]!==H||e[44]!==u?(K=o.jsxs("button",{type:"button",onClick:v,className:"flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-left cursor-pointer",children:[w,G,V,J,H,u]}),e[38]=v,e[39]=w,e[40]=G,e[41]=V,e[42]=J,e[43]=H,e[44]=u,e[45]=K):K=e[45];let U;e[46]!==r||e[47]!==b?(U=b&&o.jsx("div",{className:ve("pr-1 opacity-0 transition-opacity group-hover:opacity-100",r&&"opacity-100"),children:b}),e[46]=r,e[47]=b,e[48]=U):U=e[48];let Y;return e[49]!==K||e[50]!==U||e[51]!==E||e[52]!==D?(Y=o.jsxs("div",{className:E,children:[D,K,U]}),e[49]=K,e[50]=U,e[51]=E,e[52]=D,e[53]=Y):Y=e[53],Y}function _u(t){return t.stopPropagation()}function ft(t){const e=ce.c(10),{icon:s,title:n,description:a}=t;let i;e[0]!==s?(i=s&&o.jsx(s,{size:24,className:"text-muted-foreground/60"}),e[0]=s,e[1]=i):i=e[1];let r;e[2]!==n?(r=o.jsx("div",{children:n}),e[2]=n,e[3]=r):r=e[3];let l;e[4]!==a?(l=a&&o.jsx("div",{className:"text-xs text-muted-foreground/80 max-w-sm",children:a}),e[4]=a,e[5]=l):l=e[5];let c;return e[6]!==i||e[7]!==r||e[8]!==l?(c=o.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 p-6 text-center text-sm text-muted-foreground",children:[i,r,l]}),e[6]=i,e[7]=r,e[8]=l,e[9]=c):c=e[9],c}const Pu={loaders:Uo,actions:Wo},Au={loaders:"Loaders",actions:"Actions"},Tu={analytics:Wi,blog:la,commerce:Yi,site:qi,website:Fs};function Eu(t,e){return e===0?Tu[t.toLowerCase()]??to:to}function Es(t,e){return e===0?Ai(t):t}function Bu(t){const e=ce.c(98),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c}=t,u=_e();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[0]=m):m=e[0];const[f,g]=L.useState(m),[d,p]=L.useState(null),[x,k]=L.useState(""),[j,v]=L.useState(Fu),[b,N]=L.useState(c);b!==c&&(N(c),g([]),p(null),k(""),v(new Set));let _;e[1]===Symbol.for("react.memo_cache_sentinel")?(_=z=>{v(Q=>{const re=new Set(Q);return re.has(z)?re.delete(z):re.add(z),re})},e[1]=_):_=e[1];const y=_;let w;e[2]!==a||e[3]!==s||e[4]!==n?(w={orgSlug:s,virtualMcpId:n,branch:a},e[2]=a,e[3]=s,e[4]=n,e[5]=w):w=e[5];const S=Js(w);let E;e[6]!==S?(E=Ko((z,Q)=>S.mutate({blockKey:z,data:Q})),e[6]=S,e[7]=E):E=e[7];const D=E;let T;e[8]!==c?(T=Ti(c),e[8]=c,e[9]=T):T=e[9];const B=T,C=Pu[c];let F,P,$,G,V,J,H;if(e[10]!==C||e[11]!==a||e[12]!==l||e[13]!==c||e[14]!==r||e[15]!==j||e[16]!==s||e[17]!==f||e[18]!==i||e[19]!==S||e[20]!==D||e[21]!==x||e[22]!==d||e[23]!==B||e[24]!==u||e[25]!==n){$=Symbol.for("react.early_return_sentinel");e:{const z=[...Ci(r,l,c).map(Ku),...Ni(r,c).map(Iu)],Q=x.trim().toLowerCase(),re=Q.length>0,fe=re?z.filter(M=>M.title.toLowerCase().includes(Q)||M.resolveType.toLowerCase().includes(Q)):[],pe=new Map,ae=[],ge=new Map;if(!re){for(const M of z){const he=M.folderPath;if(!(he.length<f.length)&&f.every((we,Be)=>he[Be]===we))if(he.length===f.length)if(M.savedKey!==void 0){const we=ge.get(M.resolveType);we?we.push(M):ge.set(M.resolveType,[M])}else ae.push(M);else{const we=he[f.length],Be=pe.get(we)??{count:0,savedCount:0};M.savedKey!==void 0?Be.savedCount=Be.savedCount+1:Be.count=Be.count+1,pe.set(we,Be)}}ae.sort(Lu);for(const M of ge.values())M.sort($u)}const de=[...ge.entries()].filter(M=>{const[he]=M;return!ae.some(we=>we.resolveType===he)}).flatMap(Ru).sort(Ou);let xe;e[33]!==f?(xe=(M,he)=>Es(M.name,f.length).localeCompare(Es(he.name,f.length)),e[33]=f,e[34]=xe):xe=e[34];const ee=[...pe.entries()].map(Du).sort(xe);let X;e[35]===Symbol.for("react.memo_cache_sentinel")?(X=M=>{p(M.savedKey!==void 0?{mode:"saved",key:M.savedKey}:{mode:"available",resolveType:M.resolveType,title:M.title})},e[35]=X):X=e[35];const ne=X;let le;e[36]!==S||e[37]!==B||e[38]!==u?(le=async(M,he)=>{await S.mutateAsync({blockKey:M,data:he}),me.success(u("sandbox.runnableBlocksBrowser.savedBlockToast",{singular:B,blockId:M})),p({mode:"saved",key:M})},e[36]=S,e[37]=B,e[38]=u,e[39]=le):le=e[39];const Z=le;let q;e[40]!==l||e[41]!==d?(q=zu(d,l),e[40]=l,e[41]=d,e[42]=q):q=e[42];const se=q;if(se){const M=`${se.mode}:${se.mode==="saved"?se.blockKey:se.resolveType}`;let he;e[43]===Symbol.for("react.memo_cache_sentinel")?(he=()=>p(null),e[43]=he):he=e[43];let we;e[44]!==a||e[45]!==l||e[46]!==Z||e[47]!==c||e[48]!==r||e[49]!==s||e[50]!==i||e[51]!==S.isPending||e[52]!==D||e[53]!==M||e[54]!==se.editorTarget||e[55]!==se.initialValue||e[56]!==n?(we=o.jsx(_i,{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,kind:c,target:se.editorTarget,initialValue:se.initialValue,isCreating:S.isPending,onCreate:Z,onSaveReferencedBlock:D,onBack:he},M),e[44]=a,e[45]=l,e[46]=Z,e[47]=c,e[48]=r,e[49]=s,e[50]=i,e[51]=S.isPending,e[52]=D,e[53]=M,e[54]=se.editorTarget,e[55]=se.initialValue,e[56]=n,e[57]=we):we=e[57],$=we;break e}H="flex h-full w-full min-w-0 flex-col";let A;e[58]!==u?(A=u("sandbox.runnableBlocksBrowser.folderBreadcrumb"),e[58]=u,e[59]=A):A=e[59];let W;e[60]===Symbol.for("react.memo_cache_sentinel")?(W=()=>g([]),e[60]=W):W=e[60];const ie=f.length===0?"font-medium text-foreground":"text-muted-foreground";let be;e[61]!==ie?(be=ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",ie),e[61]=ie,e[62]=be):be=e[62];const Te=Au[c];let je;e[63]!==be||e[64]!==Te?(je=o.jsx("button",{type:"button",onClick:W,className:be,children:Te}),e[63]=be,e[64]=Te,e[65]=je):je=e[65];let De;e[66]!==f?(De=f.map((M,he)=>{const we=he===f.length-1;return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[o.jsx(Ks,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>g(f.slice(0,he+1)),className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 transition-colors hover:bg-accent hover:text-accent-foreground",we?"font-medium text-foreground":"text-muted-foreground"),children:Es(M,he)})]},`${M}-${he}`)}),e[66]=f,e[67]=De):De=e[67];let ke;e[68]!==A||e[69]!==je||e[70]!==De?(ke=o.jsxs("nav",{"aria-label":A,className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:[je,De]}),e[68]=A,e[69]=je,e[70]=De,e[71]=ke):ke=e[71];let Ne;e[72]===Symbol.for("react.memo_cache_sentinel")?(Ne=o.jsx(Rn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[72]=Ne):Ne=e[72];let Ae;e[73]===Symbol.for("react.memo_cache_sentinel")?(Ae=M=>k(M.target.value),e[73]=Ae):Ae=e[73];let ye;e[74]!==c||e[75]!==u?(ye=u("sandbox.runnableBlocksBrowser.searchPlaceholder",{kind:c}),e[74]=c,e[75]=u,e[76]=ye):ye=e[76];let Ee;e[77]!==c||e[78]!==u?(Ee=u("sandbox.runnableBlocksBrowser.searchAriaLabel",{kind:c}),e[77]=c,e[78]=u,e[79]=Ee):Ee=e[79];let Oe;e[80]!==x||e[81]!==ye||e[82]!==Ee?(Oe=o.jsxs("div",{className:"flex w-56 shrink-0 items-center gap-2",children:[Ne,o.jsx("input",{type:"text",value:x,onChange:Ae,placeholder:ye,"aria-label":Ee,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[80]=x,e[81]=ye,e[82]=Ee,e[83]=Oe):Oe=e[83],e[84]!==ke||e[85]!==Oe?(P=o.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-2 border-b px-4",children:[ke,Oe]}),e[84]=ke,e[85]=Oe,e[86]=P):P=e[86],F=Qs,J="min-h-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",G="mx-auto w-full max-w-4xl px-6 py-5",V=re?fe.length===0?o.jsx(ft,{title:u("sandbox.runnableBlocksBrowser.noSearchResults",{kind:c,query:x.trim()}),description:u("sandbox.runnableBlocksBrowser.noSearchResultsDescription")}):o.jsx("div",{className:"flex flex-col gap-1",children:fe.map(M=>o.jsx(We,{icon:C,accent:M.savedKey!==void 0?"global":void 0,title:M.title,subtitle:M.resolveType,active:!1,onClick:()=>ne(M)},M.savedKey??M.resolveType))}):ee.length===0&&ae.length===0&&de.length===0?o.jsx(ft,{title:u("sandbox.runnableBlocksBrowser.emptyFolderTitle",{kind:c}),description:f.length===0?u("sandbox.runnableBlocksBrowser.emptyFolderNoManifest"):u("sandbox.runnableBlocksBrowser.emptyFolder")}):o.jsxs(o.Fragment,{children:[ee.length>0&&o.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-2",children:ee.map(M=>{const he=Eu(M.name,f.length);return o.jsxs("button",{type:"button",onClick:()=>g([...f,M.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(he,{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:Es(M.name,f.length)}),o.jsxs("span",{className:"block truncate text-xs text-muted-foreground",children:[M.count," ",M.count===1?B:c,M.savedCount>0&&o.jsxs(o.Fragment,{children:[" ","·"," ",u("sandbox.runnableBlocksBrowser.savedCountLabel",{count:M.savedCount})]})]})]})]},M.name)})}),(ae.length>0||de.length>0)&&o.jsxs("div",{className:ve("flex flex-col gap-1",ee.length>0&&"mt-4"),children:[ae.map(M=>{const he=ge.get(M.resolveType)??[],we=j.has(M.resolveType);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx(We,{icon:C,title:M.title,subtitle:M.resolveType,active:!1,onClick:()=>ne(M)}),he.length>0&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{type:"button",onClick:()=>y(M.resolveType),"aria-expanded":we,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:In},children:[we?o.jsx(ds,{size:12,className:"shrink-0"}):o.jsx(Ks,{size:12,className:"shrink-0"}),u(we?"sandbox.runnableBlocksBrowser.hideSaved":"sandbox.runnableBlocksBrowser.seeSaved")," ","(",he.length,")"]}),we&&o.jsx("div",{className:"ml-11 flex flex-col gap-1 pb-1",children:he.map(Be=>o.jsx(We,{icon:C,accent:"global",title:Be.title,subtitle:Be.resolveType,active:!1,onClick:()=>ne(Be)},Be.savedKey))})]})]},M.resolveType)}),de.map(M=>o.jsx(We,{icon:C,accent:"global",title:M.title,subtitle:M.resolveType,active:!1,onClick:()=>ne(M)},M.savedKey))]})]})}e[10]=C,e[11]=a,e[12]=l,e[13]=c,e[14]=r,e[15]=j,e[16]=s,e[17]=f,e[18]=i,e[19]=S,e[20]=D,e[21]=x,e[22]=d,e[23]=B,e[24]=u,e[25]=n,e[26]=F,e[27]=P,e[28]=$,e[29]=G,e[30]=V,e[31]=J,e[32]=H}else F=e[26],P=e[27],$=e[28],G=e[29],V=e[30],J=e[31],H=e[32];if($!==Symbol.for("react.early_return_sentinel"))return $;let K;e[87]!==G||e[88]!==V?(K=o.jsx("div",{className:G,children:V}),e[87]=G,e[88]=V,e[89]=K):K=e[89];let U;e[90]!==F||e[91]!==K||e[92]!==J?(U=o.jsx(F,{className:J,children:K}),e[90]=F,e[91]=K,e[92]=J,e[93]=U):U=e[93];let Y;return e[94]!==P||e[95]!==U||e[96]!==H?(Y=o.jsxs("div",{className:H,children:[P,U]}),e[94]=P,e[95]=U,e[96]=H,e[97]=Y):Y=e[97],Y}function Du(t){const[e,s]=t;return{name:e,...s}}function Ou(t,e){return t.title.localeCompare(e.title)}function Ru(t){const[,e]=t;return e}function $u(t,e){return t.title.localeCompare(e.title)}function Lu(t,e){return t.title.localeCompare(e.title)}function Iu(t){return{resolveType:t.resolveType,title:t.title,folderPath:Io(t.resolveType)}}function Ku(t){return{resolveType:t.resolveType,title:t.title,folderPath:Io(t.resolveType),savedKey:t.key}}function Fu(){return new Set}function zu(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}=Pi(e,t.key);return{mode:"saved",blockKey:t.key,resolveType:s,editorTarget:{mode:"saved",blockKey:t.key,resolveType:s,title:a},initialValue:n}}function Mu(t){const e=ce.c(106),{orgSlug:s,virtualMcpId:n,branch:a,previewUrl:i,meta:r,decofile:l,resolveType:c,title:u,defaultBlockId:m,isCreating:f,onCreate:g,onSaveReferencedBlock:d}=t,p=_e(),x=Xs(),k=x?.virtualMcpId,v=ra(k===n?n:null)?.metadata?.siteSlug??null;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={},e[0]=b):b=e[0];const[N,_]=L.useState(b);let y;e[1]===Symbol.for("react.memo_cache_sentinel")?(y=[],e[1]=y):y=e[1];const[w,S]=L.useState(y),[E,D]=L.useState(0),[T,B]=L.useState(!1);let C;e[2]!==r||e[3]!==c?(C=Ln(c,r),e[2]=r,e[3]=c,e[4]=C):C=e[4];const F=C;let P,$,G,V,J,H,K,U;if(e[5]!==v||e[6]!==a||e[7]!==l||e[8]!==w||e[9]!==N||e[10]!==f||e[11]!==g||e[12]!==s||e[13]!==i||e[14]!==c||e[15]!==p||e[16]!==x?.taskId||e[17]!==u||e[18]!==n){const ae=c.split("/").pop()?.replace(/\.tsx?$/,"")??c,ge=x?.taskId??null,de=i??void 0;let xe;e[27]!==v||e[28]!==a||e[29]!==s||e[30]!==de||e[31]!==ge||e[32]!==n?(xe={orgSlug:s,virtualMcpId:n,branch:a,threadId:ge,previewUrl:de,siteSlug:v},e[27]=v,e[28]=a,e[29]=s,e[30]=de,e[31]=ge,e[32]=n,e[33]=xe):xe=e[33],$=xe;let ee,X,ne,le;if(e[34]!==l||e[35]!==w||e[36]!==N||e[37]!==g||e[38]!==p||e[39]!==u){const je=[u,...w],De=Ne=>{S(w.slice(0,Ne)),D(Vu)};let ke;e[48]!==l||e[49]!==N||e[50]!==g?(ke=async Ne=>{const Ae=Bi(Ne,l);if(Ae){me.error(Ae);return}await g(Ne,N),B(!1)},e[48]=l,e[49]=N,e[50]=g,e[51]=ke):ke=e[51],P=ke,U="flex h-full w-full min-w-0",K="flex min-w-0 flex-1 flex-col",J="shrink-0 border-b px-3 py-2.5",le="flex min-w-0 items-center gap-2 overflow-hidden",e[52]!==p?(ee=p("sandbox.availableSectionEditor.editingBreadcrumb"),e[52]=p,e[53]=ee):ee=e[53],X="flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",ne=je.map((Ne,Ae)=>{const ye=Ae===je.length-1,Ee=Ei(Ne);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[Ae>0&&o.jsx(Ks,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>De(Ae),title:Ee,className:ve("min-w-0 truncate rounded-lg px-1 py-0.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground",ye?"font-medium text-foreground":"text-muted-foreground"),children:Ee})]},`${Ee}-${Ae}`)}),e[34]=l,e[35]=w,e[36]=N,e[37]=g,e[38]=p,e[39]=u,e[40]=P,e[41]=ee,e[42]=X,e[43]=ne,e[44]=le,e[45]=J,e[46]=K,e[47]=U}else P=e[40],ee=e[41],X=e[42],ne=e[43],le=e[44],J=e[45],K=e[46],U=e[47];let Z;e[54]!==ee||e[55]!==X||e[56]!==ne?(Z=o.jsx("nav",{"aria-label":ee,className:X,children:ne}),e[54]=ee,e[55]=X,e[56]=ne,e[57]=Z):Z=e[57];let q;e[58]===Symbol.for("react.memo_cache_sentinel")?(q=()=>B(!0),e[58]=q):q=e[58];let se;e[59]!==p?(se=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[59]=p,e[60]=se):se=e[60];let A;e[61]===Symbol.for("react.memo_cache_sentinel")?(A=o.jsx(Xi,{size:14}),e[61]=A):A=e[61];let W;e[62]!==f||e[63]!==se?(W=o.jsx(Xe,{asChild:!0,children:o.jsx($e,{size:"icon",className:"shrink-0",disabled:f,onClick:q,"aria-label":se,children:A})}),e[62]=f,e[63]=se,e[64]=W):W=e[64];let ie;e[65]!==p?(ie=p("sandbox.availableSectionEditor.saveAsGlobalSection"),e[65]=p,e[66]=ie):ie=e[66];let be;e[67]!==ie?(be=o.jsx(Je,{side:"bottom",children:ie}),e[67]=ie,e[68]=be):be=e[68];let Te;e[69]!==W||e[70]!==be?(Te=o.jsxs(Qe,{children:[W,be]}),e[69]=W,e[70]=be,e[71]=Te):Te=e[71],e[72]!==le||e[73]!==Z||e[74]!==Te?(H=o.jsxs("div",{className:le,children:[Z,Te]}),e[72]=le,e[73]=Z,e[74]=Te,e[75]=H):H=e[75],G="mt-1.5 py-1 pl-1 text-sm leading-snug text-muted-foreground",V=p("sandbox.availableSectionEditor.localEditsHint",{typeLabel:ae}),e[5]=v,e[6]=a,e[7]=l,e[8]=w,e[9]=N,e[10]=f,e[11]=g,e[12]=s,e[13]=i,e[14]=c,e[15]=p,e[16]=x?.taskId,e[17]=u,e[18]=n,e[19]=P,e[20]=$,e[21]=G,e[22]=V,e[23]=J,e[24]=H,e[25]=K,e[26]=U}else P=e[19],$=e[20],G=e[21],V=e[22],J=e[23],H=e[24],K=e[25],U=e[26];let Y;e[76]!==G||e[77]!==V?(Y=o.jsx("p",{className:G,children:V}),e[76]=G,e[77]=V,e[78]=Y):Y=e[78];let z;e[79]!==Y||e[80]!==J||e[81]!==H?(z=o.jsxs("div",{className:J,children:[H,Y]}),e[79]=Y,e[80]=J,e[81]=H,e[82]=z):z=e[82];let Q;e[83]!==l||e[84]!==w||e[85]!==E||e[86]!==N||e[87]!==r||e[88]!==d||e[89]!==$||e[90]!==F||e[91]!==p?(Q=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:F?o.jsx(Fo,{schema:F,value:N,onChange:ae=>_(ae),basePath:"",breadcrumbPath:w,onBreadcrumbChange:S,meta:r,decofile:l,onSaveReferencedBlock:d,sandbox:$},E):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:p("sandbox.availableSectionEditor.noEditableFields")})})})}),e[83]=l,e[84]=w,e[85]=E,e[86]=N,e[87]=r,e[88]=d,e[89]=$,e[90]=F,e[91]=p,e[92]=Q):Q=e[92];let re;e[93]!==z||e[94]!==Q||e[95]!==K?(re=o.jsxs("div",{className:K,children:[z,Q]}),e[93]=z,e[94]=Q,e[95]=K,e[96]=re):re=e[96];let fe;e[97]!==m||e[98]!==P||e[99]!==f||e[100]!==T?(fe=o.jsx(Di,{open:T,onOpenChange:B,defaultBlockId:m,isPending:f,onSubmit:P}),e[97]=m,e[98]=P,e[99]=f,e[100]=T,e[101]=fe):fe=e[101];let pe;return e[102]!==re||e[103]!==fe||e[104]!==U?(pe=o.jsxs("div",{className:U,children:[re,fe]}),e[102]=re,e[103]=fe,e[104]=U,e[105]=pe):pe=e[105],pe}function Vu(t){return t+1}function Uu(t,e,s){const n={__resolveType:t},a=Cr([n],e)[0];return a?$i(n,a,e,s):null}function Gu({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:a,decofile:i,blockKey:r,onSaveReferencedBlock:l}){const c=_e(),u=Xs(),m=u?.virtualMcpId,g=ra(m===e?e:null)?.metadata?.siteSlug??null,[d]=L.useState(()=>Uu(r,i,Qr(a))),[p,x]=L.useState(d?.data??{}),[k,j]=L.useState([]),[v,b]=L.useState(0),[N,_]=L.useState(!1),[y,w]=L.useState(null),S=y!==null,{save:E,flush:D}=Oi({orgSlug:t,virtualMcpId:e,branch:s}),T=d?.resolveType?Ln(d.resolveType,a):null,B=i[r],C=B?wr(r,B):r,F=u?.taskId??null,P={orgSlug:t,virtualMcpId:e,branch:s,threadId:F,previewUrl:n??void 0,siteSlug:g},$=K=>{x(K),E(r,K)},G=()=>{S?(w(null),_(!1),b(K=>K+1)):w(JSON.stringify(p,null,2))},V=K=>{const U=K??"";try{const Y=JSON.parse(U);if(Y&&typeof Y=="object"&&!Array.isArray(Y)){_(!1),$(Y);return}_(!0)}catch{_(!0)}},J=[C,...k],H=K=>{j(k.slice(0,K)),b(U=>U+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(Ri,{crumbs:J,onSelect:H}),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:In},"aria-hidden":!0}),o.jsx("div",{className:"flex-1"}),o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx($e,{variant:S?"default":"ghost",size:"icon",className:"shrink-0",onClick:G,"aria-label":c(S?"sandbox.savedSectionEditor.closeJsonEditor":"sandbox.savedSectionEditor.editAsJson"),"aria-pressed":S,children:S?o.jsx(En,{size:14}):o.jsx(Ho,{size:14})})}),o.jsx(Je,{side:"bottom",children:c(S?"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:c("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:T?o.jsx(Fo,{schema:T,value:p,onChange:K=>$(K),basePath:"",breadcrumbPath:k,onBreadcrumbChange:j,meta:a,decofile:i,onSaveReferencedBlock:l,sandbox:P},v):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sandbox.savedSectionEditor.noEditableFields")})})})}),y!==null&&o.jsxs("div",{className:"absolute inset-0 flex flex-col bg-background",children:[N&&o.jsx("div",{className:"shrink-0 border-b bg-destructive/10 px-3 py-1.5 text-xs text-destructive",children:c("sandbox.savedSectionEditor.invalidJsonError")}),o.jsx("div",{className:"min-h-0 flex-1",children:o.jsx(ca,{language:"json",height:"100%",code:y,onChange:V,onSave:K=>{V(K),D()}})})]})]})]})})}function Hu(t){const e=ce.c(36),{selection:s,orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,isCreating:u,onCreateAvailable:m,onSaveReferencedBlock:f}=t,g=_e();if(!s){let x;e[0]!==g?(x=g("sandbox.sectionsRightPane.selectSectionTitle"),e[0]=g,e[1]=x):x=e[1];let k;e[2]!==g?(k=g("sandbox.sectionsRightPane.selectSectionDescription"),e[2]=g,e[3]=k):k=e[3];let j;return e[4]!==x||e[5]!==k?(j=o.jsx(ft,{title:x,description:k}),e[4]=x,e[5]=k,e[6]=j):j=e[6],j}if(s.collection==="available-section"){const x=`available:${s.resolveType}`,k=s.resolveType,j=s.title;let v;e[7]!==s.title?(v=Li(s.title),e[7]=s.title,e[8]=v):v=e[8];let b;e[9]!==m||e[10]!==s.resolveType?(b=(_,y)=>m(s.resolveType,_,y),e[9]=m,e[10]=s.resolveType,e[11]=b):b=e[11];let N;return e[12]!==i||e[13]!==c||e[14]!==u||e[15]!==l||e[16]!==f||e[17]!==n||e[18]!==r||e[19]!==s.resolveType||e[20]!==s.title||e[21]!==x||e[22]!==v||e[23]!==b||e[24]!==a?(N=o.jsx(Mu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,resolveType:k,title:j,defaultBlockId:v,isCreating:u,onCreate:b,onSaveReferencedBlock:f},x),e[12]=i,e[13]=c,e[14]=u,e[15]=l,e[16]=f,e[17]=n,e[18]=r,e[19]=s.resolveType,e[20]=s.title,e[21]=x,e[22]=v,e[23]=b,e[24]=a,e[25]=N):N=e[25],N}const d=`saved:${s.key}`;let p;return e[26]!==i||e[27]!==c||e[28]!==l||e[29]!==f||e[30]!==n||e[31]!==r||e[32]!==s.key||e[33]!==d||e[34]!==a?(p=o.jsx(Gu,{orgSlug:n,virtualMcpId:a,branch:i,previewUrl:r,meta:l,decofile:c,blockKey:s.key,onSaveReferencedBlock:f},d),e[26]=i,e[27]=c,e[28]=l,e[29]=f,e[30]=n,e[31]=r,e[32]=s.key,e[33]=d,e[34]=a,e[35]=p):p=e[35],p}function Bs(t){const e=ce.c(34),{onDuplicate:s,onRename:n,onAddVariant:a,onEditSeo:i,onViewJson:r,onDelete:l}=t,c=_e();let u;e[0]!==c?(u=c("sandbox.itemActions.moreActions"),e[0]=c,e[1]=u):u=e[1];let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ci,{size:14}),e[2]=m):m=e[2];let f;e[3]!==u?(f=o.jsx($s,{asChild:!0,children:o.jsx("button",{type:"button","aria-label":u,className:"flex h-7 w-7 items-center justify-center rounded-lg text-muted-foreground hover:bg-background hover:text-foreground cursor-pointer",onClick:qu,children:m})}),e[3]=u,e[4]=f):f=e[4];let g;e[5]!==n||e[6]!==c?(g=n&&o.jsxs(et,{onClick:n,children:[o.jsx(al,{size:14}),c("sandbox.itemActions.rename")]}),e[5]=n,e[6]=c,e[7]=g):g=e[7];let d;e[8]!==s||e[9]!==c?(d=s&&o.jsxs(et,{onClick:s,children:[o.jsx(Fn,{size:14}),c("sandbox.itemActions.duplicate")]}),e[8]=s,e[9]=c,e[10]=d):d=e[10];let p;e[11]!==a||e[12]!==c?(p=a&&o.jsxs(o.Fragment,{children:[o.jsx(pn,{}),o.jsxs(et,{onClick:a,className:"cursor-pointer text-success focus:text-success",children:[o.jsx(Go,{size:14}),c("sandbox.itemActions.addVariant")]})]}),e[11]=a,e[12]=c,e[13]=p):p=e[13];let x;e[14]!==i||e[15]!==r||e[16]!==c?(x=(i||r)&&o.jsxs(o.Fragment,{children:[o.jsx(pn,{}),i&&o.jsxs(et,{onClick:i,children:[o.jsx(Vo,{size:14}),c("sandbox.itemActions.editSeo")]}),r&&o.jsxs(et,{onClick:r,children:[o.jsx(Ho,{size:14}),c("sandbox.itemActions.viewJson")]})]}),e[14]=i,e[15]=r,e[16]=c,e[17]=x):x=e[17];let k;e[18]===Symbol.for("react.memo_cache_sentinel")?(k=o.jsx(pn,{}),e[18]=k):k=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(zn,{size:14}),e[19]=j):j=e[19];let v;e[20]!==c?(v=c("sandbox.itemActions.delete"),e[20]=c,e[21]=v):v=e[21];let b;e[22]!==l||e[23]!==v?(b=o.jsxs(et,{onClick:l,className:"text-destructive focus:text-destructive",children:[j,v]}),e[22]=l,e[23]=v,e[24]=b):b=e[24];let N;e[25]!==b||e[26]!==g||e[27]!==d||e[28]!==p||e[29]!==x?(N=o.jsxs(Ls,{align:"end",className:"w-44",children:[g,d,p,x,k,b]}),e[25]=b,e[26]=g,e[27]=d,e[28]=p,e[29]=x,e[30]=N):N=e[30];let _;return e[31]!==N||e[32]!==f?(_=o.jsxs(Is,{children:[f,N]}),e[31]=N,e[32]=f,e[33]=_):_=e[33],_}function qu(t){return t.stopPropagation()}const ti=4;function on(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 si(t,e){const s=on(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>=ti));)i=an(i,s);return n.reverse()}function ni(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 Gm(t,e){const s=on(e),n=ni(e,s),a=new Set([t]),i=s.get(t);let r=i?[i]:[];for(;r.length;){const l=[];for(const c of r)for(const u of n.get(c)??[])u.slug&&!a.has(u.slug)&&(a.add(u.slug),l.push(u));r=l}return a.delete(t),a}function Hm(t,e){if(!t)return[];const s=on(e),n=si(t,e),a=n[0];return!a||an(a,s)?[t]:n.map(i=>i.slug??"")}function Yu(t){const e=on(t),s=ni(t,e),n=new Set,a=[],i=(l,c)=>{if(!n.has(l)&&(n.add(l),a.push({entry:l,depth:c}),!(c+1>=ti)))for(const u of s.get(l)??[])i(u,c+1)},r=t.filter(l=>!an(l,e)).sort((l,c)=>l.label.localeCompare(c.label));for(const l of r)i(l,0);for(const l of t)i(l,0);return a}function Wu(t){return t.split("/").pop()?.replace(/\.tsx?$/,"")||t||"Section"}function Xu(t){const e=new Map;for(const s of t){const n=Wu(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 Eo(t){const e=ce.c(8),{icon:s,label:n,className:a}=t;let i;e[0]!==a?(i=ve("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 l;return e[4]!==n||e[5]!==i||e[6]!==r?(l=o.jsxs("div",{className:i,children:[r,n]}),e[4]=n,e[5]=i,e[6]=r,e[7]=l):l=e[7],l}const Bo=L.lazy(()=>Ve(()=>import("./app-editor-C1ZA1u8T.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147])).then(t=>({default:t.AppEditor}))),Ju=L.lazy(()=>Ve(()=>import("./cms-settings-editor-VytgeION.js"),__vite__mapDeps([148,1,2,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,106,107,11,8,9,12,13,14,15,16,17,3,4,5,6,7,10,18,19,20,21,108,109,58,110,111,0,22,23,24,57,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,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147])).then(t=>({default:t.CmsSettingsEditor}))),Qu=L.lazy(()=>Ve(()=>import("./post-editor-Cxxxfb0r.js"),__vite__mapDeps([149,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,26,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,133,68,150,146,143,81,82,112,135,131,104,105,57,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,106,107,108,109,110,111,113,114,115,23,116,117,118,119,120,121,122,22,123,124,125,126,127,128,129,130,132,134,136,137,138,151,152,139,153,154,155,140,156,157,158,159,141,142,144,145,147])).then(t=>({default:t.PostEditor}))),Zu=L.lazy(()=>Ve(()=>import("./record-editor-DulCdbwX.js"),__vite__mapDeps([160,1,2,68,126,23,73,36,105,57,58,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,69,70,20,71,4,5,6,7,8,9,72,18,11,12,13,14,15,16,17,3,10,19,21,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,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,22,123,124,125,127,128,129,130,131,132,133,134,135,136,137,138,155,159,140,141,142,143,144,145,146,147])).then(t=>({default:t.RecordEditor}))),ep=L.lazy(()=>Ve(()=>import("./context-DSH71GyO.js"),__vite__mapDeps([161,1,2,11,8,9,12,13,14,15,16,17,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,146,68,104,105,112,19,57,58,59,60,61,62,63,64,65,66,67,69,70,20,71,4,5,6,7,72,73,18,3,10,21,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,106,107,108,109,110,111,113,114,115,23,116,117,118,119,120,121,122,22,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,159,162,152,154,163,164,165,140,153,141,142,143,144,145,147])).then(t=>({default:t.BlogContext}))),tp=L.lazy(()=>Ve(()=>import("./category-editor-CldKargp.js"),__vite__mapDeps([166,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,27,31,33,25,133,68,126,23,73,36,155,26,28,29,30,32,34,35,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,69,70,71,72,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,22,123,124,125,127,128,129,130,131,132,134,135,136,137,138,151,152,139,153,154,145,156,157,158,159,140,141,142,143,144,146,147])).then(t=>({default:t.CategoryEditor}))),sp=L.lazy(()=>Ve(()=>import("./sections-editor-Ykrd9ksj.js"),__vite__mapDeps([167,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,57,58,33,41,26,27,28,29,30,31,32,34,35,36,37,25,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,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,23,116,117,118,119,120,121,122,22,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,140,24,139,168,164,169,170,145,171,158])).then(t=>({default:t.SectionsEditor}))),np=L.lazy(()=>Ve(()=>import("./seo-editor-vkCR941s.js"),__vite__mapDeps([172,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,22,23,57,58,59,60,61,62,63,64,65,66,67,68,69,70,20,71,4,5,6,7,8,9,72,73,18,11,12,13,14,15,16,17,3,10,19,21,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,169])).then(t=>({default:t.SeoEditor}))),op=L.lazy(()=>Ve(()=>import("./variant-calendar-r5D0JiAM.js"),__vite__mapDeps([173,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,68,22,23,104,72,73,130,131,144])).then(t=>({default:t.VariantCalendar}))),ap=L.lazy(()=>Ve(()=>import("./campaigns-view-Cz4ACJMm.js"),__vite__mapDeps([174,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,146,22,23,130,131,72,73,175,68,103,11,8,9,12,13,14,15,16,17,113,81,82,114,115,116,117,118,119,120,121,106,107,3,4,5,6,7,10,18,19,20,21,108,109,58,110,111,122,176,170,145,144])).then(t=>({default:t.CampaignsView}))),ip=L.lazy(()=>Ve(()=>import("./post-calendar-CtSEncUE.js"),__vite__mapDeps([177,1,2,26,27,28,29,30,31,32,33,34,35,36,37,25,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,22,23,144,21,16,15,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20,113,81,82,68,114,115,116,117,118,119,120,121,103,106,107,108,109,58,110,111,122,57,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,78,79,80,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,104,105,112,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,140,141,142,143,145,146,147])).then(t=>({default:t.PostCalendar}))),rp=L.lazy(()=>Ve(()=>import("./redirect-editor-DGmg8IhI.js"),__vite__mapDeps([178,1,2,143,46,68,126,23,73,36,57,58,33,41,26,27,28,29,30,31,32,34,35,37,25,38,39,40,42,43,44,45,47,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,69,70,20,71,4,5,6,7,8,9,72,18,11,12,13,14,15,16,17,3,10,19,21,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,22,123,124,125,127,128,129,130,131,132,133,134,135,136,137,138,159])).then(t=>({default:t.RedirectEditor})));function lp(t,e,s=!1){return t==="context"&&!e?"posts":s&&t==="calendar"?"campaigns":!s&&t==="campaigns"?"calendar":t}function cp(t,e){return t&&(yt(t)||e&&(t==="sections"||t==="campaigns"))?t:null}function dp(t){const e=ce.c(30),{deepLinkPage:s}=t,{currentBranch:n,virtualMcpId:a}=Dn(),{org:i}=di(),r=Ur(),l=Gr(),{runtime:c,previewServerUrl:u}=Kn(a),m=c==="cms",f=ta(a,n);let g,d;e[0]!==f||e[1]!==m||e[2]!==l.previewState||e[3]!==r.lifecycle.phase?(g=sa(f),d=Jl({fastPreviewActive:m||g,previewState:l.previewState,lifecyclePhase:r.lifecycle.phase}),e[0]=f,e[1]=m,e[2]=l.previewState,e[3]=r.lifecycle.phase,e[4]=g,e[5]=d):(g=e[4],d=e[5]);const p=d;if(p.kind==="sandbox-card"){const v=`/${i.slug}/settings/connections`;let b;return e[6]!==p.state||e[7]!==l.start||e[8]!==v||e[9]!==r.lifecycle||e[10]!==r.phase?(b=o.jsx(Wl,{state:p.state,claimPhase:r.phase,lifecycle:r.lifecycle,onStart:l.start,connectionsHref:v}),e[6]=p.state,e[7]=l.start,e[8]=v,e[9]=r.lifecycle,e[10]=r.phase,e[11]=b):b=e[11],b}if(!a||!n){let v;return e[12]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(ft,{title:"Waiting for sandbox context…"}),e[12]=v):v=e[12],v}if(pi(f)){let v;return e[13]===Symbol.for("react.memo_cache_sentinel")?(v=o.jsx(fi,{}),e[13]=v):v=e[13],v}if(f.kind==="pending"){let v;return e[14]!==f?(v=o.jsx(gi,{backend:f}),e[14]=f,e[15]=v):v=e[15],v}const x=g?null:l.previewUrl;let k;e[16]!==f||e[17]!==m||e[18]!==l.previewUrl||e[19]!==u?(k=f.kind==="protocol"&&f.source==="local"?pr(f):m?u:l.previewUrl,e[16]=f,e[17]=m,e[18]=l.previewUrl,e[19]=u,e[20]=k):k=e[20];let j;return e[21]!==n||e[22]!==s||e[23]!==p.devServerReady||e[24]!==p.sandboxWarming||e[25]!==i.slug||e[26]!==x||e[27]!==k||e[28]!==a?(j=o.jsx(pp,{orgSlug:i.slug,virtualMcpId:a,branch:n,previewUrl:x,sitePreviewUrl:k,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]=x,e[27]=k,e[28]=a,e[29]=j):j=e[29],j}const Do=2e3,up=15;function Oo(t,e,s,n){return typeof e!="string"||s&&(ua(e,s,n)||t.state.dataUpdateCount>=up)?!1:Do}function pp({orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,sitePreviewUrl:a,deepLinkPage:i,devServerReady:r,sandboxWarming:l}){const c=_e(),u=Xs()?.taskId??null,m={orgSlug:t,virtualMcpId:e,branch:s,threadId:u,previewUrl:n},f=!sa(ta(e,s)),g=Ii()===void 0,{data:d,isLoading:p}=mr(m,{fetchEnabled:r}),x=Ro({strict:!1}),[k,j]=L.useState(()=>cp(x.contentCollection,!f)??"pages"),v=da(),b=lp(k,v,!f),{openPanel:N}=Fr(),_={open:h=>{if(h==="campaigns"){w(null),j("campaigns");return}N("experiments")}},[y,w]=L.useState(()=>x.contentItem&&(yt(b)||b==="sections")?{collection:b,key:x.contentItem}:null),[S,E]=L.useState(()=>{const h=f?null:Jn(x);return h&&x.contentItem&&y?{blockKey:x.contentItem,focus:h,seq:1}:null}),D=y&&"key"in y?y.key:null;S&&S.blockKey!==D&&E(null);const[T,B]=L.useState(null),{data:C,isLoading:F,isFetching:P}=mi(m,{fetchEnabled:r,refetchInterval:h=>{const R=h.state.data;if(b==="apps"&&y&&y.collection==="apps"){const te=d?.[y.key];return Oo(h,typeof te?.__resolveType=="string"?te.__resolveType:void 0,R)}if(b==="site"&&d){const te=R?oo(d,R):null,ue=d.site,Ce=te?.resolveType??(typeof ue?.__resolveType=="string"?ue.__resolveType:void 0);return Oo(h,Ce,R,["seo"])}return!1}}),$=!!(i?.pageId||i?.path||i?.pathTemplate),[G,V]=L.useState(!1);if($&&!G&&y===null&&d&&!F){V(!0);const h=Nr(no(d,C),i??{});if(h){j("pages"),w({collection:"pages",key:h.key,path:h.path});const R=f?null:Jn(x);R&&E({blockKey:h.key,focus:R,seq:1})}}const[J,H]=L.useState(""),[K,U]=L.useState("list"),Y=h=>{w(h),B(null)},[z,Q]=L.useState(b);z!==b&&(Q(b),H(""));const re=(h,R)=>!ua(h,C,R)&&(F||P),{createTask:fe}=Dn(),pe=Kn(e),ae=Ul(e,C??void 0),ge=Qo(e).url,de=Bn("site_apps_install_enabled")&&ae!==null&&!ge,xe=C&&d?Kl(ae?ha(ae):[],C,d):[],ee=zl({orgSlug:t,virtualMcpId:e,branch:s}),X=Js(m),ne=Rr(m),le=Rd({orgSlug:t,virtualMcpId:e,branch:s,decofile:d??{},onMoved:(h,R)=>w(te=>te?.collection==="posts"&&te.key===h?{collection:"posts",key:R}:te)}),[Z,q]=L.useState(null),[se,A]=L.useState(),[W,ie]=L.useState(!1),[be,Te]=L.useState(),[je,De]=L.useState(null),[ke,Ne]=L.useState(null),[Ae,ye]=L.useState(null),Ee=!d||!C;if(p||F||g||Ee&&l)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(vt,{className:"size-5 text-muted-foreground"})});if(Ee)return o.jsx(ft,{title:"Could not load site data."});if(fr(C))return o.jsx(Ki,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d});const Oe=no(d,C).sort((h,R)=>h.name.localeCompare(R.name)),M=_r(d).sort((h,R)=>h.from.localeCompare(R.from)),he=Pr(d,C),we=b==="sections"?Ar(C):[],Be=oo(d,C),Ue=ja(d),gs=Un.some(h=>Ue[h].length>0),rn=yt(b)?Ue[b]:[],gt=Qn(C,"loaders"),Zt=Qn(C,"actions"),wt=f?["settings","campaigns"]:["calendar","apps",...Be?[]:["site"],...Zt===0?["actions"]:[],...dl(C)?[]:["settings"]];if(!Tr(d,C)&&!gs&>===0&&Zt===0)return o.jsx(ft,{icon:cs,title:"No editable content",description:"This project doesn't expose any Deco pages, sections, apps, loaders, or actions."});const ln={pages:Oe.length,sections:he.length,apps:f?xe.length:0,loaders:gt,actions:Zt,redirects:M.length,posts:Ue.posts.length,authors:Ue.authors.length,categories:Ue.categories.length},ht=new Set(Oe.map(h=>Ds(h.path))),Ct=new Set(Oe.map(h=>h.name)),cn=new Set(he.map(h=>h.name)),es=async h=>{const R=d[h.key];if(!R)return;const te=oa(d,h.key),ue=Er(d,h.key,Math.max(0,te-1)),Ce=Br(R.sections,ue,C,!f);if(Ce)try{await X.mutateAsync({blockKey:h.key,data:{...R,sections:Ce.sections}}),me.success(`Variant added to "${h.name}"`),w({collection:"pages",key:h.key,path:h.path})}catch(Pe){me.error(Pe instanceof Error?Pe.message:"Could not add variant")}},nt=()=>{A(void 0),q({mode:"create",sourceKey:null,initialName:"My new page",initialPath:"/example"})},Nt=h=>{A(void 0),q({mode:"duplicate",sourceKey:h.key,initialName:po(Ct,h.name),initialPath:Ql(ht,h.path)})},ot=h=>{A(void 0),q({mode:"rename",sourceKey:h.key,initialName:h.name,initialPath:h.path})},at=async h=>{if(!Z)return;const{mode:R,sourceKey:te}=Z;try{if(R==="create"){let ue;if(h.templateKey){const Pe=d[h.templateKey];if(!Pe)throw new Error("Selected template no longer exists.");ue={...Pe,name:h.name,path:h.path}}else ue=tc(h.name,h.path,f?void 0:C);const Ce=nc(d,h.name);await X.mutateAsync({blockKey:Ce,data:ue}),me.success(`Created "${h.name}"`),w({collection:"pages",key:Ce,path:h.path})}else if(R==="duplicate"&&te){const ue=d[te];if(!ue)throw new Error("Source page not found");const{key:Ce,data:Pe}=ec({source:ue,pages:Oe,newName:h.name,newPath:h.path});await X.mutateAsync({blockKey:Ce,data:Pe}),me.success(`Duplicated as "${h.name}"`),w({collection:"pages",key:Ce,path:h.path})}else if(R==="rename"&&te){const ue=d[te];if(!ue)throw new Error("Page not found");const Ce={...ue,name:h.name,path:h.path};await X.mutateAsync({blockKey:te,data:Ce}),me.success("Page updated"),y?.collection==="pages"&&y.key===te&&w({collection:"pages",key:te,path:h.path})}q(null)}catch(ue){A(ue instanceof Error?ue.message:"Save failed")}},ts=({path:h})=>{if(!Z)return null;const R=Ds(h);return(Z.mode==="rename"?Ds(Z.initialPath):null)!==R&&ht.has(R)?`A page with path "${h}" already exists.`:null},it=async(h,R,te)=>{await X.mutateAsync({blockKey:R,data:{...te,name:R,__resolveType:h}}),me.success(c("sandbox.contentBrowser.createdSection",{name:R})),w({collection:"sections",key:R})},_t=Ko((h,R)=>X.mutate({blockKey:h,data:R})),rt=async h=>{const R=d[h.key];if(!R){me.error(c("sandbox.contentBrowser.sectionNotFound"));return}const te=Zl(d,h.key),ue=po(cn,h.name),Ce={...R,name:ue};try{await X.mutateAsync({blockKey:te,data:Ce}),me.success(c("sandbox.contentBrowser.duplicatedSection",{name:h.name})),w({collection:"sections",key:te})}catch(Pe){me.error(Pe instanceof Error?Pe.message:c("sandbox.contentBrowser.duplicateFailed"))}},lt=async h=>{if(!je)return;const R=d[je];if(!R){me.error(c("sandbox.contentBrowser.sectionNotFound"));return}try{await X.mutateAsync({blockKey:je,data:{...R,name:h}}),me.success(c("sandbox.contentBrowser.sectionRenamed")),De(null)}catch(te){me.error(te instanceof Error?te.message:c("sandbox.contentBrowser.renameFailed"))}},Pt=()=>{Te(void 0),ie(!0)},At=async h=>{const R=Dr(d,h.from),te=Or(h);try{await X.mutateAsync({blockKey:R,data:te}),me.success("Created redirect"),ie(!1),w({collection:"redirects",key:R})}catch(ue){Te(ue instanceof Error?ue.message:"Could not create redirect")}},ct=async h=>{const R=kn(d,h),te=qt(R,h,Ba(h));try{await X.mutateAsync({blockKey:R,data:te}),me.success(`Created ${rs[h]}`),w({collection:h,key:R})}catch(ue){me.error(ue instanceof Error?ue.message:"Could not create")}},Tt=async h=>{const R=kn(d,"posts"),te=qt(R,"posts",Ed(h));try{await X.mutateAsync({blockKey:R,data:te}),me.success(c("sandbox.postCalendar.createdScheduledPost")),j("posts"),Q("posts"),w({collection:"posts",key:R}),B(null)}catch(ue){me.error(ue instanceof Error?ue.message:c("sandbox.postCalendar.couldNotCreate"))}},dt=async(h,R)=>{const te=d[h],ue=te?Dd(kt(te,"posts"),R):null;if(!ue){me.error(c("sandbox.postCalendar.onlyScheduledCanMove"));return}try{await X.mutateAsync({blockKey:h,data:qt(h,"posts",ue)})}catch(Ce){me.error(Ce instanceof Error?Ce.message:c("sandbox.postCalendar.couldNotReschedule"))}},ut=async h=>{const R=d[h.key];if(!R){me.error("Record not found.");return}const te=kn(d,h.kind),ue=h.kind==="posts"?"title":"name",Ce={...structuredClone(kt(R,h.kind)),[ue]:`${h.label} (copy)`};if(h.kind==="categories"){const Pe=Ue.categories.map(He=>He.slug??"").filter(Boolean);Ce.slug=Ad(String(Ce.slug??""),Pe)}try{await X.mutateAsync({blockKey:te,data:qt(te,h.kind,Ce)}),me.success(`Duplicated "${h.label}"`),w({collection:h.kind,key:te})}catch(Pe){me.error(Pe instanceof Error?Pe.message:"Duplicate failed")}},Et=()=>{j("posts"),Q("posts"),w(null),B(null),H("")},pt=async()=>{if(ke)try{const{kind:h,key:R,label:te}=ke;if(h==="blog"){if(ke.blogKind==="categories"){const ue=kt(d[R],"categories").slug,Ce=typeof ue=="string"?ue:"";if(Ce)for(const{key:Pe,payload:He}of Ea(d)){const Ze=Mc(He,Ce);Ze!==He&&await X.mutateAsync({blockKey:Pe,data:Ic(Pe,Vc(Ze))})}}await ne.mutateAsync({blockKey:R})}else await ne.mutateAsync({blockKey:R});me.success(`Deleted "${te}"`),y&&y.collection!=="available-section"&&y.key===R&&w(null),Ne(null)}catch(h){me.error(h instanceof Error?h.message:"Delete failed")}},Ge=ne.isPending||X.isPending,mt=ke?.kind==="blog"?rs[ke.blogKind]:ke?.kind??"item";return o.jsx(Fi,{value:!f,children:o.jsxs("div",{className:"flex h-full w-full",children:[o.jsx(ql,{active:b,counts:ln,hidden:wt,showBlog:gs,showContext:v,onSelect:h=>{j(h),w(null),B(null)}}),b!=="seo"&&b!=="site"&&b!=="settings"&&b!=="context"&&b!=="calendar"&&b!=="campaigns"&&b!=="post-schedule"&&b!=="posts"&&b!=="loaders"&&b!=="actions"&&o.jsx(mp,{activeCollection:b,pages:Oe,redirects:M,sections:he,availableSections:we,appCatalog:xe,canInstallApps:de,installingAppId:ee.isPending?ee.variables?.blockKey??null:null,onInstallApp:h=>{if(pe.resolved){if(pe.runtime==="cms"){me.error(c("sandbox.appEditor.installNeedsCodingSession"),{action:{label:c("chat.fastPreview.startCodingSession"),onClick:()=>fe({runtime:"sandbox"})}});return}ee.mutate({blockKey:h.id},{onSuccess:R=>Y({collection:"apps",key:R.key}),onError:R=>me.error(R.message)})}},blogEntries:rn,decofile:d,searchQuery:J,onSearchChange:H,selection:y,onSelect:Y,onCreate:()=>{b==="pages"?nt():b==="redirects"?Pt():yt(b)&&ct(b)},onDuplicatePage:Nt,onRenamePage:ot,onAddPageVariant:es,onDeletePage:h=>Ne({kind:"page",key:h.key,label:h.name}),onEditPageSeo:h=>{const R={collection:"pages",key:h.key,path:h.path};w(R),B(h.key)},onViewPageJson:h=>ye(h.key),onDuplicateSection:rt,onRenameSection:h=>De(h.key),onDeleteSection:h=>Ne({kind:"section",key:h.key,label:h.name}),onDeleteRedirect:h=>Ne({kind:"redirect",key:h.key,label:h.from||h.key}),onDuplicateBlog:ut,onDeleteBlog:h=>Ne({kind:"blog",blogKind:h.kind,key:h.key,label:h.label})}),o.jsx("div",{className:"flex-1 min-w-0",children:b==="loaders"||b==="actions"?o.jsx(Bu,{orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:C,decofile:d,kind:b}):o.jsx(L.Suspense,{fallback:o.jsx("div",{className:"h-full flex items-center justify-center",children:o.jsx(vt,{className:"size-5 text-muted-foreground"})}),children:b==="calendar"?o.jsx(op,{decofile:d}):b==="campaigns"?o.jsx(ap,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C,onOpenUse:h=>{E(R=>({blockKey:h.blockKey,focus:h.focus??{},seq:(R?.seq??0)+1})),h.blockKind==="page"&&h.path!==void 0?(j("pages"),Y({collection:"pages",key:h.blockKey,path:h.path})):(j("sections"),Y({collection:"sections",key:h.blockKey}))}}):b==="post-schedule"?o.jsx(ip,{decofile:d,isCreating:X.isPending,onCreate:h=>{Tt(h)},onReschedule:(h,R)=>{dt(h,R)},onSelect:h=>{j("posts"),Q("posts"),w({collection:"posts",key:h}),B(null)}}):b==="site"?Be?o.jsx(Bo,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:Be.key,block:d[Be.key],decofile:d,meta:C,title:"Site",excludeFields:["seo"],schemaPending:re(Be.resolveType,["seo"]),previewBaseUrl:n},`site:${Be.key}`):o.jsx(ft,{title:"Site settings not found",description:"This project doesn't have a site app block (site/apps/site.ts)."}):b==="settings"?o.jsx(Ju,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C}):b==="context"?o.jsx(ep,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C}):b==="seo"?o.jsx(np,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,meta:C,target:{kind:"site"},previewBaseUrl:a}):b==="sections"?o.jsx(Hu,{selection:y?.collection==="sections"||y?.collection==="available-section"?y:null,orgSlug:t,virtualMcpId:e,branch:s,previewUrl:n,meta:C,decofile:d,isCreating:X.isPending,onCreateAvailable:it,onSaveReferencedBlock:_t}):b==="posts"?o.jsx(bu,{orgSlug:t,virtualMcpId:e,branch:s,decofile:d,view:K,selectedKey:y?.collection==="posts"?y.key:null,onViewChange:h=>{U(h),w(null)},onClose:()=>w(null),onOpen:h=>{w({collection:"posts",key:h}),B(null)},move:le,meta:C,renderDetail:(h,R)=>o.jsx(Qu,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:h,block:d[h],decofile:d,meta:C,previewBaseUrl:a,move:le,onClose:R?.onClose,expanded:R?.expanded,onToggleExpand:R?.onToggleExpand},`post:${ls(h)}`)}):y&&y.collection!=="available-section"?y.collection==="apps"?o.jsx(Bo,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:y.key,block:d[y.key],decofile:d,meta:C,previewBaseUrl:n,schemaPending:re(typeof d[y.key]?.__resolveType=="string"?String(d[y.key].__resolveType):void 0)},`app:${y.key}`):y.collection==="categories"?o.jsx(tp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:y.key,block:d[y.key],decofile:d,meta:C,onManagePosts:()=>Et(),onOpenPost:h=>{j("posts"),Q("posts"),w({collection:"posts",key:h}),B(null)},previewBaseUrl:a},`category:${y.key}`):y.collection==="authors"?o.jsx(Zu,{orgSlug:t,virtualMcpId:e,branch:s,kind:"authors",blockKey:y.key,block:d[y.key],meta:C,decofile:d},`authors:${y.key}`):y.collection==="redirects"?o.jsx(rp,{orgSlug:t,virtualMcpId:e,branch:s,blockKey:y.key,block:d[y.key]},`redirect:${y.key}`):o.jsx(hi,{value:_,children:o.jsx(sp,{orgSlug:t,virtualMcpId:e,branch:s,previewReady:!0,previewUrl:n??void 0,currentPath:y.collection==="pages"?y.path:"/",activePageBlockKey:y.collection==="pages"?y.key:null,activeGlobalBlockKey:y.collection==="sections"?y.key:null,initialEditSeo:y.collection==="pages"&&T===y.key,onExitSeo:()=>B(null),focusVariant:S?.blockKey===y.key?{...S.focus,seq:S.seq}:null,onSelectRoot:()=>{w(null),B(null)}},y.collection==="pages"?`page:${y.key}`:`section:${y.key}`)}):o.jsx(ft,{title:`Select ${yt(b)?`a ${rs[b]}`:b==="pages"?"a page":b==="apps"?"an app":b==="redirects"?"a redirect":"a section"} to edit`,description:b==="apps"?"Browse all apps and select an installed one to edit its settings.":'Pick an item from the list, or click "+" to create one.'})})}),Z&&o.jsx(rc,{open:!!Z,mode:Z.mode,initialName:Z.initialName,initialPath:Z.initialPath,isPending:X.isPending,error:se,templates:Oe,validate:ts,onSubmit:at,onOpenChange:h=>{h||(q(null),A(void 0))}}),o.jsx(cc,{open:W,isPending:X.isPending,error:be,onSubmit:At,onOpenChange:h=>{h||(ie(!1),Te(void 0))}}),je&&o.jsx(dc,{open:!!je,blockKey:je,initialName:he.find(h=>h.key===je)?.name??je,isPending:X.isPending,onSubmit:lt,onOpenChange:h=>{h||De(null)}}),Ae&&o.jsx($r,{open:!!Ae,onOpenChange:h=>{h||ye(null)},pageKey:Ae,decofile:d,onSave:h=>X.mutateAsync({blockKey:Ae,data:h})}),o.jsx(Zi,{open:!!ke,onOpenChange:h=>{!h&&!Ge&&Ne(null)},children:o.jsxs(er,{children:[o.jsxs(tr,{children:[o.jsx(sr,{children:c("sandbox.contentBrowser.deleteDialog.title",{noun:mt})}),o.jsx(nr,{children:ke?.kind==="section"?c("sandbox.contentBrowser.deleteDialog.descriptionSection",{label:ke.label}):ke?c("sandbox.contentBrowser.deleteDialog.descriptionPermanent",{label:ke.label}):null})]}),o.jsxs(or,{children:[o.jsx(ar,{disabled:Ge,children:c("sandbox.contentBrowser.deleteDialog.cancel")}),o.jsx(ir,{onClick:h=>{h.preventDefault(),pt()},disabled:Ge,className:ve(ui({variant:"destructive"})),children:Ge?o.jsxs(o.Fragment,{children:[o.jsx(vt,{className:"size-3.5"}),c("sandbox.contentBrowser.deleteDialog.deleting")]}):c("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})})}function mp(t){const e=ce.c(60),{activeCollection:s,pages:n,redirects:a,sections:i,availableSections:r,appCatalog:l,canInstallApps:c,installingAppId:u,onInstallApp:m,blogEntries:f,decofile:g,searchQuery:d,onSearchChange:p,selection:x,onSelect:k,onCreate:j,onDuplicatePage:v,onRenamePage:b,onAddPageVariant:N,onDeletePage:_,onEditPageSeo:y,onViewPageJson:w,onDuplicateSection:S,onRenameSection:E,onDeleteSection:D,onDeleteRedirect:T,onDuplicateBlog:B,onDeleteBlog:C}=t,F=_e();let P,$,G,V,J,H;if(e[0]!==s||e[1]!==l||e[2]!==r||e[3]!==f||e[4]!==c||e[5]!==g||e[6]!==u||e[7]!==N||e[8]!==j||e[9]!==C||e[10]!==_||e[11]!==T||e[12]!==D||e[13]!==B||e[14]!==v||e[15]!==S||e[16]!==y||e[17]!==m||e[18]!==b||e[19]!==E||e[20]!==p||e[21]!==k||e[22]!==w||e[23]!==n||e[24]!==a||e[25]!==d||e[26]!==i||e[27]!==x||e[28]!==F){const z=d.toLowerCase(),Q=n.filter(A=>!z||A.name.toLowerCase().includes(z)||A.path.toLowerCase().includes(z)),re=a.filter(A=>!z||A.from.toLowerCase().includes(z)||A.to.toLowerCase().includes(z)),fe=i.filter(A=>!z||A.name.toLowerCase().includes(z)||A.key.toLowerCase().includes(z)||A.resolveType.toLowerCase().includes(z)),pe=r.filter(A=>!z||A.title.toLowerCase().includes(z)||A.resolveType.toLowerCase().includes(z)||(A.description?.toLowerCase().includes(z)??!1)),ae=Xu(fe),ge=l.filter(A=>!z||A.title.toLowerCase().includes(z)||A.app.toLowerCase().includes(z)||A.vendor.toLowerCase().includes(z)||A.category.toLowerCase().includes(z)),de=f.filter(A=>!z||A.label.toLowerCase().includes(z)||A.subtitle.toLowerCase().includes(z)),xe=s==="categories"&&!z?Yu(de):de.map(gp),ee=`Search ${s}…`,X=yt(s)?`Create new ${rs[s]}`:s==="redirects"?"Create new redirect":"Create new page",ne=s!=="apps"&&s!=="sections";J="shrink-0 border-r flex flex-col min-h-0 w-[300px]";let le;e[35]===Symbol.for("react.memo_cache_sentinel")?(le=o.jsx(Rn,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[35]=le):le=e[35];let Z;e[36]!==p?(Z=A=>p(A.target.value),e[36]=p,e[37]=Z):Z=e[37];let q;e[38]!==ee||e[39]!==d||e[40]!==Z?(q=o.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[le,o.jsx("input",{type:"text",value:d,onChange:Z,placeholder:ee,"aria-label":ee,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[38]=ee,e[39]=d,e[40]=Z,e[41]=q):q=e[41];let se;e[42]!==X||e[43]!==j||e[44]!==ne?(se=ne&&o.jsxs(Qe,{children:[o.jsx(Xe,{asChild:!0,children:o.jsx($e,{variant:"ghost",size:"icon",onClick:j,"aria-label":X,children:o.jsx($n,{size:14})})}),o.jsx(Je,{side:"bottom",children:X})]}),e[42]=X,e[43]=j,e[44]=ne,e[45]=se):se=e[45],e[46]!==q||e[47]!==se?(H=o.jsxs("div",{className:"px-2 h-12 flex items-center gap-1 border-b shrink-0",children:[q,se]}),e[46]=q,e[47]=se,e[48]=H):H=e[48],P=Qs,V="flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",$="flex flex-col gap-1 p-1.5",G=s==="pages"?Q.length===0?o.jsx(ns,{hasItems:n.length>0,emptyLabel:"No pages yet.",emptyHint:'Click "+" to create your first page.'}):Q.map(A=>{const W=x?.collection==="pages"&&x.key===A.key,ie=oa(g,A.key);return o.jsx(We,{icon:qo,title:A.name,subtitle:A.path,active:W,variantCount:ie,onClick:()=>k({collection:"pages",key:A.key,path:A.path}),menu:o.jsx(Bs,{onDuplicate:()=>v(A),onRename:()=>b(A),onAddVariant:()=>N(A),onEditSeo:()=>y(A),onViewJson:()=>w(A),onDelete:()=>_(A)})},A.key)}):s==="sections"?fe.length===0&&pe.length===0?o.jsx(ns,{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:[ae.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Eo,{icon:Fs,label:"Saved sections"}),ae.map(A=>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:A.label}),A.sections.map(W=>{const ie=x?.collection==="sections"&&x.key===W.key;return o.jsx(We,{icon:Fs,accent:"global",title:W.name,subtitle:A.label,active:ie,onClick:()=>k({collection:"sections",key:W.key}),menu:o.jsx(Bs,{onDuplicate:()=>S(W),onRename:()=>E(W),onDelete:()=>D(W)})},W.key)})]},A.label))]}),pe.length>0&&o.jsxs(o.Fragment,{children:[o.jsx(Eo,{icon:so,label:"Available sections",className:ve(ae.length>0&&"mt-3")}),pe.map(A=>{const W=x?.collection==="available-section"&&x.resolveType===A.resolveType,ie=A.resolveType.split("/").pop()?.replace(/\.tsx?$/,"");return o.jsx(We,{icon:so,title:A.title,subtitle:ie??A.resolveType,active:W,onClick:()=>k({collection:"available-section",resolveType:A.resolveType,title:A.title})},A.resolveType)})]})]}):s==="apps"?ge.length===0?o.jsx(ns,{hasItems:l.length>0,emptyLabel:"No apps found.",emptyHint:"Try a different search term."}):ge.map(A=>{const W=x?.collection==="apps"&&A.blockKey!==null&&x.key===A.blockKey,ie=u===A.id;return o.jsx(We,{icon:Xo,logoUrl:A.logo,title:A.title,subtitle:A.category,active:W,trailing:A.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"}):ie?o.jsx(vt,{className:"size-3.5 shrink-0 text-muted-foreground"}):A.installable&&c?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:()=>{if(A.installed&&A.blockKey){k({collection:"apps",key:A.blockKey});return}if(!A.installable||!c){me.message(`${A.title} is not installed on this site.`);return}u===null&&m(A)}},A.id)}):s==="redirects"?re.length===0?o.jsx(ns,{hasItems:a.length>0,emptyLabel:"No redirects yet.",emptyHint:'Click "+" to create your first redirect.'}):re.map(A=>o.jsx(We,{icon:zo,title:A.from||"(no source)",subtitle:`→ ${A.to||"(no target)"}`,active:x?.collection==="redirects"&&x.key===A.key,trailing:o.jsx(uc,{redirect:A}),onClick:()=>k({collection:"redirects",key:A.key}),menu:o.jsx(Bs,{onDelete:()=>T(A)})},A.key)):de.length===0?o.jsx(ns,{hasItems:f.length>0,emptyLabel:`No ${s} yet.`,emptyHint:`Click "+" to create your first ${yt(s)?rs[s]:"item"}.`}):xe.map(A=>{const{entry:W,depth:ie}=A,be=x?.collection===W.kind&&x.key===W.key;return o.jsx("div",{style:{paddingLeft:ie*16},children:o.jsx(We,{icon:W.kind==="posts"?Yo:W.kind==="authors"?Jo:Mo,title:W.label,invalid:W.missing.length>0,invalidReason:W.missing.length>0?F("sandbox.itemRow.missingFields",{fields:Dc(W.missing,F)}):void 0,warning:W.duplicateName,warningReason:F("sandbox.itemRow.duplicateName"),subtitle:ie>0?si(W.slug??"",de).map(fp).join(" / "):W.subtitle,active:be,onClick:()=>k({collection:W.kind,key:W.key}),menu:o.jsx(Bs,{onDuplicate:()=>B(W),onDelete:()=>C(W)})})},W.key)}),e[0]=s,e[1]=l,e[2]=r,e[3]=f,e[4]=c,e[5]=g,e[6]=u,e[7]=N,e[8]=j,e[9]=C,e[10]=_,e[11]=T,e[12]=D,e[13]=B,e[14]=v,e[15]=S,e[16]=y,e[17]=m,e[18]=b,e[19]=E,e[20]=p,e[21]=k,e[22]=w,e[23]=n,e[24]=a,e[25]=d,e[26]=i,e[27]=x,e[28]=F,e[29]=P,e[30]=$,e[31]=G,e[32]=V,e[33]=J,e[34]=H}else P=e[29],$=e[30],G=e[31],V=e[32],J=e[33],H=e[34];let K;e[49]!==$||e[50]!==G?(K=o.jsx("div",{className:$,children:G}),e[49]=$,e[50]=G,e[51]=K):K=e[51];let U;e[52]!==P||e[53]!==V||e[54]!==K?(U=o.jsx(P,{className:V,children:K}),e[52]=P,e[53]=V,e[54]=K,e[55]=U):U=e[55];let Y;return e[56]!==J||e[57]!==H||e[58]!==U?(Y=o.jsxs("div",{className:J,children:[H,U]}),e[56]=J,e[57]=H,e[58]=U,e[59]=Y):Y=e[59],Y}function fp(t){return t.slug}function gp(t){return{entry:t,depth:0}}function qm(t){const e=ce.c(25),{virtualMcpId:s}=t,n=_e(),[a,i]=L.useState(!1),r=ia(s),{connection:l}=gr(s),{activeTask:c}=Dn();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},e[0]=u):u=e[0];const m=Ro(u);if(!(io(r?.metadata)||io(c?.metadata))&&!l){let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"flex size-14 items-center justify-center rounded-full bg-muted",children:o.jsx(ro,{className:"size-7 text-foreground"})}),e[1]=d):d=e[1];let p;e[2]!==n?(p=n("mainPanelTabs.contentTab.noContentToEdit"),e[2]=n,e[3]=p):p=e[3];let x;e[4]!==n?(x=n("mainPanelTabs.contentTab.connectGithubDescription"),e[4]=n,e[5]=x):x=e[5];let k,j;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=()=>i(!0),j=o.jsx(ro,{className:"size-4"}),e[6]=k,e[7]=j):(k=e[6],j=e[7]);let v;e[8]!==n?(v=n("mainPanelTabs.previewTab.connectGithub"),e[8]=n,e[9]=v):v=e[9];let b;e[10]!==v?(b=o.jsxs($e,{onClick:k,children:[j,v]}),e[10]=v,e[11]=b):b=e[11];let N;e[12]!==p||e[13]!==x||e[14]!==b?(N=o.jsx(il,{className:"h-full",image:d,title:p,description:x,actions:b}),e[12]=p,e[13]=x,e[14]=b,e[15]=N):N=e[15];let _;e[16]!==a?(_=o.jsx(rl,{open:a,onOpenChange:i,mode:"agent"}),e[16]=a,e[17]=_):_=e[17];let y;return e[18]!==_||e[19]!==N?(y=o.jsxs(o.Fragment,{children:[N,_]}),e[18]=_,e[19]=N,e[20]=y):y=e[20],y}let g;return e[21]!==m.contentPageId||e[22]!==m.contentPath||e[23]!==m.contentPathTemplate?(g=o.jsx(zi,{children:o.jsx(dp,{deepLinkPage:{pageId:m.contentPageId,path:m.contentPath,pathTemplate:m.contentPathTemplate}})}),e[21]=m.contentPageId,e[22]=m.contentPath,e[23]=m.contentPathTemplate,e[24]=g):g=e[24],g}export{fc as $,Fm as A,Vm as B,qm as C,hm as D,ft as E,Mm as F,jc as G,qc as H,$d as I,Wc as J,Um as K,Ya as L,Oa as M,Sa as N,qt as O,Gn as P,Tm as Q,zm as R,id as S,Zc as T,Em as U,Pm as V,tn as W,nd as X,ad as Y,pc as Z,mc as _,gm as a,So as a0,gc as a1,Fe as a2,hc as a3,Nm as a4,Cm as a5,_m as a6,Am as a7,km as a8,Xc as a9,vm as aA,Im as aB,Hs as aC,Jc as aa,rd as ab,cd as ac,Hn as ad,wm as ae,Ra as af,$a as ag,ze as ah,Dm as ai,Sm as aj,Us as ak,jm as al,Bm as am,us as an,_n as ao,Gs as ap,Om as aq,Rm as ar,Kc as as,Gm as at,Yu as au,ti as av,zc as aw,Ad as ax,Ea as ay,ym as az,lo as b,nn as c,Ic as d,qe as e,bm as f,kt as g,$m as h,Dc as i,Km as j,xm as k,Na as l,sn as m,Zl as n,Ye as o,Qt as p,Ua as q,cl as r,Vc as s,Ha as t,da as u,Lm as v,Ys as w,ja as x,Hm as y,La as z};
|