decocms 4.500.3 → 4.500.5
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-DpXLHK85.js → ActiveShapeUtils-B7OXPrvi.js} +1 -1
- package/dist/client/assets/{AlertCircle-CWfOEKki.js → AlertCircle-DWGeVbRZ.js} +1 -1
- package/dist/client/assets/{AreaChart-BsAvYqSE.js → AreaChart-EU8uhxm4.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B5i4q13h.js → ArrowLeft-DKZiHtC9.js} +1 -1
- package/dist/client/assets/{ArrowUp-BhTDxCnH.js → ArrowUp-BmS2ipPe.js} +1 -1
- package/dist/client/assets/{BarChart-C3qRncE0.js → BarChart-C5BexF1_.js} +1 -1
- package/dist/client/assets/{Building02-BB32RZGw.js → Building02-CmZEvaAI.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CydyA18G.js → CategoricalChart-N0xPZGNf.js} +1 -1
- package/dist/client/assets/{CheckCircle-BAAjR6Yz.js → CheckCircle-Cxvlb0-w.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-iTIvKtkg.js → ChevronSelectorVertical-Cz_mr8Ub.js} +1 -1
- package/dist/client/assets/{ChevronUp-D2V0rxEI.js → ChevronUp-BXbTXhXZ.js} +1 -1
- package/dist/client/assets/{Copy01-D52Dm87Z.js → Copy01-Daz7AFYE.js} +1 -1
- package/dist/client/assets/{CreditCard01-ukHBKeCx.js → CreditCard01-BFLArPt1.js} +1 -1
- package/dist/client/assets/{DotsVertical-D3Nk6PKk.js → DotsVertical-B5WoSbKn.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-CDf4ybMZ.js → ErrorBarContext-QrHgjTMs.js} +1 -1
- package/dist/client/assets/{Globe04-CD1Fa9uc.js → Globe04-CHujm8Rh.js} +1 -1
- package/dist/client/assets/{Image01-CBMbNlWB.js → Image01-6k6QI1dX.js} +1 -1
- package/dist/client/assets/{Key01-DqMMqipC.js → Key01-BCUfWyre.js} +1 -1
- package/dist/client/assets/{Link01-CnfFWr1B.js → Link01-B2ZUVqeX.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ClQXqp6D.js → LinkBroken01-Shxg1MDA.js} +1 -1
- package/dist/client/assets/{Monitor01-CWjK0W6g.js → Monitor01-C6hS1MDr.js} +1 -1
- package/dist/client/assets/{Play-CiT2g6kK.js → Play-C5HXiIgy.js} +1 -1
- package/dist/client/assets/{Plus-DKtqOzS_.js → Plus-BGNNWymV.js} +1 -1
- package/dist/client/assets/{SearchMd-Eodh17Ne.js → SearchMd-CMyj3n9E.js} +1 -1
- package/dist/client/assets/{Sector-Bte8k9jG.js → Sector-BIfxElqq.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CXpLfOIN.js → ShoppingBag01-DhBZJiPR.js} +1 -1
- package/dist/client/assets/{Sun-CQyxb836.js → Sun-BZz5Ay79.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Be__kNWY.js → SwitchHorizontal01-CDaKlB_n.js} +1 -1
- package/dist/client/assets/{Tool01-BTVhARMR.js → Tool01-CIRW7kd4.js} +1 -1
- package/dist/client/assets/{Trash01-Cplj2Ik4.js → Trash01-BJZRU-Yu.js} +1 -1
- package/dist/client/assets/{Upload01-B6X2kk3D.js → Upload01-CdF0U1Ox.js} +1 -1
- package/dist/client/assets/{User01-CqwCn9hE.js → User01-Swj6Wyaw.js} +1 -1
- package/dist/client/assets/{UserSquare-Gs4U-X0G.js → UserSquare--AVOLLKT.js} +1 -1
- package/dist/client/assets/{Users01-HGukenVX.js → Users01-BguvMR-H.js} +1 -1
- package/dist/client/assets/{XAxis-D9i1XFXQ.js → XAxis-CVekAfnj.js} +1 -1
- package/dist/client/assets/{XClose-57_ntdgF.js → XClose-CxTFVFLs.js} +1 -1
- package/dist/client/assets/{ZoomOut-CK4FVubR.js → ZoomOut-C7vMH9KG.js} +1 -1
- package/dist/client/assets/{access-gate-BbBcdlA6.js → access-gate-BifQwyWv.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B6QIFmOE.js → add-connection-dialog-C99-KIxD.js} +1 -1
- package/dist/client/assets/{agent-analytics-DeR5Py98.js → agent-analytics-DezOg4iq.js} +1 -1
- package/dist/client/assets/agent-app-OwJ0X9iQ.js +1 -0
- package/dist/client/assets/{agent-assets-D65rdJP2.js → agent-assets-DtBwQzpc.js} +1 -1
- package/dist/client/assets/{agent-automation-CevIWzHP.js → agent-automation-o2OSd9jI.js} +1 -1
- package/dist/client/assets/{agent-automations-BKd6PuGH.js → agent-automations-CSVjvgdr.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CW6aSTWW.js → agent-connect-sources-BZpypWKp.js} +1 -1
- package/dist/client/assets/agent-deck-CVQI0IJ8.js +1 -0
- package/dist/client/assets/{agent-e2e-BG2Iz7Ak.js → agent-e2e-Cf-7o5JH.js} +1 -1
- package/dist/client/assets/{agent-experiments-CHzesuAq.js → agent-experiments-BjOexOgL.js} +1 -1
- package/dist/client/assets/{agent-file-D5VvPPPX.js → agent-file-CVJUPUB9.js} +1 -1
- package/dist/client/assets/{agent-hosting-CYLr345F.js → agent-hosting-DJ5loXp1.js} +1 -1
- package/dist/client/assets/{agent-icon-BnC2DyaZ.js → agent-icon-CvfPq7BK.js} +1 -1
- package/dist/client/assets/agent-library-DMvAbH9s.js +1 -0
- package/dist/client/assets/agent-library-file-B-EjZyU3.js +1 -0
- package/dist/client/assets/{agent-monitor-DLQ5MS-a.js → agent-monitor-CwvDQf-0.js} +1 -1
- package/dist/client/assets/{agent-overview-D6dFXlZ4.js → agent-overview-CsT5BzSM.js} +1 -1
- package/dist/client/assets/agent-settings-S4roascd.js +1 -0
- package/dist/client/assets/{agent-site-editor-CEDDq_xW.js → agent-site-editor-DekWNKPY.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DsF3btqi.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-DXZ1wpLE.js → agent-site-editor-content-CKfeDMKr.js} +3 -3
- package/dist/client/assets/{agent-site-editor-preview-DA_WWuwo.js → agent-site-editor-preview-Oi61j7xj.js} +3 -3
- package/dist/client/assets/agent-view-DNsQvn8c.js +1 -0
- package/dist/client/assets/{agent-view-guard-BmBvgVKz.js → agent-view-guard-DF_nEERP.js} +1 -1
- package/dist/client/assets/{agents-list-LTbwlLyC.js → agents-list-LRAFnay6.js} +1 -1
- package/dist/client/assets/{ai-providers-Dz5giEXa.js → ai-providers-BgUnArjx.js} +1 -1
- package/dist/client/assets/{alert-DliOvsdZ.js → alert-Ds8Pbd5J.js} +1 -1
- package/dist/client/assets/{alert-dialog-DaPrRw6H.js → alert-dialog-BoGCVrZa.js} +1 -1
- package/dist/client/assets/{analytics-sections-D4Cqsw8E.js → analytics-sections-BOYksc63.js} +1 -1
- package/dist/client/assets/api-keys-BFo2F8un.js +1 -0
- package/dist/client/assets/{api-keys-ZVp581wb.js → api-keys-uNOKnF25.js} +1 -1
- package/dist/client/assets/app-editor-CLedpfSA.js +1 -0
- package/dist/client/assets/{asset-utils-BViQjnRQ.js → asset-utils-C0JplDix.js} +1 -1
- package/dist/client/assets/{auth-DpVa9FBr.js → auth-CtdecWhn.js} +1 -1
- package/dist/client/assets/{auth-catchall-D4OQ62gj.js → auth-catchall-CGU8Tb_2.js} +1 -1
- package/dist/client/assets/{auth-entry-Cz_DhHV3.js → auth-entry-DIyt51AK.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DEd5xiLA.js → auth-split-layout-CXs4JEXj.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CbYI0Hyu.js → authenticate-and-persist-oauth-Cs8htcLH.js} +1 -1
- package/dist/client/assets/{automation-list-row-CkqoLF09.js → automation-list-row-BtyEuPas.js} +1 -1
- package/dist/client/assets/{automation-runs-Czz5mTZQ.js → automation-runs-fZgz2Hqj.js} +1 -1
- package/dist/client/assets/{automations-CtdrMdnv.js → automations-n2079ZKl.js} +1 -1
- package/dist/client/assets/{autosend-Dna7U2HC.js → autosend-Bed_2rHW.js} +1 -1
- package/dist/client/assets/{avatar-DkyZyTLO.js → avatar-BWSDv40I.js} +1 -1
- package/dist/client/assets/{badge-8YPtojDh.js → badge-BZ6ZWtlL.js} +1 -1
- package/dist/client/assets/{block-document-DN2iU4sd.js → block-document-C_IW_573.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-B1X4jaIN.js → blocks-preview-workspace-context-CyLjsfnh.js} +1 -1
- package/dist/client/assets/{blog-schema-DqTsSzyb.js → blog-schema-DTGd3Oxs.js} +1 -1
- package/dist/client/assets/{board-analytics-x9jjsPTb.js → board-analytics-BypUwbOK.js} +1 -1
- package/dist/client/assets/{buckets-D-HqnMa7.js → buckets-DBWKw8M4.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-B1CQIB3s.js → build-improve-prompt-doc-ClJ1Tfl6.js} +1 -1
- package/dist/client/assets/{calendar-NFkdhgk9.js → calendar-CUQ5339S.js} +1 -1
- package/dist/client/assets/{capability-load-error-CABlEf-V.js → capability-load-error-BglSkYA0.js} +1 -1
- package/dist/client/assets/{category-editor-YNMOAbYu.js → category-editor-Dh4k-2za.js} +1 -1
- package/dist/client/assets/{chart-DKHjNlDg.js → chart-DmxPBeeD.js} +1 -1
- package/dist/client/assets/chat-context-CQm-6egv.js +39 -0
- package/dist/client/assets/{chat-draft-BS9tIUoh.js → chat-draft-CLRrKKYW.js} +1 -1
- package/dist/client/assets/{checkbox-CS0Igoet.js → checkbox-cJ0fZWJo.js} +1 -1
- package/dist/client/assets/{choose-editor-B402eTw2.js → choose-editor-Cc1TcbHd.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-CxTfX9Sr.js → claim-phase-copy-DgYG3gXQ.js} +1 -1
- package/dist/client/assets/{cli-auth-success-rHBSNHET.js → cli-auth-success-DhKKsoxy.js} +1 -1
- package/dist/client/assets/{client-icons-CqYsPRCJ.js → client-icons-BGVAhs-F.js} +1 -1
- package/dist/client/assets/{collapsible-BeEr-w4N.js → collapsible-Di8zO8dv.js} +1 -1
- package/dist/client/assets/{collection-detail-IBaUmFEi.js → collection-detail-BVfokcci.js} +1 -1
- package/dist/client/assets/{collection-display-button-xcC6AWnY.js → collection-display-button-Bxb7HpiP.js} +1 -1
- package/dist/client/assets/{collection-search-CTKjuIpa.js → collection-search-BqrF-OSq.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-KpLnsj3V.js → collection-table-wrapper-CkgGqLXV.js} +1 -1
- package/dist/client/assets/{collection-tabs-HaSRL7BY.js → collection-tabs-B9w_j2Q-.js} +1 -1
- package/dist/client/assets/{column-rules-CcRXiu56.js → column-rules-CDlfxJ7f.js} +1 -1
- package/dist/client/assets/{combobox-C6uurxAD.js → combobox-C7W7K3yr.js} +1 -1
- package/dist/client/assets/{command-DW8vpIAn.js → command-psdI3Avp.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DowmMNQB.js → companion-mcps-section-Cx2dp9En.js} +1 -1
- package/dist/client/assets/{config-DBnUW1ql.js → config-BuMB0HyT.js} +1 -1
- package/dist/client/assets/{connect-layout-DZerNusC.js → connect-layout-BAsVrzyq.js} +1 -1
- package/dist/client/assets/{connect-fVFB8yuN.js → connect-vKaaPSQ-.js} +1 -1
- package/dist/client/assets/{connection-CpR5iu5o.js → connection-DsYXyfMO.js} +1 -1
- package/dist/client/assets/{connection-card-HH41R-gb.js → connection-card-KKabYrZM.js} +1 -1
- package/dist/client/assets/{connection-detail-CxUDzpC4.js → connection-detail-Cx1TsCEV.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DmYbPB1E.js → connection-form-helpers-D5AT-OBk.js} +1 -1
- package/dist/client/assets/{connections-BSZech5P.js → connections-DEMu2UYi.js} +1 -1
- package/dist/client/assets/{context-Bk5mCl6c.js → context-B4AjxGVI.js} +1 -1
- package/dist/client/assets/{context-menu-BvT7OaSF.js → context-menu-CcSwK895.js} +1 -1
- package/dist/client/assets/{core.esm-C9y_2p9u.js → core.esm-BBQ2k6X-.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BwYZdu8b.js → create-organization-dialog-ryb_Yr7s.js} +1 -1
- package/dist/client/assets/{daily-pulse-_rzFsffU.js → daily-pulse-R_HfqfjY.js} +1 -1
- package/dist/client/assets/{device-hint-D_MZXPt4.js → device-hint-yLpMwsWD.js} +1 -1
- package/dist/client/assets/{discover-C7W0IXPg.js → discover-DBy_h90B.js} +1 -1
- package/dist/client/assets/{domain-settings-B8Rinbm5.js → domain-settings-DahhbaOZ.js} +1 -1
- package/dist/client/assets/{drawer-CPnx75cL.js → drawer-Z6WGmFEd.js} +1 -1
- package/dist/client/assets/{editor-yCqmKD--.js → editor-ZVt04ZDu.js} +1 -1
- package/dist/client/assets/{empty-state-dTT22idT.js → empty-state-BIpjMV0P.js} +1 -1
- package/dist/client/assets/{empty-state-oMCOSg-5.js → empty-state-C38COFK9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B8QJH0-o.js → extract-connection-data-R_HCwhv9.js} +1 -1
- package/dist/client/assets/{feature-gate-BW7iq-dj.js → feature-gate-BBs-YK_1.js} +1 -1
- package/dist/client/assets/{feature-paywall-CgdVUKa4.js → feature-paywall-K9l_m1PM.js} +1 -1
- package/dist/client/assets/{file-explorer-YbXRSd7M.js → file-explorer-B4mkdePV.js} +1 -1
- package/dist/client/assets/{file-preview-Cw0eH4RI.js → file-preview-CbjoA-y-.js} +1 -1
- package/dist/client/assets/{file-share-button-D0sPfCUq.js → file-share-button-3fAFZqo4.js} +1 -1
- package/dist/client/assets/{file-type-icon-SA_GdG2N.js → file-type-icon-DQJBqcjt.js} +1 -1
- package/dist/client/assets/flat-project-C0OkliLB.js +1 -0
- package/dist/client/assets/{folder-icon-CDAtyCRn.js → folder-icon-C0bBbW6a.js} +1 -1
- package/dist/client/assets/{form-iGrCLiiK.js → form-C0Gw14kB.js} +1 -1
- package/dist/client/assets/{general-DjCTgVmp.js → general-CAvBksuG.js} +1 -1
- package/dist/client/assets/{home-CdIrQRml.js → home-DNlj1vDz.js} +1 -1
- package/dist/client/assets/{icon-button-CsR1tF4_.js → icon-button-DJ3FH_vW.js} +1 -1
- package/dist/client/assets/{index-B2nut9lY.js → index-BYsz2IG8.js} +1 -1
- package/dist/client/assets/{index-BlqL9SMO.js → index-CIf_Fy0-.js} +1 -1
- package/dist/client/assets/{index-U7sxkCtg.js → index-CL22V9cU.js} +2 -2
- package/dist/client/assets/{index-Ci7HVjCb.js → index-CpSJczgV.js} +1 -1
- package/dist/client/assets/{index-9DHxScVd.js → index-Csd6BEC_.js} +1 -1
- package/dist/client/assets/{index-B9Eu7iEA.js → index-DC6iJbGF.js} +1 -1
- package/dist/client/assets/{index-D-uNXrYS.js → index-DLA0mZnP.js} +1 -1
- package/dist/client/assets/{index-BxgIKT5E.js → index-Y3iKbmDC.js} +1 -1
- package/dist/client/assets/{index-C2Kh16_Z.js → index-aYlc7W7n.js} +1 -1
- package/dist/client/assets/{index-ECZj3unE.js → index-oBLJEYM1.js} +1 -1
- package/dist/client/assets/{index-C8t_0cfY.js → index-o_6CQvLG.js} +1 -1
- package/dist/client/assets/{index-redirect-DltXi-kk.js → index-redirect-D-avw8NV.js} +1 -1
- package/dist/client/assets/{index-DH_-9WPf.js → index-yN6Vji_x.js} +3 -3
- package/dist/client/assets/{index-CHnZ1OML.js → index-zHK7QZ16.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CXx-MaO_.js → infiniteQueryObserver-CkQRrcdR.js} +1 -1
- package/dist/client/assets/{infra-billing-CrrVVDdG.js → infra-billing-DYbiV_uv.js} +1 -1
- package/dist/client/assets/{input-CY_xbCC1.js → input-CFfgp0Tw.js} +1 -1
- package/dist/client/assets/{input-Dsubxg1J.js → input-qyM35152.js} +3 -3
- package/dist/client/assets/{integration-icon-B8zb5l7K.js → integration-icon-DO5tWS-C.js} +1 -1
- package/dist/client/assets/{jira-icon-CQAGuV2G.js → jira-icon-CLirt27c.js} +1 -1
- package/dist/client/assets/{label-BrB_d8st.js → label-CMx6o6z4.js} +1 -1
- package/dist/client/assets/{layout-gphUJcuu.js → layout-BOmiV94e.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CVxOaXa7.js → legacy-agents-deep-CNCjp9-J.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-WqO1j6y_.js → legacy-main-redirect-B7q15OBR.js} +1 -1
- package/dist/client/assets/library-DUvGua8d.js +1 -0
- package/dist/client/assets/{library-tab-ChNPvFjS.js → library-tab-BNFZabUZ.js} +1 -1
- package/dist/client/assets/{login-o-JLuwfW.js → login-Emu6BYEQ.js} +1 -1
- package/dist/client/assets/{markdown-B6KxKFZ3.js → markdown-BpBIe-s5.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CHuB1ZI6.js → mcp-app-renderer-ucNfuWrt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B-d-VRg6.js → mcp-oauth-HEDfQLbt.js} +1 -1
- package/dist/client/assets/{mcp-oauth-B_CRpHbq.js → mcp-oauth-tUb5Ku4P.js} +1 -1
- package/dist/client/assets/{members-CPD6F51f.js → members-5DGaxXGU.js} +1 -1
- package/dist/client/assets/{memory-OJn5uV0V.js → memory-BU6JoH4_.js} +1 -1
- package/dist/client/assets/{mini-report-page-CwDyJAfz.js → mini-report-page-BnvillTw.js} +1 -1
- package/dist/client/assets/{mock-board-CGiZtaDq.js → mock-board-CL5PjuNr.js} +1 -1
- package/dist/client/assets/{monaco-editor-BgXIJi37.js → monaco-editor-CQ53ujnX.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CRYRt9jM.js → monitoring-stats-row-CeE5cdl8.js} +1 -1
- package/dist/client/assets/{multi-select-2LqqBNod.js → multi-select-Bb_75Kq_.js} +1 -1
- package/dist/client/assets/{mustache-D2pCj9iS.js → mustache-CQikKf57.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Civny35s.js → new-project-dialog-CIdD-M5h.js} +1 -1
- package/dist/client/assets/{oauth-callback-CITtYS7F.js → oauth-callback-D5OtWQot.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-7ZDGQrFN.js → oauth-callback-ai-provider-mYrYVnqt.js} +1 -1
- package/dist/client/assets/{onboarding-BQWHCZlV.js → onboarding-s-Aq6pC0.js} +1 -1
- package/dist/client/assets/{openai-conversation-utJbcv70.js → openai-conversation-D0sRUrnM.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-_XftP7OV.js → optimistic-project-sidebar-views-DfaNoant.js} +1 -1
- package/dist/client/assets/{organization-choice-1vh8HAPM.js → organization-choice-DUpINEOM.js} +1 -1
- package/dist/client/assets/{orgs-BZ-5AWHQ.js → orgs-NyCttTtW.js} +1 -1
- package/dist/client/assets/{page-seo-form-DeitPdcq.js → page-seo-form-BcwaLsu1.js} +1 -1
- package/dist/client/assets/{pair-DikNYdKi.js → pair-C-wmghxs.js} +1 -1
- package/dist/client/assets/{plan-ladder-CIXyMEqm.js → plan-ladder-Dz96Ryba.js} +1 -1
- package/dist/client/assets/{popover-KA4f1Rso.js → popover-BJjSe4oX.js} +1 -1
- package/dist/client/assets/{post-calendar-P7Yczeyh.js → post-calendar-Dd7Rx0Y2.js} +1 -1
- package/dist/client/assets/{post-editor-D48qgVZF.js → post-editor-DUzLhnjz.js} +1 -1
- package/dist/client/assets/{preview-content-CsRoC8kG.js → preview-content-DLzimxeU.js} +1 -1
- package/dist/client/assets/{preview-dialog-CgACqBPB.js → preview-dialog-feNNzmyD.js} +1 -1
- package/dist/client/assets/{preview-panel-Bz6heUxj.js → preview-panel-CYRzCG9l.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-Bj-cxr4D.js → product-picker-dialog-DCoADulv.js} +1 -1
- package/dist/client/assets/{profile-DttmzwVP.js → profile-C4WMC8IX.js} +1 -1
- package/dist/client/assets/{project-app-view-B-LHkLR3.js → project-app-view-CLP8CgRj.js} +1 -1
- package/dist/client/assets/{project-feed-nuT0MGeK.js → project-feed-o8j1clyL.js} +1 -1
- package/dist/client/assets/{project-icon-BCIWlbB2.js → project-icon-DyrKdiRe.js} +1 -1
- package/dist/client/assets/project-reports-5Kg7yDsr.js +1 -0
- package/dist/client/assets/project-tasks-C93fh75m.js +1 -0
- package/dist/client/assets/{projects-6rC_NtTv.js → projects-DEh_o8C9.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BLhvUm-A.js → projects-empty-state-Cdl4kOQ1.js} +1 -1
- package/dist/client/assets/{prompts-Ba_KG-2c.js → prompts-Bc9FLvmN.js} +1 -1
- package/dist/client/assets/record-editor-B_D1bdnj.js +1 -0
- package/dist/client/assets/redirect-editor-CwqE3fJt.js +1 -0
- package/dist/client/assets/reports-Bmm0luQ2.js +1 -0
- package/dist/client/assets/{reports-D958VfvH.js → reports-oNZDdjI5.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Lt3lfqUL.js → reports-onboarding-DetN93z1.js} +1 -1
- package/dist/client/assets/{reports-tab-ZR-CeLn9.js → reports-tab-ChGluXDr.js} +2 -2
- package/dist/client/assets/{repositories-OT41oi2h.js → repositories-CiOfBaLB.js} +1 -1
- package/dist/client/assets/{repository-binding-C_rNGJZH.js → repository-binding-BGLfNZVf.js} +1 -1
- package/dist/client/assets/{repository-import-picker-yVMNVJAW.js → repository-import-picker-CglAAV-N.js} +1 -1
- package/dist/client/assets/{repository-picker-B4dJGi5H.js → repository-picker-Cn86nava.js} +1 -1
- package/dist/client/assets/{require-capability-Dh9KM2TE.js → require-capability-DvSGwHTo.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CDnv3SsX.js → required-auth-layout-YTpcWMST.js} +1 -1
- package/dist/client/assets/{reset-password-BBDI4kwV.js → reset-password-oN8mFGBD.js} +1 -1
- package/dist/client/assets/{resizable-E6xc07q4.js → resizable-BGEY0EFD.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BF6rqPgZ.js → resolve-tab-icon-voZLivWv.js} +1 -1
- package/dist/client/assets/{review-settings-NJYjR7BK.js → review-settings-DetXY7FI.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-CrNCYAJu.js → rich-text-link-control-CI2Op3JZ.js} +1 -1
- package/dist/client/assets/{roles-DH7V2rhC.js → roles-DUajMmJL.js} +1 -1
- package/dist/client/assets/{route-FBtmoSQ8.js → route-DJLRE8ic.js} +1 -1
- package/dist/client/assets/{route-Cj8uDmsr.js → route-Frsbu1bb.js} +1 -1
- package/dist/client/assets/route-JSQmVwkK.js +1 -0
- package/dist/client/assets/{runnable-block-editor-CSPOZTx9.js → runnable-block-editor-4vBz623-.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BFOchDNn.js → sandbox-lifecycle-context-C_3fMqSf.js} +1 -1
- package/dist/client/assets/{schema-Cx5CAoQi.js → schema-DAiRf49Q.js} +1 -1
- package/dist/client/assets/{scroll-area-gEfzLhri.js → scroll-area-D8pwM87R.js} +1 -1
- package/dist/client/assets/{search-input-tSXGNIP6.js → search-input-BADdEzRB.js} +1 -1
- package/dist/client/assets/{search-toggle-B2ZvA7nT.js → search-toggle-BXsTAhJH.js} +1 -1
- package/dist/client/assets/{secret-picker-BsE6_iwf.js → secret-picker-DYQ3Y0hB.js} +1 -1
- package/dist/client/assets/{secrets-D_3DGm4u.js → secrets-DkldztQE.js} +1 -1
- package/dist/client/assets/{sections-editor-CBUhadYU.js → sections-editor-C-qAs9t3.js} +1 -1
- package/dist/client/assets/{select-CbOgbS2d.js → select-DoctMyOC.js} +1 -1
- package/dist/client/assets/{select-model-DsSD6E8C.js → select-model-Coln0RuO.js} +1 -1
- package/dist/client/assets/{seo-editor-CnWdtXQc.js → seo-editor-AS6vQaHK.js} +1 -1
- package/dist/client/assets/{separator-Caj2juFE.js → separator-B4WfBd40.js} +1 -1
- package/dist/client/assets/{settings-tab-DqBSlRVf.js → settings-tab-DFn-ybRc.js} +1 -1
- package/dist/client/assets/{sheet-CcUwyeyx.js → sheet-B6SnxCii.js} +1 -1
- package/dist/client/assets/{shell-layout-DQzu_3a6.js → shell-layout-_gLI3g1W.js} +1 -1
- package/dist/client/assets/{skills-BAdMhSAc.js → skills-gj8cVLsz.js} +1 -1
- package/dist/client/assets/{slider-CfGhYSgO.js → slider-DN1_RJ5Y.js} +1 -1
- package/dist/client/assets/{sortable.esm-Djdx6Fqm.js → sortable.esm-39sGMg0A.js} +1 -1
- package/dist/client/assets/{sso-BdAlAmAg.js → sso-CMGxfocU.js} +1 -1
- package/dist/client/assets/{suggestion-BNgiJ1ZJ.js → suggestion-DPIiudVw.js} +1 -1
- package/dist/client/assets/{switch-BhazVYJL.js → switch-CXuIYT9e.js} +1 -1
- package/dist/client/assets/{symbol-D7hSGlXb.js → symbol-CTW82RbO.js} +1 -1
- package/dist/client/assets/{synced-repos-BC9YVpiQ.js → synced-repos-DAtDW7FL.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BYA6exv3.js → tab-icon-glyph-BkQvbqzH.js} +1 -1
- package/dist/client/assets/{table-BCWwFa46.js → table-1p2TxQNp.js} +1 -1
- package/dist/client/assets/{tabs-ygNtOTGD.js → tabs-CpwN-luG.js} +1 -1
- package/dist/client/assets/{task-board-CGKcZmT3.js → task-board-BR1DvBwF.js} +1 -1
- package/dist/client/assets/{task-route-Bc1A0MFY.js → task-route-C_DvpiOV.js} +1 -1
- package/dist/client/assets/{task-status-VxTqyW4d.js → task-status-edWeKF1d.js} +1 -1
- package/dist/client/assets/taskboard-analytics-BKAHiV-A.js +1 -0
- package/dist/client/assets/{tasks-LlnLf8Q6.js → tasks-0Nq-zOga.js} +1 -1
- package/dist/client/assets/tasks-CbEmZqW6.js +1 -0
- package/dist/client/assets/{textarea-Cz2yfMWd.js → textarea-BfwTTa-d.js} +1 -1
- package/dist/client/assets/{thread-analytics-DYe_it_u.js → thread-analytics-CopoUn-p.js} +1 -1
- package/dist/client/assets/{thread-button-DbPrz4-p.js → thread-button-D0jo5h0y.js} +1 -1
- package/dist/client/assets/{thread-intent-oxPmiLpE.js → thread-intent-CgK6_lx2.js} +1 -1
- package/dist/client/assets/{thread-route-fmJJCDUN.js → thread-route-B6Fc_RFE.js} +1 -1
- package/dist/client/assets/{thread-route-CydsZIWs.js → thread-route-CgdmmioO.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-D55xnaP7.js → thread-sheet-body-BK4lUe-W.js} +1 -1
- package/dist/client/assets/{time-range-picker-GRQ6ZyNo.js → time-range-picker-_BVYixos.js} +1 -1
- package/dist/client/assets/{toggle-group-BoHp8d1Q.js → toggle-group-DLHDaWVo.js} +1 -1
- package/dist/client/assets/{tool-namespace-BxpjstzE.js → tool-namespace-BPLgX6r-.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BmfLDUbS.js → toolbar-icon-button-C_OqF99U.js} +1 -1
- package/dist/client/assets/{tooltip-D9dKhMcM.js → tooltip-Dz-qpzYY.js} +1 -1
- package/dist/client/assets/{tooltipContext-C42keTPt.js → tooltipContext-C5rFwURT.js} +1 -1
- package/dist/client/assets/{track-B7AEg5DI.js → track-D8_YlvuV.js} +1 -1
- package/dist/client/assets/{types-DhTd2fZN.js → types-C-bGWQ4N.js} +1 -1
- package/dist/client/assets/{url-slug-BF1zPW8D.js → url-slug-DnJTGqgD.js} +1 -1
- package/dist/client/assets/{usage-stats-y9uwYGvN.js → usage-stats-Dskh866S.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CEZuf2wE.js → use-ai-providers-BAXvzpWI.js} +1 -1
- package/dist/client/assets/{use-automations-BbCwFFfW.js → use-automations-jtpzDfwI.js} +1 -1
- package/dist/client/assets/{use-autosave-CNjnDRHj.js → use-autosave-SKFoSjPt.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-Dl5fbmt9.js → use-chat-layout-state-CA9xW2qA.js} +1 -1
- package/dist/client/assets/{use-chat-navigation-Dlyibisy.js → use-chat-navigation-BYokh2PZ.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BMU-GnSw.js → use-clock-tick-D_sbvWIH.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DKwI-FYz.js → use-connect-companion-5bDO4jQu.js} +1 -1
- package/dist/client/assets/{use-connection-Bjwl8al7.js → use-connection-BIx1BUIM.js} +1 -1
- package/dist/client/assets/{use-copy-DWwjFTFc.js → use-copy-Da7eNVy9.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Cq6u3V6a.js → use-create-virtual-mcp-ejJy1cdv.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BTXcqaiw.js → use-date-fns-locale-CaWCAmJI.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DS6-D0Z3.js → use-debounced-autosave-DugSqk23.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BWgwAYQ4.js → use-debounced-value-DpRvXYf_.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B2DLMpWA.js → use-deco-credits-rm4q7hjq.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CaQ-ifBF.js → use-decopilot-events-DzS1GTJA.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BDlKnwpK.js → use-delete-connection-CveANzdS.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DkCmIWo6.js → use-deployment-admin-Dtf1f6in.js} +1 -1
- package/dist/client/assets/{use-ensure-project-folder-CqRNoawD.js → use-ensure-project-folder-DnwLT6n2.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-UzD2wX6r.js → use-fast-preview-draft-url-gddbB98r.js} +1 -1
- package/dist/client/assets/{use-file-configs-BlVRbWGm.js → use-file-configs-Cs5X6vH_.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-TxEXws4q.js → use-infinite-scroll-DzEoSjmb.js} +1 -1
- package/dist/client/assets/{use-join-requests-B2UcVFtB.js → use-join-requests-BFtEcuZ5.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CMS20W_c.js → use-main-panel-tabs-D3i-CtUA.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CPFHVJ3y.js → use-mcp-auth-status-DBZY5zBR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-hyHjvXHS.js → use-mcp-client-Dii6HKbn.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B4XQOyIC.js → use-mcp-prompts-BrfI-bT0.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DCX9XGmF.js → use-mcp-tools-DvCI3rin.js} +1 -1
- package/dist/client/assets/{use-members-BppTtT4e.js → use-members-Clb4I0WG.js} +1 -1
- package/dist/client/assets/{use-mobile-BfC7cdl6.js → use-mobile-H9hGbUdK.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DbxbeXIC.js → use-navigate-to-agent-C_Bk-WTy.js} +1 -1
- package/dist/client/assets/use-new-blocks-editor-ZHXdwaTL.js +1 -0
- package/dist/client/assets/{use-open-billing-url-BlRE_825.js → use-open-billing-url-CsVJpAR8.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BpOVJa8q.js → use-org-auth-client-CGnpmIwt.js} +1 -1
- package/dist/client/assets/{use-org-fs-CpG4Ftj0.js → use-org-fs-090kBeGb.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DAOwh9J_.js → use-org-repo-syncs-CXYmF8vW.js} +1 -1
- package/dist/client/assets/{use-org-sso-D2PH-QV7.js → use-org-sso-D0pRb0h2.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CG61KaMc.js → use-organization-roles-2XHDK9nW.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CPOQOxKw.js → use-organization-settings-BCnCWSM4.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DFsIXY6f.js → use-panel-navigate-CzmyA3PY.js} +1 -1
- package/dist/client/assets/{use-project-scope-BDGuEIbQ.js → use-project-scope-0DIp_prZ.js} +1 -1
- package/dist/client/assets/{use-releases-POJh7lfH.js → use-releases-CA_rM0y-.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BtTiu6Jz.js → use-reports-diagnostic-Nc7WKzHO.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-D1UC0d1h.js → use-sandbox-events-CUG13fIj.js} +1 -1
- package/dist/client/assets/{use-secrets-CcQOv1cy.js → use-secrets-CAgjCyZi.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DvkGVoSM.js → use-section-preview-base-nZ_rR067.js} +1 -1
- package/dist/client/assets/{use-tags-DP90qdqE.js → use-tags-Cx_sTi85.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BoVEsyvv.js → use-task-board-analytics-HMQ395Ct.js} +1 -1
- package/dist/client/assets/{use-task-board-events-C6vPjypN.js → use-task-board-events-BIxyvwMu.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-C0LWlrKc.js → use-task-board-item-prs-C-ZolRBO.js} +1 -1
- package/dist/client/assets/{use-task-board-items-Cx--Z4EY.js → use-task-board-items-fJTXcazL.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DXtRT11o.js → use-task-metadata-BGRg9gqV.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-DSKonBCj.js → use-thread-analytics-CNHU0H7W.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DR80xdVS.js → use-thread-outputs-BdDJ85ic.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DhuK1n82.js +1 -0
- package/dist/client/assets/{useQueries-BZ4QkddU.js → useQueries-SbEnc9zP.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DmpJFLm-.js +1 -0
- package/dist/client/assets/{users-CdPfAxNL.js → users-DAar6oNb.js} +1 -1
- package/dist/client/assets/{utils-DVQBiT32.js → utils-B82E0qSP.js} +1 -1
- package/dist/client/assets/{variant-calendar-W8FuVjAz.js → variant-calendar-C_pGmhST.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DWmch-z_.js → variant-matcher-override-CUEPR4IO.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DpnRn8BO.js → view-mode-toggle-0buE2kLD.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CadqoFCO.js → virtual-mcp-IOrpgzuz.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BK0LBG5W.js → watch-sse-pool-BFh4zrHL.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +235 -235
- package/package.json +1 -1
- package/dist/client/assets/agent-app-jRyWHA-b.js +0 -1
- package/dist/client/assets/agent-deck-iPy3FAq6.js +0 -1
- package/dist/client/assets/agent-library-CJFAZEFF.js +0 -1
- package/dist/client/assets/agent-library-file-DJUqDoIy.js +0 -1
- package/dist/client/assets/agent-settings-CHJwqyQm.js +0 -1
- package/dist/client/assets/agent-site-editor-code-LfbJWAq5.js +0 -2
- package/dist/client/assets/agent-view-KkOLU85d.js +0 -1
- package/dist/client/assets/api-keys-KOCO7qDg.js +0 -1
- package/dist/client/assets/app-editor-DdlK37s8.js +0 -1
- package/dist/client/assets/chat-context-kJ7vpE9_.js +0 -39
- package/dist/client/assets/flat-project-DadgDJiP.js +0 -1
- package/dist/client/assets/library-YJdPBcsq.js +0 -1
- package/dist/client/assets/project-reports-BuDozDAg.js +0 -1
- package/dist/client/assets/project-tasks-Bq0HB4Ij.js +0 -1
- package/dist/client/assets/record-editor-5kx4kvLF.js +0 -1
- package/dist/client/assets/redirect-editor-Bv9sv8zV.js +0 -1
- package/dist/client/assets/reports-DkLsDhHf.js +0 -1
- package/dist/client/assets/route-CUxOTTob.js +0 -1
- package/dist/client/assets/taskboard-analytics-BXD65o9V.js +0 -1
- package/dist/client/assets/tasks-qcYGJhAG.js +0 -1
- package/dist/client/assets/use-new-blocks-editor-DMV0JNBq.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D602T7Oc.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-TMfZO9fH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aD as s,bS as e,aE as o,bT as d,bU as l}from"./index-
|
|
1
|
+
import{aD as s,bS as e,aE as o,bT as d,bU as l}from"./index-CL22V9cU.js";const a=500;s({title:o().max(a),url:o().max(a),icon:o().max(a)});const t=s({keyId:o().max(a),modelId:o().max(a),title:o().max(a).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:o().min(1).max(a).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:o().min(1).max(a).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(o().max(a)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` built-in post blocks everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible. Off by default. Blocks already present in a post keep rendering; this only governs what can be added.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,by as A,bu as ce,j as b,bA as _,bN as ae,dl as O,bB as C,bH as P,bC as ie,c as F,l as $}from"./index-U7sxkCtg.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),v=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(B,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(B,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(B,{"data-state":n?"visible":"hidden",...t,ref:e})})}),B=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,T]=d.useState(null),Y=A(e,v=>T(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(v))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var V="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(V,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=V;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(V,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
1
|
+
import{r as d,by as A,bu as ce,j as b,bA as _,bN as ae,dl as O,bB as C,bH as P,bC as ie,c as F,l as $}from"./index-CL22V9cU.js";import{c as de}from"./index-BdQq_4o_.js";function ue(r,e){return d.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[a,c]=d.useState(null),[u,i]=d.useState(null),[h,f]=d.useState(null),[S,w]=d.useState(null),[T,Y]=d.useState(null),[x,L]=d.useState(0),[M,j]=d.useState(0),[D,y]=d.useState(!1),[N,H]=d.useState(!1),v=A(e,R=>c(R)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:a,viewport:u,onViewportChange:i,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:T,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:H,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),a=d.useRef(null),c=A(e,a,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:c,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,a=r.orientation==="horizontal";return d.useEffect(()=>(a?n(!0):s(!0),()=>{a?n(!1):s(!1)}),[a,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(B,{...l,ref:e}):null});Q.displayName=g;var he=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=d.useState(!1);return d.useEffect(()=>{const a=t.scrollArea;let c=0;if(a){const u=()=>{window.clearTimeout(c),s(!0)},i=()=>{c=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",i),()=>{window.clearTimeout(c),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",i)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>c("SCROLL_END"),100),[a,c]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>c("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,t.scrollHideDelay,c]),d.useEffect(()=>{const u=t.viewport,i=n?"scrollLeft":"scrollTop";if(u){let h=u[i];const f=()=>{const S=u[i];h!==S&&(c("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,c,s]),b.jsx(O,{present:o||a!=="hidden",children:b.jsx(B,{"data-state":a==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Z=d.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=d.useState(!1),a=r.orientation==="horizontal",c=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,i=o.viewport.offsetHeight<o.viewport.scrollHeight;s(a?u:i)}},10);return E(o.viewport,c),E(o.content,c),b.jsx(O,{present:l||n,children:b.jsx(B,{"data-state":n?"visible":"hidden",...t,ref:e})})}),B=d.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=d.useRef(null),s=d.useRef(0),[a,c]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(a.viewport,a.content),i={...l,sizes:a,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,a,S)}return o==="horizontal"?b.jsx(Se,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,a,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...i,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,a);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarXChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.x),onDragScroll:i=>r.onDragScroll(i.x),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+i.deltaX;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=d.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,a]=d.useState(),c=d.useRef(null),u=A(e,c,n.onScrollbarYChange);return d.useEffect(()=>{c.current&&a(getComputedStyle(c.current))},[c]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:i=>r.onThumbPointerDown(i.y),onDragScroll:i=>r.onDragScroll(i.y),onWheelScroll:(i,h)=>{if(n.viewport){const f=n.viewport.scrollTop+i.deltaY;r.onWheelScroll(f),se(f,h)&&i.preventDefault()}},onResize:()=>{c.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:i,onResize:h,...f}=r,S=m(g,o),[w,T]=d.useState(null),Y=A(e,v=>T(v)),x=d.useRef(null),L=d.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(i),y=P(c),N=X(h,10);function H(v){if(x.current){const p=v.clientX-x.current.left,R=v.clientY-x.current.top;u({x:p,y:R})}}return d.useEffect(()=>{const v=p=>{const R=p.target;w?.contains(R)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),d.useEffect(y,[l,y]),E(w,N),E(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(a),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),H(v))}),onPointerMove:C(r.onPointerMove,H),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),W="ScrollAreaThumb",oe=d.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(W,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(W,o),s=ee(W,o),{onThumbPositionChange:a}=s,c=A(e,h=>s.onThumbChange(h)),u=d.useRef(void 0),i=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return d.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(i(),!u.current){const S=xe(h,a);u.current=S,a()}};return a(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,i,a]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,T=h.clientY-S.top;s.onThumbPointerDown({x:w,y:T})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=W;var V="ScrollAreaCorner",te=d.forwardRef((r,e)=>{const o=m(V,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=V;var we=d.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(V,o),[n,s]=d.useState(0),[a,c]=d.useState(0),u=!!(n&&a);return E(t.scrollbarX,()=>{const i=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(i),c(i)}),E(t.scrollbarY,()=>{const i=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(i),s(i)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:a,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,a=t-s,c=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-a,i=o.content-o.viewport,h=l==="ltr"?[0,i]:[i*-1,0];return le([c,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,a=n-l,c=o==="ltr"?[0,s]:[s*-1,0],u=de(r,c);return le([0,s],[0,a])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,a=o.top!==n.top;(s||a)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(l.current),[]),d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function E(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Re=te;function _e(r){const e=F.c(21);let o,l,t,n,s;e[0]!==r?({className:l,children:o,hideScrollbar:n,viewportRef:s,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n,e[5]=s):(o=e[1],l=e[2],t=e[3],n=e[4],s=e[5]);const a=n===void 0?!1:n;let c;e[6]!==l?(c=$("relative h-full w-full",l),e[6]=l,e[7]=c):c=e[7];let u;e[8]!==o?(u=b.jsx("div",{className:"flex min-w-0 flex-col",children:o}),e[8]=o,e[9]=u):u=e[9];let i;e[10]!==u||e[11]!==s?(i=b.jsx(Ce,{ref:s,"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:u}),e[10]=u,e[11]=s,e[12]=i):i=e[12];let h;e[13]!==a?(h=b.jsx(Ee,{hideScrollbar:a}),e[13]=a,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(Re,{}),e[15]=f):f=e[15];let S;return e[16]!==t||e[17]!==c||e[18]!==i||e[19]!==h?(S=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[i,h,f]}),e[16]=t,e[17]=c,e[18]=i,e[19]=h,e[20]=S):S=e[20],S}function Ee(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,a=n===void 0?!1:n,c=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",i=a&&"hidden";let h;e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==i?(h=$("select-none touch-none p-px transition-colors",c,u,i,o),e[5]=o,e[6]=c,e[7]=u,e[8]=i,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as b,l as w,j as a,h as j}from"./index-
|
|
1
|
+
import{c as b,l as w,j as a,h as j}from"./index-CL22V9cU.js";import{i as v}from"./SearchMd-CMyj3n9E.js";function k(f){const e=b.c(17),{value:l,onChange:c,placeholder:m,onKeyDown:u,className:d,isSearching:p,disabled:r}=f,x=m===void 0?"Search...":m,h=r&&"pointer-events-none opacity-50";let t;e[0]!==d||e[1]!==h?(t=w("flex items-center gap-4 rounded-lg bg-[var(--studio-input-background)] px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",h,d),e[0]=d,e[1]=h,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{className:"size-4 text-muted-foreground/75 shrink-0"}):a.jsx(v,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=g=>c(g.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==r||e[8]!==u||e[9]!==x||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:u,placeholder:x,disabled:r,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=r,e[8]=u,e[9]=x,e[10]=s,e[11]=l,e[12]=o):o=e[12];let i;return e[13]!==t||e[14]!==n||e[15]!==o?(i=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=i):i=e[16],i}export{k as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as K,r as C,l as z,j as a,aV as M}from"./index-
|
|
1
|
+
import{c as K,r as C,l as z,j as a,aV as M}from"./index-CL22V9cU.js";import{i as B}from"./SearchMd-CMyj3n9E.js";import{I as O}from"./icon-button-DJ3FH_vW.js";function G(S){const e=K.c(34),{value:t,onChange:s,label:E,placeholder:D,clearLabel:F,expanded:o,className:j}=S,w=E===void 0?"Search":E,d=D===void 0?"Search…":D,y=F===void 0?"Clear search":F,[I,p]=C.useState(t!==""),[L,V]=C.useState(!1),[R,$]=C.useState(t);if(t!==R&&($(t),t===""&&!L&&p(!1)),!I&&!o){let l,g;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>p(!0),g=a.jsx(B,{}),e[0]=l,e[1]=g):(l=e[0],g=e[1]);let v;return e[2]!==w?(v=a.jsx(O,{label:w,tooltipSide:"bottom",variant:"secondary",onClick:l,children:g}),e[2]=w,e[3]=v):v=e[3],v}const _=o?"h-10 w-full px-3":"h-7 w-32 animate-search-expand px-2.5 sm:w-44";let n;e[4]!==j||e[5]!==_?(n=z("inline-flex shrink-0 items-center gap-1.5 overflow-hidden rounded-full bg-card text-card-foreground card-shadow",_,j),e[4]=j,e[5]=_,e[6]=n):n=e[6];let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(B,{className:"size-4 shrink-0 text-muted-foreground"}),e[7]=x):x=e[7];const k=!o;let r;e[8]!==s?(r=l=>s(l.target.value),e[8]=s,e[9]=r):r=e[9];let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=()=>V(!0),e[10]=h):h=e[10];let c;e[11]!==t?(c=()=>{V(!1),t===""&&p(!1)},e[11]=t,e[12]=c):c=e[12];let i;e[13]!==s?(i=l=>{l.key==="Escape"&&s("")},e[13]=s,e[14]=i):i=e[14];const N=o?"text-sm":"text-xs";let f;e[15]!==N?(f=z("w-full min-w-0 bg-transparent outline-none placeholder:text-muted-foreground",N),e[15]=N,e[16]=f):f=e[16];let u;e[17]!==d||e[18]!==c||e[19]!==i||e[20]!==f||e[21]!==k||e[22]!==r||e[23]!==t?(u=a.jsx("input",{autoFocus:k,value:t,onChange:r,onFocus:h,onBlur:c,onKeyDown:i,placeholder:d,"aria-label":d,className:f}),e[17]=d,e[18]=c,e[19]=i,e[20]=f,e[21]=k,e[22]=r,e[23]=t,e[24]=u):u=e[24];let m;e[25]!==y||e[26]!==o||e[27]!==s||e[28]!==t?(m=t!==""&&a.jsx("button",{type:"button","aria-label":y,onMouseDown:P,onClick:()=>{s(""),o||p(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:a.jsx(M,{className:"size-3.5"})}),e[25]=y,e[26]=o,e[27]=s,e[28]=t,e[29]=m):m=e[29];let b;return e[30]!==u||e[31]!==m||e[32]!==n?(b=a.jsxs("div",{className:n,children:[x,u,m]}),e[30]=u,e[31]=m,e[32]=n,e[33]=b):b=e[33],b}function P(S){return S.preventDefault()}export{G as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,b as d,j as l}from"./index-
|
|
1
|
+
import{c as x,b as d,j as l}from"./index-CL22V9cU.js";import{s as j}from"./User01-Swj6Wyaw.js";import{t as E}from"./Users01-BguvMR-H.js";const b=/^[A-Za-z0-9_.-]+$/;function h(u){const e=x.c(15),{field:p,secretById:t}=u,s=d(),n=p.value||"";if(!n)return null;let a;e[0]!==n||e[1]!==t?(a=t.get(n),e[0]=n,e[1]=t,e[2]=a):a=e[2];const c=a;if(!c){let i;e[3]!==n||e[4]!==s?(i=s("sandbox.envVarsField.missingSecret",{id:n}),e[3]=n,e[4]=s,e[5]=i):i=e[5];let f;return e[6]!==i?(f=l.jsx("span",{className:"text-destructive",children:i}),e[6]=i,e[7]=f):f=e[7],f}let o;e[8]!==c.scope?(o=l.jsx(N,{scope:c.scope}),e[8]=c.scope,e[9]=o):o=e[9];let r;e[10]!==c.name?(r=l.jsx("span",{className:"truncate font-mono",children:c.name}),e[10]=c.name,e[11]=r):r=e[11];let m;return e[12]!==o||e[13]!==r?(m=l.jsxs("span",{className:"inline-flex items-center gap-1.5 truncate",children:[o,r]}),e[12]=o,e[13]=r,e[14]=m):m=e[14],m}function N(u){const e=x.c(2),{scope:p}=u,t=p==="user"?j:E;let s;return e[0]!==t?(s=l.jsx(t,{className:"size-3 text-muted-foreground"}),e[0]=t,e[1]=s):s=e[1],s}export{h as S,b as a,N as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,b as y,j as s,n as C,fG as E,H as F,r as N,b2 as L,B as D,af as T,D as O,q as B,s as A,v as R,aK as q,I as _,w as I,t as z}from"./index-
|
|
1
|
+
import{c as j,b as y,j as s,n as C,fG as E,H as F,r as N,b2 as L,B as D,af as T,D as O,q as B,s as A,v as R,aK as q,I as _,w as I,t as z}from"./index-CL22V9cU.js";import{i as H}from"./AlertCircle-DWGeVbRZ.js";import{s as V}from"./Plus-BGNNWymV.js";import{s as G}from"./User01-Swj6Wyaw.js";import{t as K}from"./Users01-BguvMR-H.js";import{L as w}from"./label-CMx6o6z4.js";import{S as J,b as M,a as Q,d as U,c as P}from"./select-DoctMyOC.js";import{T as W}from"./textarea-BfwTTa-d.js";import{u as X,a as Y}from"./use-secrets-CAgjCyZi.js";import{R as Z}from"./require-capability-DvSGwHTo.js";import"./index-BdQq_4o_.js";import"./index-CIf_Fy0-.js";import"./ChevronUp-BXbTXhXZ.js";import"./access-gate-BifQwyWv.js";import"./capability-load-error-BglSkYA0.js";function ee(t){const e=j.c(6),{error:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(H,{size:16}),e[0]=c):c=e[0];let n;e[1]!==r.message||e[2]!==i?(n=i("settings.secrets.failedToLoadError",{error:r.message}),e[1]=r.message,e[2]=i,e[3]=n):n=e[3];let a;return e[4]!==n?(a=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[c,s.jsx("span",{className:"text-sm font-medium",children:n})]}),e[4]=n,e[5]=a):a=e[5],a}function te(t){const e=j.c(8),{scope:r}=t,i=y(),c=r==="user"?G:K;let n;e[0]!==r||e[1]!==i?(n=i(r==="user"?"settings.secrets.scopePrivate":"settings.secrets.scopeOrganization"),e[0]=r,e[1]=i,e[2]=n):n=e[2];const a=n;let l;e[3]!==c?(l=s.jsx(c,{size:12}),e[3]=c,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-xs",children:[l,a]}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}function $(t){const e=j.c(20),{secret:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(T,{size:16,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let c;e[1]!==r.name?(c=s.jsx("span",{className:"font-medium text-sm truncate",children:r.name}),e[1]=r.name,e[2]=c):c=e[2];let n;e[3]!==r.scope?(n=s.jsx(te,{scope:r.scope}),e[3]=r.scope,e[4]=n):n=e[4];let a;e[5]!==c||e[6]!==n?(a=s.jsxs("div",{className:"flex items-center gap-2",children:[c,n]}),e[5]=c,e[6]=n,e[7]=a):a=e[7];let l;e[8]!==r.description?(l=r.description?s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:r.description}):null,e[8]=r.description,e[9]=l):l=e[9];let o;e[10]!==a||e[11]!==l?(o=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[i,s.jsxs("div",{className:"min-w-0",children:[a,l]})]}),e[10]=a,e[11]=l,e[12]=o):o=e[12];let d;e[13]!==r.createdAt?(d=new Date(r.createdAt).toLocaleDateString(),e[13]=r.createdAt,e[14]=d):d=e[14];let m;e[15]!==d?(m=s.jsx("div",{className:"text-xs text-muted-foreground shrink-0",children:d}),e[15]=d,e[16]=m):m=e[16];let x;return e[17]!==o||e[18]!==m?(x=s.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[o,m]}),e[17]=o,e[18]=m,e[19]=x):x=e[19],x}function se(t){const e=j.c(15),{action:r}=t,i=y();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(T,{size:20,className:"text-muted-foreground"})}),e[0]=c):c=e[0];let n;e[1]!==i?(n=i("settings.secrets.emptyTitle"),e[1]=i,e[2]=n):n=e[2];let a;e[3]!==n?(a=s.jsx("p",{className:"font-medium text-sm",children:n}),e[3]=n,e[4]=a):a=e[4];let l;e[5]!==i?(l=i("settings.secrets.emptyDescription"),e[5]=i,e[6]=l):l=e[6];let o;e[7]!==l?(o=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:l}),e[7]=l,e[8]=o):o=e[8];let d;e[9]!==a||e[10]!==o?(d=s.jsxs("div",{children:[a,o]}),e[9]=a,e[10]=o,e[11]=d):d=e[11];let m;return e[12]!==r||e[13]!==d?(m=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,d,r]}),e[12]=r,e[13]=d,e[14]=m):m=e[14],m}function k({open:t,onOpenChange:e}){const r=y(),[i,c]=N.useState("organization"),[n,a]=N.useState(""),[l,o]=N.useState(""),[d,m]=N.useState(""),x=Y();function g(){c("organization"),a(""),o(""),m("")}function p(){g(),e(!1)}async function b(u){if(u.preventDefault(),!(!n.trim()||!l))try{await x.mutateAsync({scope:i,name:n.trim(),value:l,description:d.trim()||void 0}),z.success(r("settings.secrets.secretCreated",{name:n.trim()})),p()}catch(f){z.error(f instanceof Error?f.message:r("settings.secrets.failedToCreateSecret"))}}return s.jsx(O,{open:t,onOpenChange:u=>{u?e(u):p()},children:s.jsxs(B,{className:"sm:max-w-lg",children:[s.jsxs(A,{children:[s.jsx(R,{children:r("settings.secrets.newSecretTitle")}),s.jsx(q,{children:r("settings.secrets.newSecretDescription")})]}),s.jsxs("form",{onSubmit:b,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-scope",children:r("settings.secrets.scopeLabel")}),s.jsxs(J,{value:i,onValueChange:u=>c(u),children:[s.jsx(M,{id:"secret-scope",children:s.jsx(Q,{})}),s.jsxs(U,{children:[s.jsx(P,{value:"organization",children:r("settings.secrets.scopeOrganizationDescription")}),s.jsx(P,{value:"user",children:r("settings.secrets.scopePrivateDescription")})]})]})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-name",children:r("settings.secrets.nameLabel")}),s.jsx(_,{id:"secret-name",value:n,onChange:u=>a(u.target.value),placeholder:r("settings.secrets.namePlaceholder"),autoComplete:"off",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:r("settings.secrets.nameHelp")})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-value",children:r("settings.secrets.valueLabel")}),s.jsx(_,{id:"secret-value",type:"password",value:l,onChange:u=>o(u.target.value),autoComplete:"new-password",required:!0})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(w,{htmlFor:"secret-description",children:r("settings.secrets.descriptionLabel")}),s.jsx(W,{id:"secret-description",value:d,onChange:u=>m(u.target.value),rows:2,placeholder:r("settings.secrets.descriptionPlaceholder")})]}),s.jsxs(I,{children:[s.jsx(D,{type:"button",variant:"outline",onClick:p,disabled:x.isPending,children:r("settings.secrets.cancelButton")}),s.jsx(D,{type:"submit",disabled:x.isPending||!n.trim()||!l,children:x.isPending?r("settings.secrets.creatingButton"):r("settings.secrets.createButton")})]})]})]})})}function re(){const t=j.c(34),e=y(),r=X(),[i,c]=N.useState(!1);let n,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>c(!0),a=s.jsx(V,{size:14}),t[0]=n,t[1]=a):(n=t[0],a=t[1]);let l;t[2]!==e?(l=e("settings.secrets.newSecret"),t[2]=e,t[3]=l):l=t[3];let o;t[4]!==l?(o=s.jsx(C.Actions,{children:s.jsxs(D,{size:"sm",onClick:n,children:[a,l]})}),t[4]=l,t[5]=o):o=t[5];const d=o;if(r.length===0){let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(se,{action:!1}),t[6]=u):u=t[6];let f;t[7]!==i?(f=s.jsx(k,{open:i,onOpenChange:c}),t[7]=i,t[8]=f):f=t[8];let h;return t[9]!==d||t[10]!==f?(h=s.jsxs(s.Fragment,{children:[d,u,f]}),t[9]=d,t[10]=f,t[11]=h):h=t[11],h}let m,x,g;if(t[12]!==d||t[13]!==r||t[14]!==e){const u=r.filter(le),f=r.filter(ce),h=r.length===1?"settings.secrets.secretsCountSingular":"settings.secrets.secretsCountPlural";let S;t[18]!==r.length||t[19]!==e||t[20]!==h?(S=e(h,{count:r.length}),t[18]=r.length,t[19]=e,t[20]=h,t[21]=S):S=t[21];let v;t[22]!==S?(v=s.jsx("p",{className:"text-sm text-muted-foreground",children:S}),t[22]=S,t[23]=v):v=t[23],t[24]!==d||t[25]!==v?(m=s.jsxs("div",{className:"flex items-center justify-between",children:[v,d]}),t[24]=d,t[25]=v,t[26]=m):m=t[26],x=u.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionOrganization")}),s.jsx("div",{children:u.map(ie)})]}):null,g=f.length>0?s.jsxs("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:e("settings.secrets.sectionPrivate")}),s.jsx("div",{children:f.map(ne)})]}):null,t[12]=d,t[13]=r,t[14]=e,t[15]=m,t[16]=x,t[17]=g}else m=t[15],x=t[16],g=t[17];let p;t[27]!==i?(p=s.jsx(k,{open:i,onOpenChange:c}),t[27]=i,t[28]=p):p=t[28];let b;return t[29]!==m||t[30]!==x||t[31]!==g||t[32]!==p?(b=s.jsxs(s.Fragment,{children:[m,x,g,p]}),t[29]=m,t[30]=x,t[31]=g,t[32]=p,t[33]=b):b=t[33],b}function ne(t){return s.jsx($,{secret:t},t.id)}function ie(t){return s.jsx($,{secret:t},t.id)}function ce(t){return t.scope==="user"}function le(t){return t.scope==="organization"}function ae(){const t=j.c(7),e=y();let r;t[0]!==e?(r=e("settings.nav.secrets"),t[0]=e,t[1]=r):r=t[1];let i;t[2]!==r?(i=s.jsx(C.Title,{children:r}),t[2]=r,t[3]=i):i=t[3];let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(F,{fallback:oe,children:s.jsx(N.Suspense,{fallback:s.jsx(L,{className:"h-32 w-full"}),children:s.jsx(re,{})})}),t[4]=c):c=t[4];let n;return t[5]!==i?(n=s.jsx(C,{children:s.jsx(C.Content,{children:s.jsx(C.Container,{children:s.jsxs(E,{children:[i,c]})})})}),t[5]=i,t[6]=n):n=t[6],n}function oe(t){const{error:e}=t;return s.jsx(ee,{error:e??new Error("Failed to load secrets")})}function we(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z,{capability:"secrets:manage",area:"secrets",children:s.jsx(ae,{})}),t[0]=e):e=t[0],e}export{we as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ft,b as Dt,r as w,l as le,j as o,b1 as _i,B as xt,U as Qt,au as ki,X as Ei,V as Ri,a as Ai,o as Ni,h as Ci,t as z,K as Ti}from"./index-U7sxkCtg.js";import{u as Vi}from"./chat-context-kJ7vpE9_.js";import{u as In}from"./use-new-blocks-editor-DMV0JNBq.js";import{J as Mi,K as Di,N as Pi,O as Ki,Q as Ii,T as Bi,U as Fi,V as Li,W as Oi,X as kr,Y as $i,Z as zi,G as jt,_ as vt,$ as ze,a0 as Hi,H as Tn,E as Vn,e as Wi,f as Gi,j as qi,u as Ui,a1 as Er,o as Yi,a2 as Ji,q as Qi,n as Xi,a3 as to,p as vn,a4 as Zi,a5 as ea,C as Rr,a6 as ta,a7 as na,a8 as Nn,a9 as Ar,aa as Nr,ab as Cr,ac as ss,ad as sa,ae as ra,F as oa,af as Tr,ag as ia,ah as Vr,ai as Mr,M as aa,aj as Dr,d as la,ak as mn,al as ca,am as ua,an as pn,ao as da}from"./runnable-block-editor-CSPOZTx9.js";import{c as fa}from"./repository-binding-C_rNGJZH.js";import{n as ma,t as pa}from"./ChevronUp-D2V0rxEI.js";import{a6 as no,d as Pn,ak as ha,C as ga,$ as Pr,K as Kr}from"./agent-icon-BnC2DyaZ.js";import{S as Xt}from"./scroll-area-gEfzLhri.js";import{b as wt,T as _t,a as kt}from"./tooltip-D9dKhMcM.js";import{m as va,u as xa,P as ya}from"./mustache-D2pCj9iS.js";import{au as so,c as xs,av as ro,G as ba,aw as pt,ax as ls,ay as oo,ak as Ot,a8 as cs,az as us,al as Mt,a9 as Zt,j as Sa,l as ja,g as wa,r as Cn,ao as _a,aj as hn,aa as rs,ai as Vt,ah as gn,aA as ka,K as Ea,aB as Ra,am as Ir,a2 as Br,aC as Aa,aD as Lt,aE as Na,aF as Ca,aG as Ta,aH as Fr,aI as Va,aJ as Ma,aK as Da,ag as Pa,aL as Ka,aM as Ia,aN as Ba,X as Fa,aO as La,af as Oa,aP as $a}from"./claim-phase-copy-CxTfX9Sr.js";import{a as za}from"./Copy01-D52Dm87Z.js";import{a as ds,e as io}from"./UserSquare-Gs4U-X0G.js";import{i as Lr}from"./Tool01-BTVhARMR.js";import{s as Or}from"./Image01-CBMbNlWB.js";import{s as Ha}from"./Plus-DKtqOzS_.js";import{s as Wa}from"./Trash01-Cplj2Ik4.js";import{i as fs}from"./ZoomOut-CK4FVubR.js";import{u as Ga,a as $r,K as qa,P as Ua,b as Ya,C as Ja,D as Qa,c as Xa}from"./core.esm-C9y_2p9u.js";import{u as Za,s as el,a as Mn,S as tl,v as nl}from"./sortable.esm-Djdx6Fqm.js";import{A as zr}from"./avatar-DkyZyTLO.js";import{e as sl,d as Hr,b as rl,A as ol,a as il,f as al}from"./alert-dialog-DaPrRw6H.js";import{d as ll}from"./shell-layout-DQzu_3a6.js";import{a as cl,P as Wr,b as ul}from"./page-seo-form-DeitPdcq.js";import{u as dl,A as fl}from"./use-section-preview-base-DvkGVoSM.js";import{b as Gr,a as ml}from"./variant-matcher-override-DWmch-z_.js";import"./use-panel-navigate-DFsIXY6f.js";import"./thread-route-CydsZIWs.js";import"./use-project-scope-BDGuEIbQ.js";import"./autosend-Dna7U2HC.js";import"./thread-intent-oxPmiLpE.js";import"./use-mcp-client-hyHjvXHS.js";import"./auth-DpVa9FBr.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BK0LBG5W.js";import"./task-board-CGKcZmT3.js";import"./schema-Cx5CAoQi.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-CaQ-ifBF.js";import"./use-ai-providers-CEZuf2wE.js";import"./use-chat-navigation-Dlyibisy.js";import"./location-BjlyegC2.js";import"./use-organization-settings-CPOQOxKw.js";import"./input-Dsubxg1J.js";import"./usage-stats-y9uwYGvN.js";import"./tool-namespace-BxpjstzE.js";import"./form-iGrCLiiK.js";import"./label-BrB_d8st.js";import"./utils-CVEq3hMx.js";import"./markdown-B6KxKFZ3.js";import"./use-copy-DWwjFTFc.js";import"./use-mobile-BfC7cdl6.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./XClose-57_ntdgF.js";import"./icon-button-CsR1tF4_.js";import"./file-type-icon-SA_GdG2N.js";import"./chat-draft-BS9tIUoh.js";import"./LinkBroken01-ClQXqp6D.js";import"./ArrowUp-BhTDxCnH.js";import"./ShoppingBag01-CXpLfOIN.js";import"./Upload01-B6X2kk3D.js";import"./AlertCircle-CWfOEKki.js";import"./select-CbOgbS2d.js";import"./index-BdQq_4o_.js";import"./index-BlqL9SMO.js";import"./ArrowLeft-B5i4q13h.js";import"./tabs-ygNtOTGD.js";import"./use-deco-credits-B2DLMpWA.js";import"./toggle-group-BoHp8d1Q.js";import"./use-open-billing-url-BlRE_825.js";import"./index-Ci7HVjCb.js";import"./checkbox-CS0Igoet.js";import"./ChevronSelectorVertical-iTIvKtkg.js";import"./Key01-DqMMqipC.js";import"./SearchMd-Eodh17Ne.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-CWjK0W6g.js";import"./popover-KA4f1Rso.js";import"./drawer-CPnx75cL.js";import"./input-CY_xbCC1.js";import"./suggestion-BNgiJ1ZJ.js";import"./use-chat-layout-state-Dl5fbmt9.js";import"./use-file-configs-BlVRbWGm.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-B4XQOyIC.js";import"./use-org-fs-CpG4Ftj0.js";import"./useInfiniteQuery-D602T7Oc.js";import"./infiniteQueryObserver-CXx-MaO_.js";import"./Link01-CnfFWr1B.js";import"./question-004-sINsf4GQ.js";import"./use-members-BppTtT4e.js";import"./use-org-auth-client-BpOVJa8q.js";import"./feature-paywall-CgdVUKa4.js";import"./plan-ladder-CIXyMEqm.js";import"./add-connection-dialog-B6QIFmOE.js";import"./collection-search-CTKjuIpa.js";import"./extract-connection-data-B8QJH0-o.js";import"./metadata-D72DunRR.js";import"./connection-CpR5iu5o.js";import"./url-slug-BF1zPW8D.js";import"./connection-card-HH41R-gb.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-B8zb5l7K.js";import"./textarea-Cz2yfMWd.js";import"./use-connection-Bjwl8al7.js";import"./connection-form-helpers-DmYbPB1E.js";import"./authenticate-and-persist-oauth-CbYI0Hyu.js";import"./mcp-oauth-B_CRpHbq.js";import"./mcp-oauth-B-d-VRg6.js";import"./collection-tabs-HaSRL7BY.js";import"./badge-8YPtojDh.js";import"./use-infinite-scroll-TxEXws4q.js";import"./useSuspenseInfiniteQuery-TMfZO9fH.js";import"./use-task-board-events-C6vPjypN.js";import"./Play-CiT2g6kK.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-DikNYdKi.js";import"./collapsible-BeEr-w4N.js";import"./use-clock-tick-BMU-GnSw.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CHuB1ZI6.js";import"./types-DhTd2fZN.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CcUwyeyx.js";import"./use-navigate-to-agent-DbxbeXIC.js";import"./use-thread-outputs-DR80xdVS.js";import"./command-DW8vpIAn.js";import"./index-CHnZ1OML.js";import"./utils-DVQBiT32.js";import"./monaco-editor-BgXIJi37.js";import"./editor-yCqmKD--.js";import"./calendar-NFkdhgk9.js";import"./SwitchHorizontal01-Be__kNWY.js";import"./rich-text-link-control-CrNCYAJu.js";import"./switch-BhazVYJL.js";import"./view-mode-toggle-DpnRn8BO.js";import"./combobox-C6uurxAD.js";import"./sandbox-url-D3mC8qhT.js";import"./DotsVertical-D3Nk6PKk.js";import"./search-input-tSXGNIP6.js";import"./use-debounced-value-BWgwAYQ4.js";import"./asset-utils-BViQjnRQ.js";import"./sandbox-git-api-C7JbVL7R.js";import"./Building02-BB32RZGw.js";import"./CheckCircle-BAAjR6Yz.js";import"./CreditCard01-ukHBKeCx.js";import"./Globe04-CD1Fa9uc.js";import"./Sun-CQyxb836.js";import"./User01-CqwCn9hE.js";import"./Users01-HGukenVX.js";import"./project-icon-BCIWlbB2.js";import"./new-project-dialog-Civny35s.js";import"./repository-import-picker-yVMNVJAW.js";import"./repository-picker-B4dJGi5H.js";import"./required-auth-layout-CDnv3SsX.js";import"./use-org-sso-D2PH-QV7.js";import"./section-preview-url-7zfngvgW.js";function pl(n){return n.schema?.definitions??n.schema?.$defs??{}}function ao(n,e){const s=pl(e),i=s[btoa(n)];if(!i)return[];const l=[i];if(Array.isArray(i.allOf)){const d=i.allOf.find(h=>typeof h.$ref=="string")?.$ref;if(typeof d=="string"){const h=s[d.replace("#/definitions/","")];h&&l.push(h)}}return l}function hl(n,e){for(const s of ao(n,e)){const i=typeof s.image=="string"?s.image:void 0;if(i?.includes("{{{"))return i}}function gl(n,e){if(!e)return;const s=so(n);if(!s)return;const i=hl(s.resolveType,e);if(!i)return;const l=Mi(i,s.data);if(l)return Di(l)}const vl={escape:Pi};function xl(n,e){for(const s of ao(n,e)){const i=typeof s.title=="string"?s.title:void 0;if(i?.includes("{{"))return i}}function yl(n,e){if(!e)return;const s=so(n);if(s)try{const i=xl(s.resolveType,e);return i&&va.render(i,s.data,{},vl).trim()||void 0}catch{return}}function bl(n){const e=ft.c(13),{icon:s,label:i,className:l}=n;let d;e[0]!==l?(d=le("size-3.5",l),e[0]=l,e[1]=d):d=e[1];let h;e[2]!==s||e[3]!==d?(h=o.jsx(s,{className:d}),e[2]=s,e[3]=d,e[4]=h):h=e[4];let u;e[5]!==i||e[6]!==h?(u=o.jsx(_t,{asChild:!0,children:o.jsx("span",{role:"img","aria-label":i,className:"shrink-0 cursor-help",children:h})}),e[5]=i,e[6]=h,e[7]=u):u=e[7];let b;e[8]!==i?(b=o.jsx(kt,{className:"max-w-56",children:i}),e[8]=i,e[9]=b):b=e[9];let g;return e[10]!==u||e[11]!==b?(g=o.jsxs(wt,{children:[u,b]}),e[10]=u,e[11]=b,e[12]=g):g=e[12],g}const Sl="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function qr(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function lo(n){return n.map((e,s)=>({...e,index:s}))}function jl(n,e){if(e===n.length)return n;if(e<n.length)return lo(n.slice(0,e));const s=Array.from({length:e-n.length},(i,l)=>({id:crypto.randomUUID(),index:n.length+l}));return[...n,...s]}function co(n){const e=ft.c(44),{section:s,raw:i,meta:l,decofile:d}=n,h=Dt(),u=In(),b=s.isSavedBlock===!0,g=s.isMultivariate===!0;let k;e[0]!==l||e[1]!==i?(k=i&&l?gl(i,l):void 0,e[0]=l,e[1]=i,e[2]=k):k=e[2];const E=k;let U;e[3]!==l||e[4]!==g||e[5]!==i||e[6]!==b?(U=i&&l&&!b&&!g?yl(i,l):void 0,e[3]=l,e[4]=g,e[5]=i,e[6]=b,e[7]=U):U=e[7];const X=U;let F;e[8]!==d||e[9]!==l||e[10]!==i||e[11]!==s?(F=Oi(i,s,d,l),e[8]=d,e[9]=l,e[10]=i,e[11]=s,e[12]=F):F=e[12];const L=F;let f;e[13]!==g||e[14]!==i?.__resolveType?(f=!g&&xs(i?.__resolveType??""),e[13]=g,e[14]=i?.__resolveType,e[15]=f):f=e[15];const A=f,Y=b?Pn:g?no:io;let j;e[16]!==g||e[17]!==b?(j=b?{color:ba}:g?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=g,e[17]=b,e[18]=j):j=e[18];const H=j;let V;e[19]!==Y||e[20]!==u?(V=u?o.jsxs("span",{className:"relative size-4 shrink-0",children:[o.jsx(Y,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),o.jsx(zi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):o.jsx(ha,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=Y,e[20]=u,e[21]=V):V=e[21];let v;e[22]!==E?(v=E&&o.jsx("img",{src:E,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=E,e[23]=v):v=e[23];let C;e[24]!==u||e[25]!==H?(C=!u&&o.jsx(ds,{className:"h-4 w-4 shrink-0",style:H}),e[24]=u,e[25]=H,e[26]=C):C=e[26];const x=u?"shrink":"flex-1",re=s.isHidden&&"line-through opacity-50";let P;e[27]!==re||e[28]!==x?(P=le("min-w-0 truncate text-sm font-medium",x,re),e[27]=re,e[28]=x,e[29]=P):P=e[29];const oe=X??s.label;let de;e[30]!==P||e[31]!==oe?(de=o.jsx("span",{className:P,children:oe}),e[30]=P,e[31]=oe,e[32]=de):de=e[32];let Z;e[33]!==A||e[34]!==u||e[35]!==L||e[36]!==h?(Z=u?o.jsxs(o.Fragment,{children:[A&&o.jsx(bl,{icon:fs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),L&&o.jsx(kr,{}),o.jsx("span",{className:"min-w-0 flex-1"})]}):L&&o.jsx(kr,{className:"absolute -right-0.5 -top-0.5"}),e[33]=A,e[34]=u,e[35]=L,e[36]=h,e[37]=Z):Z=e[37];let te;return e[38]!==de||e[39]!==Z||e[40]!==V||e[41]!==v||e[42]!==C?(te=o.jsxs(o.Fragment,{children:[V,v,C,de,Z]}),e[38]=de,e[39]=Z,e[40]=V,e[41]=v,e[42]=C,e[43]=te):te=e[43],te}const wl="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_l="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function uo(n,e,s){if(s)return $i({selected:e});const i=n.isSavedBlock===!0,l=n.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":i?wl:l?_l:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function os(n,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function kl(n){const e=ft.c(90),{section:s,raw:i,meta:l,decofile:d,sortableId:h,selected:u,onSelect:b,onDelete:g,onDuplicate:k,onMakeReusable:E,onToggleHidden:U,onToggleLazy:X,onAddVariant:F,onDetach:L}=n,f=Dt(),A=In(),Y=i?xs(i.__resolveType??""):!1,j=s.isHidden===!0,H=Y||j;let V;e[0]!==s?(V=ro(s),e[0]=s,e[1]=V):V=e[1];const v=V;let C;e[2]!==h?(C={id:h,animateLayoutChanges:Al},e[2]=h,e[3]=C):C=e[3];const{attributes:x,listeners:re,setNodeRef:P,transform:oe,isDragging:de}=Za(C);let Z;e[4]!==oe?(Z=Ja.Transform.toString(oe?{...oe,x:0}:null),e[4]=oe,e[5]=Z):Z=e[5];const te=de?0:void 0;let S;e[6]!==Z||e[7]!==te?(S={transform:Z,opacity:te},e[6]=Z,e[7]=te,e[8]=S):S=e[8];const W=S;let je;e[9]!==s?(je=Ii(s),e[9]=s,e[10]=je):je=e[10];const K=je,He="button",G=0;let Ee;e[11]!==b?(Ee=ee=>{(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),b())},e[11]=b,e[12]=Ee):Ee=e[12];const xe=de?"cursor-grabbing":"cursor-pointer";let Re;e[13]!==A||e[14]!==s||e[15]!==u||e[16]!==xe?(Re=le("touch-none transition-colors",xe,uo(s,u,A)),e[13]=A,e[14]=s,e[15]=u,e[16]=xe,e[17]=Re):Re=e[17];let Be;e[18]!==d||e[19]!==l||e[20]!==i||e[21]!==s?(Be=o.jsx(co,{section:s,raw:i,meta:l,decofile:d}),e[18]=d,e[19]=l,e[20]=i,e[21]=s,e[22]=Be):Be=e[22];const we=!A&&!s.isMultivariate&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(os(H,Y)),onClick:ee=>{ee.stopPropagation(),X()},onPointerDown:Rl,children:o.jsx(fs,{className:le("h-3.5 w-3.5",Y&&"text-warning")})})}),o.jsx(kt,{side:"bottom",children:f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),ie=A?o.jsx(Bi,{label:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:j,onToggle:U,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})}):o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(os(H,j)),onClick:ee=>{ee.stopPropagation(),U()},onPointerDown:El,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})})}),o.jsx(kt,{side:"bottom",children:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),B=Ei,O=Fi;let I;e[23]!==f?(I=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=I):I=e[24];const D=le(os(H,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let Ce;e[25]!==O||e[26]!==I||e[27]!==D?(Ce=o.jsx(O,{label:I,classicClassName:D}),e[25]=O,e[26]=I,e[27]=D,e[28]=Ce):Ce=e[28];let Ye;e[29]!==A||e[30]!==Y||e[31]!==X||e[32]!==s.isMultivariate||e[33]!==f?(Ye=A&&!s.isMultivariate&&o.jsxs(o.Fragment,{children:[o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),X()},children:[o.jsx(fs,{className:"h-4 w-4"}),f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),o.jsx(ki,{})]}),e[29]=A,e[30]=Y,e[31]=X,e[32]=s.isMultivariate,e[33]=f,e[34]=Ye):Ye=e[34];let Je;e[35]!==k?(Je=ee=>{ee.stopPropagation(),k()},e[35]=k,e[36]=Je):Je=e[36];let tt;e[37]===Symbol.for("react.memo_cache_sentinel")?(tt=o.jsx(za,{className:"h-4 w-4"}),e[37]=tt):tt=e[37];let ne;e[38]!==f?(ne=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=ne):ne=e[39];let ye;e[40]!==Je||e[41]!==ne?(ye=o.jsxs(Qt,{onClick:Je,children:[tt,ne]}),e[40]=Je,e[41]=ne,e[42]=ye):ye=e[42];let Fe;e[43]!==A||e[44]!==v||e[45]!==F||e[46]!==f?(Fe=v&&o.jsxs(Qt,{className:le(!A&&Li),onClick:ee=>{ee.stopPropagation(),F()},children:[o.jsx(no,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=A,e[44]=v,e[45]=F,e[46]=f,e[47]=Fe):Fe=e[47];let Te;e[48]!==A||e[49]!==K||e[50]!==E||e[51]!==f?(Te=K&&o.jsxs(Qt,{className:le(!A&&Sl),onClick:ee=>{ee.stopPropagation(),E()},children:[A?o.jsx(Pn,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=A,e[49]=K,e[50]=E,e[51]=f,e[52]=Te):Te=e[52];let fe;e[53]!==A||e[54]!==L||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(fe=s.isSavedBlock===!0&&!s.isMultivariate&&o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),L()},children:[A?o.jsx(io,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=A,e[54]=L,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=fe):fe=e[58];let Ve;e[59]!==g?(Ve=ee=>{ee.stopPropagation(),g()},e[59]=g,e[60]=Ve):Ve=e[60];let Pe;e[61]===Symbol.for("react.memo_cache_sentinel")?(Pe=o.jsx(Wa,{className:"h-4 w-4"}),e[61]=Pe):Pe=e[61];let Qe;e[62]!==f?(Qe=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Qe):Qe=e[63];let Ae;e[64]!==Ve||e[65]!==Qe?(Ae=o.jsxs(Qt,{variant:"destructive",onClick:Ve,children:[Pe,Qe]}),e[64]=Ve,e[65]=Qe,e[66]=Ae):Ae=e[66];let We;e[67]!==Ye||e[68]!==ye||e[69]!==Fe||e[70]!==Te||e[71]!==fe||e[72]!==Ae?(We=o.jsxs(Ri,{align:"end",className:"w-44",children:[Ye,ye,Fe,Te,fe,Ae]}),e[67]=Ye,e[68]=ye,e[69]=Fe,e[70]=Te,e[71]=fe,e[72]=Ae,e[73]=We):We=e[73];let Le;e[74]!==B||e[75]!==Ce||e[76]!==We?(Le=o.jsxs(B,{children:[Ce,We]}),e[74]=B,e[75]=Ce,e[76]=We,e[77]=Le):Le=e[77];let Ge;return e[78]!==x||e[79]!==re||e[80]!==b||e[81]!==P||e[82]!==W||e[83]!==Re||e[84]!==Be||e[85]!==we||e[86]!==ie||e[87]!==Le||e[88]!==Ee?(Ge=o.jsxs("div",{ref:P,style:W,...x,...re,role:He,tabIndex:G,onClick:b,onKeyDown:Ee,className:Re,children:[Be,we,ie,Le]}),e[78]=x,e[79]=re,e[80]=b,e[81]=P,e[82]=W,e[83]=Re,e[84]=Be,e[85]=we,e[86]=ie,e[87]=Le,e[88]=Ee,e[89]=Ge):Ge=e[89],Ge}function El(n){return n.stopPropagation()}function Rl(n){return n.stopPropagation()}function Al(){return!1}function ms(n){const e=ft.c(11),{canAddSection:s,onAddSection:i,className:l,size:d}=n,h=Dt();let u;e[0]!==l?(u=le("w-full",l),e[0]=l,e[1]=u):u=e[1];const b=!s;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Ha,{size:14}),e[2]=g):g=e[2];let k;e[3]!==h?(k=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=k):k=e[4];let E;return e[5]!==i||e[6]!==d||e[7]!==u||e[8]!==b||e[9]!==k?(E=o.jsxs(xt,{type:"button",variant:"outline",size:d,className:u,disabled:b,onClick:i,children:[g,k]}),e[5]=i,e[6]=d,e[7]=u,e[8]=b,e[9]=k,e[10]=E):E=e[10],E}function Nl(n){const e=ft.c(101),{listKey:s,rawSections:i,sections:l,meta:d,decofile:h,selectedIndex:u,onSelect:b,onReorder:g,onDelete:k,onDuplicate:E,onMakeReusable:U,onToggleHidden:X,onToggleLazy:F,onAddVariant:L,onDetach:f,onAddSection:A,canAddSection:Y}=n,j=Y===void 0?!0:Y,H=Dt(),V=In();let v;e[0]!==l.length?(v=()=>qr(l.length),e[0]=l.length,e[1]=v):v=e[1];const[C,x]=w.useState(v),[re,P]=w.useState(null),[oe,de]=w.useState(s),[Z,te]=w.useState(l.length),S=w.useRef(!1);oe!==s?(de(s),te(l.length),x(qr(l.length))):Z!==l.length&&(te(l.length),x(nt=>jl(nt,l.length)));let W;e[2]===Symbol.for("react.memo_cache_sentinel")?(W={activationConstraint:{distance:8}},e[2]=W):W=e[2];let je;e[3]===Symbol.for("react.memo_cache_sentinel")?(je={coordinateGetter:el},e[3]=je):je=e[3];const K=Ga($r(Ua,W),$r(qa,je));let He;e[4]!==C?(He=C.map(Cl),e[4]=C,e[5]=He):He=e[5];const G=He;let Ee;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ee=nt=>{P(String(nt.active.id))},e[6]=Ee):Ee=e[6];const xe=Ee;let Re;e[7]!==G||e[8]!==g?(Re=nt=>{P(null);const{active:se,over:pe}=nt;if(!pe||se.id===pe.id)return;const rt=G.indexOf(String(se.id)),ce=G.indexOf(String(pe.id));rt===-1||ce===-1||(x(it=>lo(Mn([...it],rt,ce))),S.current=!0,requestAnimationFrame(()=>{S.current=!1}),g?.(rt,ce))},e[7]=G,e[8]=g,e[9]=Re):Re=e[9];const Be=Re;let we;e[10]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{P(null)},e[10]=we):we=e[10];const ie=we;let B,O,I,D,Ce,Ye,Je,tt,ne,ye,Fe,Te,fe,Ve,Pe;if(e[11]!==re||e[12]!==j||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==G||e[17]!==Be||e[18]!==d||e[19]!==A||e[20]!==L||e[21]!==k||e[22]!==f||e[23]!==E||e[24]!==U||e[25]!==b||e[26]!==X||e[27]!==F||e[28]!==i||e[29]!==l||e[30]!==u||e[31]!==K||e[32]!==H){Ve=Symbol.for("react.early_return_sentinel");e:{const nt=se=>{S.current||b(se)};if(e[48]!==re||e[49]!==j||e[50]!==V||e[51]!==C||e[52]!==A||e[53]!==i||e[54]!==l||e[55]!==H){const se=re?C.find(pe=>pe.id===re):null;if(D=se!=null?l[se.index]:null,I=se!=null?i[se.index]:void 0,C.length===0){let pe;e[59]!==H?(pe=H("sectionsEditor.sectionList.noSections"),e[59]=H,e[60]=pe):pe=e[60];let rt;e[61]!==pe?(rt=o.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:pe}),e[61]=pe,e[62]=rt):rt=e[62];const ce=rt;let it;e[63]!==j||e[64]!==V||e[65]!==ce||e[66]!==A?(it=V?ce:o.jsxs("div",{className:"space-y-2",children:[ce,o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm"})]}),e[63]=j,e[64]=V,e[65]=ce,e[66]=A,e[67]=it):it=e[67],Ve=it;break e}fe=le(se&&"cursor-grabbing"),e[48]=re,e[49]=j,e[50]=V,e[51]=C,e[52]=A,e[53]=i,e[54]=l,e[55]=H,e[56]=I,e[57]=D,e[58]=fe}else I=e[56],D=e[57],fe=e[58];O=Qa,tt=K,ne=Xa,ye=xe,Fe=Be,Te=ie,B=tl,Ye=G,Je=nl,Pe="space-y-1",Ce=C.map(se=>{const pe=l[se.index];return pe?o.jsx(kl,{sortableId:se.id,section:pe,raw:i[se.index],meta:d,decofile:h,selected:u===se.index,onSelect:()=>nt(se.index),onDelete:()=>k(se.index),onDuplicate:()=>E(se.index),onMakeReusable:()=>U(se.index),onToggleHidden:()=>X(se.index),onToggleLazy:()=>F(se.index),onAddVariant:()=>L(se.index),onDetach:()=>f(se.index)},se.id):null})}e[11]=re,e[12]=j,e[13]=V,e[14]=h,e[15]=C,e[16]=G,e[17]=Be,e[18]=d,e[19]=A,e[20]=L,e[21]=k,e[22]=f,e[23]=E,e[24]=U,e[25]=b,e[26]=X,e[27]=F,e[28]=i,e[29]=l,e[30]=u,e[31]=K,e[32]=H,e[33]=B,e[34]=O,e[35]=I,e[36]=D,e[37]=Ce,e[38]=Ye,e[39]=Je,e[40]=tt,e[41]=ne,e[42]=ye,e[43]=Fe,e[44]=Te,e[45]=fe,e[46]=Ve,e[47]=Pe}else B=e[33],O=e[34],I=e[35],D=e[36],Ce=e[37],Ye=e[38],Je=e[39],tt=e[40],ne=e[41],ye=e[42],Fe=e[43],Te=e[44],fe=e[45],Ve=e[46],Pe=e[47];if(Ve!==Symbol.for("react.early_return_sentinel"))return Ve;let Qe;e[68]!==Ce||e[69]!==Pe?(Qe=o.jsx("div",{className:Pe,children:Ce}),e[68]=Ce,e[69]=Pe,e[70]=Qe):Qe=e[70];let Ae;e[71]!==B||e[72]!==Ye||e[73]!==Je||e[74]!==Qe?(Ae=o.jsx(B,{items:Ye,strategy:Je,children:Qe}),e[71]=B,e[72]=Ye,e[73]=Je,e[74]=Qe,e[75]=Ae):Ae=e[75];let We;e[76]!==I||e[77]!==D||e[78]!==V||e[79]!==h||e[80]!==d?(We=D?o.jsx("div",{className:le("cursor-grabbing shadow-lg ring-1 ring-border/60",uo(D,!1,V)),children:o.jsx(co,{section:D,raw:I,meta:d,decofile:h})}):null,e[76]=I,e[77]=D,e[78]=V,e[79]=h,e[80]=d,e[81]=We):We=e[81];let Le;e[82]!==We?(Le=_i.createPortal(o.jsx(Ya,{dropAnimation:Ki,children:We}),document.body),e[82]=We,e[83]=Le):Le=e[83];let Ge;e[84]!==O||e[85]!==tt||e[86]!==ne||e[87]!==ye||e[88]!==Fe||e[89]!==Te||e[90]!==Ae||e[91]!==Le?(Ge=o.jsxs(O,{sensors:tt,collisionDetection:ne,onDragStart:ye,onDragEnd:Fe,onDragCancel:Te,children:[Ae,Le]}),e[84]=O,e[85]=tt,e[86]=ne,e[87]=ye,e[88]=Fe,e[89]=Te,e[90]=Ae,e[91]=Le,e[92]=Ge):Ge=e[92];let ee;e[93]!==j||e[94]!==V||e[95]!==A?(ee=!V&&o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm",className:"mt-2"}),e[93]=j,e[94]=V,e[95]=A,e[96]=ee):ee=e[96];let zt;return e[97]!==fe||e[98]!==Ge||e[99]!==ee?(zt=o.jsxs("div",{className:fe,children:[Ge,ee]}),e[97]=fe,e[98]=Ge,e[99]=ee,e[100]=zt):zt=e[100],zt}function Cl(n){return n.id}function is(n,e,s,i){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,i)?.data??null;const l=pt(n,e),d=l?ls(l,vt)[s]:void 0;return d?oo(d.value,i)?.data??null:null}const Tl=50;function Vl(n,e){n.own.push(ze(e)),n.own.length>Tl&&n.own.shift()}function Ur(n,e){return n.own.includes(ze(e))}function Ml(n,e){const{sectionIndex:s,variantIndex:i,shown:l,next:d,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===i&&n.emitted===l?(n.emitted=d,n):l?{sectionIndex:s,variantIndex:i,base:l,emitted:d,sectionCount:h,own:[ze(l)]}:null}function fo(n,e){return e!==null&&ze(n)!==ze(e)}function mo(n,e){return n.__resolveType!==e.__resolveType}function Dl(n,e,s,i){if(e.length===i)return"here";const l=ze(n),d=e.flatMap((h,u)=>u!==s&&h!==null&&ze(h)===l?[u]:[]);return d.length===1?d[0]:"unknown"}function Pl({merged:n,tracked:e,current:s,saved:i}){return!!n&&!!e&&s===e&&e.emitted===i}function Kl(n,e){return!!n&&!!e&&n.contains(e)}function ps(n){const e=[],s=hs("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function hs(n,e,s,i,l){const d=(h,u)=>ze(h)===ze(u);if(d(s,i)||d(e,i))return s;if(d(e,s))return i;if(as(s)&&as(i)){const h=as(e)?e:{},u={},b=[...Object.keys(s),...Object.keys(i).filter(g=>!(g in s))];for(const g of b){const k=hs(`${n}/${g.replaceAll("~","~0").replaceAll("/","~1")}`,h[g],s[g],i[g],l);k!==void 0&&(u[g]=k)}return u}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(i)&&s.length===e.length&&i.length===e.length?e.map((h,u)=>hs(`${n}/${u}`,h,s[u],i[u],l)):(l.push(n),i)}function as(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Il(n,e){let s=n.merged;for(const i of n.pointers)e[i]==="mine"&&(s=Ol(s,i,$t(n.mine,i)));return s}function Bl(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function po(n){return Bl(n,"mine")}function gs(n,e,s){const i=po(s);for(const l of s.pointers){const d=e[l];if(!d||!n.pointers.includes(l))continue;["mine","theirs"].every(u=>ze($t(n[u],l))===ze($t(s[u],l)))&&(i[l]=d)}return i}function ho(n,e,s={}){const i=e.pointers.filter(l=>!n.pointers.includes(l)||ze($t(n.theirs,l))!==ze($t(e.theirs,l)));return i.length===0?s:{...s,...Object.fromEntries(i.map(l=>[l,(s[l]??0)+1]))}}function Fl(n,e,s){if(!e||mo(n.plan.ancestor,e)||!fo(n.plan.theirs,e)||s(e))return null;const i=ps({...n.plan,theirs:e});return i.pointers.length===0?null:{plan:i,choices:gs(n.plan,n.choices,i),fresh:ho(n.plan,i,n.fresh)}}function Ll(n,e){return n.pointers.map(s=>({pointer:s,label:Hi(s,e),mine:$t(n.mine,s),theirs:$t(n.theirs,s),schema:$l(e??null,s)}))}function ys(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function $t(n,e){let s=n;for(const i of ys(e))if(Array.isArray(s))s=s[Number(i)];else if(s&&typeof s=="object")s=s[i];else return;return s}function Ol(n,e,s){const i=ys(e),l=(d,h)=>{if(h===i.length)return s;const u=i[h];if(Array.isArray(d)){const k=[...d];return k[Number(u)]=l(d[Number(u)],h+1),k}const b=d&&typeof d=="object"?{...d}:{},g=l(b[u],h+1);return g===void 0?delete b[u]:b[u]=g,b};return l(n,0)}function $l(n,e){let s=n;for(const i of ys(e)){if(!s)return null;s=/^\d+$/.test(i)&&!s.properties?.[i]?s.items:s.properties?.[i]}return s??null}const zl=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,Yr=60,Hl=3;function go(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&zl.test(n)}function vs(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const i=n.replace(/<br\s*\/?>/gi,`
|
|
1
|
+
import{c as ft,b as Dt,r as w,l as le,j as o,b1 as _i,B as xt,U as Qt,au as ki,X as Ei,V as Ri,a as Ai,o as Ni,h as Ci,t as z,K as Ti}from"./index-CL22V9cU.js";import{u as Vi}from"./chat-context-CQm-6egv.js";import{u as In}from"./use-new-blocks-editor-ZHXdwaTL.js";import{J as Mi,K as Di,N as Pi,O as Ki,Q as Ii,T as Bi,U as Fi,V as Li,W as Oi,X as kr,Y as $i,Z as zi,G as jt,_ as vt,$ as ze,a0 as Hi,H as Tn,E as Vn,e as Wi,f as Gi,j as qi,u as Ui,a1 as Er,o as Yi,a2 as Ji,q as Qi,n as Xi,a3 as to,p as vn,a4 as Zi,a5 as ea,C as Rr,a6 as ta,a7 as na,a8 as Nn,a9 as Ar,aa as Nr,ab as Cr,ac as ss,ad as sa,ae as ra,F as oa,af as Tr,ag as ia,ah as Vr,ai as Mr,M as aa,aj as Dr,d as la,ak as mn,al as ca,am as ua,an as pn,ao as da}from"./runnable-block-editor-4vBz623-.js";import{c as fa}from"./repository-binding-BGLfNZVf.js";import{n as ma,t as pa}from"./ChevronUp-BXbTXhXZ.js";import{a6 as no,d as Pn,ak as ha,C as ga,$ as Pr,K as Kr}from"./agent-icon-CvfPq7BK.js";import{S as Xt}from"./scroll-area-D8pwM87R.js";import{b as wt,T as _t,a as kt}from"./tooltip-Dz-qpzYY.js";import{m as va,u as xa,P as ya}from"./mustache-CQikKf57.js";import{au as so,c as xs,av as ro,G as ba,aw as pt,ax as ls,ay as oo,ak as Ot,a8 as cs,az as us,al as Mt,a9 as Zt,j as Sa,l as ja,g as wa,r as Cn,ao as _a,aj as hn,aa as rs,ai as Vt,ah as gn,aA as ka,K as Ea,aB as Ra,am as Ir,a2 as Br,aC as Aa,aD as Lt,aE as Na,aF as Ca,aG as Ta,aH as Fr,aI as Va,aJ as Ma,aK as Da,ag as Pa,aL as Ka,aM as Ia,aN as Ba,X as Fa,aO as La,af as Oa,aP as $a}from"./claim-phase-copy-DgYG3gXQ.js";import{a as za}from"./Copy01-Daz7AFYE.js";import{a as ds,e as io}from"./UserSquare--AVOLLKT.js";import{i as Lr}from"./Tool01-CIRW7kd4.js";import{s as Or}from"./Image01-6k6QI1dX.js";import{s as Ha}from"./Plus-BGNNWymV.js";import{s as Wa}from"./Trash01-BJZRU-Yu.js";import{i as fs}from"./ZoomOut-C7vMH9KG.js";import{u as Ga,a as $r,K as qa,P as Ua,b as Ya,C as Ja,D as Qa,c as Xa}from"./core.esm-BBQ2k6X-.js";import{u as Za,s as el,a as Mn,S as tl,v as nl}from"./sortable.esm-39sGMg0A.js";import{A as zr}from"./avatar-BWSDv40I.js";import{e as sl,d as Hr,b as rl,A as ol,a as il,f as al}from"./alert-dialog-BoGCVrZa.js";import{d as ll}from"./shell-layout-_gLI3g1W.js";import{a as cl,P as Wr,b as ul}from"./page-seo-form-BcwaLsu1.js";import{u as dl,A as fl}from"./use-section-preview-base-nZ_rR067.js";import{b as Gr,a as ml}from"./variant-matcher-override-CUEPR4IO.js";import"./use-panel-navigate-CzmyA3PY.js";import"./thread-route-CgdmmioO.js";import"./use-project-scope-0DIp_prZ.js";import"./autosend-Bed_2rHW.js";import"./thread-intent-CgK6_lx2.js";import"./use-mcp-client-Dii6HKbn.js";import"./auth-CtdecWhn.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BFh4zrHL.js";import"./task-board-BR1DvBwF.js";import"./schema-DAiRf49Q.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-DzS1GTJA.js";import"./use-ai-providers-BAXvzpWI.js";import"./use-chat-navigation-BYokh2PZ.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BCnCWSM4.js";import"./input-qyM35152.js";import"./usage-stats-Dskh866S.js";import"./tool-namespace-BPLgX6r-.js";import"./form-C0Gw14kB.js";import"./label-CMx6o6z4.js";import"./utils-CVEq3hMx.js";import"./markdown-BpBIe-s5.js";import"./use-copy-Da7eNVy9.js";import"./use-mobile-H9hGbUdK.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./XClose-CxTFVFLs.js";import"./icon-button-DJ3FH_vW.js";import"./file-type-icon-DQJBqcjt.js";import"./chat-draft-CLRrKKYW.js";import"./LinkBroken01-Shxg1MDA.js";import"./ArrowUp-BmS2ipPe.js";import"./ShoppingBag01-DhBZJiPR.js";import"./Upload01-CdF0U1Ox.js";import"./AlertCircle-DWGeVbRZ.js";import"./select-DoctMyOC.js";import"./index-BdQq_4o_.js";import"./index-CIf_Fy0-.js";import"./ArrowLeft-DKZiHtC9.js";import"./tabs-CpwN-luG.js";import"./use-deco-credits-rm4q7hjq.js";import"./toggle-group-DLHDaWVo.js";import"./use-open-billing-url-CsVJpAR8.js";import"./index-CpSJczgV.js";import"./checkbox-cJ0fZWJo.js";import"./ChevronSelectorVertical-Cz_mr8Ub.js";import"./Key01-BCUfWyre.js";import"./SearchMd-CMyj3n9E.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-C6hS1MDr.js";import"./popover-BJjSe4oX.js";import"./drawer-Z6WGmFEd.js";import"./input-CFfgp0Tw.js";import"./suggestion-DPIiudVw.js";import"./use-chat-layout-state-CA9xW2qA.js";import"./use-file-configs-Cs5X6vH_.js";import"./site-slug-DebpOoQq.js";import"./use-mcp-prompts-BrfI-bT0.js";import"./use-org-fs-090kBeGb.js";import"./useInfiniteQuery-DhuK1n82.js";import"./infiniteQueryObserver-CkQRrcdR.js";import"./Link01-B2ZUVqeX.js";import"./question-004-sINsf4GQ.js";import"./use-members-Clb4I0WG.js";import"./use-org-auth-client-CGnpmIwt.js";import"./feature-paywall-K9l_m1PM.js";import"./plan-ladder-Dz96Ryba.js";import"./add-connection-dialog-C99-KIxD.js";import"./collection-search-BqrF-OSq.js";import"./extract-connection-data-R_HCwhv9.js";import"./metadata-D72DunRR.js";import"./connection-DsYXyfMO.js";import"./url-slug-DnJTGqgD.js";import"./connection-card-KKabYrZM.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-DO5tWS-C.js";import"./textarea-BfwTTa-d.js";import"./use-connection-BIx1BUIM.js";import"./connection-form-helpers-D5AT-OBk.js";import"./authenticate-and-persist-oauth-Cs8htcLH.js";import"./mcp-oauth-tUb5Ku4P.js";import"./mcp-oauth-HEDfQLbt.js";import"./collection-tabs-B9w_j2Q-.js";import"./badge-BZ6ZWtlL.js";import"./use-infinite-scroll-DzEoSjmb.js";import"./useSuspenseInfiniteQuery-DmpJFLm-.js";import"./use-task-board-events-BIxyvwMu.js";import"./Play-C5HXiIgy.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-C-wmghxs.js";import"./collapsible-Di8zO8dv.js";import"./use-clock-tick-D_sbvWIH.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-ucNfuWrt.js";import"./types-C-bGWQ4N.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-B6SnxCii.js";import"./use-navigate-to-agent-C_Bk-WTy.js";import"./use-thread-outputs-BdDJ85ic.js";import"./command-psdI3Avp.js";import"./index-zHK7QZ16.js";import"./utils-B82E0qSP.js";import"./monaco-editor-CQ53ujnX.js";import"./editor-ZVt04ZDu.js";import"./calendar-CUQ5339S.js";import"./SwitchHorizontal01-CDaKlB_n.js";import"./rich-text-link-control-CI2Op3JZ.js";import"./switch-CXuIYT9e.js";import"./view-mode-toggle-0buE2kLD.js";import"./combobox-C7W7K3yr.js";import"./sandbox-url-D3mC8qhT.js";import"./DotsVertical-B5WoSbKn.js";import"./search-input-BADdEzRB.js";import"./use-debounced-value-DpRvXYf_.js";import"./asset-utils-C0JplDix.js";import"./sandbox-git-api-C7JbVL7R.js";import"./Building02-CmZEvaAI.js";import"./CheckCircle-Cxvlb0-w.js";import"./CreditCard01-BFLArPt1.js";import"./Globe04-CHujm8Rh.js";import"./Sun-BZz5Ay79.js";import"./User01-Swj6Wyaw.js";import"./Users01-BguvMR-H.js";import"./project-icon-DyrKdiRe.js";import"./new-project-dialog-CIdD-M5h.js";import"./repository-import-picker-CglAAV-N.js";import"./repository-picker-Cn86nava.js";import"./required-auth-layout-YTpcWMST.js";import"./use-org-sso-D0pRb0h2.js";import"./section-preview-url-7zfngvgW.js";function pl(n){return n.schema?.definitions??n.schema?.$defs??{}}function ao(n,e){const s=pl(e),i=s[btoa(n)];if(!i)return[];const l=[i];if(Array.isArray(i.allOf)){const d=i.allOf.find(h=>typeof h.$ref=="string")?.$ref;if(typeof d=="string"){const h=s[d.replace("#/definitions/","")];h&&l.push(h)}}return l}function hl(n,e){for(const s of ao(n,e)){const i=typeof s.image=="string"?s.image:void 0;if(i?.includes("{{{"))return i}}function gl(n,e){if(!e)return;const s=so(n);if(!s)return;const i=hl(s.resolveType,e);if(!i)return;const l=Mi(i,s.data);if(l)return Di(l)}const vl={escape:Pi};function xl(n,e){for(const s of ao(n,e)){const i=typeof s.title=="string"?s.title:void 0;if(i?.includes("{{"))return i}}function yl(n,e){if(!e)return;const s=so(n);if(s)try{const i=xl(s.resolveType,e);return i&&va.render(i,s.data,{},vl).trim()||void 0}catch{return}}function bl(n){const e=ft.c(13),{icon:s,label:i,className:l}=n;let d;e[0]!==l?(d=le("size-3.5",l),e[0]=l,e[1]=d):d=e[1];let h;e[2]!==s||e[3]!==d?(h=o.jsx(s,{className:d}),e[2]=s,e[3]=d,e[4]=h):h=e[4];let u;e[5]!==i||e[6]!==h?(u=o.jsx(_t,{asChild:!0,children:o.jsx("span",{role:"img","aria-label":i,className:"shrink-0 cursor-help",children:h})}),e[5]=i,e[6]=h,e[7]=u):u=e[7];let b;e[8]!==i?(b=o.jsx(kt,{className:"max-w-56",children:i}),e[8]=i,e[9]=b):b=e[9];let g;return e[10]!==u||e[11]!==b?(g=o.jsxs(wt,{children:[u,b]}),e[10]=u,e[11]=b,e[12]=g):g=e[12],g}const Sl="text-global-section-fg focus:bg-global-section/12 focus:text-global-section-fg dark:text-global-section-fg-dark dark:focus:bg-global-section/15 dark:focus:text-global-section-fg-dark [&_svg]:!text-global-section";function qr(n){return Array.from({length:n},(e,s)=>({id:crypto.randomUUID(),index:s}))}function lo(n){return n.map((e,s)=>({...e,index:s}))}function jl(n,e){if(e===n.length)return n;if(e<n.length)return lo(n.slice(0,e));const s=Array.from({length:e-n.length},(i,l)=>({id:crypto.randomUUID(),index:n.length+l}));return[...n,...s]}function co(n){const e=ft.c(44),{section:s,raw:i,meta:l,decofile:d}=n,h=Dt(),u=In(),b=s.isSavedBlock===!0,g=s.isMultivariate===!0;let k;e[0]!==l||e[1]!==i?(k=i&&l?gl(i,l):void 0,e[0]=l,e[1]=i,e[2]=k):k=e[2];const E=k;let U;e[3]!==l||e[4]!==g||e[5]!==i||e[6]!==b?(U=i&&l&&!b&&!g?yl(i,l):void 0,e[3]=l,e[4]=g,e[5]=i,e[6]=b,e[7]=U):U=e[7];const X=U;let F;e[8]!==d||e[9]!==l||e[10]!==i||e[11]!==s?(F=Oi(i,s,d,l),e[8]=d,e[9]=l,e[10]=i,e[11]=s,e[12]=F):F=e[12];const L=F;let f;e[13]!==g||e[14]!==i?.__resolveType?(f=!g&&xs(i?.__resolveType??""),e[13]=g,e[14]=i?.__resolveType,e[15]=f):f=e[15];const A=f,Y=b?Pn:g?no:io;let j;e[16]!==g||e[17]!==b?(j=b?{color:ba}:g?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=g,e[17]=b,e[18]=j):j=e[18];const H=j;let V;e[19]!==Y||e[20]!==u?(V=u?o.jsxs("span",{className:"relative size-4 shrink-0",children:[o.jsx(Y,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),o.jsx(zi,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):o.jsx(ha,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=Y,e[20]=u,e[21]=V):V=e[21];let v;e[22]!==E?(v=E&&o.jsx("img",{src:E,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=E,e[23]=v):v=e[23];let C;e[24]!==u||e[25]!==H?(C=!u&&o.jsx(ds,{className:"h-4 w-4 shrink-0",style:H}),e[24]=u,e[25]=H,e[26]=C):C=e[26];const x=u?"shrink":"flex-1",re=s.isHidden&&"line-through opacity-50";let P;e[27]!==re||e[28]!==x?(P=le("min-w-0 truncate text-sm font-medium",x,re),e[27]=re,e[28]=x,e[29]=P):P=e[29];const oe=X??s.label;let de;e[30]!==P||e[31]!==oe?(de=o.jsx("span",{className:P,children:oe}),e[30]=P,e[31]=oe,e[32]=de):de=e[32];let Z;e[33]!==A||e[34]!==u||e[35]!==L||e[36]!==h?(Z=u?o.jsxs(o.Fragment,{children:[A&&o.jsx(bl,{icon:fs,label:h("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),L&&o.jsx(kr,{}),o.jsx("span",{className:"min-w-0 flex-1"})]}):L&&o.jsx(kr,{className:"absolute -right-0.5 -top-0.5"}),e[33]=A,e[34]=u,e[35]=L,e[36]=h,e[37]=Z):Z=e[37];let te;return e[38]!==de||e[39]!==Z||e[40]!==V||e[41]!==v||e[42]!==C?(te=o.jsxs(o.Fragment,{children:[V,v,C,de,Z]}),e[38]=de,e[39]=Z,e[40]=V,e[41]=v,e[42]=C,e[43]=te):te=e[43],te}const wl="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",_l="text-[oklch(0.45_0.15_160)] hover:bg-[oklch(0.65_0.15_160/0.12)] dark:text-[oklch(0.78_0.15_160)] dark:hover:bg-[oklch(0.65_0.15_160/0.15)]";function uo(n,e,s){if(s)return $i({selected:e});const i=n.isSavedBlock===!0,l=n.isMultivariate===!0;return le("group relative flex select-none items-center gap-2 rounded-[var(--studio-control-radius,var(--radius-md))] px-2 py-2.5",e?"bg-accent text-accent-foreground":i?wl:l?_l:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function os(n,e){return le("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":n?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function kl(n){const e=ft.c(90),{section:s,raw:i,meta:l,decofile:d,sortableId:h,selected:u,onSelect:b,onDelete:g,onDuplicate:k,onMakeReusable:E,onToggleHidden:U,onToggleLazy:X,onAddVariant:F,onDetach:L}=n,f=Dt(),A=In(),Y=i?xs(i.__resolveType??""):!1,j=s.isHidden===!0,H=Y||j;let V;e[0]!==s?(V=ro(s),e[0]=s,e[1]=V):V=e[1];const v=V;let C;e[2]!==h?(C={id:h,animateLayoutChanges:Al},e[2]=h,e[3]=C):C=e[3];const{attributes:x,listeners:re,setNodeRef:P,transform:oe,isDragging:de}=Za(C);let Z;e[4]!==oe?(Z=Ja.Transform.toString(oe?{...oe,x:0}:null),e[4]=oe,e[5]=Z):Z=e[5];const te=de?0:void 0;let S;e[6]!==Z||e[7]!==te?(S={transform:Z,opacity:te},e[6]=Z,e[7]=te,e[8]=S):S=e[8];const W=S;let je;e[9]!==s?(je=Ii(s),e[9]=s,e[10]=je):je=e[10];const K=je,He="button",G=0;let Ee;e[11]!==b?(Ee=ee=>{(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),b())},e[11]=b,e[12]=Ee):Ee=e[12];const xe=de?"cursor-grabbing":"cursor-pointer";let Re;e[13]!==A||e[14]!==s||e[15]!==u||e[16]!==xe?(Re=le("touch-none transition-colors",xe,uo(s,u,A)),e[13]=A,e[14]=s,e[15]=u,e[16]=xe,e[17]=Re):Re=e[17];let Be;e[18]!==d||e[19]!==l||e[20]!==i||e[21]!==s?(Be=o.jsx(co,{section:s,raw:i,meta:l,decofile:d}),e[18]=d,e[19]=l,e[20]=i,e[21]=s,e[22]=Be):Be=e[22];const we=!A&&!s.isMultivariate&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(os(H,Y)),onClick:ee=>{ee.stopPropagation(),X()},onPointerDown:Rl,children:o.jsx(fs,{className:le("h-3.5 w-3.5",Y&&"text-warning")})})}),o.jsx(kt,{side:"bottom",children:f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),ie=A?o.jsx(Bi,{label:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:j,onToggle:U,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})}):o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(os(H,j)),onClick:ee=>{ee.stopPropagation(),U()},onPointerDown:El,children:j?o.jsx(Lr,{className:"h-3.5 w-3.5"}):o.jsx(Or,{className:"h-3.5 w-3.5"})})}),o.jsx(kt,{side:"bottom",children:f(j?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),B=Ei,O=Fi;let I;e[23]!==f?(I=f("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=f,e[24]=I):I=e[24];const D=le(os(H,!1),"data-[state=open]:ml-0 data-[state=open]:w-7 data-[state=open]:opacity-100 data-[state=open]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]");let Ce;e[25]!==O||e[26]!==I||e[27]!==D?(Ce=o.jsx(O,{label:I,classicClassName:D}),e[25]=O,e[26]=I,e[27]=D,e[28]=Ce):Ce=e[28];let Ye;e[29]!==A||e[30]!==Y||e[31]!==X||e[32]!==s.isMultivariate||e[33]!==f?(Ye=A&&!s.isMultivariate&&o.jsxs(o.Fragment,{children:[o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),X()},children:[o.jsx(fs,{className:"h-4 w-4"}),f(Y?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),o.jsx(ki,{})]}),e[29]=A,e[30]=Y,e[31]=X,e[32]=s.isMultivariate,e[33]=f,e[34]=Ye):Ye=e[34];let Je;e[35]!==k?(Je=ee=>{ee.stopPropagation(),k()},e[35]=k,e[36]=Je):Je=e[36];let tt;e[37]===Symbol.for("react.memo_cache_sentinel")?(tt=o.jsx(za,{className:"h-4 w-4"}),e[37]=tt):tt=e[37];let ne;e[38]!==f?(ne=f("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=f,e[39]=ne):ne=e[39];let ye;e[40]!==Je||e[41]!==ne?(ye=o.jsxs(Qt,{onClick:Je,children:[tt,ne]}),e[40]=Je,e[41]=ne,e[42]=ye):ye=e[42];let Fe;e[43]!==A||e[44]!==v||e[45]!==F||e[46]!==f?(Fe=v&&o.jsxs(Qt,{className:le(!A&&Li),onClick:ee=>{ee.stopPropagation(),F()},children:[o.jsx(no,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=A,e[44]=v,e[45]=F,e[46]=f,e[47]=Fe):Fe=e[47];let Te;e[48]!==A||e[49]!==K||e[50]!==E||e[51]!==f?(Te=K&&o.jsxs(Qt,{className:le(!A&&Sl),onClick:ee=>{ee.stopPropagation(),E()},children:[A?o.jsx(Pn,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=A,e[49]=K,e[50]=E,e[51]=f,e[52]=Te):Te=e[52];let fe;e[53]!==A||e[54]!==L||e[55]!==s.isMultivariate||e[56]!==s.isSavedBlock||e[57]!==f?(fe=s.isSavedBlock===!0&&!s.isMultivariate&&o.jsxs(Qt,{onClick:ee=>{ee.stopPropagation(),L()},children:[A?o.jsx(io,{className:"h-4 w-4"}):o.jsx(ds,{className:"h-4 w-4"}),f("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=A,e[54]=L,e[55]=s.isMultivariate,e[56]=s.isSavedBlock,e[57]=f,e[58]=fe):fe=e[58];let Ve;e[59]!==g?(Ve=ee=>{ee.stopPropagation(),g()},e[59]=g,e[60]=Ve):Ve=e[60];let Pe;e[61]===Symbol.for("react.memo_cache_sentinel")?(Pe=o.jsx(Wa,{className:"h-4 w-4"}),e[61]=Pe):Pe=e[61];let Qe;e[62]!==f?(Qe=f("sectionsEditor.sectionList.deleteMenuItem"),e[62]=f,e[63]=Qe):Qe=e[63];let Ae;e[64]!==Ve||e[65]!==Qe?(Ae=o.jsxs(Qt,{variant:"destructive",onClick:Ve,children:[Pe,Qe]}),e[64]=Ve,e[65]=Qe,e[66]=Ae):Ae=e[66];let We;e[67]!==Ye||e[68]!==ye||e[69]!==Fe||e[70]!==Te||e[71]!==fe||e[72]!==Ae?(We=o.jsxs(Ri,{align:"end",className:"w-44",children:[Ye,ye,Fe,Te,fe,Ae]}),e[67]=Ye,e[68]=ye,e[69]=Fe,e[70]=Te,e[71]=fe,e[72]=Ae,e[73]=We):We=e[73];let Le;e[74]!==B||e[75]!==Ce||e[76]!==We?(Le=o.jsxs(B,{children:[Ce,We]}),e[74]=B,e[75]=Ce,e[76]=We,e[77]=Le):Le=e[77];let Ge;return e[78]!==x||e[79]!==re||e[80]!==b||e[81]!==P||e[82]!==W||e[83]!==Re||e[84]!==Be||e[85]!==we||e[86]!==ie||e[87]!==Le||e[88]!==Ee?(Ge=o.jsxs("div",{ref:P,style:W,...x,...re,role:He,tabIndex:G,onClick:b,onKeyDown:Ee,className:Re,children:[Be,we,ie,Le]}),e[78]=x,e[79]=re,e[80]=b,e[81]=P,e[82]=W,e[83]=Re,e[84]=Be,e[85]=we,e[86]=ie,e[87]=Le,e[88]=Ee,e[89]=Ge):Ge=e[89],Ge}function El(n){return n.stopPropagation()}function Rl(n){return n.stopPropagation()}function Al(){return!1}function ms(n){const e=ft.c(11),{canAddSection:s,onAddSection:i,className:l,size:d}=n,h=Dt();let u;e[0]!==l?(u=le("w-full",l),e[0]=l,e[1]=u):u=e[1];const b=!s;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(Ha,{size:14}),e[2]=g):g=e[2];let k;e[3]!==h?(k=h("sectionsEditor.sectionList.addSectionButton"),e[3]=h,e[4]=k):k=e[4];let E;return e[5]!==i||e[6]!==d||e[7]!==u||e[8]!==b||e[9]!==k?(E=o.jsxs(xt,{type:"button",variant:"outline",size:d,className:u,disabled:b,onClick:i,children:[g,k]}),e[5]=i,e[6]=d,e[7]=u,e[8]=b,e[9]=k,e[10]=E):E=e[10],E}function Nl(n){const e=ft.c(101),{listKey:s,rawSections:i,sections:l,meta:d,decofile:h,selectedIndex:u,onSelect:b,onReorder:g,onDelete:k,onDuplicate:E,onMakeReusable:U,onToggleHidden:X,onToggleLazy:F,onAddVariant:L,onDetach:f,onAddSection:A,canAddSection:Y}=n,j=Y===void 0?!0:Y,H=Dt(),V=In();let v;e[0]!==l.length?(v=()=>qr(l.length),e[0]=l.length,e[1]=v):v=e[1];const[C,x]=w.useState(v),[re,P]=w.useState(null),[oe,de]=w.useState(s),[Z,te]=w.useState(l.length),S=w.useRef(!1);oe!==s?(de(s),te(l.length),x(qr(l.length))):Z!==l.length&&(te(l.length),x(nt=>jl(nt,l.length)));let W;e[2]===Symbol.for("react.memo_cache_sentinel")?(W={activationConstraint:{distance:8}},e[2]=W):W=e[2];let je;e[3]===Symbol.for("react.memo_cache_sentinel")?(je={coordinateGetter:el},e[3]=je):je=e[3];const K=Ga($r(Ua,W),$r(qa,je));let He;e[4]!==C?(He=C.map(Cl),e[4]=C,e[5]=He):He=e[5];const G=He;let Ee;e[6]===Symbol.for("react.memo_cache_sentinel")?(Ee=nt=>{P(String(nt.active.id))},e[6]=Ee):Ee=e[6];const xe=Ee;let Re;e[7]!==G||e[8]!==g?(Re=nt=>{P(null);const{active:se,over:pe}=nt;if(!pe||se.id===pe.id)return;const rt=G.indexOf(String(se.id)),ce=G.indexOf(String(pe.id));rt===-1||ce===-1||(x(it=>lo(Mn([...it],rt,ce))),S.current=!0,requestAnimationFrame(()=>{S.current=!1}),g?.(rt,ce))},e[7]=G,e[8]=g,e[9]=Re):Re=e[9];const Be=Re;let we;e[10]===Symbol.for("react.memo_cache_sentinel")?(we=()=>{P(null)},e[10]=we):we=e[10];const ie=we;let B,O,I,D,Ce,Ye,Je,tt,ne,ye,Fe,Te,fe,Ve,Pe;if(e[11]!==re||e[12]!==j||e[13]!==V||e[14]!==h||e[15]!==C||e[16]!==G||e[17]!==Be||e[18]!==d||e[19]!==A||e[20]!==L||e[21]!==k||e[22]!==f||e[23]!==E||e[24]!==U||e[25]!==b||e[26]!==X||e[27]!==F||e[28]!==i||e[29]!==l||e[30]!==u||e[31]!==K||e[32]!==H){Ve=Symbol.for("react.early_return_sentinel");e:{const nt=se=>{S.current||b(se)};if(e[48]!==re||e[49]!==j||e[50]!==V||e[51]!==C||e[52]!==A||e[53]!==i||e[54]!==l||e[55]!==H){const se=re?C.find(pe=>pe.id===re):null;if(D=se!=null?l[se.index]:null,I=se!=null?i[se.index]:void 0,C.length===0){let pe;e[59]!==H?(pe=H("sectionsEditor.sectionList.noSections"),e[59]=H,e[60]=pe):pe=e[60];let rt;e[61]!==pe?(rt=o.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:pe}),e[61]=pe,e[62]=rt):rt=e[62];const ce=rt;let it;e[63]!==j||e[64]!==V||e[65]!==ce||e[66]!==A?(it=V?ce:o.jsxs("div",{className:"space-y-2",children:[ce,o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm"})]}),e[63]=j,e[64]=V,e[65]=ce,e[66]=A,e[67]=it):it=e[67],Ve=it;break e}fe=le(se&&"cursor-grabbing"),e[48]=re,e[49]=j,e[50]=V,e[51]=C,e[52]=A,e[53]=i,e[54]=l,e[55]=H,e[56]=I,e[57]=D,e[58]=fe}else I=e[56],D=e[57],fe=e[58];O=Qa,tt=K,ne=Xa,ye=xe,Fe=Be,Te=ie,B=tl,Ye=G,Je=nl,Pe="space-y-1",Ce=C.map(se=>{const pe=l[se.index];return pe?o.jsx(kl,{sortableId:se.id,section:pe,raw:i[se.index],meta:d,decofile:h,selected:u===se.index,onSelect:()=>nt(se.index),onDelete:()=>k(se.index),onDuplicate:()=>E(se.index),onMakeReusable:()=>U(se.index),onToggleHidden:()=>X(se.index),onToggleLazy:()=>F(se.index),onAddVariant:()=>L(se.index),onDetach:()=>f(se.index)},se.id):null})}e[11]=re,e[12]=j,e[13]=V,e[14]=h,e[15]=C,e[16]=G,e[17]=Be,e[18]=d,e[19]=A,e[20]=L,e[21]=k,e[22]=f,e[23]=E,e[24]=U,e[25]=b,e[26]=X,e[27]=F,e[28]=i,e[29]=l,e[30]=u,e[31]=K,e[32]=H,e[33]=B,e[34]=O,e[35]=I,e[36]=D,e[37]=Ce,e[38]=Ye,e[39]=Je,e[40]=tt,e[41]=ne,e[42]=ye,e[43]=Fe,e[44]=Te,e[45]=fe,e[46]=Ve,e[47]=Pe}else B=e[33],O=e[34],I=e[35],D=e[36],Ce=e[37],Ye=e[38],Je=e[39],tt=e[40],ne=e[41],ye=e[42],Fe=e[43],Te=e[44],fe=e[45],Ve=e[46],Pe=e[47];if(Ve!==Symbol.for("react.early_return_sentinel"))return Ve;let Qe;e[68]!==Ce||e[69]!==Pe?(Qe=o.jsx("div",{className:Pe,children:Ce}),e[68]=Ce,e[69]=Pe,e[70]=Qe):Qe=e[70];let Ae;e[71]!==B||e[72]!==Ye||e[73]!==Je||e[74]!==Qe?(Ae=o.jsx(B,{items:Ye,strategy:Je,children:Qe}),e[71]=B,e[72]=Ye,e[73]=Je,e[74]=Qe,e[75]=Ae):Ae=e[75];let We;e[76]!==I||e[77]!==D||e[78]!==V||e[79]!==h||e[80]!==d?(We=D?o.jsx("div",{className:le("cursor-grabbing shadow-lg ring-1 ring-border/60",uo(D,!1,V)),children:o.jsx(co,{section:D,raw:I,meta:d,decofile:h})}):null,e[76]=I,e[77]=D,e[78]=V,e[79]=h,e[80]=d,e[81]=We):We=e[81];let Le;e[82]!==We?(Le=_i.createPortal(o.jsx(Ya,{dropAnimation:Ki,children:We}),document.body),e[82]=We,e[83]=Le):Le=e[83];let Ge;e[84]!==O||e[85]!==tt||e[86]!==ne||e[87]!==ye||e[88]!==Fe||e[89]!==Te||e[90]!==Ae||e[91]!==Le?(Ge=o.jsxs(O,{sensors:tt,collisionDetection:ne,onDragStart:ye,onDragEnd:Fe,onDragCancel:Te,children:[Ae,Le]}),e[84]=O,e[85]=tt,e[86]=ne,e[87]=ye,e[88]=Fe,e[89]=Te,e[90]=Ae,e[91]=Le,e[92]=Ge):Ge=e[92];let ee;e[93]!==j||e[94]!==V||e[95]!==A?(ee=!V&&o.jsx(ms,{canAddSection:j,onAddSection:A,size:"sm",className:"mt-2"}),e[93]=j,e[94]=V,e[95]=A,e[96]=ee):ee=e[96];let zt;return e[97]!==fe||e[98]!==Ge||e[99]!==ee?(zt=o.jsxs("div",{className:fe,children:[Ge,ee]}),e[97]=fe,e[98]=Ge,e[99]=ee,e[100]=zt):zt=e[100],zt}function Cl(n){return n.id}function is(n,e,s,i){if(!n||!e)return null;if(!e.isMultivariate)return jt(n,e,i)?.data??null;const l=pt(n,e),d=l?ls(l,vt)[s]:void 0;return d?oo(d.value,i)?.data??null:null}const Tl=50;function Vl(n,e){n.own.push(ze(e)),n.own.length>Tl&&n.own.shift()}function Ur(n,e){return n.own.includes(ze(e))}function Ml(n,e){const{sectionIndex:s,variantIndex:i,shown:l,next:d,sectionCount:h}=e;return n&&n.sectionIndex===s&&n.variantIndex===i&&n.emitted===l?(n.emitted=d,n):l?{sectionIndex:s,variantIndex:i,base:l,emitted:d,sectionCount:h,own:[ze(l)]}:null}function fo(n,e){return e!==null&&ze(n)!==ze(e)}function mo(n,e){return n.__resolveType!==e.__resolveType}function Dl(n,e,s,i){if(e.length===i)return"here";const l=ze(n),d=e.flatMap((h,u)=>u!==s&&h!==null&&ze(h)===l?[u]:[]);return d.length===1?d[0]:"unknown"}function Pl({merged:n,tracked:e,current:s,saved:i}){return!!n&&!!e&&s===e&&e.emitted===i}function Kl(n,e){return!!n&&!!e&&n.contains(e)}function ps(n){const e=[],s=hs("",n.ancestor,n.mine,n.theirs,e);return{...n,merged:s,pointers:e}}function hs(n,e,s,i,l){const d=(h,u)=>ze(h)===ze(u);if(d(s,i)||d(e,i))return s;if(d(e,s))return i;if(as(s)&&as(i)){const h=as(e)?e:{},u={},b=[...Object.keys(s),...Object.keys(i).filter(g=>!(g in s))];for(const g of b){const k=hs(`${n}/${g.replaceAll("~","~0").replaceAll("/","~1")}`,h[g],s[g],i[g],l);k!==void 0&&(u[g]=k)}return u}return Array.isArray(e)&&Array.isArray(s)&&Array.isArray(i)&&s.length===e.length&&i.length===e.length?e.map((h,u)=>hs(`${n}/${u}`,h,s[u],i[u],l)):(l.push(n),i)}function as(n){return!!n&&typeof n=="object"&&!Array.isArray(n)}function Il(n,e){let s=n.merged;for(const i of n.pointers)e[i]==="mine"&&(s=Ol(s,i,$t(n.mine,i)));return s}function Bl(n,e){return Object.fromEntries(n.pointers.map(s=>[s,e]))}function po(n){return Bl(n,"mine")}function gs(n,e,s){const i=po(s);for(const l of s.pointers){const d=e[l];if(!d||!n.pointers.includes(l))continue;["mine","theirs"].every(u=>ze($t(n[u],l))===ze($t(s[u],l)))&&(i[l]=d)}return i}function ho(n,e,s={}){const i=e.pointers.filter(l=>!n.pointers.includes(l)||ze($t(n.theirs,l))!==ze($t(e.theirs,l)));return i.length===0?s:{...s,...Object.fromEntries(i.map(l=>[l,(s[l]??0)+1]))}}function Fl(n,e,s){if(!e||mo(n.plan.ancestor,e)||!fo(n.plan.theirs,e)||s(e))return null;const i=ps({...n.plan,theirs:e});return i.pointers.length===0?null:{plan:i,choices:gs(n.plan,n.choices,i),fresh:ho(n.plan,i,n.fresh)}}function Ll(n,e){return n.pointers.map(s=>({pointer:s,label:Hi(s,e),mine:$t(n.mine,s),theirs:$t(n.theirs,s),schema:$l(e??null,s)}))}function ys(n){return n.split("/").slice(1).map(e=>e.replaceAll("~1","/").replaceAll("~0","~"))}function $t(n,e){let s=n;for(const i of ys(e))if(Array.isArray(s))s=s[Number(i)];else if(s&&typeof s=="object")s=s[i];else return;return s}function Ol(n,e,s){const i=ys(e),l=(d,h)=>{if(h===i.length)return s;const u=i[h];if(Array.isArray(d)){const k=[...d];return k[Number(u)]=l(d[Number(u)],h+1),k}const b=d&&typeof d=="object"?{...d}:{},g=l(b[u],h+1);return g===void 0?delete b[u]:b[u]=g,b};return l(n,0)}function $l(n,e){let s=n;for(const i of ys(e)){if(!s)return null;s=/^\d+$/.test(i)&&!s.properties?.[i]?s.items:s.properties?.[i]}return s??null}const zl=/\.(png|jpe?g|gif|webp|avif|svg)(\?.*)?$/i,Yr=60,Hl=3;function go(n,e){return e?.format==="image-uri"?!0:n.startsWith("data:image/")||/^(https?:)?\/\//.test(n)&&zl.test(n)}function vs(n,e){if(!(e?.format==="rich-text"||e?.format==="rich-text-inline"||e?.format==="html"||/<\/?[a-z][^>]*>/i.test(n)))return n;const i=n.replace(/<br\s*\/?>/gi,`
|
|
2
2
|
`).replace(/<\/(p|div|li|h[1-6])>/gi,`
|
|
3
3
|
`);return Gl(i).replace(/\u00a0/g," ").replace(/\n{2,}/g,`
|
|
4
4
|
`).trim()}const Wl={" ":" ","&":"&","<":"<",">":">",""":'"',"'":"'"};function Gl(n){if(typeof DOMParser<"u")return new DOMParser().parseFromString(n,"text/html").body.textContent??"";let e=n;for(let s="";s!==e;)s=e,e=e.replace(/<[^<>]*>/g,"");return e.replace(/<|>/g,"").replace(/&(nbsp|amp|lt|gt|quot|#39);/g,s=>Wl[s]??s)}function Dn(n){const e=n.replace(/\s+/g," ").trim();return e.length>Yr?`${e.slice(0,Yr-1)}…`:e}function ql(n){if(n.startsWith("data:"))return"image";const e=n.split(/[?#]/)[0]??n;return decodeURIComponent(e.split("/").pop()||n)}function Kn(n,e){if(n==null||n==="")return{kind:"empty"};if(typeof n=="string")return go(n,e)?{kind:"image",src:n}:{kind:"text",text:vs(n,e)};if(typeof n=="number"||typeof n=="bigint")return{kind:"text",text:String(n)};if(typeof n=="boolean")return{kind:"yesNo",value:n};if(Array.isArray(n)){const s=e?.items??null;return{kind:"list",count:n.length,items:n.slice(0,Hl).map(i=>Ul(i,s)??"")}}if(typeof n=="object"){const s=n;if("value"in s&&Object.keys(s).length<=2)return Kn(s.value,e?.properties?.value??e);const i=Object.entries(s).filter(([l,d])=>!l.startsWith("__")&&d!==void 0).flatMap(([l,d])=>{const h=e?.properties?.[l]??null,u=Kn(d,h);if(u.kind==="empty")return[];const b=u.kind==="text"?Dn(u.text):u.kind==="image"?ql(u.src):u.kind==="yesNo"?u.value?"✓":"✗":u.kind==="list"?`${u.count}`:"…";return[{label:h?.title?.trim()||l,text:b}]}).slice(0,4);return i.length>0?{kind:"fields",entries:i}:{kind:"empty"}}return{kind:"text",text:String(n)}}function Ul(n,e){if(typeof n=="string")return Dn(vs(n,e));if(!n||typeof n!="object"||Array.isArray(n))return null;const s=n,i=e?.titleBy,l=i?s[i]:void 0;if(typeof l=="string"&&l.trim())return Dn(l);for(const[d,h]of Object.entries(s))if(!(d.startsWith("__")||typeof h!="string"||!h.trim())&&!go(h,e?.properties?.[d]??null))return Dn(vs(h,null));return null}const Jr=1500;function Yl(n,e){const s=n.split(/(\s+)/).filter(k=>k!==""),i=e.split(/(\s+)/).filter(k=>k!=="");if(s.length>Jr||i.length>Jr)return{mine:[{text:n,kind:"changed"}],theirs:[{text:e,kind:"changed"}]};const l=Array.from({length:s.length+1},()=>new Array(i.length+1).fill(0));for(let k=s.length-1;k>=0;k--)for(let E=i.length-1;E>=0;E--){const U=l[k];U[E]=s[k]===i[E]?l[k+1][E+1]+1:Math.max(l[k+1][E],U[E+1])}const d=[],h=[],u=(k,E,U)=>{const X=k.at(-1);X&&(X.kind===U||U==="same"&&!E.trim())?X.text+=E:k.push({text:E,kind:U})};let b=0,g=0;for(;b<s.length&&g<i.length;)s[b]===i[g]?(u(d,s[b],"same"),u(h,i[g],"same"),b++,g++):l[b+1][g]>=l[b][g+1]?(u(d,s[b],"changed"),b++):(u(h,i[g],"changed"),g++);for(;b<s.length;b++)u(d,s[b],"changed");for(;g<i.length;g++)u(h,i[g],"changed");return{mine:d,theirs:h}}function Jl(n){const e=ft.c(10);let s,i;e[0]!==n?({open:s,...i}=n,e[0]=n,e[1]=s,e[2]=i):(s=e[1],i=e[2]);const{data:l}=Ai.useSession();let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=le("max-h-[85vh] grid-rows-[auto_minmax(0,1fr)_auto] sm:max-w-lg"),e[3]=d):d=e[3];const h=l?.user??null;let u;e[4]!==i||e[5]!==h?(u=o.jsx(sl,{className:d,"data-testid":"form-conflict-dialog",onEscapeKeyDown:Zl,onOpenAutoFocus:Xl,children:o.jsx(oc,{...i,viewer:h,heading:Ql})}),e[4]=i,e[5]=h,e[6]=u):u=e[6];let b;return e[7]!==s||e[8]!==u?(b=o.jsx(al,{open:s,children:u}),e[7]=s,e[8]=u,e[9]=b):b=e[9],b}function Ql(n,e){return o.jsxs(rl,{className:"text-left",children:[o.jsx(ol,{children:n}),o.jsx(il,{children:e})]})}function Xl(n){n.preventDefault(),n.currentTarget?.focus()}function Zl(n){return n.preventDefault()}const ec={},tc=(n,e)=>o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx("h2",{className:"text-lg font-semibold",children:n}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e})]});function nc(n,e,s=0,i={}){const l=e[Math.min(s,e.length-1)],d={field:l?rc(l.label):"",label:l?.label??""};return e.length<=1?{title:n("sectionsEditor.formConflict.titleOne",d),description:n("sectionsEditor.formConflict.descriptionOne")}:{title:n("sectionsEditor.formConflict.titleStep",d),description:s>=e.length-1?o.jsx(sc,{t:n,fields:e,choices:i}):n("sectionsEditor.formConflict.descriptionStep")}}function sc(n){const e=ft.c(9),{t:s,fields:i,choices:l}=n;let d;if(e[0]!==l||e[1]!==i||e[2]!==s){let u;e[4]!==l||e[5]!==s?(u=(b,g)=>o.jsxs(w.Fragment,{children:[g>0&&" · ",`${b.label}: `,o.jsx("span",{className:"font-medium text-foreground",children:s((l[b.pointer]??"mine")==="mine"?"sectionsEditor.formConflict.summaryYours":"sectionsEditor.formConflict.summaryTheirs")})]},b.pointer),e[4]=l,e[5]=s,e[6]=u):u=e[6],d=i.map(u),e[0]=l,e[1]=i,e[2]=s,e[3]=d}else d=e[3];let h;return e[7]!==d?(h=o.jsx("span",{"data-testid":"form-conflict-summary",children:d}),e[7]=d,e[8]=h):h=e[8],h}function rc(n){return/^[A-Z][a-z]/.test(n)&&!n.includes("›")?n.charAt(0).toLowerCase()+n.slice(1):n}function oc(n){const e=ft.c(68),s=Dt(),{fields:i,choices:l,changedAgain:d,fresh:h,heading:u}=n,b=d===void 0?!1:d,g=h===void 0?ec:h,k=u===void 0?tc:u,E=i.length>1,[U,X]=w.useState(0),[F,L]=w.useState(ic);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={},e[0]=f):f=e[0];const[A,Y]=w.useState(f),j=Math.max(0,Math.min(U,i.length-1)),H=i[j],V=j===i.length-1;let v;e[1]!==j||e[2]!==i||e[3]!==g?(v=we=>{const ie=i[j],B=i[we];!ie||!B||we===j||(L(O=>new Set(O).add(ie.pointer)),Y(O=>({...O,[ie.pointer]:g[ie.pointer]??0,[B.pointer]:g[B.pointer]??0})),X(we))},e[1]=j,e[2]=i,e[3]=g,e[4]=v):v=e[4];const C=v;let x;e[5]!==j||e[6]!==C?(x=we=>{if(!we)return;const ie=B=>{const O={ArrowLeft:-1,ArrowRight:1}[B.key];!O||B.defaultPrevented||B.altKey||B.ctrlKey||B.metaKey||B.shiftKey||ll(B.target)||(B.preventDefault(),C(j+O))};return we.ownerDocument.addEventListener("keydown",ie),()=>we.ownerDocument.removeEventListener("keydown",ie)},e[5]=j,e[6]=C,e[7]=x):x=e[7];const re=x;if(!H)return null;let P,oe,de,Z,te;if(e[8]!==F||e[9]!==j||e[10]!==l||e[11]!==i||e[12]!==g||e[13]!==C||e[14]!==k||e[15]!==re||e[16]!==E||e[17]!==n||e[18]!==A||e[19]!==s){const{title:we,description:ie}=nc(s,i,j,l);let B;e[25]!==n?(B=O=>{O.detail>1||n.onApply()},e[25]=n,e[26]=B):B=e[26],P=B,oe=E?re:void 0,de="flex min-w-0 flex-col gap-3",e[27]!==F||e[28]!==j||e[29]!==i||e[30]!==g||e[31]!==C||e[32]!==E||e[33]!==A||e[34]!==s?(Z=E&&o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("div",{role:"group","aria-label":s("sectionsEditor.formConflict.steps"),className:"-m-1 flex flex-wrap items-center",children:i.map((O,I)=>{const D=I!==j&&(g[O.pointer]??0)>(A[O.pointer]??0);return o.jsx("button",{type:"button","aria-label":D?s("sectionsEditor.formConflict.stepChangedAgain",{label:O.label}):O.label,"aria-current":I===j?"step":void 0,"data-answered":I!==j&&F.has(O.pointer)?"":void 0,"data-changed-again":D?"":void 0,onClick:()=>C(I),className:"group cursor-pointer rounded-full p-1 outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:o.jsx("span",{className:le("block h-2 w-2 rounded-full bg-border transition-[width,background-color,box-shadow] motion-reduce:transition-none","group-hover:bg-muted-foreground/60","group-data-[answered]:bg-foreground/45","group-aria-[current=step]:w-5 group-aria-[current=step]:bg-foreground","group-data-[changed-again]:ring-2 group-data-[changed-again]:ring-warning group-data-[changed-again]:ring-offset-1 group-data-[changed-again]:ring-offset-background")})},O.pointer)})}),o.jsx("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:s("sectionsEditor.formConflict.stepCount",{step:String(j+1),count:String(i.length)})})]}),e[27]=F,e[28]=j,e[29]=i,e[30]=g,e[31]=C,e[32]=E,e[33]=A,e[34]=s,e[35]=Z):Z=e[35],te=k(we,ie),e[8]=F,e[9]=j,e[10]=l,e[11]=i,e[12]=g,e[13]=C,e[14]=k,e[15]=re,e[16]=E,e[17]=n,e[18]=A,e[19]=s,e[20]=P,e[21]=oe,e[22]=de,e[23]=Z,e[24]=te}else P=e[20],oe=e[21],de=e[22],Z=e[23],te=e[24];let S;e[36]!==oe||e[37]!==de||e[38]!==Z||e[39]!==te?(S=o.jsxs("div",{ref:oe,className:de,children:[Z,te]}),e[36]=oe,e[37]=de,e[38]=Z,e[39]=te,e[40]=S):S=e[40];const W=!b&&"sr-only";let je;e[41]!==W?(je=le("text-sm text-muted-foreground",W),e[41]=W,e[42]=je):je=e[42];let K;e[43]!==b||e[44]!==E||e[45]!==s?(K=b?s(E?"sectionsEditor.formConflict.changedAgainSteps":"sectionsEditor.formConflict.changedAgain"):"",e[43]=b,e[44]=E,e[45]=s,e[46]=K):K=e[46];let He;e[47]!==je||e[48]!==K?(He=o.jsx("p",{role:"status",className:je,children:K}),e[47]=je,e[48]=K,e[49]=He):He=e[49];const G=E?"vertical":"all";let Ee;e[50]!==H||e[51]!==n||e[52]!==G?(Ee=o.jsx(uc,{field:H,...n,arrows:G}),e[50]=H,e[51]=n,e[52]=G,e[53]=Ee):Ee=e[53];let xe;e[54]!==He||e[55]!==Ee?(xe=o.jsxs("div",{className:"-mx-2 flex min-h-0 flex-col gap-3 overflow-y-auto px-2 py-1",children:[He,Ee]}),e[54]=He,e[55]=Ee,e[56]=xe):xe=e[56];let Re;e[57]!==P||e[58]!==j||e[59]!==C||e[60]!==V||e[61]!==E||e[62]!==s?(Re=E?o.jsxs(Hr,{className:"flex-row flex-wrap items-center justify-between gap-2 sm:justify-between",children:[o.jsx(xt,{type:"button",variant:"outline","aria-disabled":j===0,onClick:()=>C(j-1),className:"aria-disabled:cursor-default aria-disabled:opacity-45",children:s("sectionsEditor.formConflict.back")}),o.jsx(xt,{type:"button","data-testid":"form-conflict-primary",onClick:V?P:()=>C(j+1),children:s(V?"sectionsEditor.formConflict.ok":"sectionsEditor.formConflict.next")})]}):o.jsx(Hr,{className:"items-center gap-2",children:o.jsx(xt,{type:"button","data-testid":"form-conflict-primary",onClick:P,children:s("sectionsEditor.formConflict.ok")})}),e[57]=P,e[58]=j,e[59]=C,e[60]=V,e[61]=E,e[62]=s,e[63]=Re):Re=e[63];let Be;return e[64]!==S||e[65]!==xe||e[66]!==Re?(Be=o.jsxs(o.Fragment,{children:[S,xe,Re]}),e[64]=S,e[65]=xe,e[66]=Re,e[67]=Be):Be=e[67],Be}function ic(){return new Set}function ac(n){const e=Kn(n.mine,n.schema),s=Kn(n.theirs,n.schema),i=e.kind==="text"&&s.kind==="text"?Yl(e.text,s.text):null;return l=>i?o.jsx(fc,{parts:i[l]}):o.jsx(pc,{preview:l==="mine"?e:s})}const lc={all:{ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},vertical:{ArrowDown:1,ArrowUp:-1}};function cc(n,e){const s=lc[e][n.key];if(!s)return;const i=[...n.currentTarget.querySelectorAll('[role="radio"]')],l=i.indexOf(document.activeElement);if(l<0)return;n.preventDefault();const d=i[(l+s+i.length)%i.length];d?.focus(),d?.click()}function uc(n){const e=ft.c(59),{field:s,choices:i,viewer:l,onChoose:d,arrows:h}=n,u=Dt();let b,g,k,E,U,X,F,L,f,A,Y,j,H;if(e[0]!==h||e[1]!==i||e[2]!==s||e[3]!==d||e[4]!==u||e[5]!==l?.image||e[6]!==l?.name){const C=ac(s),x=i[s.pointer]??"mine";j="radiogroup",H=s.label,k="flex flex-col gap-2",e[20]!==h?(E=S=>cc(S,h),e[20]=h,e[21]=E):E=e[21];let re;e[22]!==s.pointer||e[23]!==d?(re=()=>d(s.pointer,"mine"),e[22]=s.pointer,e[23]=d,e[24]=re):re=e[24];const P=l?.image??void 0;let oe;e[25]!==u||e[26]!==l?.name?(oe=dc(l?.name)||u("sectionsEditor.formConflict.you"),e[25]=u,e[26]=l?.name,e[27]=oe):oe=e[27];let de;e[28]!==P||e[29]!==oe?(de=o.jsx(zr,{url:P,fallback:oe,shape:"circle",size:"sm",className:"text-xs"}),e[28]=P,e[29]=oe,e[30]=de):de=e[30];let Z;e[31]!==u?(Z=u("sectionsEditor.formConflict.you"),e[31]=u,e[32]=Z):Z=e[32];let te;e[33]!==u?(te=u("sectionsEditor.formConflict.yourVersionNotSaved"),e[33]=u,e[34]=te):te=e[34],U=o.jsx(Qr,{side:"mine",checked:x==="mine",onChoose:re,avatar:de,who:Z,meta:te,children:C("mine")}),b=Qr,g="theirs",X=x==="theirs",e[35]!==s.pointer||e[36]!==d?(F=()=>d(s.pointer,"theirs"),e[35]=s.pointer,e[36]=d,e[37]=F):F=e[37],e[38]===Symbol.for("react.memo_cache_sentinel")?(L=o.jsx(zr,{url:"icon://user",fallback:"",muted:!0,shape:"circle",size:"sm"}),e[38]=L):L=e[38],e[39]!==u?(f=u("sectionsEditor.formConflict.someoneElse"),e[39]=u,e[40]=f):f=e[40],e[41]!==u?(A=u("sectionsEditor.formConflict.theirVersionSaved"),e[41]=u,e[42]=A):A=e[42],Y=C("theirs"),e[0]=h,e[1]=i,e[2]=s,e[3]=d,e[4]=u,e[5]=l?.image,e[6]=l?.name,e[7]=b,e[8]=g,e[9]=k,e[10]=E,e[11]=U,e[12]=X,e[13]=F,e[14]=L,e[15]=f,e[16]=A,e[17]=Y,e[18]=j,e[19]=H}else b=e[7],g=e[8],k=e[9],E=e[10],U=e[11],X=e[12],F=e[13],L=e[14],f=e[15],A=e[16],Y=e[17],j=e[18],H=e[19];let V;e[43]!==b||e[44]!==g||e[45]!==X||e[46]!==F||e[47]!==L||e[48]!==f||e[49]!==A||e[50]!==Y?(V=o.jsx(b,{side:g,checked:X,onChoose:F,avatar:L,who:f,meta:A,children:Y}),e[43]=b,e[44]=g,e[45]=X,e[46]=F,e[47]=L,e[48]=f,e[49]=A,e[50]=Y,e[51]=V):V=e[51];let v;return e[52]!==k||e[53]!==E||e[54]!==U||e[55]!==V||e[56]!==j||e[57]!==H?(v=o.jsxs("div",{role:j,"aria-label":H,className:k,onKeyDown:E,children:[U,V]}),e[52]=k,e[53]=E,e[54]=U,e[55]=V,e[56]=j,e[57]=H,e[58]=v):v=e[58],v}function dc(n){return(n??"").trim().split(/\s+/).filter(Boolean).slice(0,2).map(e=>e.charAt(0).toUpperCase()).join("")}function Qr(n){const e=ft.c(27),{side:s,checked:i,onChoose:l,avatar:d,who:h,meta:u,children:b}=n,g=w.useId(),k=`${g}-who`,E=`${g}-meta ${g}-value`,U=i?0:-1,X=i?"border-primary bg-primary/5 ring-1 ring-primary":"hover:bg-muted/50";let F;e[0]!==X?(F=le("grid w-full cursor-pointer grid-cols-[auto_minmax(0,1fr)] items-start gap-3 rounded-xl border bg-background p-3 text-left transition-[border-color,box-shadow,background-color] outline-none","focus-visible:ring-2 focus-visible:ring-ring/50",X),e[0]=X,e[1]=F):F=e[1];const L=`${g}-who`;let f;e[2]!==L||e[3]!==h?(f=o.jsx("span",{id:L,className:"text-sm font-medium text-foreground",children:h}),e[2]=L,e[3]=h,e[4]=f):f=e[4];const A=`${g}-meta`;let Y;e[5]!==u||e[6]!==A?(Y=o.jsx("span",{id:A,children:u}),e[5]=u,e[6]=A,e[7]=Y):Y=e[7];let j;e[8]!==f||e[9]!==Y?(j=o.jsxs("span",{className:"flex flex-wrap items-baseline gap-x-1.5 text-xs text-muted-foreground",children:[f,Y]}),e[8]=f,e[9]=Y,e[10]=j):j=e[10];const H=`${g}-value`,V=`conflict-${s}`;let v;e[11]!==b||e[12]!==H||e[13]!==V?(v=o.jsx("span",{id:H,"data-testid":V,className:"min-w-0 text-sm",children:b}),e[11]=b,e[12]=H,e[13]=V,e[14]=v):v=e[14];let C;e[15]!==j||e[16]!==v?(C=o.jsxs("span",{className:"flex min-w-0 flex-col gap-1",children:[j,v]}),e[15]=j,e[16]=v,e[17]=C):C=e[17];let x;return e[18]!==d||e[19]!==i||e[20]!==l||e[21]!==k||e[22]!==C||e[23]!==E||e[24]!==U||e[25]!==F?(x=o.jsxs("button",{type:"button",role:"radio","aria-checked":i,"aria-labelledby":k,"aria-describedby":E,tabIndex:U,onClick:l,className:F,children:[d,C]}),e[18]=d,e[19]=i,e[20]=l,e[21]=k,e[22]=C,e[23]=E,e[24]=U,e[25]=F,e[26]=x):x=e[26],x}function fc(n){const e=ft.c(4),{parts:s}=n;let i;e[0]!==s?(i=s.map(mc),e[0]=s,e[1]=i):i=e[1];let l;return e[2]!==i?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:i}),e[2]=i,e[3]=l):l=e[3],l}function mc(n,e){return n.kind==="changed"?o.jsx("mark",{className:"rounded-sm bg-warning/20 px-0.5 text-foreground",children:n.text},e):o.jsx("span",{children:n.text},e)}function pc(n){const e=ft.c(29),{preview:s}=n,i=Dt();switch(s.kind){case"empty":{let l;e[0]!==i?(l=i("sectionsEditor.formConflict.empty"),e[0]=i,e[1]=l):l=e[1];let d;return e[2]!==l?(d=o.jsx("span",{className:"italic text-muted-foreground",children:l}),e[2]=l,e[3]=d):d=e[3],d}case"text":{let l;return e[4]!==s.text?(l=o.jsx("span",{className:"whitespace-pre-wrap break-words",children:s.text}),e[4]=s.text,e[5]=l):l=e[5],l}case"image":{let l;return e[6]!==s.src?(l=o.jsx("img",{src:s.src,alt:"",className:"max-h-24 max-w-full rounded border object-contain"}),e[6]=s.src,e[7]=l):l=e[7],l}case"yesNo":{const l=s.value?"sectionsEditor.formConflict.yes":"sectionsEditor.formConflict.no";let d;e[8]!==i||e[9]!==l?(d=i(l),e[8]=i,e[9]=l,e[10]=d):d=e[10];let h;return e[11]!==d?(h=o.jsx("span",{children:d}),e[11]=d,e[12]=h):h=e[12],h}case"list":{const l=s.count===1?"sectionsEditor.formConflict.oneItem":"sectionsEditor.formConflict.items",d=String(s.count);let h;e[13]!==i||e[14]!==l||e[15]!==d?(h=i(l,{count:d}),e[13]=i,e[14]=l,e[15]=d,e[16]=h):h=e[16];let u;e[17]!==h?(u=o.jsx("span",{className:"text-muted-foreground",children:h}),e[17]=h,e[18]=u):u=e[18];let b;e[19]!==s.count||e[20]!==s.items?(b=s.items.some(Boolean)&&o.jsxs("span",{className:"flex flex-col",children:[s.items.map(gc),s.count>s.items.length&&o.jsx("span",{children:"…"})]}),e[19]=s.count,e[20]=s.items,e[21]=b):b=e[21];let g;return e[22]!==u||e[23]!==b?(g=o.jsxs("span",{className:"flex flex-col gap-1",children:[u,b]}),e[22]=u,e[23]=b,e[24]=g):g=e[24],g}case"fields":{let l;e[25]!==s.entries?(l=s.entries.map(hc),e[25]=s.entries,e[26]=l):l=e[26];let d;return e[27]!==l?(d=o.jsx("dl",{className:"grid grid-cols-[auto_minmax(0,1fr)] gap-x-2 gap-y-0.5",children:l}),e[27]=l,e[28]=d):d=e[28],d}}}function hc(n){return o.jsxs("div",{className:"contents",children:[o.jsx("dt",{className:"text-muted-foreground",children:n.label}),o.jsx("dd",{className:"truncate",children:n.text})]},n.label)}function gc(n,e){return o.jsx("span",{className:"truncate",children:`${e+1}. ${n||"…"}`},e)}function vc(n,e,s,i){if(!n||typeof n!="object")return{kind:"error",reason:"no-matcher-rule"};const l=e.trim();if(!l)return Ot(n,s,i)?{kind:"inline",blockKey:n.__resolveType??"",inlinedRule:cs(n,s,i)}:{kind:"noop"};const d=us(n,s,i);if(!d)return{kind:"error",reason:"unreadable-rule"};if(d.blockKey)return{kind:"updateBlock",blockKey:d.blockKey,blockData:Mt(d.resolveType,d.data,l)};const h=Tn(l),u=Vn(h,s);return u?{kind:"error",reason:"invalid-block-id",message:u}:{kind:"createBlock",blockId:h,blockData:Mt(d.resolveType,d.data,l),reference:Zt(h)}}const Xr="section-form-stale-save",xc=3,yc=1e3;function Zr(n,e){const s=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:to(e.pageKey?n[e.pageKey]?.sections:void 0,n),i=Math.max(0,Math.min(e.pageVariantIndex,s.length-1)),l=s[i]?.sections??[];return{pageVariants:s,variantIndex:i,rawSections:l,parsedSections:vn(l,n)}}const eo=new WeakMap;let bc=0;function Sc(n){let e=eo.get(n);return e===void 0&&(e=++bc,eo.set(n,e)),e}function jf({orgSlug:n,virtualMcpId:e,branch:s,previewReady:i=!0,previewUrl:l,currentPath:d,activePageBlockKey:h=null,activeGlobalBlockKey:u=null,externalSelection:b,onSaved:g,initialEditSeo:k=!1,onExitSeo:E,onSelectRoot:U,onViewJsonFile:X,onFocusedBlockChange:F,onVariantPreviewOverride:L}){const f=Dt(),A=Vi(),Y=A?.taskId??null,j=i?{orgSlug:n,virtualMcpId:e,branch:s,threadId:Y,previewUrl:l}:null,[H,V]=w.useState([]),{data:v,isLoading:C}=Wi(j,{pollWhile:H.length>0}),{data:x,isLoading:re}=Gi(j),P=In(),oe=A?.virtualMcpId,Z=fa(oe===e?e:null)?.metadata?.siteSlug??null,te=dl({virtualMcpId:e,sandboxUrl:l}),[S,W]=w.useState(null),[je,K]=w.useState(null),[He,G]=w.useState(null),[Ee,xe]=w.useState(0),[Re,Be]=w.useState(void 0),[we,ie]=w.useState(null),[B,O]=w.useState(null),[I,D]=w.useState([]),Ce=w.useRef(null),[Ye,Je]=w.useState(I.length);Ye!==I.length&&(Je(I.length),requestAnimationFrame(()=>{Ce.current&&(Ce.current.scrollTop=0)}));const[tt,ne]=w.useState(0),[ye,Fe]=w.useState(null),[Te,fe]=w.useState(null),[Ve,Pe]=w.useState(null),[Qe,Ae]=w.useState(!1),[We,Le]=w.useState(!1),Ge=w.useRef(null),[ee,zt]=w.useState(!0),[nt,se]=w.useState(!1),[pe,rt]=w.useState(!1),[ce,it]=w.useState(k),[bs,Ss]=w.useState(k);k&&!bs&&(Ss(!0),it(!0),W(null),K(null),G(null),D([])),!k&&bs&&Ss(!1);const[vo,xn]=w.useState(null),[js,Bn]=w.useState(void 0),[ws,Pt]=w.useState([]),[_s,en]=w.useState(0),[Xe,at]=w.useState(0),[xo,Ze]=w.useState(null),[Ht,st]=w.useState(null),[ks,Es]=w.useState(null),yo=Ni(),bo=`${n}/${e}/${s}`,yn=qi({orgSlug:n,virtualMcpId:e,branch:s}),[So,jo]=w.useState(d),[wo,_o]=w.useState(h),[ko,Eo]=w.useState(u);(So!==d||wo!==h||ko!==u)&&(queueMicrotask(()=>yn.flush()),jo(d),_o(h),Eo(u),W(null),K(null),G(null),xe(0),ie(null),O(null),at(0),Ze(null),st(null),D([]),ne(t=>t+1),it(!1),xn(null),Bn(void 0),Pt([]),en(t=>t+1));const me=Ui({orgSlug:n,virtualMcpId:e,branch:s}),tn=la((t,r)=>{me.mutate({blockKey:t,data:r},{onSuccess:()=>g?.(),onError:a=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:a.message}))})}),bn=xa({orgSlug:n,virtualMcpId:e,branch:s}),[Wt,Gt]=w.useState(!1),J=w.useRef(null),qt=w.useRef(null),yt=w.useRef(null),bt=w.useRef(null),Fn=w.useRef({}),Kt=w.useRef(null),nn=w.useRef(!1),sn=w.useRef(!1),qe=w.useRef(new Map),rn=w.useRef(!1),ht=w.useRef([]),Ln=w.useRef(new WeakSet),Oe=w.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Rs,As]=w.useState(0),[Ro,Ao]=w.useState(0),[No,Co]=w.useState(null);if(!i||C||re)return o.jsx("div",{className:"h-full w-full flex items-center justify-center",children:o.jsx(Ci,{className:"size-5 text-muted-foreground"})});if(!v||!x)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const To=Sa(v),ae=!!u,he=ae?null:ja(To,d,h),_=ae?u:he?.key??null,On=ae&&u?v[u]:void 0,Ns=ae&&u&&On?wa(u,On):ae&&u?u:"",on=!ae&&_&&v[_]?v[_]:null,$n=ce&&v&&x&&_&&he?Er(v,{kind:"page",pageKey:_,pageName:String(he.name??""),path:String(he.path??"")},x):null,Vo=ce?on?.seo:void 0,Sn=js!==void 0?js:Vo,Mo=ce?Yi(Sn):void 0,Cs=$n?.seoTypeOptions??[],Ts=ce&&x?Ji(x):"",zn=vo??Mo??{},jn=ce&&$n?cl(zn,$n):null,Vs=ce&&jn&&Qi(Sn)?Cn(jn,x):null,Ms=ce?Xi(v,x)?.seoData:void 0,Ne=ae?[{label:"Default",sections:[{__resolveType:u}]}]:to(on?.sections,v??{}),mt=Ne.length>1,ge=Math.min(Ee,Ne.length-1),ot=Ne[ge],Q=ot?.sections??[],Me=vn(Q,v),Hn=!ae&&_a(on?.sections);if(ae&&u&&ks!==u){Es(u);const t=Q[0],r=Me[0];if(t&&r){W(0),at(0),D([]);const a=jt(t,r,v);a&&(K(a.data),G(a.resolveType),st(null),Ze(null))}}!ae&&ks!==null&&Es(null),Oe.current={rawSections:Q,parsedSections:Me,decofile:v??{},activePageKey:_,pageVariants:Ne,variantIndex:ge,sectionVariantIndex:Xe,selectedSectionIndex:S};const Do=()=>({multivariate:Hn,index:ge,variants:Ne.map(t=>({rule:t.rule}))}),Wn=(t,r)=>{if(!L)return;if(!_||!Hn||t.length<=1){L(null);return}const a=Gr(_,{multivariate:!0,index:r,variants:t},v,x);L(a.length>0?a:null)},Gn=L&&_&&Hn&&mt&&!C&&!re?_:null;if(Gn!==No&&(Co(Gn),Gn)){const t=Ne.map(a=>({rule:a.rule})),r=ge;queueMicrotask(()=>Wn(t,r))}const Ut=(t,r,a)=>{if(!L)return;if(!_){L(null);return}const c=Do(),m=Gr(_,c,v,x);if(!t||r<0){L(m.length>0?m:null);return}const y=ml({pageKey:_,page:c,sectionIndex:r,sectionLazy:Me[r]?.isLazy??!1,mvObj:t,selectedVariantIndex:a,decofile:v,meta:x}),p=[...m,...y];L(p.length>0?p:null)},St=(t,r,a,c=S??-1,m=!1)=>{const y=pt(t,r);if(!y){K(null),G(null),st(null),Ze(null),m&&Ut(null,c,a);return}const R=ls(y,vt)[a];if(!R){K(null),G(null),st(null),Ze(null),m&&Ut(null,c,a);return}const $=oo(R.value,v);K($?.data??null),G($?.resolveType??null);const{resolveType:N,formValue:T}=hn(R.rule,v,x??void 0);st(N),Ze(T),m&&Ut(y,c,a)},an=b?.index;if(b!==void 0&&(b?.seq??null)!==Re&&(Be(b?.seq??null),typeof an=="number")){const t=Q[an],r=Me[an];if(t&&r)if(W(an),at(0),D([]),ne(a=>a+1),r.isMultivariate)St(t,r,0,an);else{const a=jt(t,r,v);a?(K(a.data),G(a.resolveType)):(K(null),G(null)),st(null),Ze(null)}}if(Rs!==Ro){Ao(Rs);const t=S!==null?Q[S]:null,r=S!==null?Me[S]:null;if(t&&r&&S!==null)if(D([]),ne(a=>a+1),r.isMultivariate)St(t,r,Xe,S);else{const a=jt(t,r,v??{});K(a?.data??null),G(a?.resolveType??null)}}const lt=H[0];if(lt){const{formBase:t,target:r}=lt,a=Zr(v,r),c=t.sectionIndex,m=a.rawSections.length===t.sectionCount?is(a.rawSections[c],a.parsedSections[c],r.sectionVariantIndex,v):null,y=Fl(lt,m,p=>Ur(t,p));if(y){const R=[{...lt,...y,changedAgain:!0},...H.slice(1)];ht.current=R,V(R)}}const ln={orgSlug:n,virtualMcpId:e,branch:s,threadId:Y,previewUrl:l??void 0,siteSlug:Z},wn=He&&x?Cn(He,x):null,ct=(t,r)=>{if(!_)return;J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear(),bt.current&&(clearTimeout(bt.current),bt.current=null),yt.current&&(clearTimeout(yt.current),yt.current=null);const a=mn(v,_,t,ge,Ne);me.mutate({blockKey:_,data:a},{onSuccess:()=>r?.onSuccess?.()??g?.(),onError:c=>{r?.onError?.(),z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))}})},It=()=>{F?.(null),W(null),rt(!1),K(null),G(null),at(0),Ze(null),st(null),D([]),ne(t=>t+1)},Ds=()=>Kl(Ce.current,document.activeElement),qn=(t=f("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear(),qt.current=null,z.error(t,{id:Xr}),Ds()){rn.current=!0;return}As(r=>r+1)},Ps=()=>{!rn.current||Ds()||ht.current.length>0||J.current!==null||nn.current||sn.current||qe.current.size>0||(rn.current=!1,As(t=>t+1))},Ks=()=>{rn.current&&setTimeout(Ps,0)},Is=t=>{qe.current.size!==0&&setTimeout(()=>{if(nn.current||sn.current)return;const r=[...qe.current.values()];qe.current.clear();for(const a of r)a()},t)},Po=t=>{const{activePageKey:r,variantIndex:a,sectionVariantIndex:c}=Oe.current,m=Kt.current;return{formBase:m?.sectionIndex===t&&m.variantIndex===c?m:null,pageKey:r,global:ae,pageVariantIndex:a,sectionVariantIndex:c,schema:wn}},cn=t=>{ht.current=t,V(t)},Ko=t=>{const r=ht.current,a=r.findIndex(y=>y.formBase===t.formBase),c=a>=0?r[a]:void 0,m=c?r.with(a,{...t,choices:gs(c.plan,c.choices,t.plan),fresh:ho(c.plan,t.plan,c.fresh),changedAgain:c.changedAgain||ze(c.plan.theirs)!==ze(t.plan.theirs)}):[...r,{...t,changedAgain:Ln.current.has(t.formBase)}];cn(m)},Bs=(t,r)=>{const a=ht.current,c=a.findIndex(p=>p.formBase===t),m=a[c];if(!m)return!1;if(ze(m.plan.mine)===ze(r))return!0;const y=ps({...m.plan,mine:r});if(y.pointers.length===0){const p=a.filter(R=>R!==m);return cn(p),!1}return cn(a.with(c,{...m,plan:y,choices:gs(m.plan,m.choices,y)})),!0},Io=t=>{const r=Oe.current;return r.selectedSectionIndex===t.formBase.sectionIndex&&r.activePageKey===t.target.pageKey&&r.variantIndex===t.target.pageVariantIndex&&r.sectionVariantIndex===t.target.sectionVariantIndex},Bo=()=>{const t=ht.current[0];if(!t)return null;const{formBase:r,target:a}=t;J.current&&qt.current?.sectionIndex===r.sectionIndex&&qt.current.sectionVariantIndex===a.sectionVariantIndex&&(clearTimeout(J.current),J.current=null,qt.current=null),qe.current.delete(`${a.pageKey}:${r.sectionIndex}:${a.sectionVariantIndex}`);const c=r.emitted;return c&&typeof c=="object"&&!Bs(r,c)&&un(c,r.sectionIndex,0,a),ht.current[0]??null},Fo=()=>{const t=ht.current[0],r=Bo();if(!r||!t||r.formBase!==t.formBase||r.plan.pointers.some(y=>!t.plan.pointers.includes(y)))return;const a=Il(r.plan,r.choices);cn(ht.current.slice(1));const{formBase:c,target:m}=r;c.base=r.plan.theirs,c.emitted=a,Ln.current.add(c),(Kt.current===c||Io(r))&&(Kt.current=c,K(a),ne(y=>y+1)),un(a,c.sectionIndex,0,m)},Lo=t=>{const[r,...a]=ht.current;r&&cn([{...r,choices:t},...a])},un=(t,r,a=0,c)=>{const m=c??Po(r),y=m.sectionVariantIndex,p=m.formBase,R=qt.current;J.current&&(clearTimeout(J.current),J.current=null,R&&(R.sectionIndex!==r||R.sectionVariantIndex!==y)&&R.write());const $=`${m.pageKey}:${r}:${y}`,N=()=>{if(nn.current||sn.current){qe.current.set($,N);return}const T=typeof t=="function"?t():t;if(p&&Bs(p,T))return;const M=Oe.current.decofile,{rawSections:ue,parsedSections:be,pageVariants:Ie,variantIndex:De}=Zr(M,m),Ue=m.pageKey,q=ue[r];if(!q)return;const ve=be[r];if(!ve)return;const _e=p?.base,$e=is(q,ve,y,M),dt=!!_e&&!!$e&&fo(_e,$e)&&!(p&&Ur(p,$e));if(dt&&_e&&$e){if(mo(_e,$e)){qn(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const Se=ve.isSavedBlock?"here":Dl(_e,ue.map((ke,Tt)=>is(ke,be[Tt],y,M)),r,p?.sectionCount??ue.length);if(Se==="unknown"){qn(f("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof Se=="number"&&p){p.sectionCount=ue.length,p.sectionIndex=Se,Kt.current===p&&W(Se),un(T,Se,a,m);return}}const et=dt&&_e&&$e?ps({ancestor:_e,mine:T,theirs:$e}):null;if(et&&et.pointers.length>0&&p){p.sectionCount=ue.length,Ko({plan:et,formBase:p,target:m,sectionIndex:r,choices:po(et),changedAgain:!1,fresh:{}});return}const gt=et?et.merged:null,Ct=gt??T,jr=Pl({merged:!!gt,tracked:p,current:Kt.current,saved:T});gt&&z.info(f("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Xr}),jr&&p&&(p.emitted=gt,K(gt));const ns=jr||!gt?Ct:T;p&&(p.base=ns,p.sectionCount=ue.length,Vl(p,ns));const wr={onSuccess:()=>{p&&Ln.current.delete(p),g?.()},onError:Se=>{if(p?.base===ns&&_e&&(p.base=_e),Se instanceof Fa){a<xc?(qe.current.delete($),sn.current=!0,setTimeout(()=>{sn.current=!1,un(()=>{const ke=p?.emitted;return ke&&typeof ke=="object"?ke:T},r,a+1,m),qe.current.delete($),Is(pn)},yc*2**a)):qn();return}z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Se.message}))}},_r=Se=>{nn.current=!0;let ke=!1;me.mutateAsync(Se).then(()=>wr.onSuccess(),Tt=>{ke=!0,wr.onError(Tt)}).finally(()=>{nn.current=!1,Is(ke?pn:0),Ps()})};if(ve.isSavedBlock){const Se=da(q,ve);if(!Se)return;_r({blockKey:Se,data:Ct,..._e?{base:{value:gt?$e:_e}}:{},rebaseOnConflict:!1});return}if(!Ue)return;const An={...M[Ue]},Ft=[...ue];if(ve.isMultivariate){const Se=pt(q,ve);if(!Se||!Ue)return;const ke=Ba(Se,y,Ct);Ft[r]=Lt(q,ve,ke)}else if(ve.isHidden){const Se=xs(q.__resolveType),ke=Se?{...q.section}:{...q},Tt=Array.isArray(ke.variants)?[...ke.variants]:[];Tt[0]&&(Tt[0]={...Tt[0],value:Ct}),ke.variants=Tt,Se?Ft[r]={...q,section:ke}:Ft[r]=ke}else ve.isLazy?Ft[r]={...q,section:Ct}:Ft[r]=Ct;if(Ie.length>1){const Se=An.sections,ke=[...Se?.variants??[]];ke[De]&&(ke[De]={...ke[De],value:Ft}),An.sections={...Se,variants:ke}}else An.sections=Ft;_r({blockKey:Ue,data:An,rebaseOnConflict:!1})};qt.current={sectionIndex:r,sectionVariantIndex:y,write:N},J.current=setTimeout(()=>{J.current=null,N()},pn)},Oo=t=>{rn.current=!1,W(t),at(0),D([]),ne(m=>m+1);const r=Q[t],a=Me[t];if(F?.(a?.isSavedBlock?a.resolveType??null:null),!r||!a)return;if(a.isMultivariate){St(r,a,0,t);return}const c=jt(r,a,v);if(!c){K(null),G(null),st(null),Ze(null),Ut(null,t,0);return}K(c.data),G(c.resolveType),st(null),Ze(null),Ut(null,t,0)},Fs=t=>{const r=t;S!==null&&(Kt.current=Ml(Kt.current,{sectionIndex:S,variantIndex:Oe.current.sectionVariantIndex,shown:je,next:r,sectionCount:Oe.current.rawSections.length})),K(r),S!==null&&un(r,S)},Un=t=>{if(!_||!v||!x||!he)return;const r={kind:"page",pageKey:_,pageName:String(he.name??""),path:String(he.path??"")},a=Er(v,r,x);a&&yn.save(_,()=>{const c=yo.getQueryData(Ti.decofile(bo))?.[_];if(!c||typeof c!="object"||c===null||Array.isArray(c))return null;const m={...c,...Fn.current};return Fn.current={},t?.raw!==void 0?{...m,seo:t.raw}:t?.inner!==void 0?ul(r,a,m,t.inner):m})},Ls=(t,r)=>{_&&(Fn.current[t]=r,Un())},$o=(t,r)=>{if(!_)return;const a=Mn([...Q],t,r);S!==null&&(S===t?W(r):t<S&&r>=S?W(S-1):t>S&&r<=S&&W(S+1)),ct(a)},zo=t=>{if(!_)return;const r=Q.filter((a,c)=>c!==t);S===t?It():S!==null&&S>t&&W(S-1),ct(r)},Ho=t=>{if(!_)return;const r=Q[t];if(!r)return;const a=[...Q];a.splice(t+1,0,ca(r)),S!==null&&S>t&&W(S+1),ct(a)},Wo=t=>{if(!_)return;const r=Q[t],a=Me[t];if(!r||!a)return;const c=a.isHidden?Ma(r):Da(r);if(!c)return;const m=[...Q];m[t]=c,S===t&&It(),ct(m)},Go=t=>{if(!_)return;const r=Q[t],a=Me[t];if(!r||!a||a.isMultivariate)return;const c=Va(r);if(!c)return;const m=[...Q];m[t]=c,S===t&&It(),ct(m)},qo=t=>{if(!_)return;const r=Q[t],a=Me[t];if(!r||!a?.isSavedBlock)return;const c=jt(r,a,v);if(!c?.data)return;const{name:m,...y}=c.data,p=[...Q];a.isLazy?p[t]={...r,section:y}:p[t]=y,S===t&&It(),ct(p)},Uo=t=>{if(!_)return;const r=[...Q,{__resolveType:t.resolveType}],a=r.length-1;ct(r,{onError:()=>{Oe.current.selectedSectionIndex===a&&It()}}),Ae(!1),W(a),at(0),D([]),ne(p=>p+1);const c=r[a],m=vn(r,v)[a];if(!c||!m)return;if(m.isMultivariate){St(c,m,0);return}const y=jt(c,m,v);if(!y){K(null),G(null),st(null),Ze(null);return}K(y.data),G(y.resolveType),st(null),Ze(null)},Os=t=>{Ge.current=t.append,Ae(!0)},Yo=t=>{const r=Ge.current;if(!r){Uo(t);return}r({__resolveType:t.resolveType}),Ae(!1),Ge.current=null},$s=t=>{if(S===null)return;const r=Q[S],a=Me[S];!r||!a?.isMultivariate||(at(t),D([]),ne(c=>c+1),St(r,a,t,S,!0))},Jo=t=>{if(S===null||!_)return;const r=Q[S],a=Me[S];if(!r||!a?.isMultivariate)return;const c=pt(r,a);if(!c)return;const m=Ca(c,t);if(!m){z.error(f("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const y=[...Q];y[S]=Lt(r,a,m);const p=m.variants;let R=Xe;t===Xe?R=Math.min(t,p.length-1):t<Xe&&(R=Xe-1),at(R),D([]),ne($=>$+1),St(y[S],a,R),ct(y)},Qo=t=>{if(S===null||!_)return;const r=Q[S],a=Me[S];if(!r||!a?.isMultivariate)return;const c=pt(r,a);if(!c)return;const m=Ta(c,t),y=[...Q];y[S]=Lt(r,a,m);const p=t+1;at(p),D([]),ne(R=>R+1),St(y[S],a,p),ct(y)},Xo=(t,r)=>{if(S===null||!_||t===r)return;const a=Q[S],c=Me[S];if(!a||!c?.isMultivariate)return;const m=pt(a,c);if(!m)return;const y=Aa(m,t,r),p=[...Q];p[S]=Lt(a,c,y);let R=Xe;Xe===t?R=r:t<Xe&&r>=Xe?R=Xe-1:t>Xe&&r<=Xe&&(R=Xe+1),at(R),St(p[S],c,R),ct(p)},dn=t=>{const r=t??S;if(r===null||!_)return;const a=Q[r],c=Me[r];if(!a||!c)return;const m=ka(a,c);if(!m){z.error(f("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const y=[...Q];y[r]=m.section;const p=vn(y,v)[r];if(!p?.isMultivariate){z.error(f("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}W(r),at(m.newVariantIndex),D([]),ne(R=>R+1),St(m.section,p,m.newVariantIndex,r),ct(y)},zs=()=>{if(S===null||!_)return;const t=Q[S],r=Me[S];if(!t||!r?.isMultivariate)return;const a=pt(t,r);if(!a)return;const c=Na(t,r,a);if(!c){z.error(f("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const m=[...Q];m[S]=c;const y=vn(m,v)[S];if(!y)return;at(0),st(null),Ze(null),D([]),ne(R=>R+1);const p=jt(c,y,v);p?(K(p.data),G(p.resolveType)):(K(null),G(null)),Ut(null,S,0),ct(m)},Zo=async t=>{if(ye===null||!_)return;const r=Vn(t,v);if(r){z.error(r);return}const a=Q[ye],c=Me[ye];if(!a||!c)return;const m=jt(a,c,v);if(!m){z.error(f("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const y={...m.data,name:t};try{await me.mutateAsync({blockKey:t,data:y});const p=[...Q];p[ye]={__resolveType:t},await me.mutateAsync({blockKey:_,data:mn(v,_,p,ge,Ne)}),S===ye&&It(),Fe(null),z.success(f("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),g?.()}catch(p){z.error(p instanceof Error?p.message:f("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"))}},Hs=ot?.rule;if(mt&&S===null&&B===null&&Hs){const{resolveType:t,formValue:r}=hn(Hs,v??{},x??void 0);O(t),ie(r)}const Yt=x?Zi(x):[],Yn=x&&v?ea(x,v):[],Ws=!ae&&!!(te&&x&&v),Gs=B&&x?Cn(B,x):null,Et=()=>{yt.current&&(clearTimeout(yt.current),yt.current=null),bt.current&&(clearTimeout(bt.current),bt.current=null)},Bt=async(t,r)=>{if(!(Ia(r,t,x)>0))try{await bn.mutateAsync({blockKey:t})}catch(a){z.error(a instanceof Error?a.message:f("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"))}},qs=t=>{yt.current&&clearTimeout(yt.current),yt.current=setTimeout(()=>{const{activePageKey:r,decofile:a,variantIndex:c}=Oe.current;if(!r)return;const m={...a[r]},y={...m.sections},p=[...y.variants??[]],R=p[c],$=R?.rule;if(Ot($,a,x)){const N=$?.__resolveType??"",T=a[N],M=typeof T?.name=="string"?T.name:N,{__resolveType:ue,...be}=t;me.mutate({blockKey:N,data:Mt(ue??"",be,M)},{onSuccess:()=>g?.(),onError:Ie=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:Ie.message}))});return}R&&(p[c]={...R,rule:t}),m.sections={...y,variants:p},me.mutate({blockKey:r,data:m},{onSuccess:()=>g?.(),onError:N=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:N.message}))})},pn)},Us=t=>{O(t);const r=t?Ir(t,x):{__resolveType:Br};ie(t?r:{}),qs(r)},Ys=t=>{const r=t;ie(r);const a=B?{__resolveType:B,...r}:{...r};qs(a)},Js=async t=>{Et();const{activePageKey:r,decofile:a,variantIndex:c}=Oe.current;if(!r)return;const m=a[r],y=m?.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const p=y;if(!Array.isArray(p.variants))return;const R=[...p.variants],$=R[c];if(!$)return;const N=Vt($.rule,a,x),T=Zt(t);R[c]={...$,rule:T};const M={...a,[r]:{...m,sections:{...p,variants:R}}},{resolveType:ue,formValue:be}=hn(T,M,x??void 0);O(ue),ie(be);try{await me.mutateAsync({blockKey:r,data:M[r]}),N&&N!==t&&await Bt(N,M),g?.()}catch(Ie){z.error(Ie instanceof Error?Ie.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}},Qs=t=>{bt.current&&clearTimeout(bt.current);const{selectedSectionIndex:r,sectionVariantIndex:a}=Oe.current;r!==null&&(bt.current=setTimeout(()=>{const{rawSections:c,parsedSections:m,decofile:y,activePageKey:p,pageVariants:R,variantIndex:$}=Oe.current;if(!p)return;const N=c[r],T=m[r];if(!N||!T?.isMultivariate)return;const M=pt(N,T);if(!M)return;const be=(M.variants??[])[a]?.rule;if(Ot(be,y,x)){const q=be?.__resolveType??"",ve=y[q],_e=typeof ve?.name=="string"?ve.name:q,{__resolveType:$e,...dt}=t;me.mutate({blockKey:q,data:Mt($e??"",dt,_e)},{onSuccess:()=>g?.(),onError:et=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:et.message}))});return}const Ie=Fr(M,a,t),De=[...c];De[r]=Lt(N,T,Ie);const Ue=mn(y,p,De,$,R);me.mutate({blockKey:p,data:Ue},{onSuccess:()=>g?.(),onError:q=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:q.message}))})},pn))},ei=t=>{st(t);const r=t?Ir(t,x):{__resolveType:Br};Ze(t?r:{}),Qs(r)},ti=t=>{const r=t;Ze(r);const a=Ht?{__resolveType:Ht,...r}:{...r};Qs(a)},ni=async t=>{Et();const{selectedSectionIndex:r,sectionVariantIndex:a,rawSections:c,parsedSections:m,decofile:y,activePageKey:p,pageVariants:R,variantIndex:$}=Oe.current;if(r===null||!p)return;const N=c[r],T=m[r];if(!N||!T?.isMultivariate)return;const M=pt(N,T);if(!M)return;const ue=M.variants??[],be=Vt(ue[a]?.rule,y,x),Ie=Zt(t),De=Fr(M,a,Ie),Ue=[...c];Ue[r]=Lt(N,T,De);const q=mn(y,p,Ue,$,R),ve={...y,[p]:q},{resolveType:_e,formValue:$e}=hn(Ie,ve,x??void 0);st(_e),Ze($e);try{await me.mutateAsync({blockKey:p,data:q}),be&&be!==t&&await Bt(be,ve),g?.()}catch(dt){z.error(dt instanceof Error?dt.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}};if(!ae&&!he)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.noPageFound",{currentPath:d})});if(ae&&!On)return o.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:f("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Ke=S!==null?Me[S]??null:null,Xs=S!==null?Q[S]:null,Zs=Xs&&Ke?.isMultivariate?pt(Xs,Ke):null,Rt=Zs?ls(Zs,vt):[],_n=Math.min(Xe,Math.max(Rt.length-1,0)),Jt=Rt[_n]??null,At=Ke?.isMultivariate===!0,Jn=S!==null&&Ke!==null,Nt=Jn&&(At||!!(wn&&je)),si=Nt&&!ae&&Ke?.isSavedBlock===!0,ut=ae||si,er=ae?Ns:Ke?.label??"",ri=Ht&&x?Cn(Ht,x):null,tr=(t,r)=>r&&P?`${t} · ${r}`:t,nr=Ke?Ke.variantOf??Ke.label:"",oi=(()=>{const t=At&&Jt?Jt.label:null;return t?P?[tr(nr,t)]:[Ke.label,t]:[Ke?.label??""]})(),Qn=tr(he?.name??"",mt?ot?.label:null),kn=Nt&&(!ae||I.length>0)?ae?[Ns,...I]:[Qn,...oi,...I]:[],sr=ce&&he?[he.name,"SEO",...ws]:[],rr=f("sectionsEditor.pageVariantTabs.variantsLabel"),or=nt&&he?[he.name,rr]:pe&&he&&Ke?[Qn,nr,rr]:[],En=or.length>0?or:sr.length>0?sr:ut?kn.length>0?kn:[er]:kn.length>0?kn:[Qn],ir=Jn&&!At&&!Ke?.isHidden&&!!_,ii=ut||!ae&&mt&&!!ot||ir,ai=Jn&&!At&&!ae&&I.length===0&&!!Ke&&ro(Ke)&&!!_,li=P&&Nt&&!pe&&At&&I.length===0&&!!Jt,ar=P&&I.length>0?Rr(I[I.length-1]):null,ci=I.length>1?Rr(I[I.length-2]):null,lr=ut?er:Nt?Ke?.label??"":he?.name??"",ui=nt||pe?f("sectionsEditor.pageVariantTabs.variantsLabel"):ce?f("sectionsEditor.panelSections.seo"):ar??lr,cr=pe?Ke?.variantOf??Ke?.label??"":nt||ce?he?.name??"":ar?ci??lr:ut?f("sectionsEditor.sectionsEditor.globalSectionSubtitle"):Nt?he?.name??"":he?.path??"",Xn=!nt&&!pe&&!ce&&!Nt&&!ut,di=!P&&!ce&&!ae&&At&&I.length===0,fn=()=>{if(!_)return;Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const t=v[_],r=Ea(t.sections,Q);if(!r)return;const a=Ra(r);me.mutate({blockKey:_,data:{...t,sections:r}},{onSuccess:()=>{xe(a),W(null),K(null),G(null),D([]),ie(null),O(null)},onError:c=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:c.message}))})},Rn=(t,r,a)=>{if(!_)return;Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const c=v[_],m=c.sections;if(!m||typeof m!="object"||Array.isArray(m))return;const y=m;if(!Array.isArray(y.variants))return;const p=t([...y.variants]);if(!p)return;const R=Ka(y,p),$={...v,[_]:{...c,sections:R}};me.mutate({blockKey:_,data:$[_]},{onSuccess:()=>{r?.();const N=typeof a=="string"?[a]:a??[];(async()=>{for(const T of N)await Bt(T,$)})()},onError:N=>z.error(f("sectionsEditor.sectionsEditor.saveFailed",{error:N.message}))})},Zn=t=>{fe(null),xe(t),W(null),K(null),G(null),D([]);const r=Ne[t]?.rule,{resolveType:a,formValue:c}=hn(r,v??{},x??void 0);O(a),ie(c),Wn(Ne.map(m=>({rule:m.rule})),t)},ur=(t,r)=>{if(t===r)return;let a=ge;ge===t?a=r:t<ge&&r>=ge?a=ge-1:t>ge&&r<=ge&&(a=ge+1),xe(a);const c=Mn(Ne.map(m=>({rule:m.rule})),t,r);Wn(c,a),Rn(m=>Mn(m,t,r))},dr=t=>{const r=Ne[t]?.rule,a=Vt(r,v??{},x??void 0);Rn(c=>c.length<=1?null:(c.splice(t,1),c),()=>{Ne.length-1===1?xe(0):t<ge?xe(ge-1):t===ge&&xe(Math.max(0,t-1)),W(null),K(null),G(null),D([]),ie(null),O(null)},a)},fi=()=>{const t=Ne.map((r,a)=>({variant:r,index:a})).filter(({variant:r})=>!Pa(r.rule)).map(({variant:r})=>Vt(r.rule,v??{},x??void 0)).filter(r=>!!r);Rn(r=>{const a=La({variants:r}),c=r[a];return c?[{...c,rule:Oa()}]:null},()=>{xe(0),W(null),K(null),G(null),D([]),ie(null),O(null),se(!1)},t)},fr=t=>{Rn(r=>$a(r,t),()=>{xe(t+1),W(null),K(null),G(null),D([]),ie(null),O(null)})},mi=async(t,r)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const a=Oe.current.activePageKey,c=Oe.current.decofile;if(!a)return;const m=c[a],y=m.sections;if(!y||typeof y!="object"||Array.isArray(y))return;const p=y;if(!Array.isArray(p.variants))return;const R=[...p.variants],$=R[t];if(!$?.rule||typeof $.rule!="object"){z.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const N=$.rule,T=r.trim();Gt(!0);try{if(!T){if(!Ot(N,c,x)){fe(null);return}const Ue=N.__resolveType??"";R[t]={...$,rule:cs(N,c,x)};const q={...c,[a]:{...m,sections:{...p,variants:R}}};await me.mutateAsync({blockKey:a,data:q[a]}),await Bt(Ue,q),fe(null),g?.();return}const M=us(N,c,x);if(!M){z.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(M.blockKey){await me.mutateAsync({blockKey:M.blockKey,data:Mt(M.resolveType,M.data,T)}),fe(null),g?.();return}const ue=Tn(T),be=Vn(ue,c);if(be){z.error(be);return}const Ie=Mt(M.resolveType,M.data,T);let De=null;try{await me.mutateAsync({blockKey:ue,data:Ie}),De=ue,R[t]={...$,rule:Zt(ue)},await me.mutateAsync({blockKey:a,data:{...m,sections:{...p,variants:R}}}),De=null}catch(Ue){throw De&&await bn.mutateAsync({blockKey:De}).catch(()=>{}),Ue}fe(null),z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:T})),g?.()}catch(M){z.error(M instanceof Error?M.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Gt(!1)}},pi=async(t,r)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const{selectedSectionIndex:a,rawSections:c,parsedSections:m,decofile:y,activePageKey:p,pageVariants:R,variantIndex:$}=Oe.current;if(a===null||!p)return;const N=c[a],T=m[a];if(!N||!T?.isMultivariate)return;const M=pt(N,T);if(!M)return;const ue=M.variants??[],be=ue[t];if(!be?.rule||typeof be.rule!="object"){z.error(f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const Ie=be.rule,De=r.trim();Gt(!0);const Ue=async q=>{const ve={...M,variants:q},_e=[...c];_e[a]=Lt(N,T,ve);const $e=mn(y,p,_e,$,R);return await me.mutateAsync({blockKey:p,data:$e}),{...y,[p]:$e}};try{if(!De){if(!Ot(Ie,y,x)){Pe(null);return}const et=Ie.__resolveType??"",gt=[...ue];gt[t]={...be,rule:cs(Ie,y,x)};const Ct=await Ue(gt);await Bt(et,Ct),Pe(null),g?.();return}const q=us(Ie,y,x);if(!q){z.error(f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(q.blockKey){await me.mutateAsync({blockKey:q.blockKey,data:Mt(q.resolveType,q.data,De)}),Pe(null),g?.();return}const ve=Tn(De),_e=Vn(ve,y);if(_e){z.error(_e);return}const $e=Mt(q.resolveType,q.data,De);let dt=null;try{await me.mutateAsync({blockKey:ve,data:$e}),dt=ve;const et=[...ue];et[t]={...be,rule:Zt(ve)},await Ue(et),dt=null}catch(et){throw dt&&await bn.mutateAsync({blockKey:dt}).catch(()=>{}),et}Pe(null),z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:De})),g?.()}catch(q){z.error(q instanceof Error?q.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Gt(!1)}},mr=async(t,r,a)=>{K(a);try{await me.mutateAsync({blockKey:t,data:a})}catch(c){throw K(m=>m===a?r:m),c}},hi={rename:async(t,r,a)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const{activePageKey:c,decofile:m}=Oe.current;if(!c)return;const y=Array.isArray(t.variants)?[...t.variants]:[],p=y[r],R=p?.rule&&typeof p.rule=="object"?p.rule:void 0,$=async T=>{const M={...t,variants:T};return await mr(c,t,M),{...m,[c]:M}},N=vc(R,a,m,x);if(N.kind!=="noop"){if(N.kind==="error"){z.error(N.reason==="no-matcher-rule"?f("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):N.reason==="unreadable-rule"?f("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):N.message??f("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}Gt(!0);try{if(N.kind==="inline"){const M=[...y];M[r]={...p,rule:N.inlinedRule};const ue=await $(M);await Bt(N.blockKey,ue),g?.();return}if(N.kind==="updateBlock"){await me.mutateAsync({blockKey:N.blockKey,data:N.blockData}),g?.();return}let T=null;try{await me.mutateAsync({blockKey:N.blockId,data:N.blockData}),T=N.blockId;const M=[...y];M[r]={...p,rule:N.reference},await $(M),T=null}catch(M){throw T&&await bn.mutateAsync({blockKey:T}).catch(()=>{}),M}z.success(f("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:a.trim()})),g?.()}catch(T){z.error(T instanceof Error?T.message:f("sectionsEditor.sectionsEditor.failedToRenameVariant"))}finally{Gt(!1)}}},selectGlobal:async(t,r,a)=>{Et(),J.current&&(clearTimeout(J.current),J.current=null),qe.current.clear();const{activePageKey:c,decofile:m}=Oe.current;if(!c)return;const y=Array.isArray(t.variants)?[...t.variants]:[],p=y[r];if(!p)return;const R=Vt(p.rule,m,x);y[r]={...p,rule:Zt(a)};const $={...t,variants:y},N={...m,[c]:$};try{await mr(c,t,$),R&&R!==a&&await Bt(R,N),g?.()}catch(T){z.error(T instanceof Error?T.message:f("sectionsEditor.sectionsEditor.couldNotApplySavedRule"))}}},pr=()=>{It()},hr=t=>{xn(t),Un({inner:t})},gr=t=>{Bn(t),Un({raw:t})},vr=()=>{xn(null),Pt([])},xr=()=>en(t=>t+1),yr=()=>{yn.flush(),it(!1),xn(null),Bn(void 0),Pt([]),en(t=>t+1),E?.()},gi=()=>{se(!1),rt(!1),W(null),it(!0)},vi=()=>{ce&&yr(),W(null),se(!0)},xi=()=>rt(!0),es=t=>{if(nt&&t===0){se(!1);return}if(pe&&t<2){rt(!1),t===0&&W(null);return}if(ce){if(t===0){yr();return}if(t===1){Pt([]),en(a=>a+1);return}Pt(ws.slice(0,t-1)),en(a=>a+1);return}if(ae){D(I.slice(0,t)),ne(a=>a+1);return}if(t===0){pr();return}if(t===1){D([]),ne(a=>a+1);return}const r=!P&&At&&Jt?1:0;if(r===1&&t===2){D([]),ne(a=>a+1);return}D(I.slice(0,t-1-r))},ts=En.length>1?o.jsx("button",{type:"button",onClick:()=>es(ua(En.length,{isMultivariateSectionTop:di})),title:f("sectionsEditor.sectionsEditor.back"),"aria-label":f("sectionsEditor.sectionsEditor.back"),className:le("shrink-0 inline-flex size-6 items-center justify-center rounded-[var(--studio-control-radius,var(--radius-md))] transition-colors",ut?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:o.jsx(ga,{className:"size-4"})}):null,yi=ut||Nt||ce?ii&&o.jsxs("div",{className:le("border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!ae&&mt&&ot&&o.jsxs("button",{type:"button",onClick:pr,title:f("sectionsEditor.sectionsEditor.editingInVariant",{variant:ot.label}),className:le("shrink-0 inline-flex items-center gap-1 rounded-lg h-6 px-1.5 text-xs font-medium cursor-pointer transition-opacity hover:opacity-80",na),children:[o.jsx(ta,{rule:rs(ot.rule,v??{},x??void 0),matchers:Yt}),o.jsx("span",{className:"max-w-[160px] truncate",children:ot.label})]}),o.jsx("div",{className:"flex-1"}),ut&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Pn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(kt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),ir&&o.jsx(Nn,{onClick:()=>dn()})]}),ut&&o.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:f("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):o.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx(Ar,{pageKey:_,initialName:he.name,initialPath:he.path,onFieldChange:Ls,variant:"header"})}),o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:()=>it(!0),children:o.jsx(Pr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"ghost",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>X&&_?X():Le(!0),children:o.jsx(Kr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]}),o.jsx(Nn,{onClick:fn})]}),bi=o.jsxs(o.Fragment,{children:[mt&&_&&o.jsx(Nr,{listKey:_,variants:Ne,activeIndex:ge,decofile:v??{},meta:x,matchers:Yt,onSelect:Zn,onReorder:ur,onRename:fe,onDuplicate:fr,onDelete:dr,onAdd:fn}),mt&&B!==null&&o.jsx(Cr,{className:"mt-3",children:o.jsx("div",{className:le("space-y-3",Wt&&"pointer-events-none opacity-50"),children:o.jsx(ss,{currentRt:B,currentLabel:gn(ot?.rule,v??{},vt,x??void 0),currentGlobalKey:Vt(ot?.rule,v??{},x??void 0)??void 0,matchers:Yt,globals:Yn,onSelect:Us,onSelectGlobal:Js,schema:Gs,formValue:we,onChange:Ys,formKey:`${ge}:${B??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:v,onSaveReferencedBlock:tn,sandbox:ln})})})]}),br=o.jsxs(o.Fragment,{children:[o.jsx(sa,{listKey:`${_??""}:${S??""}`,variants:Rt.map((t,r)=>({index:r,label:t.label})),selectedIndex:_n,onSelect:$s,onRename:Pe,onDuplicate:Qo,onDelete:Jo,onRemoveAll:zs,onReorder:Xo,onAdd:()=>dn()}),o.jsx(Cr,{children:o.jsx(ss,{currentRt:Ht??"",currentLabel:gn(Jt?.rule,v??{},vt,x??void 0),currentGlobalKey:Vt(Jt?.rule,v??{},x??void 0)??void 0,matchers:Yt,globals:Yn,onSelect:ei,onSelectGlobal:ni,schema:ri,formValue:xo,onChange:ti,formKey:`${S??"none"}:${_n}:${Ht??""}`,formWrapperClassName:"pt-1",meta:x??void 0,decofile:v,onSaveReferencedBlock:tn,sandbox:ln})})]}),Sr=o.jsx("div",{className:le(P?"px-2":"p-2 pt-3"),children:o.jsx(Nl,{listKey:`${_??""}-${ge}`,rawSections:Q,sections:Me,meta:x,decofile:v,selectedIndex:S,onSelect:Oo,onReorder:$o,onDelete:zo,onDuplicate:Ho,onMakeReusable:Fe,onToggleHidden:Wo,onToggleLazy:Go,onAddVariant:dn,onDetach:qo,onAddSection:()=>Ae(!0),canAddSection:Ws})}),Si=o.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[_&&he&&o.jsx(Ar,{pageKey:_,initialName:he.name,initialPath:he.path,onFieldChange:Ls}),on&&_?o.jsx(Wr,{rawSeo:Sn,innerSeo:zn,defaultResolveType:Ts,seoSchema:Vs,activeResolveType:jn,seoTypeOptions:Cs,formResetKey:_s,siteDefaultSeo:Ms,onBreadcrumbChange:Pt,onPersistRaw:gr,onInnerChange:hr,onClearForm:vr,onBumpFormKey:xr}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),ji=o.jsx(Xt,{className:"flex-1 min-h-0 [&_[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:on&&_?o.jsx(Wr,{rawSeo:Sn,innerSeo:zn,defaultResolveType:Ts,seoSchema:Vs,activeResolveType:jn,seoTypeOptions:Cs,formResetKey:_s,siteDefaultSeo:Ms,onBreadcrumbChange:Pt,onPersistRaw:gr,onInnerChange:hr,onClearForm:vr,onBumpFormKey:xr}):o.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:f("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),wi=o.jsxs(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[mt&&_&&o.jsx(Nr,{listKey:_,variants:Ne,activeIndex:ge,decofile:v??{},meta:x,matchers:Yt,onSelect:Zn,onReorder:ur,onRename:fe,onDuplicate:fr,onDelete:dr,onAdd:fn}),mt&&B!==null&&o.jsxs("div",{className:le("px-3 border-b",ee?"pt-3 pb-5 space-y-3":"py-2"),children:[o.jsxs("button",{type:"button",onClick:()=>zt(t=>!t),className:"flex w-full items-center justify-between gap-2 text-left cursor-pointer rounded-[var(--studio-control-radius,var(--radius-sm))] py-0.5 hover:bg-muted/40","aria-expanded":ee,children:[o.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:f("sectionsEditor.sectionsEditor.variantRule")}),ee?o.jsx(ma,{className:"size-3.5 shrink-0 text-muted-foreground"}):o.jsx(pa,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),ee&&o.jsx("div",{className:le("space-y-3",Wt&&"pointer-events-none opacity-50"),children:o.jsx(ss,{currentRt:B,currentLabel:gn(ot?.rule,v??{},vt,x??void 0),currentGlobalKey:Vt(ot?.rule,v??{},x??void 0)??void 0,matchers:Yt,globals:Yn,onSelect:Us,onSelectGlobal:Js,schema:Gs,formValue:we,onChange:Ys,formKey:`${ge}:${B??""}`,formWrapperClassName:"space-y-3",meta:x??void 0,decofile:v,onSaveReferencedBlock:tn,sandbox:ln})})]}),Sr]},"editor-section-list");return o.jsx(ra,{children:o.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!P&&ts&&o.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ts}),(P||En.length>1)&&o.jsx(oa,{crumbs:En,onSelect:es,onSelectRoot:()=>{yn.flush(),U?U():es(0)}}),o.jsx("div",{className:"shrink-0",children:P?o.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ut&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[P&&ts,ut&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx("span",{className:"shrink-0 cursor-help",children:o.jsx(Pn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),o.jsx(kt,{side:"bottom",className:"max-w-[260px]",children:f("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[o.jsx("span",{className:"truncate text-sm font-semibold",children:ui}),cr&&o.jsx("span",{className:"truncate text-xs text-muted-foreground",children:cr})]}),Xn&&mt&&ot&&o.jsx(Tr,{variants:Ne,activeIndex:ge,onSelect:Zn,onManage:vi,onRemoveAll:fi}),li&&o.jsx(Tr,{variants:Rt,activeIndex:_n,onSelect:$s,onManage:xi,onRemoveAll:zs}),Xn&&!mt&&o.jsx(Nn,{onClick:fn}),ai&&o.jsx(Nn,{onClick:()=>dn()}),o.jsx(ia,{}),Xn&&o.jsxs(o.Fragment,{children:[o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"outline",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.editSeo"),className:"size-7 shrink-0",onClick:gi,children:o.jsx(Pr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.editSeo")})]}),!X&&o.jsxs(wt,{children:[o.jsx(_t,{asChild:!0,children:o.jsx(xt,{type:"button",variant:"outline",size:"icon","aria-label":f("sectionsEditor.sectionsEditor.viewJson"),className:"size-7 shrink-0",onClick:()=>Le(!0),children:o.jsx(Kr,{size:14})})}),o.jsx(kt,{side:"bottom",children:f("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):yi}),lt&&o.jsx(Jl,{open:!0,fields:Ll(lt.plan,lt.target.schema),choices:lt.choices,changedAgain:lt.changedAgain,fresh:lt.fresh,onChoose:(t,r)=>Lo({...lt.choices,[t]:r}),onApply:Fo},Sc(lt.formBase)),pe?o.jsx(Vr,{onAdd:()=>dn(),children:br},"editor-section-variants"):Nt?o.jsxs(Xt,{viewportRef:Ce,onBlur:Ks,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!P&&At&&Rt.length>0&&I.length===0&&br,o.jsx(Mr,{activeSchema:wn,formValue:je,formResetKey:tt,onFormChange:Fs,onBreadcrumbChange:D,breadcrumbPath:I,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:x,decofile:v,onSaveReferencedBlock:tn,sandbox:ln,previewBaseUrl:te,onRequestAddSection:Os,onVariantMatcherOp:ae?hi:void 0})]},"editor-section-form"):ae?o.jsx(Xt,{viewportRef:Ce,onBlur:Ks,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx(Mr,{activeSchema:wn,formValue:je,formResetKey:tt,onFormChange:Fs,onBreadcrumbChange:D,breadcrumbPath:I,emptyMessage:f("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:x,decofile:v,onSaveReferencedBlock:tn,sandbox:ln,previewBaseUrl:te,onRequestAddSection:Os})},"editor-global-block"):ce?P?o.jsx(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"p-3",children:Si})},"editor-seo"):ji:nt?o.jsx(Vr,{onAdd:fn,children:bi},"editor-variants"):P?o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[o.jsx(Xt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"py-2",children:Sr})}),o.jsx("div",{className:"shrink-0 border-t p-2",children:o.jsx(ms,{canAddSection:Ws,onAddSection:()=>Ae(!0)})})]},"editor-section-list"):wi,o.jsx(aa,{open:ye!==null,onOpenChange:t=>{t||Fe(null)},defaultBlockId:ye!==null?Tn(Me[ye]?.label??""):"",isPending:me.isPending,onSubmit:Zo}),te&&o.jsx(fl,{open:Qe,onOpenChange:t=>{Ae(t),t||(Ge.current=null)},meta:x,decofile:v,previewBaseUrl:te,onSelect:Yo}),We&&_&&v&&o.jsx(ya,{open:We,onOpenChange:Le,pageKey:_,decofile:v}),Te!==null&&o.jsx(Dr,{open:!0,initialName:Ot(Ne[Te]?.rule,v??{},x??void 0)?gn(Ne[Te]?.rule,v??{},vt,x??void 0):"",autoLabel:vt(rs(Ne[Te]?.rule,v??{},x??void 0)),isPending:Wt,onSubmit:async t=>{await mi(Te,t)},onOpenChange:t=>{!t&&!Wt&&fe(null)}}),Ve!==null&&o.jsx(Dr,{open:!0,initialName:Ot(Rt[Ve]?.rule,v??{},x??void 0)?gn(Rt[Ve]?.rule,v??{},vt,x??void 0):"",autoLabel:vt(rs(Rt[Ve]?.rule,v??{},x??void 0)),isPending:Wt,onSubmit:async t=>{await pi(Ve,t)},onOpenChange:t=>{!t&&!Wt&&Pe(null)}})]})})}export{jf as SectionsEditor};
|