decocms 4.581.1 → 4.582.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-D1QqLKFH.js → AlertCircle-DT2ZDuIl.js} +1 -1
- package/dist/client/assets/{AreaChart-C-sK2ItE.js → AreaChart-DcNurrpT.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B_zuPCk3.js → ArrowLeft-DR_MRxUB.js} +1 -1
- package/dist/client/assets/{ArrowUp-BVEp2Brj.js → ArrowUp-BdtMKnAz.js} +1 -1
- package/dist/client/assets/{BookOpen01-DU_gf3Q9.js → BookOpen01-DejCO54_.js} +1 -1
- package/dist/client/assets/{CartesianChart-BR9Be1vV.js → CartesianChart-43C3tGyF.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DhUmp4Jo.js → CategoricalChart-GawOpO41.js} +1 -1
- package/dist/client/assets/{CheckCircle-r_uvA104.js → CheckCircle-CM--cqi0.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Cnj6Mtq0.js → ChevronSelectorVertical-BJDM_s_Z.js} +1 -1
- package/dist/client/assets/{ChevronUp-fKdis79A.js → ChevronUp-DM7pn8nV.js} +1 -1
- package/dist/client/assets/{CreditCard01-2UGmTwp0.js → CreditCard01-BKZ9QJb-.js} +1 -1
- package/dist/client/assets/{Globe04-BIxVPRI2.js → Globe04-BZJYx7x5.js} +1 -1
- package/dist/client/assets/{Key01-B-uaWiXd.js → Key01-CC_tghZO.js} +1 -1
- package/dist/client/assets/{LinkBroken01-ChDYryt0.js → LinkBroken01-4l2zZef9.js} +1 -1
- package/dist/client/assets/{Minus-eMZySqLh.js → Minus-Bj5yI5D8.js} +1 -1
- package/dist/client/assets/{Monitor01-CzcVShIo.js → Monitor01-DeK03po-.js} +1 -1
- package/dist/client/assets/{Play-DK3U1VA7.js → Play-kYcUI1An.js} +1 -1
- package/dist/client/assets/{Plus-BNdH4tYy.js → Plus-DEeR8qC2.js} +1 -1
- package/dist/client/assets/ReferenceLine-DbQts9AQ.js +1 -0
- package/dist/client/assets/{SearchMd-DWnwnZQO.js → SearchMd-DVpGBR2l.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BrAbYbaG.js → ShoppingBag01-BV5nZGeU.js} +1 -1
- package/dist/client/assets/{Sun-wrM9Jol_.js → Sun-Ba2OXmDv.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-D7pFOqnZ.js → SwitchHorizontal01-Cp1oX99F.js} +1 -1
- package/dist/client/assets/{Tool01-AMJ0J7Ld.js → Tool01-BlUlKjGy.js} +1 -1
- package/dist/client/assets/{Tooltip-CZ7doa0d.js → Tooltip-DNR0eew9.js} +1 -1
- package/dist/client/assets/{Trash01-Chu35sQ_.js → Trash01-CgZrkZ3U.js} +1 -1
- package/dist/client/assets/{Upload01-CGdoFUP8.js → Upload01-DDoiK0tv.js} +1 -1
- package/dist/client/assets/{UserSquare-DUXP0rwX.js → UserSquare-DEjJtCDR.js} +1 -1
- package/dist/client/assets/{Users01-BnTqMUrr.js → Users01-DVMhWmct.js} +1 -1
- package/dist/client/assets/{XClose-BAfH6Ebz.js → XClose-xYIhBL8b.js} +1 -1
- package/dist/client/assets/{Zap-YDxTdktJ.js → Zap-BsuEhLd3.js} +1 -1
- package/dist/client/assets/{access-gate-DDMODilC.js → access-gate-BYQd4796.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-B8fK5SPo.js → add-connection-dialog-C86xZwTt.js} +1 -1
- package/dist/client/assets/agent-app-qCE6mpox.js +1 -0
- package/dist/client/assets/agent-assets-BERkZgBg.js +1 -0
- package/dist/client/assets/{agent-automation-DNgt345_.js → agent-automation-B3znFoJv.js} +3 -3
- package/dist/client/assets/{agent-automations-mWv09YVd.js → agent-automations-BI5n1DEk.js} +1 -1
- package/dist/client/assets/agent-blog-DFA4iTY2.js +2 -0
- package/dist/client/assets/{agent-blog-post-D5O_ItNv.js → agent-blog-post-CJzR6SRp.js} +2 -2
- package/dist/client/assets/{agent-calendar-DFwq2V3Y.js → agent-calendar-DCBRCsam.js} +1 -1
- package/dist/client/assets/{agent-capabilities-DSfvUGIA.js → agent-capabilities-B40k722B.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BaY-1hUg.js → agent-connect-sources-BvH_YwiD.js} +1 -1
- package/dist/client/assets/agent-deck-C_9xRnWL.js +1 -0
- package/dist/client/assets/{agent-e2e-BzjDB0Mp.js → agent-e2e-B2FpHDAG.js} +1 -1
- package/dist/client/assets/agent-experiments-BDFLMLOM.js +1 -0
- package/dist/client/assets/{agent-file-G_Q7_eCe.js → agent-file-CAkn0Q5x.js} +1 -1
- package/dist/client/assets/{agent-hosting-DPI1YzdW.js → agent-hosting-D0d8gHPR.js} +1 -1
- package/dist/client/assets/{agent-icon-DFd8L1O_.js → agent-icon-CpMz1pSC.js} +1 -1
- package/dist/client/assets/agent-library-Cs6jlCDK.js +1 -0
- package/dist/client/assets/agent-library-file-DV2qsJC9.js +1 -0
- package/dist/client/assets/agent-overview-IBMGymrh.js +1 -0
- package/dist/client/assets/{agent-releases-DJ49AvX3.js → agent-releases-k0DaB9LQ.js} +2 -2
- package/dist/client/assets/agent-settings-DF71XJZP.js +1 -0
- package/dist/client/assets/{agent-site-editor-CqHVUUAC.js → agent-site-editor-CS9MMMbk.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-gfgfb7xF.js +2 -0
- package/dist/client/assets/agent-site-editor-content-C07hh63_.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CFg2FnqN.js +1 -0
- package/dist/client/assets/agent-view-CzQtfKwQ.js +1 -0
- package/dist/client/assets/{agent-view-guard-D4yaqKiq.js → agent-view-guard-XdI97YrW.js} +1 -1
- package/dist/client/assets/{ai-providers-CovrDI_x.js → ai-providers-DoacYpUR.js} +1 -1
- package/dist/client/assets/{alert-BA8nDu40.js → alert-DFQMLwuf.js} +1 -1
- package/dist/client/assets/{analytics-sections-C7dFg_aE.js → analytics-sections-DNjeT1Pf.js} +1 -1
- package/dist/client/assets/{api-keys-BrhrD9eO.js → api-keys-Bbyyi1IV.js} +1 -1
- package/dist/client/assets/api-keys-CLzhmgUv.js +1 -0
- package/dist/client/assets/{app-editor-tnp3-UhR.js → app-editor-Cd7oWsvo.js} +1 -1
- package/dist/client/assets/{asset-utils-BSepCiAa.js → asset-utils-DxQXeDgB.js} +1 -1
- package/dist/client/assets/{auth-DiKlrdGP.js → auth-Br21RAsk.js} +1 -1
- package/dist/client/assets/{auth-catchall-tnYz6mdY.js → auth-catchall-ChHXwieU.js} +1 -1
- package/dist/client/assets/{auth-entry-SgfwAEXQ.js → auth-entry-BUy5eNSm.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D_rznvbe.js → auth-split-layout-DXcvh-93.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-osQ4PKuX.js → authenticate-and-persist-oauth-CTJV9ez5.js} +1 -1
- package/dist/client/assets/{automation-list-row-FS-zfRjW.js → automation-list-row-COaiktOt.js} +1 -1
- package/dist/client/assets/{automation-runs-DLYz6YWQ.js → automation-runs-BluUkmKT.js} +1 -1
- package/dist/client/assets/{automations-rbGBA3mS.js → automations-BvZ8wxJr.js} +1 -1
- package/dist/client/assets/{badge-BpUJoM3p.js → badge-C2zO_tAX.js} +1 -1
- package/dist/client/assets/{block-document-yqfgnbbt.js → block-document-DTM21O-Q.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-CzI6HAkj.js → blocks-preview-workspace-context-0qX3i0Hw.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Uq85dLE5.js → blocks-tab-states-BZoxOO-H.js} +1 -1
- package/dist/client/assets/{blog-preview-url-BUDrdqoz.js → blog-preview-url-Bcn3MddY.js} +1 -1
- package/dist/client/assets/{blog-schema-Cqi3HnFC.js → blog-schema-PWQlG4FM.js} +1 -1
- package/dist/client/assets/{blog-source-gate-BWofeMwB.js → blog-source-gate-DcD3mNPu.js} +1 -1
- package/dist/client/assets/{blog-view-gate-BjGoFrlO.js → blog-view-gate-BpiHsFQi.js} +1 -1
- package/dist/client/assets/{buckets-QdgXdcXC.js → buckets-r-Vn310N.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-Yt1kTpo8.js → build-improve-prompt-doc-BYTmOiJ8.js} +1 -1
- package/dist/client/assets/{calendar-RX4MUBCU.js → calendar-DkvAGmxG.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dco-wYs-.js → capability-load-error-CHW06qRY.js} +1 -1
- package/dist/client/assets/{category-editor-DMitV3My.js → category-editor-D53-0-dG.js} +1 -1
- package/dist/client/assets/{category-tree-CYPMeaO5.js → category-tree-EQNjX_vh.js} +1 -1
- package/dist/client/assets/{chart-Q-cSHjjY.js → chart-DP-afdSL.js} +1 -1
- package/dist/client/assets/{chat-context-BVOzxL7y.js → chat-context-Na_9rQo_.js} +1 -1
- package/dist/client/assets/{chat-draft-DCJJT_1i.js → chat-draft-BnT_bTVf.js} +1 -1
- package/dist/client/assets/{checkbox-x2IxTucq.js → checkbox-Dn6r2X61.js} +1 -1
- package/dist/client/assets/{choose-editor-CMLPeKz2.js → choose-editor-DFYfaLQ4.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DupR1ypd.js → cli-auth-success-BWjEoABt.js} +1 -1
- package/dist/client/assets/{client-icons-BXUuRiJU.js → client-icons-B7ckFhTB.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-BPeg7XT1.js → cms-settings-editor-BLtwrg_Q.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-DDyrwrmA.js → cms-store-drafts-DC7_MPeX.js} +1 -1
- package/dist/client/assets/{collapsible-CmQt_iZ0.js → collapsible-waKUBV3F.js} +1 -1
- package/dist/client/assets/collection-detail-BdQUzwBw.js +1 -0
- package/dist/client/assets/{collection-display-button-Q31iiQyG.js → collection-display-button-CpOX39FE.js} +1 -1
- package/dist/client/assets/{collection-search-kFWWyWV8.js → collection-search-CKJ8zcS9.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-lwnrgmvl.js → collection-table-wrapper-DX64SyX5.js} +1 -1
- package/dist/client/assets/{collection-tabs-ZWO3GiY3.js → collection-tabs-DL3FYMaD.js} +1 -1
- package/dist/client/assets/{combobox-B7xBLEqp.js → combobox-CZTRaybI.js} +1 -1
- package/dist/client/assets/{command-C00hDMwB.js → command-B0-oLV0k.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DqGiryze.js → companion-mcps-section-CAkQdc3e.js} +1 -1
- package/dist/client/assets/{config-1WcD3pf5.js → config-DhSdzr_l.js} +1 -1
- package/dist/client/assets/{connect-CPk_XjVi.js → connect-DwtFEmWa.js} +2 -2
- package/dist/client/assets/{connect-layout-Cki4va2J.js → connect-layout-By1LwNsY.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-OGa93hL5.js → connect-source-dialog-Clx35W2U.js} +1 -1
- package/dist/client/assets/{connection-CLrwGffq.js → connection-CwOP2DkA.js} +1 -1
- package/dist/client/assets/{connection-card-CG85F9R4.js → connection-card-DxEnheWw.js} +1 -1
- package/dist/client/assets/{connection-detail-B8RNsYKm.js → connection-detail-Bm5pNgz3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Du6e-sDu.js → connection-form-helpers-DsiTws_r.js} +1 -1
- package/dist/client/assets/{connection-slug-BC6vEqea.js → connection-slug-CqKJM07D.js} +1 -1
- package/dist/client/assets/{connections-DTZU4hmT.js → connections-8N6-U8BU.js} +1 -1
- package/dist/client/assets/{content-tab-xOpBPR9g.js → content-tab-D3gTzU_j.js} +3 -3
- package/dist/client/assets/{context-DZfW90rI.js → context-CdMMXT5s.js} +1 -1
- package/dist/client/assets/{context-menu-dgkpoBmD.js → context-menu-BAywIeQG.js} +1 -1
- package/dist/client/assets/{context-shell-Dlkux8ZE.js → context-shell-C8ZPCYjw.js} +3 -3
- package/dist/client/assets/{core.esm-DUcC46mO.js → core.esm-YEEWezEY.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CG0hKl_H.js → create-organization-dialog-BpL43B76.js} +1 -1
- package/dist/client/assets/{delete-copy-BLgf78Hs.js → delete-copy-UjfjjP4_.js} +1 -1
- package/dist/client/assets/{device-hint-CmMhxStN.js → device-hint-AWxEadtg.js} +1 -1
- package/dist/client/assets/discover-DhvRjqxh.js +1 -0
- package/dist/client/assets/{domain-settings-ClKI_rRO.js → domain-settings-BCvvef40.js} +1 -1
- package/dist/client/assets/{drawer-OboTDl5r.js → drawer-CfOCKnhq.js} +1 -1
- package/dist/client/assets/{editor-ChiPsACh.js → editor-COFIs9XE.js} +2 -2
- package/dist/client/assets/{editor-classes-De5o_8lB.js → editor-classes-aqVUSPbm.js} +1 -1
- package/dist/client/assets/{empty-message-D92Pb6fP.js → empty-message-CirmMDhM.js} +1 -1
- package/dist/client/assets/{empty-state-BcZKaOw-.js → empty-state-C7Sg1bax.js} +1 -1
- package/dist/client/assets/{empty-state-CxI5dssp.js → empty-state-CFvQY7HR.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DdEGbuLK.js → experiments-tab-choice-Ch-KXcUZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DwWq6VY0.js → extract-connection-data-CFxfI9gN.js} +1 -1
- package/dist/client/assets/{feature-gate-qgzTBO3A.js → feature-gate-BsIQ70jm.js} +1 -1
- package/dist/client/assets/{feature-paywall-ljVyCUfx.js → feature-paywall-AtUr_EOu.js} +1 -1
- package/dist/client/assets/{file-explorer-fgWC9Rob.js → file-explorer-DpEdUCiL.js} +1 -1
- package/dist/client/assets/{file-preview-C1UH8fjg.js → file-preview-PSKf9fIz.js} +1 -1
- package/dist/client/assets/{file-share-button-Bm5Af9aY.js → file-share-button-D9sAYI1R.js} +1 -1
- package/dist/client/assets/{file-type-icon-Dnh_2HcY.js → file-type-icon-3Zm8W435.js} +1 -1
- package/dist/client/assets/{folder-icon-BZSobjd4.js → folder-icon-D4-RUOt8.js} +1 -1
- package/dist/client/assets/{form-CuAETLLt.js → form-BZ7xdssd.js} +1 -1
- package/dist/client/assets/{frame-navigation-D2IzuXnb.js → frame-navigation-8oPGH7NY.js} +1 -1
- package/dist/client/assets/{general-CThohMer.js → general-Bt-teqGz.js} +1 -1
- package/dist/client/assets/{github-icon-D0vbU4b9.js → github-icon-DH5Sm3NR.js} +1 -1
- package/dist/client/assets/held-block-view-BR-UYX4S.js +3 -0
- package/dist/client/assets/{home-DrAlxwLg.js → home-CIpHO2ej.js} +1 -1
- package/dist/client/assets/{home-overview-DPAQZtaE.js → home-overview-9H7C1hoB.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-C2j-K6SC.js → hosted-reconcile-C5UVxzTP.js} +1 -1
- package/dist/client/assets/{icon-button-D8OdW1Ng.js → icon-button-BfibpDoO.js} +1 -1
- package/dist/client/assets/{index-DDDWDv4s.js → index-BP527m3V.js} +6 -6
- package/dist/client/assets/{index-CNMZKaZ4.js → index-BXpXjiyK.js} +1 -1
- package/dist/client/assets/{index-CldZuS5S.js → index-BpLEscAk.js} +1 -1
- package/dist/client/assets/index-BqWale_V.css +1 -0
- package/dist/client/assets/{index-BTxnnO3z.js → index-CQ7e2YEj.js} +1 -1
- package/dist/client/assets/{index-Ch7SvmMC.js → index-CmzG_GaM.js} +1 -1
- package/dist/client/assets/{index-C_OpZGYh.js → index-DCl7HPjQ.js} +1 -1
- package/dist/client/assets/{index-D1w7KFj7.js → index-DF1Gszum.js} +1 -1
- package/dist/client/assets/{index-BATsrbDm.js → index-DN9fxTzN.js} +1 -1
- package/dist/client/assets/{index-54RE0ioE.js → index-DZi8I8ot.js} +1 -1
- package/dist/client/assets/{index-wTvZKrHA.js → index-Db96seLi.js} +1 -1
- package/dist/client/assets/{index-DAjFmo5j.js → index-DoH06YKc.js} +1 -1
- package/dist/client/assets/{index-DxWwCAMV.js → index-Ds3fsbcX.js} +1 -1
- package/dist/client/assets/{index-CY0csw6V.js → index-DuYneP0E.js} +1 -1
- package/dist/client/assets/{index-D3ue61h8.js → index-dsAQGF7D.js} +1 -1
- package/dist/client/assets/{index-CBYIpf8n.js → index-jQ2gY_fm.js} +1 -1
- package/dist/client/assets/{index-ByeVWJ7k.js → index-n1AjR0vt.js} +1 -1
- package/dist/client/assets/{index-redirect-CYDCVRJ_.js → index-redirect-QRKsjVCi.js} +1 -1
- package/dist/client/assets/index-tLhNg31B.js +4 -0
- package/dist/client/assets/{infiniteQueryObserver-ktArfc_t.js → infiniteQueryObserver-BFZQsptZ.js} +1 -1
- package/dist/client/assets/{infra-billing-C-QVvoRz.js → infra-billing-C3ShZZOT.js} +1 -1
- package/dist/client/assets/{input-CBsHXM-K.js → input-C1HwcZTs.js} +1 -1
- package/dist/client/assets/{input-CFiVVIga.js → input-GqBshPf5.js} +4 -4
- package/dist/client/assets/{integration-icon-D5RK2sEk.js → integration-icon-XUOEUOb8.js} +1 -1
- package/dist/client/assets/item-actions-BfBBT1Qz.js +1 -0
- package/dist/client/assets/{jira-icon-CmDZL_wM.js → jira-icon-B48lqxRs.js} +1 -1
- package/dist/client/assets/{label-EESrxoYH.js → label-DSlWCd9e.js} +1 -1
- package/dist/client/assets/{layout-Byi_jW8h.js → layout-QjOyVmz4.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DAEkCShw.js → legacy-admin-welcome-dialog-DWeHIzCA.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CQX5HShD.js → legacy-agents-deep-COHFWDWb.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-PkEZIvXO.js → legacy-main-redirect-h5ds91_H.js} +1 -1
- package/dist/client/assets/library-BMXElwFo.js +1 -0
- package/dist/client/assets/{library-tab-BLBQDXJU.js → library-tab-DI2mHZkf.js} +1 -1
- package/dist/client/assets/{login-BQoCsEsr.js → login-DgKeSKz2.js} +1 -1
- package/dist/client/assets/{markdown-D5a0osui.js → markdown-BTKw4nl8.js} +1 -1
- package/dist/client/assets/match-site-slug-config-B47_xZCi.js +1 -0
- package/dist/client/assets/{mcp-app-renderer-BgUWGow9.js → mcp-app-renderer-BT9_tzyT.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CU691SiC.js → mcp-oauth-1Tp9szFm.js} +1 -1
- package/dist/client/assets/{mcp-oauth-COyT3l0E.js → mcp-oauth-BQRDLkqA.js} +1 -1
- package/dist/client/assets/{members-n8Lstn8K.js → members-DQZtkBei.js} +1 -1
- package/dist/client/assets/{memory-BgMa5u8j.js → memory-B82F2Q7k.js} +2 -2
- package/dist/client/assets/{mock-board-CSrbkqG4.js → mock-board-B7BOXAS7.js} +4 -4
- package/dist/client/assets/{monaco-editor-CwGsSUX8.js → monaco-editor-DTLNzmeB.js} +1 -1
- package/dist/client/assets/{monitoring-s0QSQdK5.js → monitoring-CRmBvi8F.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BsFnLxNy.js → monitoring-stats-row-G2RBze7B.js} +1 -1
- package/dist/client/assets/{multi-select-C5VqbVMP.js → multi-select-ykLyfeEh.js} +1 -1
- package/dist/client/assets/{mustache-BVD8gEp8.js → mustache-p2j_fCOZ.js} +1 -1
- package/dist/client/assets/{named-rule-step-BTqgnNQ5.js → named-rule-step-BJ5LyK07.js} +1 -1
- package/dist/client/assets/{named-rule-view-Bd8STvPD.js → named-rule-view-BBEm0z_K.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BiqAeUrE.js → new-project-dialog-C3JFSI1q.js} +1 -1
- package/dist/client/assets/{oauth-callback-B5GC_Yyx.js → oauth-callback-Cg1KjIf_.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cn-Tp4BP.js → oauth-callback-ai-provider-hOquTBPU.js} +1 -1
- package/dist/client/assets/{oauth-consent-BVAt6oz1.js → oauth-consent-CzhJum4d.js} +1 -1
- package/dist/client/assets/{onboarding-fUXPiATA.js → onboarding-FLu6ztJj.js} +1 -1
- package/dist/client/assets/{openai-conversation-9mnOj04I.js → openai-conversation-DhsFXaEr.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-CyYUwQmb.js → optimistic-project-sidebar-views-D6axz004.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DONFE4J2.js → order-monitor-day-CQJg9ymu.js} +1 -1
- package/dist/client/assets/{organization-choice-BHlAXEW9.js → organization-choice-dV-mJr-d.js} +1 -1
- package/dist/client/assets/{orgs-BAGB65GL.js → orgs-DafOcWKJ.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BCe3XCOA.js → own-accounts-section-BitxRWkd.js} +1 -1
- package/dist/client/assets/{pair-Fhnk8ar3.js → pair-Dsc6GXhQ.js} +1 -1
- package/dist/client/assets/{parse-sections-yZQqTgrz.js → parse-sections-Cy8SKsEh.js} +3 -3
- package/dist/client/assets/{plan-D1utRlpJ.js → plan-5t2sCqh-.js} +1 -1
- package/dist/client/assets/{plan-ladder-CM-HcM-s.js → plan-ladder-xVKcSuhD.js} +1 -1
- package/dist/client/assets/{plan-usage-card-CMfNWBwg.js → plan-usage-card-Cxjcl-tF.js} +2 -2
- package/dist/client/assets/{popover-B_j0y2h7.js → popover-CelLmvH8.js} +1 -1
- package/dist/client/assets/post-calendar-DkUmj6jK.js +1 -0
- package/dist/client/assets/post-editor-DkdXE0U4.js +2 -0
- package/dist/client/assets/{preview-content-DvqZaSqe.js → preview-content-Di9jV9fD.js} +1 -1
- package/dist/client/assets/{preview-dialog-CEbSM9Y6.js → preview-dialog-BTVSDgVC.js} +1 -1
- package/dist/client/assets/{preview-panel-jbh-mjn6.js → preview-panel-COaKD6oK.js} +1 -1
- package/dist/client/assets/preview-tab-BFi8NHe-.js +557 -0
- package/dist/client/assets/{product-picker-dialog-V4AhQCT6.js → product-picker-dialog-tqTphLK7.js} +1 -1
- package/dist/client/assets/{profile-BUCYaJ8H.js → profile-ItK6hTrx.js} +1 -1
- package/dist/client/assets/project-app-view-CMAf9Mlz.js +1 -0
- package/dist/client/assets/{project-apps-CY9tfRYe.js → project-apps-ByyLejju.js} +1 -1
- package/dist/client/assets/{project-icon-DNEfBFoN.js → project-icon-TEwy-duh.js} +1 -1
- package/dist/client/assets/{project-index--AWJOyZB.js → project-index-DqRiC0zN.js} +1 -1
- package/dist/client/assets/project-reports-CPvLPQcs.js +1 -0
- package/dist/client/assets/project-tasks-B88cPPXW.js +1 -0
- package/dist/client/assets/{projects-CJc-98C_.js → projects-FY3sblQl.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CbOIGuob.js → projects-empty-state-OMTDG8SV.js} +1 -1
- package/dist/client/assets/{prompts-CEf1e1i5.js → prompts-TP7YCuz6.js} +1 -1
- package/dist/client/assets/{record-editor-hYaeLcuc.js → record-editor-IJLTcCdR.js} +1 -1
- package/dist/client/assets/{redirect-editor-3TvH_UFo.js → redirect-editor-B2-M7doi.js} +1 -1
- package/dist/client/assets/{reports-D10gkSrT.js → reports-CvxegUiQ.js} +1 -1
- package/dist/client/assets/reports-ODcJFAP-.js +1 -0
- package/dist/client/assets/{reports-onboarding-RhfCcqej.js → reports-onboarding-BicRsxJF.js} +1 -1
- package/dist/client/assets/{reports-tab-CtVgyXhu.js → reports-tab-CCY5hBR2.js} +2 -2
- package/dist/client/assets/repositories-C0edGPcS.js +1 -0
- package/dist/client/assets/{repositories-CJnEkuZk.js → repositories-V6vmPwSM.js} +1 -1
- package/dist/client/assets/{repository-binding-DAYbvLYj.js → repository-binding-DGc5VhVW.js} +1 -1
- package/dist/client/assets/{repository-picker-BO6sLOq7.js → repository-picker-DO5Hy-o-.js} +1 -1
- package/dist/client/assets/{require-capability-DQWSlcjo.js → require-capability-CCGZ96D-.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Dg5kgnfG.js → required-auth-layout-DoMwdVaZ.js} +1 -1
- package/dist/client/assets/{reset-password-B8UgVD_T.js → reset-password-B672rI1V.js} +1 -1
- package/dist/client/assets/{resizable-CaTV7JDr.js → resizable-DrLaW_Jl.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DEOb6228.js → resolve-tab-icon-CfRdrLF-.js} +1 -1
- package/dist/client/assets/{review-settings-i1b4oJDO.js → review-settings-B8FCs2a_.js} +1 -1
- package/dist/client/assets/{role-color-BE5BDDIE.js → role-color-CPDxseg4.js} +1 -1
- package/dist/client/assets/{roles-BgQMqKxE.js → roles-BYqU9-We.js} +1 -1
- package/dist/client/assets/{route-BmXq3cGb.js → route-BXYvPulM.js} +1 -1
- package/dist/client/assets/route-Bh9fCZXT.js +1 -0
- package/dist/client/assets/{route-B8-5mDhW.js → route-a1KQq-lz.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-DJ1Zj_fI.js → sandbox-git-api-3zULVhcU.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DAW3x9U4.js → sandbox-lifecycle-context-BEzUu66E.js} +1 -1
- package/dist/client/assets/save-status-Cx3aKwGu.js +1 -0
- package/dist/client/assets/{schema-B5L6XabR.js → schema-BtzAS_P2.js} +1 -1
- package/dist/client/assets/{schema-CPDsJI-V.js → schema-DIJe3qA1.js} +1 -1
- package/dist/client/assets/{scroll-area-BIbpYC_e.js → scroll-area-mVo2jhxQ.js} +1 -1
- package/dist/client/assets/{search-input-CTHDb7Fb.js → search-input-ChnwrZA6.js} +1 -1
- package/dist/client/assets/{search-toggle--RSSxY_n.js → search-toggle-CC4Rs40x.js} +1 -1
- package/dist/client/assets/{secret-picker-B1Qdwzz-.js → secret-picker-CWGbJrCR.js} +1 -1
- package/dist/client/assets/{secrets-CpTgKWI_.js → secrets-DE59ARp-.js} +1 -1
- package/dist/client/assets/{section-array-field-B-W5rSAO.js → section-array-field-4mOiVd7b.js} +1 -1
- package/dist/client/assets/{sections-HCoksWSk.js → sections-B1sv3rvB.js} +1 -1
- package/dist/client/assets/sections-editor-sTEVWcAy.js +1 -0
- package/dist/client/assets/{select-CCUqWhU2.js → select-BNoZ1cwH.js} +1 -1
- package/dist/client/assets/{select-model-fLHQEf93.js → select-model-BqTl5eD-.js} +1 -1
- package/dist/client/assets/{seo-editor-BSBriMlp.js → seo-editor-iaqzR9NS.js} +1 -1
- package/dist/client/assets/{separator-W-jiHDRf.js → separator-CwN-gidC.js} +1 -1
- package/dist/client/assets/settings-tab-H1Nf96Yz.js +1 -0
- package/dist/client/assets/{sheet-CJ8R5cz8.js → sheet-1BLiVjE3.js} +1 -1
- package/dist/client/assets/{shell-layout-DHcyl3tS.js → shell-layout-BHtZVBED.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DvTjz5UN.js → site-draft-actions-GLib44bU.js} +5 -5
- package/dist/client/assets/{site-draft-view-DKi9gDFG.js → site-draft-view-CKK7PKoH.js} +1 -1
- package/dist/client/assets/site-editor-Bl3uFRW-.js +1 -0
- package/dist/client/assets/{site-editor-toast-DCLSfuYN.js → site-editor-toast-BXRGIPuY.js} +1 -1
- package/dist/client/assets/{skills-61y8fOuN.js → skills-Q6l6j9x7.js} +1 -1
- package/dist/client/assets/{slider-DGrjjZbc.js → slider-BKrw7nqs.js} +1 -1
- package/dist/client/assets/{sortable.esm-CFU3AjR2.js → sortable.esm-CA_k0RaZ.js} +1 -1
- package/dist/client/assets/{sso-Bc4JROTr.js → sso-C4bCFgaT.js} +1 -1
- package/dist/client/assets/{suggestion-C25G9PiT.js → suggestion-BdOz28RC.js} +1 -1
- package/dist/client/assets/{super-agent-icon-BOjAbgwW.js → super-agent-icon-DExAOD4i.js} +1 -1
- package/dist/client/assets/{switch-C6GSkMRa.js → switch-B60LgmjA.js} +1 -1
- package/dist/client/assets/{synced-repos-MVTThVIT.js → synced-repos-DfFbkdSN.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-X8r_SUyr.js → tab-icon-glyph-MzzsG5oc.js} +1 -1
- package/dist/client/assets/{table-CGK_amHI.js → table-KEskYvtS.js} +1 -1
- package/dist/client/assets/{tabs-DSwAq5ok.js → tabs-DXm_rA9S.js} +1 -1
- package/dist/client/assets/{task-board-DGEnY-WP.js → task-board-CdhOR9bl.js} +1 -1
- package/dist/client/assets/{task-route-kuDxMB7g.js → task-route-DeSbQRkP.js} +1 -1
- package/dist/client/assets/{task-status-DwyseT36.js → task-status-Bn4DeOrT.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-Bc5gvPec.js → taskboard-analytics-CRI_d1NW.js} +1 -1
- package/dist/client/assets/tasks-DGRURa32.js +1 -0
- package/dist/client/assets/{tasks-CwTnwmgS.js → tasks-fWq-fqoJ.js} +3 -3
- package/dist/client/assets/{textarea-bQEpPrrj.js → textarea-CRgCAK3p.js} +1 -1
- package/dist/client/assets/{thread-analytics-DrA1-9Im.js → thread-analytics-aoAc3KR6.js} +1 -1
- package/dist/client/assets/{thread-intent-SBN04Rtw.js → thread-intent-DrRX6nG0.js} +1 -1
- package/dist/client/assets/{thread-route-D0a5VvFp.js → thread-route-D404Xl1w.js} +1 -1
- package/dist/client/assets/{thread-route-hd8uqVKt.js → thread-route-L_F2dRjs.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DldXKcG5.js → thread-sheet-body-D3DOFB6A.js} +1 -1
- package/dist/client/assets/{time-range-picker-DkQtJ9_-.js → time-range-picker-DouTd8PJ.js} +1 -1
- package/dist/client/assets/{toggle-group-D7egmHqH.js → toggle-group-JYZ1PCaE.js} +1 -1
- package/dist/client/assets/{tool-namespace-DqMAELKh.js → tool-namespace-BBpCD9sF.js} +1 -1
- package/dist/client/assets/{tool-set-selector-CRdnTdII.js → tool-set-selector-DTAr1xzz.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Cf4mp3st.js → toolbar-icon-button-B0M5XFng.js} +1 -1
- package/dist/client/assets/{tooltip-7WjUlVHN.js → tooltip-D9qNlq6S.js} +1 -1
- package/dist/client/assets/{tooltipContext-BM-E9VBq.js → tooltipContext-B94TDN-Q.js} +1 -1
- package/dist/client/assets/{track-Dc3qAx4h.js → track-DJVHN5Lv.js} +1 -1
- package/dist/client/assets/{types-DcXrDLzi.js → types-BfPC7vnd.js} +5 -5
- package/dist/client/assets/{url-slug-DGizFeaX.js → url-slug-Bts08KOo.js} +1 -1
- package/dist/client/assets/{usage-stats-DyA2nNO3.js → usage-stats-CK4hgSt6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C9vcyTaN.js → use-ai-providers-CxZCPqVC.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-2JoZ8nxT.js → use-apply-named-rule-h1W6SPpC.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-D4gRql_N.js +1 -0
- package/dist/client/assets/{use-automations-BHeTrxpI.js → use-automations-B7d02VWl.js} +1 -1
- package/dist/client/assets/{use-autosave-BZAqhdxE.js → use-autosave-DOc72aWE.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BLLvbZl2.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-mgFqTgen.js → use-chat-layout-state-DQhX2zdi.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-JTIsBKu7.js → use-cms-publish-actions-DimSJzWP.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DOyeAK5f.js → use-connect-companion-CqTyzSlz.js} +1 -1
- package/dist/client/assets/{use-connection-C4wZIedX.js → use-connection-CFmR-X06.js} +1 -1
- package/dist/client/assets/{use-content-sync-DX9AICcw.js → use-content-sync-BEqIA-0g.js} +1 -1
- package/dist/client/assets/{use-copy-C87hppcx.js → use-copy-PziytufC.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-CdwoumPu.js → use-date-fns-locale-BVsHKqDt.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BGT68o5u.js → use-debounced-autosave-CU3dUlJX.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CPkVN80B.js → use-debounced-value-DJ5YZsat.js} +1 -1
- package/dist/client/assets/{use-deco-credits-B_yRwpIs.js → use-deco-credits-_9aC49vI.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DYaMckqi.js → use-decopilot-events-B84nN_Z6.js} +1 -1
- package/dist/client/assets/{use-delete-block-Bl87-vdk.js → use-delete-block-BbJuByhU.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DfHAqmGL.js → use-delete-connection-Bp9D22pQ.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C8Pxnc-A.js → use-deployment-admin-D8TSoW7b.js} +1 -1
- package/dist/client/assets/{use-entitlements-B129mOCR.js → use-entitlements-Chh3D10H.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-C1985-Ir.js → use-fast-preview-draft-url-DRtzWCS3.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dee9WDV4.js → use-file-configs-8VTVKs7P.js} +1 -1
- package/dist/client/assets/{use-id-selection-HxPtQK4g.js → use-id-selection-LGL3_97F.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CE46iYvK.js → use-inbox-feed-DjVLN02v.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CRqa_9m8.js → use-infinite-scroll-BBVWbqWO.js} +1 -1
- package/dist/client/assets/{use-join-requests-CIJW_zlt.js → use-join-requests-4dddz-2V.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-qfCNgDSO.js → use-main-panel-tabs-Bq834oWY.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CoQg2kYd.js → use-mcp-auth-status-ewp8JzH8.js} +1 -1
- package/dist/client/assets/{use-mcp-client-b044lJnb.js → use-mcp-client-CaYmuD4l.js} +2 -2
- package/dist/client/assets/{use-mcp-prompts-Dlq8VH38.js → use-mcp-prompts-lHtFGIni.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DS8wEzPs.js → use-mcp-tools-COoBOTb8.js} +1 -1
- package/dist/client/assets/{use-mobile-CEHdcOx8.js → use-mobile-B0YlxBUo.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BroyCilU.js → use-move-blocks-CRsMTnFT.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Kz2oOKmA.js → use-navigate-to-agent-D9u86crS.js} +1 -1
- package/dist/client/assets/use-never-published-BRSQAhRd.js +1 -0
- package/dist/client/assets/{use-org-fs-CLPhRw3y.js → use-org-fs-Cv09aZqm.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BoVbI9tW.js → use-org-repo-syncs-CKUvsIrW.js} +1 -1
- package/dist/client/assets/{use-org-sso-DRrVlfwY.js → use-org-sso-CBrdU305.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CdJMCbcP.js → use-organization-settings-BWLJTTpw.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-D5R7YysD.js +1 -0
- package/dist/client/assets/{use-project-scope-dsKJBAry.js → use-project-scope-Dzg0nsjs.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CmtYzKJF.js → use-recent-apps-BKAftwoT.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DFRAKqsS.js → use-reports-diagnostic-CgjecoRR.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-9oqLSRsO.js → use-sandbox-events-BtXLDGZr.js} +2 -2
- package/dist/client/assets/{use-secrets-NEOz5brl.js → use-secrets-D46GKExN.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-dFGv18ks.js → use-section-preview-base-BO578O9L.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-BpkHLNx1.js → use-sidebar-collapsed-x7SsKYNl.js} +1 -1
- package/dist/client/assets/{use-tags-CWDFKR0B.js → use-tags-LwHF4ikl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-YY743rvT.js → use-task-board-analytics-TZTLLgky.js} +1 -1
- package/dist/client/assets/{use-task-board-events-De0Ql0Pn.js → use-task-board-events-U_kvLTo1.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CjIgw8Jt.js → use-task-board-item-prs-BW_n16vt.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DNUZNAh_.js → use-task-board-items-B66t-aAy.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-B1rpgS5r.js → use-task-board-prompts-CHIblyN4.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BOYPl3PT.js → use-task-metadata-DdKhuIQ3.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-WMuzypnI.js → use-thread-outputs-DsjZa1n5.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BG2f-NWf.js → use-view-draft-kind-BtHf66Jj.js} +1 -1
- package/dist/client/assets/{use-voice-input-Br5vij9C.js → use-voice-input-Li611DFd.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CN2uIy97.js +1 -0
- package/dist/client/assets/{useQueries-BN4ZsbwM.js → useQueries-B8jtB-RW.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-ECHIzp7d.js +1 -0
- package/dist/client/assets/{users-BGI0PgLT.js → users-zlgoDQuW.js} +1 -1
- package/dist/client/assets/{utils-B_l1jy6k.js → utils-DONok1LX.js} +1 -1
- package/dist/client/assets/{variant-calendar-bWZKkiCF.js → variant-calendar-CjAgTw5u.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CEpfOStd.js → variant-matcher-override-BKIrGg8S.js} +1 -1
- package/dist/client/assets/{view-header-CX8g-yAR.js → view-header-OfKMmhb0.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BFUo5OwK.js → virtual-mcp-BKUZFB3-.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CkVyQC5r.js → watch-sse-pool-B39Ow5tK.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +3 -3
- package/package.json +1 -1
- package/dist/client/assets/ReferenceLine-DAphe5so.js +0 -1
- package/dist/client/assets/agent-app-CTOrbTVN.js +0 -1
- package/dist/client/assets/agent-assets-BnRemq1c.js +0 -1
- package/dist/client/assets/agent-blog-qw7eDyTJ.js +0 -2
- package/dist/client/assets/agent-deck-DAVpyFYS.js +0 -1
- package/dist/client/assets/agent-experiments-BbI7pAh_.js +0 -1
- package/dist/client/assets/agent-library-CF4cgtSY.js +0 -1
- package/dist/client/assets/agent-library-file-D0_5aahe.js +0 -1
- package/dist/client/assets/agent-overview-DGOr-pbZ.js +0 -1
- package/dist/client/assets/agent-settings-Dm19cEBP.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Cdro8saM.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BkBXLnyf.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-OMqwm4vD.js +0 -1
- package/dist/client/assets/agent-view-D6Nsllob.js +0 -1
- package/dist/client/assets/api-keys-s9GXv_s3.js +0 -1
- package/dist/client/assets/collection-detail-D7GPiaeW.js +0 -1
- package/dist/client/assets/discover-CI_r8-3h.js +0 -1
- package/dist/client/assets/held-block-view-Clis5U4a.js +0 -3
- package/dist/client/assets/index-CxjuNZbg.js +0 -4
- package/dist/client/assets/index-DYPWHH-M.css +0 -1
- package/dist/client/assets/item-actions-DjxeOUUN.js +0 -1
- package/dist/client/assets/library-DuCkVtdF.js +0 -1
- package/dist/client/assets/match-site-slug-config-D3fUJ6vX.js +0 -1
- package/dist/client/assets/post-calendar-JMOv3xNE.js +0 -1
- package/dist/client/assets/post-editor-DQrYTE_3.js +0 -2
- package/dist/client/assets/preview-tab-Cm6SZitV.js +0 -557
- package/dist/client/assets/project-app-view-C1zig9vg.js +0 -1
- package/dist/client/assets/project-reports-DTqtwUEL.js +0 -1
- package/dist/client/assets/project-tasks-C14eJRtf.js +0 -1
- package/dist/client/assets/reports-Dqx3LdYF.js +0 -1
- package/dist/client/assets/repositories-CDGzat4Q.js +0 -1
- package/dist/client/assets/route-CDNrV6ea.js +0 -1
- package/dist/client/assets/save-status-BvsiA7U3.js +0 -1
- package/dist/client/assets/sections-editor-3egytFfS.js +0 -1
- package/dist/client/assets/settings-tab-DtZ2USkZ.js +0 -1
- package/dist/client/assets/site-editor-C1i1Yk8D.js +0 -1
- package/dist/client/assets/tasks-DmaKkQjL.js +0 -1
- package/dist/client/assets/use-ask-in-chat-BtGzAvHO.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-Byep-1Pa.js +0 -1
- package/dist/client/assets/use-never-published-CT51G1NV.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-CL3n89is.js +0 -1
- package/dist/client/assets/useInfiniteQuery-o37Jr6S0.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BhOGXRBX.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{dA as Z,dy as tt,aG as et,hI as ot,c as J,a4 as rt,j as I,d as it,r as W}from"./index-DDDWDv4s.js";import{a as st,g as K,s as B}from"./tool-namespace-DqMAELKh.js";import{u as nt}from"./use-mcp-client-b044lJnb.js";import{a as at,b as lt}from"./use-mcp-tools-DS8wEzPs.js";import{c as mt}from"./content-blocks-o63cs2vh.js";import{M as pt}from"./mcp-app-renderer-BgUWGow9.js";import{g as ct,M as Y}from"./types-DcXrDLzi.js";import{b as ut,d as dt}from"./chat-context-BVOzxL7y.js";import{g as ft}from"./shell-layout-DHcyl3tS.js";import{p as gt}from"./task-route-kuDxMB7g.js";import{C as ht}from"./connect-source-dialog-OGa93hL5.js";import"./auth-DiKlrdGP.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./thread-route-D0a5VvFp.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./use-entitlements-B129mOCR.js";import"./use-ai-providers-C9vcyTaN.js";import"./use-decopilot-events-DYaMckqi.js";import"./Globe04-BIxVPRI2.js";import"./UserSquare-DUXP0rwX.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./use-mobile-CEHdcOx8.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./task-key-BCHdFiOO.js";import"./project-index--AWJOyZB.js";import"./core.esm-DUcC46mO.js";import"./site-url-en5df9c-.js";import"./use-connect-companion-DOyeAK5f.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./form-CuAETLLt.js";import"./icon-button-D8OdW1Ng.js";import"./useQueries-BN4ZsbwM.js";import"./authenticate-and-persist-oauth-osQ4PKuX.js";import"./mcp-oauth-COyT3l0E.js";import"./mcp-oauth-CU691SiC.js";import"./track-Dc3qAx4h.js";import"./extract-connection-data-DwWq6VY0.js";import"./connection-CLrwGffq.js";import"./url-slug-DGizFeaX.js";const X="studio://navigate",At=new Set(["vtex","ga4","gsc","github"]);function St(n){const[t]=n;if(n.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null,l=null,e=null;try{const r=new URL(t.uri).searchParams;o=r.get("main"),l=r.get("field"),e=r.get("task")}catch{}const m=o&&ot.has(o)?o:null;return{isNavigate:!0,tab:m,field:m==="connect-sources"&&l&&At.has(l)?l:null,task:m==="board"&&e?gt(e):null}}const Ct=2e3,xt=Z(et(),tt());function It(n){const[t]=n;if(n.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return null;let o=null;try{o=new URL(t.uri).searchParams.get("args")}catch{return null}return o&&z(o)?o:null}function z(n){if(!(!n||n.length>Ct))try{const t=xt.safeParse(JSON.parse(n));return t.success?t.data:void 0}catch{return}}function Nt(n){const t=J.c(50),{client:o,resourceURI:l,tool:e,connectionId:m,orgId:r,args:c,searchArgs:u}=n,d=it(),{sendMessage:f}=ut(),{setAppContext:s,clearAppContext:g}=dt(),{openSidePanel:a,openTab:h,closeTab:A}=ft(),i=`${m}:${e.name}`,[S,D]=W.useState(null);let x;t[0]!==A?(x=p=>p==="inline"?(A(),"inline"):"fullscreen",t[0]=A,t[1]=x):x=t[1];const O=x,[L]=W.useState(u);let N;t[2]!==L||t[3]!==e.annotations?.readOnlyHint?(N=e.annotations?.readOnlyHint&&z(L),t[2]=L,t[3]=e.annotations?.readOnlyHint,t[4]=N):N=t[4];let b;t[5]!==c||t[6]!==N?(b={...c,...N},t[5]=c,t[6]=N,t[7]=b):b=t[7];const R=b;let k;t[8]!==o||t[9]!==e.name||t[10]!==R?(k={client:o,toolName:e.name,toolArguments:R},t[8]=o,t[9]=e.name,t[10]=R,t[11]=k):k=t[11];const{data:w}=lt(k);let E;if(t[12]!==e._meta||t[13]!==e.name){const p=K(e._meta);E=B(e.name,p),t[12]=e._meta,t[13]=e.name,t[14]=E}else E=t[14];const G=E;let v;t[15]!==e.inputSchema?(v=e.inputSchema??{type:"object"},t[15]=e.inputSchema,t[16]=v):v=t[16];let j;t[17]!==G||t[18]!==v||t[19]!==e?(j={...e,name:G,inputSchema:v},t[17]=G,t[18]=v,t[19]=e,t[20]=j):j=t[20];const F=j;let U;t[21]!==d||t[22]!==a||t[23]!==h||t[24]!==f?(U=p=>{const V=It(p.content);if(V){d({to:".",search:Q=>({...Q,args:V}),replace:!0});return}const C=St(p.content);if(C.isNavigate){C.tab==="connect-sources"&&C.field?D(C.field):C.tab&&h(C.tab,C.task?{taskKey:C.task,replace:!1}:void 0);return}const q=mt(p.content);q.content.length>0&&(a(),f({tiptapDoc:q}))},t[21]=d,t[22]=a,t[23]=h,t[24]=f,t[25]=U):U=t[25];const $=U;let M;t[26]!==F?(M={tool:F},t[26]=F,t[27]=M):M=t[27];let P;t[28]!==s||t[29]!==i?(P=p=>s(i,p),t[28]=s,t[29]=i,t[30]=P):P=t[30];let _;t[31]!==g||t[32]!==i?(_=()=>g(i),t[31]=g,t[32]=i,t[33]=_):_=t[33];let T;t[34]!==o||t[35]!==$||t[36]!==O||t[37]!==r||t[38]!==l||t[39]!==P||t[40]!==_||t[41]!==M||t[42]!==R||t[43]!==w?(T=I.jsx(pt,{resourceURI:l,orgId:r,toolInfo:M,toolInput:R,toolResult:w,displayMode:"fullscreen",minHeight:Y.fullscreen.minHeight,maxHeight:Y.fullscreen.maxHeight,client:o,onMessage:$,onUpdateModelContext:P,onTeardown:_,onRequestDisplayMode:O,className:"h-full"}),t[34]=o,t[35]=$,t[36]=O,t[37]=r,t[38]=l,t[39]=P,t[40]=_,t[41]=M,t[42]=R,t[43]=w,t[44]=T):T=t[44];let y;t[45]!==S?(y=S&&I.jsx(ht,{field:S,onClose:()=>D(null)}),t[45]=S,t[46]=y):y=t[46];let H;return t[47]!==T||t[48]!==y?(H=I.jsxs(I.Fragment,{children:[T,y]}),t[47]=T,t[48]=y,t[49]=H):H=t[49],H}function lo(n){const t=J.c(21),{connectionId:o,toolName:l,args:e,searchArgs:m}=n,{org:r}=rt();let c;t[0]!==o||t[1]!==r.id||t[2]!==r.slug?(c={connectionId:o,orgId:r.id,orgSlug:r.slug},t[0]=o,t[1]=r.id,t[2]=r.slug,t[3]=c):c=t[3];const u=nt(c);let d;t[4]!==u?(d={client:u},t[4]=u,t[5]=d):d=t[5];const{data:f}=at(d);let s,g,a;t[6]!==l||t[7]!==f.tools?(s=st(decodeURIComponent(l)),a=f.tools.find(i=>i.name===s)??f.tools.find(i=>{const S=K(i._meta);if(!S)return!1;if(B(i.name,S)===s)return!0;const x=B(s,S);return x!==s&&i.name===x}),g=a?._meta?ct(a._meta):void 0,t[6]=l,t[7]=f.tools,t[8]=s,t[9]=g,t[10]=a):(s=t[8],g=t[9],a=t[10]);const h=g;if(!a||!h){let i;return t[11]!==s?(i=I.jsx("div",{className:"flex items-center justify-center h-full w-full",children:I.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',s,'" not found or has no UI']})}),t[11]=s,t[12]=i):i=t[12],i}let A;return t[13]!==e||t[14]!==u||t[15]!==o||t[16]!==r.id||t[17]!==h||t[18]!==m||t[19]!==a?(A=I.jsx(Nt,{client:u,resourceURI:h,tool:a,connectionId:o,orgId:r.id,args:e,searchArgs:m}),t[13]=e,t[14]=u,t[15]=o,t[16]=r.id,t[17]=h,t[18]=m,t[19]=a,t[20]=A):A=t[20],A}export{lo as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,j as r}from"./index-DDDWDv4s.js";import{C as i}from"./index-CY0csw6V.js";import{R as p}from"./reports-tab-CtVgyXhu.js";import"./use-mobile-CEHdcOx8.js";import"./use-sidebar-collapsed-BpkHLNx1.js";import"./use-chat-layout-state-mgFqTgen.js";import"./thread-route-D0a5VvFp.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./UserSquare-DUXP0rwX.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./toolbar-icon-button-Cf4mp3st.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./sheet-CJ8R5cz8.js";import"./resizable-CaTV7JDr.js";import"./site-url-en5df9c-.js";import"./use-reports-diagnostic-DFRAKqsS.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./self-tool-result-8OxPN9Nm.js";import"./site-error-Da6iapvu.js";import"./projects-empty-state-CbOIGuob.js";import"./project-profile-dMAv1_XF.js";function vt(){const o=m.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(i.Content,{children:r.jsx(p,{})}),o[0]=t):t=o[0],t}export{vt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,a4 as n,j as r,K as f}from"./index-DDDWDv4s.js";import{C as d}from"./index-CY0csw6V.js";import{m as u,P as x,T as h}from"./mock-board-CSrbkqG4.js";import{F as j}from"./feature-gate-qgzTBO3A.js";import"./use-mobile-CEHdcOx8.js";import"./use-sidebar-collapsed-BpkHLNx1.js";import"./use-chat-layout-state-mgFqTgen.js";import"./thread-route-D0a5VvFp.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./UserSquare-DUXP0rwX.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./toolbar-icon-button-Cf4mp3st.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./sheet-CJ8R5cz8.js";import"./resizable-CaTV7JDr.js";import"./core.esm-DUcC46mO.js";import"./sortable.esm-CFU3AjR2.js";import"./use-task-board-analytics-YY743rvT.js";import"./combobox-B7xBLEqp.js";import"./popover-B_j0y2h7.js";import"./use-task-board-prompts-B1rpgS5r.js";import"./badge-BpUJoM3p.js";import"./icon-button-D8OdW1Ng.js";import"./use-org-fs-CLPhRw3y.js";import"./use-automations-BHeTrxpI.js";import"./search-toggle--RSSxY_n.js";import"./context-menu-dgkpoBmD.js";import"./super-agent-icon-BOjAbgwW.js";import"./use-task-board-items-DNUZNAh_.js";import"./config-1WcD3pf5.js";import"./use-task-board-events-De0Ql0Pn.js";import"./use-decopilot-events-DYaMckqi.js";import"./sprints-C1z9xhcL.js";import"./select-CCUqWhU2.js";import"./index-BdQq_4o_.js";import"./task-route-kuDxMB7g.js";import"./task-key-BCHdFiOO.js";import"./project-index--AWJOyZB.js";import"./use-tags-CWDFKR0B.js";import"./feedback-BqoIMOg7.js";import"./calendar-RX4MUBCU.js";import"./alert-BA8nDu40.js";import"./collapsible-CmQt_iZ0.js";import"./use-copy-C87hppcx.js";import"./markdown-D5a0osui.js";import"./chat-context-BVOzxL7y.js";import"./use-entitlements-B129mOCR.js";import"./use-ai-providers-C9vcyTaN.js";import"./index-BTxnnO3z.js";import"./usage-stats-DyA2nNO3.js";import"./tool-namespace-DqMAELKh.js";import"./form-CuAETLLt.js";import"./utils-CVEq3hMx.js";import"./editor-classes-De5o_8lB.js";import"./suggestion-C25G9PiT.js";import"./index-DAjFmo5j.js";import"./index-CldZuS5S.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CjIgw8Jt.js";import"./use-connection-C4wZIedX.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-DldXKcG5.js";import"./useSuspenseInfiniteQuery-BhOGXRBX.js";import"./pair-Fhnk8ar3.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BgUWGow9.js";import"./types-DcXrDLzi.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-Dlq8VH38.js";import"./use-thread-outputs-WMuzypnI.js";import"./file-type-icon-Dnh_2HcY.js";import"./use-infinite-scroll-CRqa_9m8.js";import"./task-status-DwyseT36.js";import"./separator-W-jiHDRf.js";import"./chat-draft-DCJJT_1i.js";import"./feature-paywall-ljVyCUfx.js";import"./plan-ladder-CM-HcM-s.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function Ho(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{Ho as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as m,j as r}from"./index-DDDWDv4s.js";import{C as i}from"./index-CY0csw6V.js";import{R as p}from"./reports-tab-CtVgyXhu.js";import"./use-mobile-CEHdcOx8.js";import"./use-sidebar-collapsed-BpkHLNx1.js";import"./use-chat-layout-state-mgFqTgen.js";import"./thread-route-D0a5VvFp.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./UserSquare-DUXP0rwX.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./toolbar-icon-button-Cf4mp3st.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./sheet-CJ8R5cz8.js";import"./resizable-CaTV7JDr.js";import"./site-url-en5df9c-.js";import"./use-reports-diagnostic-DFRAKqsS.js";import"./companions-core-DhUD88pR.js";import"./metadata-D72DunRR.js";import"./github-repo-scope-C58hYmYC.js";import"./self-tool-result-8OxPN9Nm.js";import"./site-error-Da6iapvu.js";import"./projects-empty-state-CbOIGuob.js";import"./project-profile-dMAv1_XF.js";function wt(){const o=m.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(i.Content,{children:r.jsx(p,{})}),o[0]=t):t=o[0],t}export{wt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r,j as t}from"./index-DDDWDv4s.js";import{OrgRepositoriesPage as m}from"./repositories-CJnEkuZk.js";import{R as p}from"./require-capability-DQWSlcjo.js";import"./repository-picker-BO6sLOq7.js";import"./ArrowLeft-B_zuPCk3.js";import"./Plus-BNdH4tYy.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./label-EESrxoYH.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./SearchMd-DWnwnZQO.js";import"./BookOpen01-DU_gf3Q9.js";import"./ShoppingBag01-BrAbYbaG.js";import"./use-debounced-value-CPkVN80B.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./LinkBroken01-ChDYryt0.js";import"./checkbox-x2IxTucq.js";import"./Minus-eMZySqLh.js";import"./Users01-BnTqMUrr.js";import"./empty-state-BcZKaOw-.js";import"./badge-BpUJoM3p.js";import"./alert-BA8nDu40.js";import"./icon-button-D8OdW1Ng.js";import"./collapsible-CmQt_iZ0.js";import"./select-CCUqWhU2.js";import"./index-BdQq_4o_.js";import"./ChevronUp-fKdis79A.js";import"./textarea-bQEpPrrj.js";import"./Trash01-Chu35sQ_.js";import"./secret-picker-B1Qdwzz-.js";import"./use-secrets-NEOz5brl.js";import"./access-gate-DDMODilC.js";import"./capability-load-error-Dco-wYs-.js";function M(){const o=r.c(1);let i;return o[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(p,{capability:"file-configs:manage",area:"files",children:t.jsx(m,{})}),o[0]=i):i=o[0],i}export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x,l as h,m as j,j as i,P as u,aR as g,O as R,n as P}from"./index-DDDWDv4s.js";import{u as b}from"./use-mobile-CEHdcOx8.js";import{R as v}from"./index-CY0csw6V.js";import{A as _}from"./plan-usage-card-CMfNWBwg.js";import"./use-sidebar-collapsed-BpkHLNx1.js";import"./use-chat-layout-state-mgFqTgen.js";import"./thread-route-D0a5VvFp.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./UserSquare-DUXP0rwX.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./toolbar-icon-button-Cf4mp3st.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./sheet-CJ8R5cz8.js";import"./resizable-CaTV7JDr.js";import"./badge-BpUJoM3p.js";import"./popover-B_j0y2h7.js";import"./toggle-group-D7egmHqH.js";import"./active-indicator-CCMhAsc_.js";import"./use-ai-providers-C9vcyTaN.js";import"./use-entitlements-B129mOCR.js";import"./plan-ladder-CM-HcM-s.js";function Tt(){const t=x.c(16),d=b();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={select:B},t[0]=s):s=t[0];const l=h(s),c=!d&&"p-1.5";let o;t[1]!==c?(o=j("flex-1 min-h-0",c),t[1]=c,t[2]=o):o=t[2];const f=d?"plain":"card";let r;t[3]!==l?(r=l?i.jsx(_,{}):void 0,t[3]=l,t[4]=r):r=t[4];let m;t[5]!==r?(m=i.jsx(v,{actions:r}),t[5]=r,t[6]=m):m=t[6];let n;t[7]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(u.Content,{children:i.jsx(g,{children:i.jsx(R,{})})}),t[7]=n):n=t[7];let p;t[8]!==m?(p=i.jsxs(P.Breadcrumbs.Provider,{children:[m,n]}),t[8]=m,t[9]=p):p=t[9];let e;t[10]!==f||t[11]!==p?(e=i.jsx(u,{"data-testid":"settings-panel",variant:f,children:p}),t[10]=f,t[11]=p,t[12]=e):e=t[12];let a;return t[13]!==o||t[14]!==e?(a=i.jsx("div",{className:o,children:e}),t[13]=o,t[14]=e,t[15]=a):a=t[15],a}function B(t){return t.location.pathname.endsWith("/settings/ai-providers")}export{Tt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as T,r as E,a4 as Ae,eH as Te,b as Z,m as $,j as r,a5 as Be,es as Ve,B as we,t as te,I as Qe,h as Ge,bu as We}from"./index-DDDWDv4s.js";import{b as _e}from"./Tool01-AMJ0J7Ld.js";import{s as Ye}from"./Trash01-Chu35sQ_.js";import{i as Pe}from"./Upload01-CGdoFUP8.js";import{r as He,L as Ke,s as Je,F as Xe,i as Ue}from"./use-never-published-CT51G1NV.js";import{L as Ne}from"./label-EESrxoYH.js";import{T as ke,a as Ee,c as Se}from"./tooltip-7WjUlVHN.js";import{u as Ze}from"./repository-binding-DAYbvLYj.js";import{u as et}from"./chat-context-BVOzxL7y.js";import{u as Ce,a8 as tt,h as st,b as it,a9 as rt}from"./site-editor-toast-DCLSfuYN.js";import{c as nt}from"./use-organization-settings-CdJMCbcP.js";import{a as ot}from"./SwitchHorizontal01-D7pFOqnZ.js";import{a as at,b as lt,P as ct}from"./popover-B_j0y2h7.js";import{S as dt}from"./switch-C6GSkMRa.js";import{a as ft,T as ut}from"./toggle-group-D7egmHqH.js";import{m as mt}from"./match-site-slug-config-D3fUJ6vX.js";import{u as pt}from"./use-file-configs-Dee9WDV4.js";import{u as gt}from"./asset-utils-BSepCiAa.js";import{i as xt}from"./AlertCircle-D1QqLKFH.js";const $e=E.createContext(null);function ls(t){const e=T.c(3),{children:s}=t,n=et(),l=Ce(n?.virtualMcpId,n?.currentBranch);let o;return e[0]!==l.kind||e[1]!==s?(o=E.createElement($e.Provider,{value:l.kind},s),e[0]=l.kind,e[1]=s,e[2]=o):o=e[2],o}function ht(){const t=T.c(4),e=E.useContext($e),{org:s}=Ae(),n=nt("new_blocks_editor"),l=!!s.id;let o;return t[0]!==e||t[1]!==n||t[2]!==l?(o=tt({backend:e,hasOrg:l,orgFlag:n}),t[0]=e,t[1]=n,t[2]=l,t[3]=o):o=t[3],o}function bt(){return ht()??!1}function yt(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";const e=t;if(Array.isArray(e.variants)){const s=e.variants,n=s.find(i=>i.rule?.__resolveType?.includes("always")),l=Te(n);if(typeof l=="string")return l;const o=s.map(i=>Te(i)).find(i=>typeof i=="string");if(typeof o=="string")return o}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function vt(t){const e=T.c(29),{className:s}=t,n=Z();if(bt()){let d;e[0]!==n?(d=n("sectionsEditor.field.missingRequired"),e[0]=n,e[1]=d):d=e[1];let p;e[2]!==s?(p=$("shrink-0 cursor-help text-destructive",s),e[2]=s,e[3]=p):p=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(Be,{className:"size-3.5"}),e[4]=x):x=e[4];let m;e[5]!==d||e[6]!==p?(m=r.jsx(ke,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":d,className:p,children:x})}),e[5]=d,e[6]=p,e[7]=m):m=e[7];let g;e[8]!==n?(g=n("sectionsEditor.field.missingRequiredTooltip"),e[8]=n,e[9]=g):g=e[9];let h;e[10]!==g?(h=r.jsx(Ee,{className:"max-w-56",children:g}),e[10]=g,e[11]=h):h=e[11];let w;return e[12]!==m||e[13]!==h?(w=r.jsxs(Se,{children:[m,h]}),e[12]=m,e[13]=h,e[14]=w):w=e[14],w}let o;e[15]!==n?(o=n("sectionsEditor.field.missingRequired"),e[15]=n,e[16]=o):o=e[16];let i;e[17]!==s?(i=$("size-2 shrink-0 cursor-help rounded-full bg-destructive",s),e[17]=s,e[18]=i):i=e[18];let f;e[19]!==o||e[20]!==i?(f=r.jsx(ke,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":o,className:i})}),e[19]=o,e[20]=i,e[21]=f):f=e[21];let c;e[22]!==n?(c=n("sectionsEditor.field.missingRequiredTooltip"),e[22]=n,e[23]=c):c=e[23];let a;e[24]!==c?(a=r.jsx(Ee,{className:"max-w-56",children:c}),e[24]=c,e[25]=a):a=e[25];let u;return e[26]!==f||e[27]!==a?(u=r.jsxs(Se,{children:[f,a]}),e[26]=f,e[27]=a,e[28]=u):u=e[28],u}const Re=E.createContext({required:!1,invalid:!1});function jt(){return E.useContext(Re)}function cs(t){const e=T.c(6),{required:s,invalid:n,children:l}=t;let o;e[0]!==n||e[1]!==s?(o={required:s,invalid:n},e[0]=n,e[1]=s,e[2]=o):o=e[2];let i;return e[3]!==l||e[4]!==o?(i=r.jsx(Re.Provider,{value:o,children:l}),e[3]=l,e[4]=o,e[5]=i):i=e[5],i}function ds(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const wt="cursor-help underline decoration-dotted decoration-muted-foreground/50 underline-offset-4";function Oe(t){return Ze(t)?.metadata?.fieldDescriptionTooltips??!1}function Nt(t){const e=T.c(9),{description:s,virtualMcpId:n,children:l}=t,o=Oe(n);if(!s||!o)return l;let i;e[0]!==l?(i=E.cloneElement(l,{className:$(l.props.className,wt)}),e[0]=l,e[1]=i):i=e[1];let f;e[2]!==i?(f=r.jsx(ke,{asChild:!0,children:i}),e[2]=i,e[3]=f):f=e[3];let c;e[4]!==s?(c=r.jsx(Ee,{className:"max-w-64",children:s}),e[4]=s,e[5]=c):c=e[5];let a;return e[6]!==f||e[7]!==c?(a=r.jsxs(Se,{delayDuration:300,children:[f,c]}),e[6]=f,e[7]=c,e[8]=a):a=e[8],a}function kt(t){const e=T.c(17),{htmlFor:s,label:n,description:l,labelClassName:o,virtualMcpId:i}=t,f=Oe(i),{required:c,invalid:a}=jt();let u;e[0]!==a||e[1]!==c?(u=c&&a&&r.jsx(vt,{className:"mt-0.5 self-start"}),e[0]=a,e[1]=c,e[2]=u):u=e[2];let d;e[3]!==s||e[4]!==n||e[5]!==o||e[6]!==u?(d=r.jsxs(Ne,{htmlFor:s,className:o,children:[n,u]}),e[3]=s,e[4]=n,e[5]=o,e[6]=u,e[7]=d):d=e[7];const p=d;if(!f){let m;e[8]!==l?(m=l&&r.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:l}),e[8]=l,e[9]=m):m=e[9];let g;return e[10]!==p||e[11]!==m?(g=r.jsxs("div",{className:"space-y-0.5",children:[p,m]}),e[10]=p,e[11]=m,e[12]=g):g=e[12],g}let x;return e[13]!==l||e[14]!==p||e[15]!==i?(x=r.jsx(Nt,{description:l,virtualMcpId:i,children:p}),e[13]=l,e[14]=p,e[15]=i,e[16]=x):x=e[16],x}function Et(t){const e=Z(),s=Ce(t?.virtualMcpId,t?.branch),{connection:n}=it(t?.virtualMcpId),l=rt(s,n);if(!l||!t||s.kind!=="protocol"||!s.describe.assets)return null;const{maxBytes:o}=s.describe.assets,i=f=>`${l}/assets/${encodeURIComponent(f)}`;return async f=>{if(f.size>o)throw new Error(e("sectionsEditor.fileField.tooLarge",{max:`${Math.floor(o/(1024*1024))} MB`}));if(s.describe.readOnly)throw new Error(e("decoServe.upload.readOnly",{name:f.name}));let c;try{c=await fetch(i(f.name),{method:"PUT",signal:Ve(),headers:{"content-type":f.type||"application/octet-stream"},body:f})}catch{throw new Error(e("decoServe.upload.serverGone",{name:f.name}))}const a=await c.json().catch(()=>null);if(!c.ok||typeof a?.path!="string"){const u=a?.error?.message;throw new Error(e("decoServe.upload.failed",{name:f.name,detail:typeof u=="string"?u:`HTTP ${c.status}`}))}return a.path}}function St(t,e){const s=T.c(6),n=Ce(t?.virtualMcpId,t?.branch);let l;s[0]!==n||s[1]!==t?.previewUrl?(l=n.kind==="protocol"&&n.source==="sandbox"?t?.previewUrl??null:st(n),s[0]=n,s[1]=t?.previewUrl,s[2]=l):l=s[2];const o=l;let i;return s[3]!==e||s[4]!==o?(i=o&&e.startsWith("/")&&!e.startsWith("//")?new URL(e,o).href:e,s[3]=e,s[4]=o,s[5]=i):i=s[5],i}function Ct(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-black/40 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100",children:r.jsxs("span",{className:"flex items-center gap-1.5 rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:[r.jsx(Pe,{size:14}),"Click to replace"]})}),t[0]=e):e=t[0],e}function Ft(t){try{const e=new URL(t).pathname;return decodeURIComponent(e.split("/").pop()??t)}catch{return t.split("/").pop()??t}}function It(t){const e=t.lastIndexOf(".");return e<0||e===t.length-1?"":t.slice(e+1).toLowerCase()}const Tt=["low","medium","high","original"];function De(t){return t==="low"||t==="medium"||t==="high"||t==="original"}function Me(t,e){try{return new URL(t).searchParams.get(e)}catch{const s=_t(t);for(const n of s){const l=n.indexOf("=");if((l>=0?n.slice(0,l):n)===e)return l>=0?n.slice(l+1):""}return null}}function qe(t,e,s){const n=t.indexOf("#"),l=n>=0?t.slice(n):"",o=n>=0?t.slice(0,n):t,i=o.indexOf("?"),f=i>=0?o.slice(0,i):o,c=(i>=0?o.slice(i+1).split("&"):[]).filter(Boolean).filter(a=>{const u=a.indexOf("=");return(u>=0?a.slice(0,u):a)!==e});return s!==void 0&&c.push(`${e}=${s}`),`${f}${c.length?`?${c.join("&")}`:""}${l}`}function _t(t){const e=t.indexOf("#"),s=e>=0?t.slice(0,e):t,n=s.indexOf("?");return n<0?[]:s.slice(n+1).split("&").filter(Boolean)}function Ut(t){if(!t)return;const e=Me(t,"quality");return De(e)?e:void 0}function Pt(t,e){return qe(t,"quality",e)}function $t(t){return t?Me(t,"muted")!=="false":!0}function Rt(t,e){return qe(t,"muted",e?void 0:"false")}function Ot(t){const e=T.c(36),{value:s,onChange:n,showMuted:l}=t,o=l===void 0?!1:l,i=Z(),f=E.useId();let c;e[0]!==s?(c=Ut(s),e[0]=s,e[1]=c):c=e[1];const a=c;let u;e[2]!==s?(u=$t(s),e[2]=s,e[3]=u):u=e[3];const d=u;let p;e[4]!==i?(p=i("sectionsEditor.mediaTransformControls.mediaOptionsLabel"),e[4]=i,e[5]=p):p=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=r.jsx(ot,{size:14}),e[6]=x):x=e[6];let m;e[7]!==p?(m=r.jsx(at,{asChild:!0,children:r.jsx(we,{type:"button",variant:"outline",size:"sm",className:"h-9 shrink-0","aria-label":p,children:x})}),e[7]=p,e[8]=m):m=e[8];let g;e[9]!==i?(g=i("sectionsEditor.mediaTransformControls.qualityLabel"),e[9]=i,e[10]=g):g=e[10];let h;e[11]!==g?(h=r.jsx(Ne,{className:"text-xs text-muted-foreground",children:g}),e[11]=g,e[12]=h):h=e[12];const w=a??"";let v;e[13]!==n||e[14]!==s?(v=j=>n(Pt(s,De(j)?j:void 0)),e[13]=n,e[14]=s,e[15]=v):v=e[15];let N;e[16]===Symbol.for("react.memo_cache_sentinel")?(N=Tt.map(Dt),e[16]=N):N=e[16];let S;e[17]!==v||e[18]!==w?(S=r.jsx(ft,{type:"single",variant:"outline",size:"sm",value:w,onValueChange:v,children:N}),e[17]=v,e[18]=w,e[19]=S):S=e[19];let y;e[20]!==S||e[21]!==h?(y=r.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,S]}),e[20]=S,e[21]=h,e[22]=y):y=e[22];let k;e[23]!==d||e[24]!==f||e[25]!==n||e[26]!==o||e[27]!==i||e[28]!==s?(k=o&&r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsx(Ne,{htmlFor:f,className:"text-xs text-muted-foreground",children:i("sectionsEditor.mediaTransformControls.mutedLabel")}),r.jsx(dt,{id:f,checked:d,onCheckedChange:j=>n(Rt(s,j))})]}),e[23]=d,e[24]=f,e[25]=n,e[26]=o,e[27]=i,e[28]=s,e[29]=k):k=e[29];let b;e[30]!==y||e[31]!==k?(b=r.jsx(lt,{align:"end",className:"w-auto min-w-52 p-3",children:r.jsxs("div",{className:"flex flex-col gap-3",children:[y,k]})}),e[30]=y,e[31]=k,e[32]=b):b=e[32];let C;return e[33]!==b||e[34]!==m?(C=r.jsxs(ct,{children:[m,b]}),e[33]=b,e[34]=m,e[35]=C):C=e[35],C}function Dt(t){return r.jsx(ut,{value:t,className:"h-8 px-3 text-xs capitalize",children:t},t)}function Mt(t){try{const e=new URL(t);return e.protocol==="http:"||e.protocol==="https:"?e.href:""}catch{return""}}const Le=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function qt(t){const e=T.c(25),{siteSlug:s,onUploaded:n,onNeedsPicker:l,serveUpload:o}=t,i=Z(),f=!o;let c;e[0]!==f?(c={enabled:f},e[0]=f,e[1]=c):c=e[1];const a=pt(c),u=gt(),[d,p]=E.useState(!1);let x;e[2]!==a.data?.configs?(x=a.data?.configs??[],e[2]=a.data?.configs,e[3]=x):x=e[3];let m;e[4]!==s||e[5]!==x?(m=mt(x,s),e[4]=s,e[5]=x,e[6]=m):m=e[6];const g=m;let h;e[7]!==a.data?.configs||e[8]!==g?.id||e[9]!==l||e[10]!==n||e[11]!==o||e[12]!==i||e[13]!==u?(h=async function(C){if(!C)return;const j=Array.from(C).filter(Lt);if(j.length===0){te.error(i("sectionsEditor.imageField.onlyImageFilesAccepted"));return}if(o){try{n(await o(j[0]))}catch(U){const F=U;te.error(F instanceof Error?F.message:i("sectionsEditor.imageField.uploadFailed"))}return}const R=He(a.data?.configs??[],g?.id,typeof window<"u"?window.localStorage.getItem(Ke):null);if(!R){l();return}try{const U=await u.mutateAsync({configId:R,file:j[0]}),F=Mt(U.publicUrl);if(!F){te.error(i("sectionsEditor.imageField.uploadFailed"));return}n(F),j.length>1&&te.info(i("sectionsEditor.imageField.uploadedWithExtraFilesIgnored",{fileName:j[0].name}))}catch(U){const F=U;te.error(F instanceof Error?F.message:i("sectionsEditor.imageField.uploadFailed"))}},e[7]=a.data?.configs,e[8]=g?.id,e[9]=l,e[10]=n,e[11]=o,e[12]=i,e[13]=u,e[14]=h):h=e[14];const w=h,v=g?.id??null;let N,S;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.preventDefault(),b.dataTransfer.types.includes("Files")&&p(!0)},S=b=>{b.currentTarget===b.target&&p(!1)},e[15]=N,e[16]=S):(N=e[15],S=e[16]);let y;e[17]!==w?(y={onDragOver:N,onDragLeave:S,onDrop:b=>{b.preventDefault(),b.stopPropagation(),p(!1),w(b.dataTransfer.files)}},e[17]=w,e[18]=y):y=e[18];let k;return e[19]!==w||e[20]!==d||e[21]!==v||e[22]!==y||e[23]!==u.isPending?(k={isDragging:d,isPending:u.isPending,lockedConfigId:v,handleFiles:w,dropProps:y},e[19]=w,e[20]=d,e[21]=v,e[22]=y,e[23]=u.isPending,e[24]=k):k=e[24],k}function Lt(t){return Le.has(t.type||"")}const zt=3;function fs(t){const e=T.c(97),{schema:s,value:n,onChange:l,path:o,label:i,sandbox:f,compact:c}=t,a=Z();let u;e[0]!==n?(u=yt(n),e[0]=n,e[1]=u):u=e[1];const d=u,[p,x]=E.useState(!1),[m,g]=E.useState(!1),[h,w]=E.useState(!1),v=St(f,d),[N,S]=E.useState(0);let y;e[2]!==N||e[3]!==v?(y=N>0?`${v}${v.includes("?")?"&":"?"}retry=${N}`:v,e[2]=N,e[3]=v,e[4]=y):y=e[4];let k;e[5]!==y?(k=Je(y),e[5]=y,e[6]=k):k=e[6];const b=k,C=!!d&&!b;let j,R;e[7]!==d?(j=d?Ft(d):"",R=j?It(j):"",e[7]=d,e[8]=j,e[9]=R):(j=e[8],R=e[9]);const U=R;let F;e[10]!==l?(F=function(fe){g(!1),w(!1),S(0),l(fe)},e[10]=l,e[11]=F):F=e[11];const I=F,[O,se]=E.useState(d),[ze,Fe]=E.useState(d);ze!==d&&(Fe(d),se(d));let ie;e[12]!==I||e[13]!==d?(ie=function(fe){se(fe);const ee=fe.trim();ee&&!Ue(ee)||ee!==d&&(Fe(ee),I(ee))},e[12]=I,e[13]=d,e[14]=ie):ie=e[14];const ue=ie;let re;e[15]!==d||e[16]!==O?(re=function(){O.trim()&&!Ue(O)&&se(d)},e[15]=d,e[16]=O,e[17]=re):re=e[17];const me=re,P=Et(f),Ie=E.useRef(null);let ne;e[18]!==P?(ne=()=>P?Ie.current?.click():x(!0),e[18]=P,e[19]=ne):ne=e[19];const D=ne,pe=f?.siteSlug;let oe;e[20]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>x(!0),e[20]=oe):oe=e[20];let ae;e[21]!==P||e[22]!==I||e[23]!==pe?(ae={siteSlug:pe,onUploaded:I,onNeedsPicker:oe,serveUpload:P},e[21]=P,e[22]=I,e[23]=pe,e[24]=ae):ae=e[24];const{isDragging:le,isPending:ce,lockedConfigId:ge,dropProps:xe,handleFiles:he}=qt(ae),be=!i&&"hidden";let M;e[25]!==be?(M=$("min-w-0",be),e[25]=be,e[26]=M):M=e[26];const ye=f?.virtualMcpId;let q;e[27]!==i||e[28]!==o||e[29]!==s.description||e[30]!==ye?(q=r.jsx(kt,{htmlFor:o,label:i,description:s.description,labelClassName:"text-muted-foreground",virtualMcpId:ye}),e[27]=i,e[28]=o,e[29]=s.description,e[30]=ye,e[31]=q):q=e[31];let L;e[32]!==M||e[33]!==q?(L=r.jsx("div",{className:M,children:q}),e[32]=M,e[33]=q,e[34]=L):L=e[34];const ve=le&&"border-primary ring-2 ring-primary/30",je=ce&&"pointer-events-none opacity-60";let z;e[35]!==ve||e[36]!==je?(z=$("group relative w-full overflow-hidden rounded-[var(--studio-surface-radius,var(--radius-xl))] border shadow-edge border-border/60 bg-muted/30 transition",ve,je),e[35]=ve,e[36]=je,e[37]=z):z=e[37];let A;e[38]!==D||e[39]!==c||e[40]!==U||e[41]!==j||e[42]!==h||e[43]!==m||e[44]!==ce||e[45]!==i||e[46]!==N||e[47]!==v||e[48]!==b||e[49]!==d||e[50]!==a||e[51]!==C?(A=d?r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:D,"aria-label":a("sectionsEditor.imageField.replaceImage"),className:$("relative block w-full cursor-pointer bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",c?"h-28":"h-40"),children:[!h&&!C&&r.jsx("img",{src:b,alt:i,className:$("h-full w-full object-contain transition-opacity",!m&&"opacity-0"),onLoad:()=>g(!0),onError:()=>{v!==d&&N<zt?setTimeout(()=>S(At),600):w(!0)}},d),(h||C)&&r.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[r.jsx(_e,{size:20}),r.jsx("p",{className:"text-xs",children:a("sectionsEditor.imageField.previewUnavailable")})]}),!m&&!h&&!C&&r.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"}),r.jsx(Ct,{})]}),!c&&r.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[r.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:j}),U&&r.jsx("span",{className:"shrink-0 rounded-[var(--studio-control-radius,var(--radius))] bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:U})]})]}):r.jsxs("button",{type:"button",onClick:D,className:$("flex w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-accent hover:text-foreground",c?"h-28":"h-40"),children:[r.jsx(_e,{size:20}),r.jsx("span",{className:"text-sm font-medium",children:a(ce?"sectionsEditor.imageField.uploading":"sectionsEditor.imageField.dropImageOrClickToBrowse")}),!c&&r.jsx("span",{className:"text-xs text-muted-foreground",children:a("sectionsEditor.imageField.supportedFormatsAndSize")})]}),e[38]=D,e[39]=c,e[40]=U,e[41]=j,e[42]=h,e[43]=m,e[44]=ce,e[45]=i,e[46]=N,e[47]=v,e[48]=b,e[49]=d,e[50]=a,e[51]=C,e[52]=A):A=e[52];let B;e[53]!==le||e[54]!==a?(B=le&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:r.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow-soft",children:a("sectionsEditor.imageField.dropToUpload")})}),e[53]=le,e[54]=a,e[55]=B):B=e[55];let V;e[56]!==xe||e[57]!==z||e[58]!==A||e[59]!==B?(V=r.jsxs("div",{...xe,className:z,children:[A,B]}),e[56]=xe,e[57]=z,e[58]=A,e[59]=B,e[60]=V):V=e[60];let Q;e[61]!==ue?(Q=_=>ue(_.target.value),e[61]=ue,e[62]=Q):Q=e[62];let G;e[63]!==d?(G=_=>{_.key==="Escape"&&se(d)},e[63]=d,e[64]=G):G=e[64];let W;e[65]!==a?(W=a("sectionsEditor.imageField.urlPlaceholder"),e[65]=a,e[66]=W):W=e[66];let Y;e[67]!==o||e[68]!==me||e[69]!==Q||e[70]!==G||e[71]!==W||e[72]!==O?(Y=r.jsx(Qe,{id:o,type:"url",value:O,onChange:Q,onBlur:me,onKeyDown:G,placeholder:W,className:"h-9 min-w-0 flex-1"}),e[67]=o,e[68]=me,e[69]=Q,e[70]=G,e[71]=W,e[72]=O,e[73]=Y):Y=e[73];let H;e[74]!==D||e[75]!==d||e[76]!==a?(H=!d&&r.jsxs(we,{type:"button",variant:"outline",size:"sm",onClick:D,className:"h-9 shrink-0",children:[r.jsx(Pe,{size:14}),a("sectionsEditor.imageField.browse")]}),e[74]=D,e[75]=d,e[76]=a,e[77]=H):H=e[77];let K;e[78]!==I||e[79]!==d||e[80]!==a?(K=d&&r.jsxs(r.Fragment,{children:[r.jsx(Ot,{value:d,onChange:I}),r.jsx(we,{type:"button",variant:"ghost",size:"sm",onClick:()=>I(""),className:"h-9 shrink-0","aria-label":a("sectionsEditor.imageField.removeImage"),children:r.jsx(Ye,{size:14})})]}),e[78]=I,e[79]=d,e[80]=a,e[81]=K):K=e[81];let J;e[82]!==Y||e[83]!==H||e[84]!==K?(J=r.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[Y,H,K]}),e[82]=Y,e[83]=H,e[84]=K,e[85]=J):J=e[85];let X;e[86]!==he||e[87]!==ge||e[88]!==p||e[89]!==P||e[90]!==I?(X=P?r.jsx("input",{ref:Ie,type:"file",accept:[...Le].join(","),className:"hidden",onChange:_=>{he(_.target.files),_.target.value=""}}):r.jsx(Xe,{open:p,onOpenChange:x,mode:"image",onSelect:_=>I(_),lockedConfigId:ge}),e[86]=he,e[87]=ge,e[88]=p,e[89]=P,e[90]=I,e[91]=X):X=e[91];let de;return e[92]!==L||e[93]!==V||e[94]!==J||e[95]!==X?(de=r.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[L,V,J,X]}),e[92]=L,e[93]=V,e[94]=J,e[95]=X,e[96]=de):de=e[96],de}function At(t){return t+1}function us(t){const e=T.c(15),{isPending:s,isError:n}=t,l=Z();if(n){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(xt,{size:13}),e[0]=c):c=e[0];let a;e[1]!==l?(a=l("sandbox.saveStatus.failed"),e[1]=l,e[2]=a):a=e[2];let u;return e[3]!==a?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-destructive",children:[c,a]}),e[3]=a,e[4]=u):u=e[4],u}if(s){let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=r.jsx(Ge,{className:"size-[13px]"}),e[5]=c):c=e[5];let a;e[6]!==l?(a=l("sandbox.saveStatus.saving"),e[6]=l,e[7]=a):a=e[7];let u;return e[8]!==a?(u=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[c,a]}),e[8]=a,e[9]=u):u=e[9],u}let o;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(We,{size:13}),e[10]=o):o=e[10];let i;e[11]!==l?(i=l("sandbox.saveStatus.saved"),e[11]=l,e[12]=i):i=e[12];let f;return e[13]!==i?(f=r.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground/70",children:[o,i]}),e[13]=i,e[14]=f):f=e[14],f}export{Ct as C,kt as F,fs as I,vt as M,ls as N,Tt as Q,cs as R,us as S,bt as a,Oe as b,jt as c,Nt as d,yt as e,Ft as f,It as g,Et as h,ds as i,St as j,Ot as k,Ut as l,qt as m,Pt as s,ht as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i8 as ei,bn as ti,c as wn,b as jn,r as b,m as le,j as r,c7 as ni,bk as Cs,i9 as Mo,B as It,Y as on,au as si,_ as ri,bm as oi,Z as ai,q as ii,hG as li,ia as ci,ib as ui,h as di,bo as wt,ic as Jr,id as bs,ie as fi,ig as pt,ih as Qr,ii as mi,fP as pi,ij as hi,ik as Yr,il as gi,t as W,ft as Zr,im as vi,io as Bt,ip as yi,iq as Si,ir as bi,fh as Xr,is as xs,it as xi,iu as _i,iv as ki,fe as wi,fQ as ji,iw as Ri,ix as Ei,fs as Vi,K as Ti,iy as eo,eK as Ai,fI as Wn,fN as to,iz as no,iA as Ni,iB as Ci,iC as Pi,iD as _s,iE as Bi,iF as Ki,iG as Mi,iH as so,iI as Di,iJ as Fi,fg as ro,iK as Ii,iL as Li,fK as oo,iM as Oi,fc as zi}from"./index-DDDWDv4s.js";import{u as $i}from"./chat-context-BVOzxL7y.js";import{a as Xn,M as ao}from"./save-status-BvsiA7U3.js";import{p as kn,f as Hi,n as Wi}from"./parse-sections-yZQqTgrz.js";import{b as Gi}from"./repository-binding-DAYbvLYj.js";import{n as qi,t as Ui}from"./ChevronUp-fKdis79A.js";import{ab as Do,b as Zn,as as Ji,e as Qi,F as Yi,a2 as io,a0 as lo}from"./agent-icon-DFd8L1O_.js";import{S as an}from"./scroll-area-BIbpYC_e.js";import{c as jt,T as Rt,a as Et}from"./tooltip-7WjUlVHN.js";import{h as Zi,i as Xi,j as el,E as tl,k as nl,V as sl,l as rl,m as ol,G as al,s as Jn,v as Qn,p as Fo,n as il,o as ll,a as co,q as cl,u as ul,A as Gn,P as uo,w as fo,x as mo,y as ks,z as dl,B as fl,D as po,F as ml,J as ho,K as go,L as vo,M as pl,Q as yo,c as hl,T as ln,U as gl,W as vl}from"./held-block-view-Clis5U4a.js";import{j as yl,u as Sl,i as bl,v as xl,aK as _l,U as kl,k as So,b1 as bo,ab as Kt,ac as Mt,ax as wl,b2 as jl,b3 as Rl,aV as xo,aA as El,aH as Vl}from"./site-editor-toast-DCLSfuYN.js";import{u as Tl,ao as _o,e as ko,j as Al,z as Nl,y as qn,ad as Cl,ae as Pl,aj as Bl}from"./blocks-tab-states-Uq85dLE5.js";import{u as Kl}from"./use-delete-block-Bl87-vdk.js";import{b as Ml,u as Dl,k as Un,e as xn}from"./use-never-published-CT51G1NV.js";import{a as Es,e as Io}from"./UserSquare-DUXP0rwX.js";import{i as wo,s as jo}from"./Tool01-AMJ0J7Ld.js";import{s as Fl}from"./Plus-BNdH4tYy.js";import{s as Il}from"./Trash01-Chu35sQ_.js";import{i as Vs}from"./Zap-YDxTdktJ.js";import{u as Ll,a as Ro,n as Ol,P as zl,o as $l,C as Hl,D as Wl,c as Gl}from"./core.esm-DUcC46mO.js";import{u as ql,s as Ul,a as Yn,S as Jl,v as Ql}from"./sortable.esm-CFU3AjR2.js";import{s as Yl,g as Zl,u as Xl,A as ec}from"./use-section-preview-base-dFGv18ks.js";import{m as tc,P as nc}from"./mustache-BVD8gEp8.js";import{r as Eo,u as sc,a as rc,i as oc,f as ac,B as ic}from"./empty-message-D92Pb6fP.js";import{u as lc,a as cc,P as Vo,w as uc,b as dc}from"./seo-editor-BSBriMlp.js";import{v as fc,k as ws,x as To,j as mc,y as pc}from"./named-rule-step-BTqgnNQ5.js";import{u as hc}from"./use-apply-named-rule-2JoZ8nxT.js";import{o as Jt,f as Ts,y as As,q as Ft,h as cn,u as gc,n as Ut,r as js,m as Dt,k as _n,b as vc,s as Ao,z as yc,A as Sc,B as bc}from"./section-array-field-B-W5rSAO.js";import{b as No,a as xc}from"./variant-matcher-override-CEpfOStd.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./thread-route-D0a5VvFp.js";import"./use-project-scope-dsKJBAry.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./use-entitlements-B129mOCR.js";import"./use-ai-providers-C9vcyTaN.js";import"./use-decopilot-events-DYaMckqi.js";import"./Upload01-CGdoFUP8.js";import"./label-EESrxoYH.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./popover-B_j0y2h7.js";import"./switch-C6GSkMRa.js";import"./toggle-group-D7egmHqH.js";import"./active-indicator-CCMhAsc_.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-Dee9WDV4.js";import"./asset-utils-BSepCiAa.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./AlertCircle-D1QqLKFH.js";import"./hosted-reconcile-C2j-K6SC.js";import"./SearchMd-DWnwnZQO.js";import"./textarea-bQEpPrrj.js";import"./use-copy-C87hppcx.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./Play-DK3U1VA7.js";import"./monaco-editor-CwGsSUX8.js";import"./editor-ChiPsACh.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./CreditCard01-2UGmTwp0.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./index-BdQq_4o_.js";import"./index-DxWwCAMV.js";import"./utils-B_l1jy6k.js";import"./calendar-RX4MUBCU.js";import"./usage-stats-DyA2nNO3.js";import"./tool-namespace-DqMAELKh.js";import"./form-CuAETLLt.js";import"./utils-CVEq3hMx.js";import"./markdown-D5a0osui.js";import"./use-mobile-CEHdcOx8.js";import"./select-CCUqWhU2.js";import"./editor-classes-De5o_8lB.js";import"./combobox-B7xBLEqp.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-9oqLSRsO.js";import"./use-blocks-v8-project-Byep-1Pa.js";import"./use-voice-input-Br5vij9C.js";import"./drawer-OboTDl5r.js";import"./index-D1w7KFj7.js";import"./checkbox-x2IxTucq.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-DJ1Zj_fI.js";import"./empty-state-CxI5dssp.js";import"./search-input-CTHDb7Fb.js";import"./tabs-DSwAq5ok.js";import"./use-debounced-value-CPkVN80B.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-Fhnk8ar3.js";import"./collapsible-CmQt_iZ0.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./new-project-dialog-BiqAeUrE.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BgUWGow9.js";import"./types-DcXrDLzi.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-CJ8R5cz8.js";import"./use-connection-C4wZIedX.js";import"./use-mcp-prompts-Dlq8VH38.js";import"./use-thread-outputs-WMuzypnI.js";import"./file-type-icon-Dnh_2HcY.js";import"./slider-DGrjjZbc.js";import"./index-CBYIpf8n.js";import"./tooltipContext-BM-E9VBq.js";import"./CategoricalChart-DhUmp4Jo.js";import"./index-54RE0ioE.js";import"./use-move-blocks-BroyCilU.js";const _c={escape:Zi};function kc(v,e){for(const p of Yl(v,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function wc(v,e){if(!e)return;const p=ei(v,ti(e));if(p)try{const S=kc(p.resolveType,e);return S&&tc.render(S,p.data,{},_c).trim()||void 0}catch{return}}function jc(v){const e=wn.c(13),{icon:p,label:S,className:x}=v;let V;e[0]!==x?(V=le("size-3.5",x),e[0]=x,e[1]=V):V=e[1];let C;e[2]!==p||e[3]!==V?(C=r.jsx(p,{className:V}),e[2]=p,e[3]=V,e[4]=C):C=e[4];let _;e[5]!==S||e[6]!==C?(_=r.jsx(Rt,{asChild:!0,children:r.jsx("span",{role:"img","aria-label":S,className:"shrink-0 cursor-help",children:C})}),e[5]=S,e[6]=C,e[7]=_):_=e[7];let P;e[8]!==S?(P=r.jsx(Et,{className:"max-w-56",children:S}),e[8]=S,e[9]=P):P=e[9];let k;return e[10]!==_||e[11]!==P?(k=r.jsxs(jt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Rc="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 Co(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Lo(v){return v.map((e,p)=>({...e,index:p}))}function Ec(v,e){if(e===v.length)return v;if(e<v.length)return Lo(v.slice(0,e));const p=Array.from({length:e-v.length},(S,x)=>({id:crypto.randomUUID(),index:v.length+x}));return[...v,...p]}function Oo(v){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=v,C=jn(),_=Xn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Z;e[0]!==x||e[1]!==S?(Z=S&&x?Zl(S,x):void 0,e[0]=x,e[1]=S,e[2]=Z):Z=e[2];const ge=Z;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?wc(S,x):void 0,e[3]=x,e[4]=k,e[5]=S,e[6]=P,e[7]=Ue):Ue=e[7];const Le=Ue;let Ce;e[8]!==V||e[9]!==x||e[10]!==S||e[11]!==p?(Ce=rl(S,p,V,x),e[8]=V,e[9]=x,e[10]=S,e[11]=p,e[12]=Ce):Ce=e[12];const Je=Ce;let w;e[13]!==k||e[14]!==S?.__resolveType?(w=!k&&Cs(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Zn:k?Do:Io;let q;e[16]!==k||e[17]!==P?(q=P?{color:oi}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=q):q=e[18];const _e=q;let I;e[19]!==xe||e[20]!==_?(I=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(al,{"aria-hidden":!0,className:"absolute inset-0 size-4 opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100"})]}):r.jsx(Ji,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=I):I=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Es,{className:"h-4 w-4 shrink-0",style:_e}),e[24]=_,e[25]=_e,e[26]=d):d=e[26];const Oe=_?"shrink":"flex-1",u=p.isHidden&&"line-through opacity-50";let Ee;e[27]!==u||e[28]!==Oe?(Ee=le("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const X=Le??p.label;let ze;e[30]!==Ee||e[31]!==X?(ze=r.jsx("span",{className:Ee,children:X}),e[30]=Ee,e[31]=X,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(jc,{icon:Vs,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(ao,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(ao,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==I||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[I,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=I,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Vc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Tc="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 zo(v,e,p){if(p)return ol({selected:e});const S=v.isSavedBlock===!0,x=v.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":S?Vc:x?Tc:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function Rs(v,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]":v?"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 Ac(v){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:Z,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=v,w=jn(),c=Xn(),xe=S?Cs(S.__resolveType??""):!1,q=p.isHidden===!0,_e=xe||q;let I;e[0]!==p?(I=Mo(p),e[0]=p,e[1]=I):I=e[1];const ke=I,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Pc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:X,transform:ze,isDragging:nt}=ql(Oe);let Pe;e[4]!==ze?(Pe=Hl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let de;e[6]!==Pe||e[7]!==st?(de={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=de):de=e[8];const g=de;let we;e[9]!==p?(we=el(p),e[9]=p,e[10]=we):we=e[10];const rt=we,ot="button",m=0;let L;e[11]!==P?(L=F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),P())},e[11]=P,e[12]=L):L=e[12];const Xe=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Xe?(A=le("touch-none transition-colors",Xe,zo(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Xe,e[17]=A):A=e[17];let Qe;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Qe=r.jsx(Oo,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Qe):Qe=e[22];const H=!c&&d&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(Rs(_e,xe)),onClick:F=>{F.stopPropagation(),Le?.()},onPointerDown:Cc,children:r.jsx(Vs,{className:le("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),at=c?r.jsx(tl,{label:w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:q,onToggle:Ue,children:q?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})}):r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(Rs(_e,q)),onClick:F=>{F.stopPropagation(),Ue()},onPointerDown:Nc,children:q?r.jsx(wo,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(q?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=ri,Ye=nl;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(Rs(_e,!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 $e;e[25]!==Ye||e[26]!==ve||e[27]!==it?($e=r.jsx(Ye,{label:ve,classicClassName:it}),e[25]=Ye,e[26]=ve,e[27]=it,e[28]=$e):$e=e[28];let Be;e[29]!==c||e[30]!==d||e[31]!==xe||e[32]!==Le||e[33]!==w?(Be=c&&d&&r.jsxs(r.Fragment,{children:[r.jsxs(on,{onClick:F=>{F.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(si,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let Ke;e[35]!==Z?(Ke=F=>{F.stopPropagation(),Z()},e[35]=Z,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(Qi,{className:"h-4 w-4"}),e[37]=se):se=e[37];let Y;e[38]!==w?(Y=w("sectionsEditor.sectionList.duplicateMenuItem"),e[38]=w,e[39]=Y):Y=e[39];let ee;e[40]!==Ke||e[41]!==Y?(ee=r.jsxs(on,{onClick:Ke,children:[se,Y]}),e[40]=Ke,e[41]=Y,e[42]=ee):ee=e[42];let D;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(D=ke&&r.jsxs(on,{className:le(!c&&sl),onClick:F=>{F.stopPropagation(),Ce()},children:[r.jsx(Do,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=D):D=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(on,{className:le(!c&&Rc),onClick:F=>{F.stopPropagation(),ge()},children:[c?r.jsx(Zn,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.makeReusableMenuItem")]}),e[48]=c,e[49]=rt,e[50]=ge,e[51]=w,e[52]=T):T=e[52];let me;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(me=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(on,{onClick:F=>{F.stopPropagation(),Je()},children:[c?r.jsx(Io,{className:"h-4 w-4"}):r.jsx(Es,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.detachMenuItem")]}),e[53]=c,e[54]=Je,e[55]=p.isMultivariate,e[56]=p.isSavedBlock,e[57]=w,e[58]=me):me=e[58];let He;e[59]!==k?(He=F=>{F.stopPropagation(),k()},e[59]=k,e[60]=He):He=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Il,{className:"h-4 w-4"}),e[61]=et):et=e[61];let Me;e[62]!==w?(Me=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=Me):Me=e[63];let $;e[64]!==He||e[65]!==Me?($=r.jsxs(on,{variant:"destructive",onClick:He,children:[et,Me]}),e[64]=He,e[65]=Me,e[66]=$):$=e[66];let ie;e[67]!==Be||e[68]!==ee||e[69]!==D||e[70]!==T||e[71]!==me||e[72]!==$?(ie=r.jsxs(ai,{align:"end",className:"w-44",children:[Be,ee,D,T,me,$]}),e[67]=Be,e[68]=ee,e[69]=D,e[70]=T,e[71]=me,e[72]=$,e[73]=ie):ie=e[73];let Ve;e[74]!==fe||e[75]!==$e||e[76]!==ie?(Ve=r.jsxs(fe,{children:[$e,ie]}),e[74]=fe,e[75]=$e,e[76]=ie,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==X||e[82]!==g||e[83]!==A||e[84]!==Qe||e[85]!==H||e[86]!==at||e[87]!==Ve||e[88]!==L?(Te=r.jsxs("div",{ref:X,style:g,...u,...Ee,role:ot,tabIndex:m,onClick:P,onKeyDown:L,className:A,children:[Qe,H,at,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=X,e[82]=g,e[83]=A,e[84]=Qe,e[85]=H,e[86]=at,e[87]=Ve,e[88]=L,e[89]=Te):Te=e[89],Te}function Nc(v){return v.stopPropagation()}function Cc(v){return v.stopPropagation()}function Pc(){return!1}function Ns(v){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=v,C=jn();let _;e[0]!==x?(_=le("w-full",x),e[0]=x,e[1]=_):_=e[1];const P=!p;let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=r.jsx(Fl,{size:14}),e[2]=k):k=e[2];let Z;e[3]!==C?(Z=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=Z):Z=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==Z?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,Z]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=Z,e[10]=ge):ge=e[10],ge}function Bc(v){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:Z,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=v,q=xe===void 0?!0:xe,_e=jn(),I=Xn();let ke;e[0]!==x.length?(ke=()=>Co(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[X,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);X!==p?(ze(p),Pe(x.length),Oe(Co(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Ec(tt,x.length)));let de;e[2]===Symbol.for("react.memo_cache_sentinel")?(de={activationConstraint:{distance:8}},e[2]=de):de=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={coordinateGetter:Ul},e[3]=g):g=e[3];const we=Ll(Ro(zl,de),Ro(Ol,g));let rt;e[4]!==d?(rt=d.map(Kc),e[4]=d,e[5]=rt):rt=e[5];const ot=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const L=m;let Xe;e[7]!==ot||e[8]!==k?(Xe=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const We=ot.indexOf(String(O.id)),ht=ot.indexOf(String(Ae.id));We===-1||ht===-1||(Oe(bt=>Lo(Yn([...bt],We,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(We,ht))},e[7]=ot,e[8]=k,e[9]=Xe):Xe=e[9];const A=Xe;let Qe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{Ee(null)},e[10]=Qe):Qe=e[10];const H=Qe;let at,fe,Ye,ve,it,$e,Be,Ke,se,Y,ee,D,T,me,He;if(e[11]!==u||e[12]!==q||e[13]!==I||e[14]!==C||e[15]!==d||e[16]!==ot||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==Z||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){me=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==q||e[50]!==I||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Ye=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let We;e[61]!==Ae?(We=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=We):We=e[62];const ht=We;let bt;e[63]!==q||e[64]!==I||e[65]!==ht||e[66]!==c?(bt=I?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:q,onAddSection:c,size:"sm"})]}),e[63]=q,e[64]=I,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],me=bt;break e}T=le(O&&"cursor-grabbing"),e[48]=u,e[49]=q,e[50]=I,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Ye,e[57]=ve,e[58]=T}else Ye=e[56],ve=e[57],T=e[58];fe=Wl,Ke=we,se=Gl,Y=L,ee=A,D=H,at=Jl,$e=ot,Be=Ql,He="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Ac,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>Z(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=q,e[13]=I,e[14]=C,e[15]=d,e[16]=ot,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=Z,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=at,e[34]=fe,e[35]=Ye,e[36]=ve,e[37]=it,e[38]=$e,e[39]=Be,e[40]=Ke,e[41]=se,e[42]=Y,e[43]=ee,e[44]=D,e[45]=T,e[46]=me,e[47]=He}else at=e[33],fe=e[34],Ye=e[35],ve=e[36],it=e[37],$e=e[38],Be=e[39],Ke=e[40],se=e[41],Y=e[42],ee=e[43],D=e[44],T=e[45],me=e[46],He=e[47];if(me!==Symbol.for("react.early_return_sentinel"))return me;let et;e[68]!==it||e[69]!==He?(et=r.jsx("div",{className:He,children:it}),e[68]=it,e[69]=He,e[70]=et):et=e[70];let Me;e[71]!==at||e[72]!==$e||e[73]!==Be||e[74]!==et?(Me=r.jsx(at,{items:$e,strategy:Be,children:et}),e[71]=at,e[72]=$e,e[73]=Be,e[74]=et,e[75]=Me):Me=e[75];let $;e[76]!==Ye||e[77]!==ve||e[78]!==I||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",zo(ve,!1,I)),children:r.jsx(Oo,{section:ve,raw:Ye,meta:V,decofile:C})}):null,e[76]=Ye,e[77]=ve,e[78]=I,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=ni.createPortal(r.jsx($l,{dropAnimation:Xi,children:$}),document.body),e[82]=$,e[83]=ie):ie=e[83];let Ve;e[84]!==fe||e[85]!==Ke||e[86]!==se||e[87]!==Y||e[88]!==ee||e[89]!==D||e[90]!==Me||e[91]!==ie?(Ve=r.jsxs(fe,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:D,children:[Me,ie]}),e[84]=fe,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=D,e[90]=Me,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==q||e[94]!==I||e[95]!==c?(Te=!I&&r.jsx(Ns,{canAddSection:q,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=q,e[94]=I,e[95]=c,e[96]=Te):Te=e[96];let F;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(F=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=F):F=e[100],F}function Kc(v){return v.id}function Mc(v,e,p,S){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(v,p,S)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:Ts(v,p,S)}:{kind:"noop"};const V=As(v,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Jn(x),_=Qn(C,p);return _?{kind:"error",reason:"invalid-block-id",message:_}:{kind:"createBlock",blockId:C,blockData:Ft(V.resolveType,V.data,x),reference:cn(C)}}const Po="section-form-stale-save",Dc=3;function Bo(v,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Fo(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,v,p)}}const Ko=new WeakMap;let Fc=0;function Ic(v){let e=Ko.get(v);return e===void 0&&(e=++Fc,Ko.set(v,e)),e}function xf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:Z=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=jn(),xe=$i(),q=xe?.taskId??null,_e=S?{orgSlug:v,virtualMcpId:e,branch:p,threadId:q,previewUrl:x}:null,[I,ke]=b.useState([]),{data:d,isLoading:Oe}=yl(_e,{pollWhile:I.length>0}),{data:u,isLoading:Ee}=Tl(_e),X=Xn(),ze=xe?.virtualMcpId,Pe=Gi(ze===e?e:null)?.metadata?.siteSlug??null,st=Xl({virtualMcpId:e,branch:p,sandboxUrl:x}),de=Sl(e,p),g=bl(de),we=Vi(g),rt=!g,ot=!!st||g,[m,L]=b.useState(null),[Xe,A]=b.useState(null),[Qe,H]=b.useState(null),[at,fe]=b.useState(0),[Ye,ve]=b.useState(void 0),[it,$e]=b.useState(null),Be={index:it,remember:$e},[Ke,se]=b.useState(null),[Y,ee]=b.useState(null),[D,T]=b.useState([]),me=b.useRef(null),[He,et]=b.useState(D.length);He!==D.length&&(et(D.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[Me,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,F]=b.useState(null),[tt,O]=b.useState(null),[Ae,We]=b.useState(!1),[ht,bt]=b.useState(!1),Rn=b.useRef(null),[En,$o]=b.useState(!0),[Qt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[je,un]=b.useState(Z),[Ps,Bs]=b.useState(Z);Z&&!Ps&&(Bs(!0),un(!0),L(null),A(null),H(null),T([])),!Z&&Ps&&Bs(!1);const[Ho,dn]=b.useState(null),[Ks,An]=b.useState(void 0),[Ms,Ot]=b.useState([]),[Ds,Yt]=b.useState(0),[De,lt]=b.useState(0),[Wo,Fe]=b.useState(null),[Zt,Ge]=b.useState(null),[Fs,Is]=b.useState(null),Nn=ii(),Cn=xl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Ml({orgSlug:v,virtualMcpId:e,branch:p}),[Go,qo]=b.useState(V),[Uo,Jo]=b.useState(C),[Qo,Yo]=b.useState(_);(Go!==V||Uo!==C||Qo!==_)&&(queueMicrotask(()=>fn.flush()),qo(V),Jo(C),Yo(_),L(null),A(null),H(null),fe(0),se(null),ee(null),lt(0),Fe(null),Ge(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1));const B=Dl({orgSlug:v,virtualMcpId:e,branch:p}),mn=hl(t=>{B.mutate(t,{onSuccess:()=>k?.(),onError:B.reportError})},d??{},B.v8),Pn=Kl({orgSlug:v,virtualMcpId:e,branch:p}),Ls=hc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Bn=b.useRef({}),zt=b.useRef(null),pn=b.useRef(!1),hn=b.useRef(!1),ye=b.useRef(new Map),tn=b.useRef(!1),ct=b.useRef([]),es=b.useRef(new WeakSet);_l(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:o,selectedSectionIndex:a}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,a]){const f=l==null?void 0:s[l],R=l==null?void 0:o[l],h=f&&R?.isSavedBlock?_s(f,R):null;h&&i.add(h)}if([...i].some(l=>t.has(l))){for(const l of[N,gt,vt])l.current&&clearTimeout(l.current),l.current=null;_t.current=null,ye.current.clear(),n&&t.has(n)&&(Bn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Os,zs]=b.useState(0),[Zo,Xo]=b.useState(0),$s=li(de,{orgSlug:v,virtualMcpId:e,branch:p}),Hs=ci($s,I[0]?.blockKey??null,ui(d,I[0]?.blockKey??null)),[ea,ta]=b.useState(null),ts=kl(v,e).epoch,[na,sa]=b.useState(ts);lc(je?{orgSlug:v,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const Ws=_??(d&&u?_o(ko(d,u),V,C)?.key??null:null),ns=So({orgSlug:v,virtualMcpId:e,branch:p},Ws?[Ws]:[],{withRefs:!0}),[Gs,ra]=b.useState(!1),ss=So({orgSlug:v,virtualMcpId:e,branch:p},Gs?Al:[]),qs={ready:!(de.kind==="protocol"&&de.hosted)||Gs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>ra(!0)};if(ns.failed)return r.jsxs("div",{className:"h-full w-full flex flex-col items-center justify-center gap-3 p-6 text-center text-sm text-muted-foreground",children:[r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailed")}),r.jsx("p",{children:c("sectionsEditor.hosted.blockLoadFailedHint")}),r.jsx(It,{variant:"outline",size:"sm",onClick:ns.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!ns.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(di,{className:"size-5 text-muted-foreground"})});if(!d||!u)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.couldNotLoadSiteData")});const oa=ko(d,u),G=!!_,oe=G?null:_o(oa,V,C),y=G?_:oe?.key??null,rs=G&&_?d[_]:void 0,Us=G&&_&&rs?Nl(_,rs):G&&_?_:"",nn=!G&&y&&d[y]?d[y]:null,os=je&&d&&u&&y&&oe?Eo(d,{kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},u):null,aa=je?nn?.seo:void 0,Kn=Ks!==void 0?Ks:aa,ia=je?sc(Kn):void 0,Js=os?.seoTypeOptions??[],Qs=je&&u?rc(u):"",as=Ho??ia??{},Mn=je&&os?cc(as,os):null,Ys=je&&Mn&&oc(Kn)?qn(Mn,u):null,Zs=je?ac(d,u)?.seoData:void 0,pe=G?[{label:"Default",sections:[{__resolveType:_}]}]:Fo(nn?.sections,d??{},g),yt=pe.length>1,te=Math.min(at,pe.length-1),Se=pe[te],K=Se?.sections??[],ce=kn(K,d,g),Dn=!G&&gc(nn?.sections,g);if(G&&_&&Fs!==_){Is(_);const t=K[0],n=ce[0];if(t&&n){L(0),lt(0),T([]);const s=wt(t,n,d,g);s&&(A(s.data),H(s.resolveType),Ge(null),Fe(null))}}!G&&Fs!==null&&Is(null),re.current={rawSections:K,parsedSections:ce,decofile:d??{},activePageKey:y,pageVariants:pe,variantIndex:te,sectionVariantIndex:De,selectedSectionIndex:m};const la=()=>({multivariate:Dn,index:te,variants:pe.map(t=>({rule:t.rule})),lazyValues:g&&Dn&&Ai(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Dn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},o=g?bo(y,s):No(y,s,d,u);w(o.length>0?o:null)},ls=w&&y&&Dn&&yt&&!Oe&&!Ee?y:null;if(ls!==ea&&(ta(ls),ls)){const t=pe.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>is(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const o=la(),a=g?bo(y,o):No(y,o,d,u);if(!t||n<0){w(a.length>0?a:null);return}const i={pageKey:y,page:o,sectionIndex:n,sectionLazy:ce[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=g?jl(i):xc({...i,decofile:d,meta:u}),f=g?Rl(a,l):[...a,...l];w(f.length>0?f:null)},xt=(t,n,s,o=m??-1,a=!1)=>{const i=pt(t,n);if(!i){A(null),H(null),Ge(null),Fe(null),a&&$t(null,o,s);return}const f=Qr(i,we)[s];if(!f){A(null),H(null),Ge(null),Fe(null),a&&$t(null,o,s);return}const R=hi(f.value,d);A(R?.data??null),H(R?.resolveType??null);const{resolveType:h,formValue:j}=Ut(f.rule,d,u??void 0);Ge(h),Fe(j),a&&$t(i,o,s)},cs=t=>{F(null),fe(t),L(null),A(null),H(null),T([]);const n=pe[t]?.rule,{resolveType:s,formValue:o}=Ut(n,d??{},u??void 0);ee(s),se(o),is(pe.map(a=>({rule:a.rule})),t)},ca=(t,n)=>{const s=K[t],o=ce[t];if(!s||!o)return!1;const a=o.isMultivariate?pt(s,o)?.variants?.length??0:0,i=n<a?n:0;if(L(t),lt(i),T([]),$(l=>l+1),o.isMultivariate)xt(s,o,i,t);else{const l=wt(s,o,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),Ge(null),Fe(null)}return!0},Xs=P?.index;if(P!==void 0&&(P?.seq??null)!==Ye&&(ve(P?.seq??null),typeof Xs=="number"&&ca(Xs,0)),ts!==na){sa(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||B.isPending||fn.isPending||I.length>0,n=m!==null&&Jr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=K[m],o=ce[m];if(T([]),$(a=>a+1),!s||!o)L(null),A(null),H(null);else if(o.isMultivariate)xt(s,o,De,m);else{const a=wt(s,o,d,g);A(a?.data??null),H(a?.resolveType??null)}}!t&&je&&(dn(null),An(void 0),Yt(s=>s+1))}if(Os!==Zo){Xo(Os);const t=m!==null?K[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,De,m);else{const s=wt(t,n,d,g);A(s?.data??null),H(s?.resolveType??null)}}const ut=I[0];if(ut){const{formBase:t,target:n}=ut,s=Bo(d,n,g),o=t.sectionIndex,a=s.rawSections.length===t.sectionCount?bs(s.rawSections[o],s.parsedSections[o],n.sectionVariantIndex,d,g):null,i=fi(ut,a,l=>Yr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...I.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:q,previewUrl:g?void 0:x??void 0,siteSlug:Pe},Fn=Qe&&u?qn(Qe,u):null,dt=(t,n)=>{if(!y)return;N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),vt.current&&(clearTimeout(vt.current),vt.current=null),gt.current&&(clearTimeout(gt.current),gt.current=null);const s=ln(d,y,t,te,pe);B.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:o=>{n?.onError?.(),B.reportError(o)}})},Ht=()=>{Ce?.(null),L(null),Tn(!1),A(null),H(null),lt(0),Fe(null),Ge(null),T([]),$(t=>t+1)},er=()=>Jr(me.current,document.activeElement),us=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,W.error(t,{id:Po}),er()){tn.current=!0;return}zs(n=>n+1)},tr=()=>{!tn.current||er()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,zs(t=>t+1))},nr=()=>{tn.current&&setTimeout(tr,0)},sr=de.kind==="protocol"&&de.source==="github",rr=t=>Vl(Nn,Cn,t,de.kind==="protocol"?de:null),or=t=>{ye.current.size!==0&&setTimeout(()=>{if(pn.current||hn.current)return;const n=[...ye.current.values()];ye.current.clear();for(const s of n)s()},t)},ua=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:o}=re.current,a=zt.current;return{formBase:a?.sectionIndex===t&&a.variantIndex===o?a:null,pageKey:n,global:G,pageVariantIndex:s,sectionVariantIndex:o,schema:Fn}},vn=t=>{ct.current=t,ke(t)},da=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),o=s>=0?n[s]:void 0,a=o?n.with(s,{...t,choices:no(o.plan,o.choices,t.plan),fresh:Ii(o.plan,t.plan,o.fresh),changedAgain:o.changedAgain||Wn(o.plan.theirs)!==Wn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(a)},ar=(t,n)=>{const s=ct.current,o=s.findIndex(l=>l.formBase===t),a=s[o];if(!a)return!1;if(Wn(a.plan.mine)===Wn(n))return!0;const i=to({...a.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==a);return vn(l),!1}return vn(s.with(o,{...a,plan:i,choices:no(a.plan,a.choices,i)})),!0},fa=t=>{const n=re.current;return n.selectedSectionIndex===t.formBase.sectionIndex&&n.activePageKey===t.target.pageKey&&n.variantIndex===t.target.pageVariantIndex&&n.sectionVariantIndex===t.target.sectionVariantIndex},ma=()=>{const t=ct.current[0];if(!t)return null;const{formBase:n,target:s}=t;N.current&&_t.current?.sectionIndex===n.sectionIndex&&_t.current.sectionVariantIndex===s.sectionVariantIndex&&(clearTimeout(N.current),N.current=null,_t.current=null),ye.current.delete(`${s.pageKey}:${n.sectionIndex}:${s.sectionVariantIndex}`);const o=n.emitted;return o&&typeof o=="object"&&!ar(n,o)&&yn(o,n.sectionIndex,0,s),ct.current[0]??null},pa=()=>{const t=ct.current[0],n=ma();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=ji(n.plan,n.choices);de.kind==="protocol"&&de.source==="github"&&Ri(n.plan,n.choices)&&wl(c,!1),vn(ct.current.slice(1));const{formBase:o,target:a}=n;o.base=n.plan.theirs,o.version=void 0,o.emitted=s,es.current.add(o),(zt.current===o||fa(n))&&(zt.current=o,A(s),$(i=>i+1)),yn(s,o.sectionIndex,0,a)},ha=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,o,a=!1)=>{const i=o??ua(n),l=i.sectionVariantIndex,f=i.formBase,R=a||eo(ct.current,f,i,n,g).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const j=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(j,E);return}const M=typeof t=="function"?t():t,z=eo(ct.current,f,i,n,g).base;if(z&&ar(z,M))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Q,variantIndex:be}=Bo(ne,i,g),Ie=i.pageKey,he=J[n];if(!he)return;const ue=Ne[n];if(!ue)return;const qe=f?.base,Ze=bs(he,ue,l,ne,g),Nt=!!qe&&!!Ze&&Ni(qe,Ze)&&!(f&&Yr(f,Ze));if(Nt&&qe&&Ze){if(Ci(qe,Ze)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ue.isSavedBlock?"here":Pi(qe,J.map((ae,mt)=>bs(ae,Ne[mt],l,ne,g)),n,f?.sectionCount??J.length);if(U==="unknown"){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof U=="number"&&f){f.sectionCount=J.length,f.sectionIndex=U,zt.current===f&&L(U),yn(M,U,s,i);return}}const Ct=Nt&&qe&&Ze?to({ancestor:qe,mine:M,theirs:Ze}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,da({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Bi(Ct),changedAgain:!1,blockKey:ue.isSavedBlock?_s(he,ue):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??M,Gr=Ki({merged:!!Pt,tracked:f,current:zt.current,saved:M});Pt&&W.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Po}),Gr&&f&&(f.emitted=Pt,A(Pt));const Ss=Gr||!Pt?rn:M;f&&(f.base=Ss,f.sectionCount=J.length,Mi(f,Ss));const qr={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&qe&&(f.base=qe),U instanceof El){if(f&&(f.version=void 0),s<Dc){ye.current.delete(j),hn.current=!0;const ae=Li(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:M},n,s+1,i,ae.immediate),ye.current.delete(j),or(xn(g))},ae.delay)}else us();return}B.reportError(U)}},Ur=U=>{pn.current=!0;let ae=!1;B.mutateAsync(U).then(()=>qr.onSuccess(),mt=>{ae=!0,qr.onError(mt)}).finally(()=>{pn.current=!1,or(ae?xn(g):0),tr()})};if(ue.isSavedBlock){const U=_s(he,ue);if(!U)return;Ur({blockKey:U,data:rn,...qe?{base:{value:Di({startedFrom:qe,stored:Ze,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:so({formBase:f,rebased:!!Pt,versionOf:rr,productionVersionOf:ae=>oo(Nn,Cn,ae),...sr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Hn={...ne[Ie]},qt=[...J];if(ue.isMultivariate){const U=pt(he,ue);if(!U||!Ie)return;const ae=Fi(U,l,rn);qt[n]=Bt(he,ue,ae)}else if(ue.isHidden){const U=Cs(he.__resolveType),ae=U?{...he.section}:{...he},mt=Array.isArray(ae.variants)?[...ae.variants]:[];mt[0]&&(mt[0]=ro(ae.__resolveType,mt[0],rn)),ae.variants=mt,U?qt[n]={...he,section:ae}:qt[n]=ae}else ue.isLazy?qt[n]={...he,section:rn}:qt[n]=rn;if(Q.length>1){const U=Hn.sections,ae=[...U?.variants??[]];ae[be]&&(ae[be]=ro(U?.__resolveType,ae[be],qt)),Hn.sections={...U,variants:ae}}else Hn.sections=qt;Ur({blockKey:Ie,data:Hn,rebaseOnConflict:!1,guard:so({formBase:null,rebased:!1,versionOf:rr,productionVersionOf:U=>oo(Nn,Cn,U),...sr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},R){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(g))},ga=t=>{tn.current=!1,L(t),lt(0),T([]),$(a=>a+1);const n=K[t],s=ce[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const o=wt(n,s,d,g);if(!o){A(null),H(null),Ge(null),Fe(null),$t(null,t,0);return}A(o.data),H(o.resolveType),Ge(null),Fe(null),$t(null,t,0)},ir=t=>{const n=t;m!==null&&(zt.current=Ei(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Xe,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},ds=t=>{if(!y||!d||!u||!oe)return;const n={kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},s=Eo(d,n,u);s&&fn.save(y,()=>{const o=Nn.getQueryData(Ti.decofile(Cn))?.[y];if(!o||typeof o!="object"||o===null||Array.isArray(o))return null;const a={...o,...Bn.current};return Bn.current={},t?.raw!==void 0?uc(a,t.raw,u):t?.inner!==void 0?dc(n,s,a,t.inner):a})},lr=(t,n)=>{y&&(Bn.current[t]=n,ds())},va=(t,n)=>{if(!y)return;const s=Yn([...K],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),dt(s)},ya=t=>{if(!y)return;const n=K.filter((s,o)=>o!==t);m===t?Ht():m!==null&&m>t&&L(m-1),dt(n)},Sa=t=>{if(!y)return;const n=K[t];if(!n)return;const s=[...K];s.splice(t+1,0,gl(n)),m!==null&&m>t&&L(m+1),dt(s)},ba=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s)return;const o=s.isHidden?_i(n,g):ki(n,u);if(!o)return;const a=[...K];a[t]=o,m===t&&Ht(),dt(a)},xa=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const o=xi(n);if(!o)return;const a=[...K];a[t]=o,m===t&&Ht(),dt(a)},_a=t=>{if(!y)return;const n=K[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const o=wt(n,s,d,g);if(!o?.data)return;const{name:a,...i}=o.data,l=[...K];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Ht(),dt(l)},ka=t=>{if(!y)return;const n=Wi(ce),s=[...K.slice(0,n),{__resolveType:t.resolveType},...K.slice(n)];dt(s,{onError:()=>{re.current.selectedSectionIndex===n&&Ht()}}),We(!1),L(n),lt(0),T([]),$(l=>l+1);const o=s[n],a=kn(s,d,g)[n];if(!o||!a)return;if(a.isMultivariate){xt(o,a,0);return}const i=wt(o,a,d,g);if(!i){A(null),H(null),Ge(null),Fe(null);return}A(i.data),H(i.resolveType),Ge(null),Fe(null)},cr=t=>{Rn.current=t.append,We(!0)},wa=t=>{const n=Rn.current;if(!n){ka(t);return}n({__resolveType:t.resolveType}),We(!1),Rn.current=null},ur=t=>{if(m===null)return;const n=K[m],s=ce[m];!n||!s?.isMultivariate||(lt(t),T([]),$(o=>o+1),xt(n,s,t,m,!0))},ja=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=Si(o,t);if(!a){W.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...K];i[m]=Bt(n,s,a);const l=a.variants;let f=De;t===De?f=Math.min(t,l.length-1):t<De&&(f=De-1),lt(f),T([]),$(R=>R+1),xt(i[m],s,f),dt(i)},Ra=t=>{if(m===null||!y)return;const n=K[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=bi(o,t,g),i=[...K];i[m]=Bt(n,s,a);const l=Xr(o.variants??[],t,g);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,g),dt(i)},Ea=(t,n)=>{if(m===null||!y||t===n)return;const s=K[m],o=ce[m];if(!s||!o?.isMultivariate)return;const a=pt(s,o);if(!a)return;const i=vi(a,t,n),l=[...K];l[m]=Bt(s,o,i);let f=De;De===t?f=n:t<De&&n>=De?f=De-1:t>De&&n<=De&&(f=De+1),lt(f),xt(l[m],o,f,m,g),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=K[n],o=ce[n];if(!s||!o)return;const a=gi(s,o,void 0,u,g);if(!a){W.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...K];i[n]=a.section;const l=kn(i,d,g)[n];if(!l?.isMultivariate){W.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),lt(a.newVariantIndex),T([]),$(f=>f+1),xt(a.section,l,a.newVariantIndex,n,g),dt(i)},dr=()=>{if(m===null||!y)return;const t=K[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const o=yi(t,n,s);if(!o){W.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const a=[...K];a[m]=o;const i=kn(a,d,g)[m];if(!i)return;lt(0),Ge(null),Fe(null),T([]),$(f=>f+1);const l=wt(o,i,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),$t(null,m,0),dt(a)},Va=async t=>{if(ie===null||!y)return;const n=Qn(t,d,u);if(n){W.error(n);return}const s=K[ie],o=ce[ie];if(!s||!o)return;const a=wt(s,o,d,g);if(!a){W.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...a.data,name:t};try{const l=await B.mutateAsync({blockKey:t,data:i,create:!0}),f=[...K];f[ie]={__resolveType:t},await B.mutateAsync({blockKey:y,data:ln(d,y,f,te,pe)}),m===ie&&Ht(),Ve(null),Un(l)||W.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){W.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Mt(l))})}},fr=Se?.rule;if(yt&&m===null&&Y===null&&fr){const{resolveType:t,formValue:n}=Ut(fr,d??{},u??void 0);ee(t),se(n)}const sn=u?il(u):[],fs=u&&d?ll(u,d):[],Wt=g&&u&&d?fc(u,d):[],ms=(t,n)=>{if(Wt.length===0)return;const s=Cl(t);return{kinds:Wt,selected:s,campaignPrefill:mc(t),onPick:n,load:qs}},mr=!G&&!!(ot&&u&&d),pr=Y&&u?qn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},Gt=async(t,n)=>{if(Sc(n,t,u,g))try{await Pn.mutateAsync({blockKey:t})}catch(s){W.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Mt(s))})}},hr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a={...s[n]},i={...a.sections},l=[...i.variants??[]],f=l[o],R=f?.rule;if(Jt(R,s,u)){const h=R?.__resolveType??"",j=s[h],E=typeof j?.name=="string"?j.name:h,{__resolveType:M,...z}=t;B.mutate({blockKey:h,data:Ft(M??"",z,E)},{onSuccess:()=>k?.(),onError:B.reportError});return}f&&(l[o]={...f,rule:t}),a.sections={...i,variants:l},B.mutate({blockKey:n,data:a},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g))},gr=t=>{ee(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};se(t?n:{}),hr(n)},vr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};hr(s)},In=async(t,n,s)=>{const o=pc(n,t);if(!o.ok)return o.reason==="conflict"&&W.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),xo),null;const a={};if(s){const i=s(o.rule);if(!i)return null;a[i.blockKey]=i.data}return o.blockWrite&&(a[o.blockWrite.blockKey]=o.blockWrite.block),Object.keys(a).length>0&&!(await Ls.apply({writes:a})).ok?null:(o.blockWrite&&W.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...xo,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:o.rule,projected:{...n,...a}})},yr=Wt.length>0?{kinds:Wt,load:qs,prepare:async t=>(await In(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Pl(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Ls.apply({writes:{[Bl(t).blockKey]:n.block}})).ok}}:null,Sr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=await In(t,s,f=>{const R=s[n],h=R?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const j=h;if(!Array.isArray(j.variants))return null;const E=[...j.variants],M=E[o];return M?(E[o]={...M,rule:f},{blockKey:n,data:{...R,sections:{...j,variants:E}}}):null});if(!a)return;const{resolveType:i,formValue:l}=Ut(a.rule,a.projected,u??void 0);ee(i),se(l),k?.()},br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=s[n],i=a?.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[o];if(!R)return;const h=Dt(R.rule,s,u),j=cn(t);f[o]={...R,rule:j};const E={...s,[n]:{...a,sections:{...l,variants:f}}},{resolveType:M,formValue:z}=Ut(j,E,u??void 0);ee(M),se(z);try{await B.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await Gt(h,E),k?.()}catch(ne){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ne))})}},xr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const z=(E.variants??[])[s]?.rule;if(Jt(z,i,u)){const Q=z?.__resolveType??"",be=i[Q],Ie=typeof be?.name=="string"?be.name:Q,{__resolveType:he,...ue}=t;B.mutate({blockKey:Q,data:Ft(he??"",ue,Ie)},{onSuccess:()=>k?.(),onError:B.reportError});return}const ne=xs(E,s,t),J=[...o];J[n]=Bt(h,j,ne);const Ne=ln(i,l,J,R,f);B.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:B.reportError})},xn(g)))},Ta=t=>{Ge(t);const n=t?Ao(t,u):{__resolveType:Zr(u)};Fe(t?n:{}),xr(n)},Aa=t=>{const n=t;Fe(n);const s=Zt?{__resolveType:Zt,...n}:{...n};xr(s)},Na=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=await In(t,i,M=>{const z=o[n],ne=a[n];if(!z||!ne?.isMultivariate)return null;const J=pt(z,ne);if(!J)return null;const Ne=[...o];return Ne[n]=Bt(z,ne,xs(J,s,M)),{blockKey:l,data:ln(i,l,Ne,R,f)}});if(!h)return;const{resolveType:j,formValue:E}=Ut(h.rule,h.projected,u??void 0);Ge(j),Fe(E),k?.()},Ca=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(n===null||!l)return;const h=o[n],j=a[n];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=Dt(M[s]?.rule,i,u),ne=cn(t),J=xs(E,s,ne),Ne=[...o];Ne[n]=Bt(h,j,J);const Q=ln(i,l,Ne,R,f),be={...i,[l]:Q},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);Ge(Ie),Fe(he);try{await B.mutateAsync({blockKey:l,data:Q}),z&&z!==t&&await Gt(z,be),k?.()}catch(ue){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(ue))})}};if(!G&&!oe)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.noPageFound",{currentPath:V})});if(G&&!rs)return r.jsx("div",{className:"h-full w-full flex items-center justify-center text-sm text-muted-foreground",children:c("sectionsEditor.sectionsEditor.globalBlockNotFound")});const Re=m!==null?ce[m]??null:null,_r=m!==null?K[m]:null,kr=_r&&Re?.isMultivariate?pt(_r,Re):null,Vt=kr?Qr(kr,we,g):[],Ln=Math.min(De,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=Re?.isMultivariate===!0,ps=m!==null&&Re!==null,At=ps&&(Tt||!!(Fn&&Xe)),Pa=At&&!G&&Re?.isSavedBlock===!0,ft=G||Pa,wr=G?Us:Re?.label??"",Ba=Zt&&u?qn(Zt,u):null,jr=(t,n)=>n&&X?`${t} · ${n}`:t,Rr=Re?Re.variantOf??Re.label:"",Ka=(()=>{const t=Tt&&kt?kt.label:null;return t?X?[jr(Rr,t)]:[Re.label,t]:[Re?.label??""]})(),hs=jr(oe?.name??"",yt?Se?.label:null),On=At&&(!G||D.length>0)?G?[Us,...D]:[hs,...Ka,...D]:[],Er=je&&oe?[oe.name,"SEO",...Ms]:[],Vr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Tr=Qt&&oe?[oe.name,Vr]:Lt&&oe&&Re?[hs,Rr,Vr]:[],zn=Tr.length>0?Tr:Er.length>0?Er:ft?On.length>0?On:[wr]:On.length>0?On:[hs],Ar=ps&&!Tt&&!Re?.isHidden&&!!y,Ma=ft||!G&&yt&&!!Se||Ar,Da=ps&&!Tt&&!G&&D.length===0&&!!Re&&Mo(Re)&&!!y,Fa=X&&At&&!Lt&&Tt&&D.length===0&&!!kt,Nr=X&&D.length>0?co(D[D.length-1]):null,Ia=D.length>1?co(D[D.length-2]):null,Cr=ft?wr:At?Re?.label??"":oe?.name??"",La=Qt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):je?c("sectionsEditor.panelSections.seo"):Nr??Cr,Pr=Lt?Re?.variantOf??Re?.label??"":Qt||je?oe?.name??"":Nr?Ia??Cr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?oe?.name??"":oe?.path??"",gs=!Qt&&!Lt&&!je&&!At&&!ft,Oa=!X&&!je&&!G&&Tt&&D.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=vc(t.sections,K,u,g);if(!n)return;const{sections:s,newVariantIndex:o}=n;B.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{fe(o),L(null),A(null),H(null),T([]),se(null),ee(null)},onError:B.reportError})},$n=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const o=d[y],a=o.sections;if(!a||typeof a!="object"||Array.isArray(a))return;const i=a;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=yc(i,l),R={...d,[y]:{...o,sections:f}};B.mutate({blockKey:y,data:R[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const j of h)await Gt(j,R)})()},onError:B.reportError})},Br=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),fe(s);const o=Yn(pe.map(a=>({rule:a.rule})),t,n);is(o,s),$n(a=>Yn(a,t,n))},Kr=t=>{const n=pe[t]?.rule,s=Dt(n,d??{},u??void 0);$n(o=>o.length<=1?null:(o.splice(t,1),o),()=>{pe.length-1===1?fe(0):t<te?fe(te-1):t===te&&fe(Math.max(0,t-1)),L(null),A(null),H(null),T([]),se(null),ee(null)},s)},za=()=>{const t=pe.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!wi(n.rule)).map(({variant:n})=>Dt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=Oi({variants:n}),o=n[s];return o?[{...o,rule:zi(u)}]:null},()=>{fe(0),L(null),A(null),H(null),T([]),se(null),ee(null),Vn(!1)},t)},Mr=t=>{let n=t+1;$n(s=>(n=Xr(s,t,g),bc(s,t,g)),()=>{fe(n),L(null),A(null),H(null),T([]),se(null),ee(null)})},$a=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,o=re.current.decofile;if(!s)return;const a=o[s],i=a.sections;if(!i||typeof i!="object"||Array.isArray(i))return;const l=i;if(!Array.isArray(l.variants))return;const f=[...l.variants],R=f[t];if(!R?.rule||typeof R.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=R.rule,j=n.trim();en(!0);try{if(!j){if(!Jt(h,o,u)){F(null);return}const Q=h.__resolveType??"";f[t]={...R,rule:Ts(h,o,u)};const be={...o,[s]:{...a,sections:{...l,variants:f}}};await B.mutateAsync({blockKey:s,data:be[s]}),await Gt(Q,be),F(null),k?.();return}const E=As(h,o,u);if(!E){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await B.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,j)}),F(null),k?.();return}const M=Jn(j),z=Qn(M,o,u);if(z){W.error(z);return}const ne=Ft(E.resolveType,E.data,j);let J=null,Ne=!1;try{const Q=await B.mutateAsync({blockKey:M,data:ne,create:!0});Ne=Un(Q),J=Ne?null:M,f[t]={...R,rule:cn(M)},await B.mutateAsync({blockKey:s,data:{...a,sections:{...l,variants:f}}}),J=null}catch(Q){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Q}F(null),Ne||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:j})),k?.()}catch(E){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(E))})}finally{en(!1)}},Ha=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:R}=re.current;if(s===null||!l)return;const h=o[s],j=a[s];if(!h||!j?.isMultivariate)return;const E=pt(h,j);if(!E)return;const M=E.variants??[],z=M[t];if(!z?.rule||typeof z.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,J=n.trim();en(!0);const Ne=async Q=>{const be={...E,variants:Q},Ie=[...o];Ie[s]=Bt(h,j,be);const he=ln(i,l,Ie,R,f);return await B.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Ze=ne.__resolveType??"",Nt=[...M];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await Gt(Ze,Ct),O(null),k?.();return}const Q=As(ne,i,u);if(!Q){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Q.blockKey){await B.mutateAsync({blockKey:Q.blockKey,data:Ft(Q.resolveType,Q.data,J)}),O(null),k?.();return}const be=Jn(J),Ie=Qn(be,i,u);if(Ie){W.error(Ie);return}const he=Ft(Q.resolveType,Q.data,J);let ue=null,qe=!1;try{const Ze=await B.mutateAsync({blockKey:be,data:he,create:!0});qe=Un(Ze),ue=qe?null:be;const Nt=[...M];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ue=null}catch(Ze){throw ue&&await Pn.mutateAsync({blockKey:ue}).catch(()=>{}),Ze}O(null),qe||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Q){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(Q))})}finally{en(!1)}},Dr=async(t,n,s)=>{A(s);try{await B.mutateAsync({blockKey:t,data:s})}catch(o){throw A(a=>a===s?n:a),o}},Wa={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n],f=l?.rule&&typeof l.rule=="object"?l.rule:void 0,R=async j=>{const E={...t,variants:j};return await Dr(o,t,E),{...a,[o]:E}},h=Mc(f,s,a,u);if(h.kind!=="noop"){if(h.kind==="error"){W.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const M=[...i];M[n]={...l,rule:h.inlinedRule};const z=await R(M);await Gt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await B.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let j=null,E=!1;try{const M=await B.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Un(M),j=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await R(z),j=null}catch(M){throw j&&await Pn.mutateAsync({blockKey:j}).catch(()=>{}),M}E||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(j){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Mt(j))})}finally{en(!1)}}},selectGlobal:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Dt(l.rule,a,u);i[n]={...l,rule:cn(s)};const R={...t,variants:i},h={...a,[o]:R};try{await Dr(o,t,R),f&&f!==s&&await Gt(f,h),k?.()}catch(j){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Mt(j))})}},selectNamedRule:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:o,decofile:a}=re.current;if(!o)return;let i=null;!await In(s,a,f=>{const R=Array.isArray(t.variants)?[...t.variants]:[],h=R[n];return h?(R[n]={...h,rule:f},i={...t,variants:R},{blockKey:o,data:i}):null})||!i||(A(i),k?.())}},Fr=()=>{Ht(),g&&$t(null,-1,0)},Ir=t=>{dn(t),ds({inner:t})},Lr=t=>{An(t),ds({raw:t})},Or=()=>{dn(null),Ot([])},zr=()=>Yt(t=>t+1),$r=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1),ge?.()},Ga=()=>{Vn(!1),Tn(!1),L(null),un(!0)},qa=()=>{je&&$r(),L(null),Vn(!0)},Ua=()=>Tn(!0),vs=t=>{if(Qt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&L(null);return}if(je){if(t===0){$r();return}if(t===1){Ot([]),Yt(s=>s+1);return}Ot(Ms.slice(0,t-1)),Yt(s=>s+1);return}if(G){T(D.slice(0,t)),$(s=>s+1);return}if(t===0){Fr();return}if(t===1){T([]),$(s=>s+1);return}const n=!X&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(D.slice(0,t-1-n))},ys=zn.length>1?r.jsx("button",{type:"button",onClick:()=>vs(vl(zn.length,{isMultivariateSectionTop:Oa})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("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",ft?"text-foreground/80 hover:bg-global-section/15":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:r.jsx(Yi,{className:"size-4"})}):null,Ja=ft||At||je?Ma&&r.jsxs("div",{className:le("border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[r.jsxs("div",{className:"flex min-w-0 items-center gap-2 overflow-hidden",children:[!G&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Fr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.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",ul),children:[r.jsx(cl,{rule:js(Se.rule,d??{},u??void 0),matchers:sn}),r.jsx("span",{className:"max-w-[160px] truncate",children:Se.label})]}),r.jsx("div",{className:"flex-1"}),ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Ar&&r.jsx(Gn,{onClick:()=>Sn()})]}),ft&&r.jsx("p",{className:"mt-1.5 py-1.5 pl-1 text-sm leading-snug text-foreground",children:c("sectionsEditor.sectionsEditor.globalSectionBanner")})]}):r.jsxs("div",{className:"flex items-center gap-2 border-b px-3 py-2.5",children:[r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr,variant:"header"})}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:()=>un(!0),children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>Le&&y?Le():bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Gn,{onClick:bn})]}),Qa=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsx(mo,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Hr=r.jsxs(r.Fragment,{children:[r.jsx(dl,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:ur,onRename:O,onDuplicate:Ra,onDelete:ja,onRemoveAll:dr,onReorder:Ea,onAdd:()=>Sn()}),r.jsx(mo,{children:r.jsx(ks,{currentRt:Zt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:Ta,onSelectGlobal:Ca,named:ms(kt?.rule,Na),namedRow:ws(kt?.rule,Wt),rule:kt?.rule,schema:Ba,formValue:Wo,onChange:Aa,formKey:`${m??"none"}:${Ln}:${Zt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr=r.jsx("div",{className:le(X?"px-2":"p-2 pt-3"),children:r.jsx(Bc,{listKey:`${y??""}-${te}`,rawSections:K,sections:ce,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{ga(t),Je?.(t)},onReorder:va,onDelete:ya,onDuplicate:Sa,onMakeReusable:Ve,onToggleHidden:ba,onToggleLazy:rt?xa:void 0,onAddVariant:Sn,onDetach:_a,onAddSection:()=>We(!0),canAddSection:mr})}),Ya=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&oe&&r.jsx(uo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:lr}),nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Za=r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"min-w-0 max-w-full overflow-x-hidden px-6 py-4",children:r.jsx("div",{className:"mx-auto max-w-2xl",children:nn&&y?r.jsx(Vo,{rawSeo:Kn,innerSeo:as,defaultResolveType:Qs,seoTypesLoading:g&&!u,seoSchema:Ys,activeResolveType:Mn,seoTypeOptions:Js,formResetKey:Ds,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Xa=r.jsxs(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(fo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Br,onRename:F,onDuplicate:Mr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsxs("div",{className:le("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>$o(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-accent","aria-expanded":En,children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:c("sectionsEditor.sectionsEditor.variantRule")}),En?r.jsx(qi,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(Ui,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:le("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Dt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:gr,onSelectGlobal:br,named:ms(Se?.rule,Sr),namedRow:ws(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr]},"editor-section-list");return r.jsx(ic,{value:g,children:r.jsx(fl,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(X||zn.length>1)&&r.jsx(Hi,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:le("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&ys,ft&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Zn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),r.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r.jsx("span",{className:"truncate text-sm font-semibold",children:La}),Pr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Pr})]}),gs&&yt&&Se&&r.jsx(po,{variants:pe,activeIndex:te,onSelect:cs,onManage:qa,onRemoveAll:za}),Fa&&r.jsx(po,{variants:Vt,activeIndex:Ln,onSelect:ur,onManage:Ua,onRemoveAll:dr}),gs&&!yt&&r.jsx(Gn,{onClick:bn}),Da&&r.jsx(Gn,{onClick:()=>Sn()}),r.jsx(ml,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.editSeo"),className:"shrink-0",onClick:Ga,children:r.jsx(io,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(jt,{children:[r.jsx(Rt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"outline",size:"icon-sm","aria-label":c("sectionsEditor.sectionsEditor.viewJson"),className:"shrink-0",onClick:()=>bt(!0),children:r.jsx(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Ja}),ut&&r.jsx(mi,{open:!0,fields:pi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:$s!==null,fresh:ut.fresh,keepTyping:g,onChoose:(t,n)=>ha({...ut.choices,[t]:n}),onApply:pa},Ic(ut.formBase)),Lt?r.jsx(ho,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Tt&&Vt.length>0&&D.length===0&&Hr,r.jsx(To,{value:yr,children:r.jsx(go,{value:G&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr,onVariantMatcherOp:G?Wa:void 0})})})]},"editor-section-form"):G?r.jsx(an,{viewportRef:me,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(To,{value:yr,children:r.jsx(go,{value:G&&g?Be:null,children:r.jsx(vo,{activeSchema:Fn,formValue:Xe,formResetKey:Me,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr})})})},"editor-global-block"):je?X?r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Ya})},"editor-seo"):Za:Qt?r.jsx(ho,{onAdd:bn,children:Qa},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Wr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:mr,onAddSection:()=>We(!0)})})]},"editor-section-list"):Xa,r.jsx(pl,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(ce[ie]?.label??""):"",isPending:B.isPending,onSubmit:Va}),ot&&r.jsx(ec,{open:Ae,onOpenChange:t=>{We(t),t||(Rn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:wa}),ht&&y&&d&&r.jsx(nc,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(yo,{open:!0,initialName:Jt(pe[Te]?.rule,d??{},u??void 0)?_n(pe[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(pe[Te]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await $a(Te,t)},onOpenChange:t=>{!t&&!Xt&&F(null)}}),tt!==null&&r.jsx(yo,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(js(Vt[tt]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await Ha(tt,t)},onOpenChange:t=>{!t&&!Xt&&O(null)}})]})})})}export{xf as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-DDDWDv4s.js";import{V as a}from"./index-CxjuNZbg.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as u,r as g,j as n,J as G,a0 as F,a as E,l as O,b as P,n as y,L as H}from"./index-DDDWDv4s.js";import{C as M}from"./chat-context-BVOzxL7y.js";import{C as x}from"./index-CY0csw6V.js";import{L}from"./index-C_OpZGYh.js";import{B as V}from"./blocks-preview-workspace-context-CzI6HAkj.js";import{e as T,p as J,s as K,a as W,r as U,T as $,u as R,b as z}from"./site-editor-toast-DCLSfuYN.js";import{u as q,L as B,P as Q,S as X}from"./preview-tab-Cm6SZitV.js";import{C as Y}from"./content-tab-xOpBPR9g.js";import{T as Z}from"./tab-icon-glyph-X8r_SUyr.js";import{r as tt}from"./resolve-tab-icon-DEOb6228.js";import ot from"./agent-site-editor-CqHVUUAC.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./thread-route-D0a5VvFp.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./use-entitlements-B129mOCR.js";import"./use-ai-providers-C9vcyTaN.js";import"./use-decopilot-events-DYaMckqi.js";import"./use-mobile-CEHdcOx8.js";import"./use-sidebar-collapsed-BpkHLNx1.js";import"./use-chat-layout-state-mgFqTgen.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./UserSquare-DUXP0rwX.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./toolbar-icon-button-Cf4mp3st.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./sheet-CJ8R5cz8.js";import"./resizable-CaTV7JDr.js";import"./core.esm-DUcC46mO.js";import"./sortable.esm-CFU3AjR2.js";import"./context-menu-dgkpoBmD.js";import"./create-organization-dialog-CG0hKl_H.js";import"./form-CuAETLLt.js";import"./project-apps-CY9tfRYe.js";import"./use-recent-apps-CmtYzKJF.js";import"./feedback-BqoIMOg7.js";import"./textarea-bQEpPrrj.js";import"./sandbox-url-D3mC8qhT.js";import"./use-sandbox-events-9oqLSRsO.js";import"./use-blocks-v8-project-Byep-1Pa.js";import"./use-voice-input-Br5vij9C.js";import"./popover-B_j0y2h7.js";import"./index-D1w7KFj7.js";import"./checkbox-x2IxTucq.js";import"./select-CCUqWhU2.js";import"./index-BdQq_4o_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./utils-B_l1jy6k.js";import"./sandbox-git-api-DJ1Zj_fI.js";import"./save-status-BvsiA7U3.js";import"./use-never-published-CT51G1NV.js";import"./hosted-reconcile-C2j-K6SC.js";import"./blocks-tab-states-Uq85dLE5.js";import"./empty-state-CxI5dssp.js";import"./search-input-CTHDb7Fb.js";import"./tabs-DSwAq5ok.js";import"./active-indicator-CCMhAsc_.js";import"./use-file-configs-Dee9WDV4.js";import"./asset-utils-BSepCiAa.js";import"./usage-stats-DyA2nNO3.js";import"./tool-namespace-DqMAELKh.js";import"./utils-CVEq3hMx.js";import"./markdown-D5a0osui.js";import"./use-copy-C87hppcx.js";import"./switch-C6GSkMRa.js";import"./toggle-group-D7egmHqH.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./sandbox-lifecycle-context-DAW3x9U4.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./frame-navigation-D2IzuXnb.js";import"./variant-matcher-override-CEpfOStd.js";import"./section-array-field-B-W5rSAO.js";import"./use-fast-preview-draft-url-C1985-Ir.js";import"./parse-sections-yZQqTgrz.js";import"./held-block-view-Clis5U4a.js";import"./calendar-RX4MUBCU.js";import"./editor-classes-De5o_8lB.js";import"./empty-message-D92Pb6fP.js";import"./pair-Fhnk8ar3.js";import"./collapsible-CmQt_iZ0.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BgUWGow9.js";import"./types-DcXrDLzi.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-C4wZIedX.js";import"./use-mcp-prompts-Dlq8VH38.js";import"./use-thread-outputs-WMuzypnI.js";import"./file-type-icon-Dnh_2HcY.js";import"./named-rule-step-BTqgnNQ5.js";import"./slider-DGrjjZbc.js";import"./index-CBYIpf8n.js";import"./tooltipContext-BM-E9VBq.js";import"./CategoricalChart-DhUmp4Jo.js";import"./index-54RE0ioE.js";import"./combobox-B7xBLEqp.js";import"./scroll-area-BIbpYC_e.js";import"./monaco-editor-CwGsSUX8.js";import"./editor-ChiPsACh.js";import"./useQueries-BN4ZsbwM.js";import"./device-hint-CmMhxStN.js";import"./alert-BA8nDu40.js";import"./virtual-mcp-BFUo5OwK.js";import"./url-slug-DGizFeaX.js";import"./app-preview-url-9Od4s8Sz.js";import"./agent-capabilities-DSfvUGIA.js";import"./preview-source-BsRLGWUP.js";import"./use-task-metadata-BOYPl3PT.js";import"./delete-copy-BLgf78Hs.js";import"./category-tree-CYPMeaO5.js";import"./use-move-blocks-BroyCilU.js";import"./index-CldZuS5S.js";import"./view-header-CX8g-yAR.js";import"./use-cms-publish-actions-JTIsBKu7.js";import"./use-content-sync-DX9AICcw.js";import"./use-delete-block-Bl87-vdk.js";import"./item-actions-DjxeOUUN.js";import"./date-utils-CrvIKg-s.js";import"./badge-BpUJoM3p.js";import"./empty-state-BcZKaOw-.js";import"./mustache-BVD8gEp8.js";import"./collection-table-wrapper-lwnrgmvl.js";import"./table-CGK_amHI.js";import"./site-draft-actions-DvTjz5UN.js";import"./separator-W-jiHDRf.js";import"./cms-store-drafts-DDyrwrmA.js";import"./serial-task-queue-CGOeQgpr.js";import"./index-BATsrbDm.js";import"./input-CFiVVIga.js";import"./icon-button-D8OdW1Ng.js";import"./chat-draft-DCJJT_1i.js";import"./use-deco-credits-B_yRwpIs.js";import"./input-CBsHXM-K.js";import"./suggestion-C25G9PiT.js";import"./use-org-fs-CLPhRw3y.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-ljVyCUfx.js";import"./plan-ladder-CM-HcM-s.js";import"./add-connection-dialog-B8fK5SPo.js";import"./extract-connection-data-DwWq6VY0.js";import"./metadata-D72DunRR.js";import"./connection-CLrwGffq.js";import"./connection-card-CG85F9R4.js";import"./connection-slug-BC6vEqea.js";import"./schema-CPDsJI-V.js";import"./connection-form-helpers-Du6e-sDu.js";import"./authenticate-and-persist-oauth-osQ4PKuX.js";import"./mcp-oauth-COyT3l0E.js";import"./mcp-oauth-CU691SiC.js";import"./collection-tabs-ZWO3GiY3.js";import"./use-infinite-scroll-CRqa_9m8.js";import"./useSuspenseInfiniteQuery-BhOGXRBX.js";import"./use-task-board-events-De0Ql0Pn.js";import"./save-changes-debug-nBi-n9eV.js";import"./site-draft-view-DKi9gDFG.js";import"./blog-view-gate-BjGoFrlO.js";function I(o){return o.kind==="unavailable"&&o.source==="local"&&(o.problem?.reason??"not-answering")==="not-answering"}const et=o=>o;function it(o){const t=u.c(10),{candidates:e,invalidLink:c,shell:m,editor:i}=o,r=c===void 0?!1:c,s=m===void 0?et:m,[p,l]=g.useState(null);if(p){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(null),t[0]=f):f=t[0];let h;return t[1]!==p||t[2]!==i?(h=i(p,f),t[1]=p,t[2]=i,t[3]=h):h=t[3],h}let a;t[4]!==e||t[5]!==r?(a=n.jsx(rt,{candidates:e,invalidLink:r,onConnect:l}),t[4]=e,t[5]=r,t[6]=a):a=t[6];let d;return t[7]!==s||t[8]!==a?(d=s(a),t[7]=s,t[8]=a,t[9]=d):d=t[9],d}function rt(o){const t=u.c(17),{candidates:e,invalidLink:c,onConnect:m}=o,i=c===void 0?!1:c,[r]=G(),{language:s}=r;let p;t[0]!==m?(p=N=>m({endpoint:N}),t[0]=m,t[1]=p):p=t[1];let l;t[2]!==e||t[3]!==p?(l={candidates:e,onFound:p},t[2]=e,t[3]=p,t[4]=l):l=t[4];const a=q(l),{state:d,access:f,needsGesture:h}=a;let k;t[5]!==e||t[6]!==s?(k=new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(e.map(T)),t[5]=e,t[6]=s,t[7]=k):k=t[7];const C=k;let S;t[8]!==f||t[9]!==a.start||t[10]!==h||t[11]!==d?(S=f==="denied"?{kind:"denied"}:h?{kind:"needs-gesture",onStart:a.start}:d.problem?{kind:"problem",problem:d.problem,host:T(d.problem.endpoint)}:{kind:"looking",paused:d.status==="paused"},t[8]=f,t[9]=a.start,t[10]=h,t[11]=d,t[12]=S):S=t[12];const _=S;let j;return t[13]!==C||t[14]!==i||t[15]!==_?(j=n.jsx(B,{wait:_,hosts:C,invalidLink:i}),t[13]=C,t[14]=i,t[15]=_,t[16]=j):j=t[16],j}const v="deco-serve",w="working-tree",nt={id:"",slug:"",name:"",logo:null},st={id:v,slug:v},mt={virtualMcpId:v,taskId:null,openTask:()=>{},createTask:()=>"",createTaskWithMessage:()=>{},activeTask:null,isThreadLocked:!1,lockedHarness:null,lockedBranch:null,currentBranch:w,setCurrentTaskBranch:()=>{}};function pt(){const o=window.location.hash,t=new URLSearchParams(o.replace(/^#/,"")).has("endpoint"),e=t?J(o):null;return t&&window.history.replaceState(null,"",window.location.pathname+window.location.search),e&&K(e),{candidates:W(e,U()),invalidLink:t&&!e}}const at=[{id:"site-editor",to:"/site-editor",label:"preview"},{id:"content",to:"/site-editor/content",label:"content"}];function ct(){const o=u.c(6),t=P();let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:lt},o[0]=e):e=o[0];const c=O(e);let m;o[1]!==t||o[2]!==c?(m=at.map(r=>n.jsx(y.Tab,{asChild:!0,active:c==="content"==(r.id==="content"),children:n.jsxs(H,{to:r.to,activeOptions:{exact:!0},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(Z,{icon:tt({tabId:r.id,kind:"system",connections:[]})})}),t(`common.mainPanelTabs.${r.label}`)]})},r.id)),o[1]=t,o[2]=c,o[3]=m):m=o[3];let i;return o[4]!==m?(i=n.jsx(y.Tabs,{children:m}),o[4]=m,o[5]=i):i=o[5],i}function lt(o){return o.matches.at(-1)?.staticData.siteEditorView}function A(o){const t=u.c(14),{children:e}=o,c=P(),{connection:m}=z(v),i=R(v,w);let r,s;if(t[0]!==i||t[1]!==e||t[2]!==m||t[3]!==c){s=Symbol.for("react.early_return_sentinel");t:{if(r=m?T(m.endpoint):"",i.kind==="protocol"){s=e;break t}if(i.kind!=="unavailable"||I(i)){s=n.jsx(X,{headingLevel:2,waiting:!0,title:c("decoServe.connect.reaching",{host:r})});break t}}t[0]=i,t[1]=e,t[2]=m,t[3]=c,t[4]=r,t[5]=s}else r=t[4],s=t[5];if(s!==Symbol.for("react.early_return_sentinel"))return s;let p;t[6]!==i.problem?(p=i.problem??{reason:"not-answering"},t[6]=i.problem,t[7]=p):p=t[7];let l;t[8]!==r||t[9]!==p?(l={kind:"problem",problem:p,host:r},t[8]=r,t[9]=p,t[10]=l):l=t[10];let a;return t[11]!==r||t[12]!==l?(a=n.jsx(B,{wait:l,hosts:r}),t[11]=r,t[12]=l,t[13]=a):a=t[13],a}function dt(o){const t=u.c(6),{onLost:e}=o,c=R(v,w);let m;t[0]!==c?(m=I(c),t[0]=c,t[1]=m):m=t[1];const i=m;let r,s;return t[2]!==i||t[3]!==e?(r=()=>{i&&e()},s=[i,e],t[2]=i,t[3]=e,t[4]=r,t[5]=s):(r=t[4],s=t[5]),g.useEffect(r,s),null}const D={threadOpen:!1,contentOpen:!0,threadVisibilityExplicit:!1,toggleThread:()=>{},toggleContent:()=>{}};function ut(){const o=u.c(11),{data:t}=E.useSession();let e;o[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ft},o[0]=e):e=o[0];const c=O(e),m=!!t?.user;let i;o[1]!==m?(i={rail:m},o[1]=m,o[2]=i):i=o[2];const r=c??"preview";let s,p,l;o[3]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(ct,{}),p=n.jsx(x.Thread,{children:null}),l=n.jsx(ot,{}),o[3]=s,o[4]=p,o[5]=l):(s=o[3],p=o[4],l=o[5]);let a;o[6]!==r?(a=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:r,contentNavigation:s,children:[p,l]})}),o[6]=r,o[7]=a):a=o[7];let d;return o[8]!==i||o[9]!==a?(d=n.jsx(L,{outsideOrg:i,children:a}),o[8]=i,o[9]=a,o[10]=d):d=o[10],d}function ft(o){return o.matches.at(-1)?.staticData.siteEditorView}function ht(o){const t=u.c(8),{children:e}=o,{data:c}=E.useSession(),m=!!c?.user;let i;t[0]!==m?(i={rail:m},t[0]=m,t[1]=i):i=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(x.Thread,{children:null}),t[2]=r):r=t[2];let s;t[3]!==e?(s=n.jsx(L.Content,{children:n.jsxs(x,{...D,threadless:!0,contentKey:"guide",children:[r,n.jsx(x.Content,{children:e})]})}),t[3]=e,t[4]=s):s=t[4];let p;return t[5]!==i||t[6]!==s?(p=n.jsx(L,{outsideOrg:i,children:s}),t[5]=i,t[6]=s,t[7]=p):p=t[7],p}const b=()=>{},vt={connection:null,set:b,clear:b};function fr(){const o=u.c(3),[t]=g.useState(pt);let e;return o[0]!==t.candidates||o[1]!==t.invalidLink?(e=n.jsx(F,{org:nt,project:st,children:n.jsx(it,{candidates:t.candidates,invalidLink:t.invalidLink,shell:kt,editor:xt})}),o[0]=t.candidates,o[1]=t.invalidLink,o[2]=e):e=o[2],e}function xt(o,t){return n.jsxs($.Provider,{value:{connection:o,set:b,clear:b},children:[n.jsx(dt,{onLost:t}),n.jsx(M,{value:mt,children:n.jsx(V,{children:n.jsx(ut,{})})})]})}function kt(o){return n.jsx($.Provider,{value:vt,children:n.jsx(ht,{children:o})})}function hr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Q,{virtualMcpId:v})}),o[0]=t):t=o[0],t}function vr(){const o=u.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(A,{children:n.jsx(Y,{virtualMcpId:v})}),o[0]=t):t=o[0],t}export{vr as SiteEditorContent,hr as SiteEditorPreview,fr as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,a4 as n,j as r,K as f}from"./index-DDDWDv4s.js";import{C as d}from"./index-CY0csw6V.js";import{m as u,P as x,T as h}from"./mock-board-CSrbkqG4.js";import{F as j}from"./feature-gate-qgzTBO3A.js";import"./use-mobile-CEHdcOx8.js";import"./use-sidebar-collapsed-BpkHLNx1.js";import"./use-chat-layout-state-mgFqTgen.js";import"./thread-route-D0a5VvFp.js";import"./use-view-draft-kind-BG2f-NWf.js";import"./use-project-scope-dsKJBAry.js";import"./repository-binding-DAYbvLYj.js";import"./use-mcp-client-b044lJnb.js";import"./auth-DiKlrdGP.js";import"./use-organization-settings-CdJMCbcP.js";import"./schema-B5L6XabR.js";import"./task-board-DGEnY-WP.js";import"./thread-intent-SBN04Rtw.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-CkVyQC5r.js";import"./agent-icon-DFd8L1O_.js";import"./AlertCircle-D1QqLKFH.js";import"./Tool01-AMJ0J7Ld.js";import"./ArrowUp-BVEp2Brj.js";import"./ArrowLeft-B_zuPCk3.js";import"./LinkBroken01-ChDYryt0.js";import"./BookOpen01-DU_gf3Q9.js";import"./Globe04-BIxVPRI2.js";import"./CheckCircle-r_uvA104.js";import"./ChevronUp-fKdis79A.js";import"./ChevronSelectorVertical-Cnj6Mtq0.js";import"./UserSquare-DUXP0rwX.js";import"./CreditCard01-2UGmTwp0.js";import"./SwitchHorizontal01-D7pFOqnZ.js";import"./Key01-B-uaWiXd.js";import"./Minus-eMZySqLh.js";import"./Monitor01-CzcVShIo.js";import"./Sun-wrM9Jol_.js";import"./Play-DK3U1VA7.js";import"./Plus-BNdH4tYy.js";import"./SearchMd-DWnwnZQO.js";import"./ShoppingBag01-BrAbYbaG.js";import"./Trash01-Chu35sQ_.js";import"./Upload01-CGdoFUP8.js";import"./Users01-BnTqMUrr.js";import"./XClose-BAfH6Ebz.js";import"./Zap-YDxTdktJ.js";import"./tooltip-7WjUlVHN.js";import"./index-DxWwCAMV.js";import"./toolbar-icon-button-Cf4mp3st.js";import"./shell-layout-DHcyl3tS.js";import"./use-deployment-admin-C8Pxnc-A.js";import"./admin-fetch-BhTJlAsX.js";import"./command-C00hDMwB.js";import"./index-Ch7SvmMC.js";import"./integration-icon-D5RK2sEk.js";import"./project-icon-DNEfBFoN.js";import"./use-navigate-to-agent-Kz2oOKmA.js";import"./use-debounced-value-CPkVN80B.js";import"./new-project-dialog-BiqAeUrE.js";import"./label-EESrxoYH.js";import"./repository-picker-BO6sLOq7.js";import"./github-icon-D0vbU4b9.js";import"./useInfiniteQuery-o37Jr6S0.js";import"./infiniteQueryObserver-ktArfc_t.js";import"./collection-search-kFWWyWV8.js";import"./legacy-admin-welcome-dialog-DAEkCShw.js";import"./drawer-OboTDl5r.js";import"./required-auth-layout-Dg5kgnfG.js";import"./use-org-sso-DRrVlfwY.js";import"./sheet-CJ8R5cz8.js";import"./resizable-CaTV7JDr.js";import"./core.esm-DUcC46mO.js";import"./sortable.esm-CFU3AjR2.js";import"./use-task-board-analytics-YY743rvT.js";import"./combobox-B7xBLEqp.js";import"./popover-B_j0y2h7.js";import"./use-task-board-prompts-B1rpgS5r.js";import"./badge-BpUJoM3p.js";import"./icon-button-D8OdW1Ng.js";import"./use-org-fs-CLPhRw3y.js";import"./use-automations-BHeTrxpI.js";import"./search-toggle--RSSxY_n.js";import"./context-menu-dgkpoBmD.js";import"./super-agent-icon-BOjAbgwW.js";import"./use-task-board-items-DNUZNAh_.js";import"./config-1WcD3pf5.js";import"./use-task-board-events-De0Ql0Pn.js";import"./use-decopilot-events-DYaMckqi.js";import"./sprints-C1z9xhcL.js";import"./select-CCUqWhU2.js";import"./index-BdQq_4o_.js";import"./task-route-kuDxMB7g.js";import"./task-key-BCHdFiOO.js";import"./project-index--AWJOyZB.js";import"./use-tags-CWDFKR0B.js";import"./feedback-BqoIMOg7.js";import"./calendar-RX4MUBCU.js";import"./alert-BA8nDu40.js";import"./collapsible-CmQt_iZ0.js";import"./use-copy-C87hppcx.js";import"./markdown-D5a0osui.js";import"./chat-context-BVOzxL7y.js";import"./use-entitlements-B129mOCR.js";import"./use-ai-providers-C9vcyTaN.js";import"./index-BTxnnO3z.js";import"./usage-stats-DyA2nNO3.js";import"./tool-namespace-DqMAELKh.js";import"./form-CuAETLLt.js";import"./utils-CVEq3hMx.js";import"./editor-classes-De5o_8lB.js";import"./suggestion-C25G9PiT.js";import"./index-DAjFmo5j.js";import"./index-CldZuS5S.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-task-board-item-prs-CjIgw8Jt.js";import"./use-connection-C4wZIedX.js";import"./github-repo-scope-C58hYmYC.js";import"./thread-sheet-body-DldXKcG5.js";import"./useSuspenseInfiniteQuery-BhOGXRBX.js";import"./pair-Fhnk8ar3.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BgUWGow9.js";import"./types-DcXrDLzi.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-mcp-prompts-Dlq8VH38.js";import"./use-thread-outputs-WMuzypnI.js";import"./file-type-icon-Dnh_2HcY.js";import"./use-infinite-scroll-CRqa_9m8.js";import"./task-status-DwyseT36.js";import"./separator-W-jiHDRf.js";import"./chat-draft-DCJJT_1i.js";import"./feature-paywall-ljVyCUfx.js";import"./plan-ladder-CM-HcM-s.js";function a(){const t=l.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx("div",{className:"flex h-full min-h-0 flex-col overflow-hidden",children:r.jsx(h,{})}),t[0]=o):o=t[0],o}function Ho(){const t=l.c(8),{locator:o}=n();let i;t[0]!==o?(i=c=>c.setQueryData(f.taskBoardItems(o),u()),t[0]=o,t[1]=i):i=t[1];let p;t[2]===Symbol.for("react.memo_cache_sentinel")?(p=r.jsx(a,{}),t[2]=p):p=t[2];let m;t[3]!==i?(m=r.jsx(x,{seed:i,children:p}),t[3]=i,t[4]=m):m=t[4];let e;t[5]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(a,{}),t[5]=e):e=t[5];let s;return t[6]!==m?(s=r.jsx(d.Content,{children:r.jsx(j,{feature:"kanban",backdrop:m,children:e})}),t[6]=m,t[7]=s):s=t[7],s}export{Ho as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as r}from"./index-DDDWDv4s.js";import{b as a}from"./chat-context-BVOzxL7y.js";import{g as i}from"./shell-layout-DHcyl3tS.js";function u(){const t=r.c(3),{sendMessage:s}=a(),{openSidePanel:o}=i();let e;return t[0]!==o||t[1]!==s?(e=n=>{o(),s({parts:[{type:"text",text:n}]})},t[0]=o,t[1]=s,t[2]=e):e=t[2],e}export{u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,du as c}from"./index-DDDWDv4s.js";import{u}from"./repository-binding-DAYbvLYj.js";function a(r){return c(r?.metadata)}function l(r){const t=e.c(2),s=u(r);let o;return t[0]!==s?(o=a(s),t[0]=s,t[1]=o):o=t[1],o}export{a as b,l as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{fI as U,q as xe,b as V,r as L,e as Ae,K as Q,fJ as oe,ea as Ee,fK as Me,fL as le,fM as ae,fN as Oe,fO as Fe,fP as ze,fQ as Le,fR as He,fS as Re,c as H,j as o,x as Ue,aT as $e,w as Be,dY as Ie,R as Qe,v as Ve,D as qe,m as Ge,B as ve,h as _e,t as ke,X as Ye,bu as ce,Y as ee,a7 as We,Z as Je,_ as Ze}from"./index-DDDWDv4s.js";import{u as Xe}from"./use-voice-input-Br5vij9C.js";import{x as Ke,c as et,u as Se,v as tt,ax as it,ay as je,az as nt,aA as _,aB as X,an as rt,aC as st,aD as fe,aE as te,aF as ue,Z as ot,X as lt,Y as at,aG as ct,aH as de,af as ft,aI as ut,y as dt,$ as mt,aJ as ht,aK as pt,aL as gt,a1 as yt}from"./site-editor-toast-DCLSfuYN.js";import{b as xt,h as vt,a as kt,d as me,e as he,f as St,c as jt,g as wt}from"./hosted-reconcile-C2j-K6SC.js";import{z as bt,y as Pt}from"./blocks-tab-states-Uq85dLE5.js";import{s as Ct}from"./sandbox-git-api-DJ1Zj_fI.js";import{u as Nt}from"./chat-context-BVOzxL7y.js";import{b as Dt}from"./sandbox-url-D3mC8qhT.js";import{d as Tt}from"./utils-B_l1jy6k.js";import{d as At}from"./delay-CnY5UFtP.js";import{i as Et}from"./AlertCircle-D1QqLKFH.js";import{P as Mt,e as Ot}from"./agent-icon-DFd8L1O_.js";import{a as Ft}from"./SwitchHorizontal01-D7pFOqnZ.js";import{b as K}from"./Tool01-AMJ0J7Ld.js";import{i as we}from"./Upload01-CGdoFUP8.js";import{S as zt}from"./search-input-CTHDb7Fb.js";import{T as Lt,a as Ht,c as Rt,b as Ut}from"./tabs-DSwAq5ok.js";import{u as $t}from"./use-debounced-value-CPkVN80B.js";import{a as Bt}from"./use-file-configs-Dee9WDV4.js";import{a as It,u as Qt,i as be,e as Vt,b as pe,f as qt}from"./asset-utils-BSepCiAa.js";import{f as q,M as Gt,c as _t,g as Z}from"./usage-stats-DyA2nNO3.js";function Yt(t,e,i,r={}){return Pe("",t,e,i,r)}function Pe(t,e,i,r,n){if(Y(i,r)||Y(e,r))return i;if(Y(e,i))return r;if(ie(i)&&ie(r)){const s=ie(e)?e:{},c={},f=[...Object.keys(i),...Object.keys(r).filter(h=>!(h in i))];for(const h of f){const p=Pe(`${t}/${Wt(h)}`,s[h],i[h],r[h],n);p!==void 0&&(c[h]=p)}return c}if(Array.isArray(e)&&Array.isArray(i)&&Array.isArray(r)&&i.length===e.length&&r.length===e.length){const s=[];for(const[c,f]of e.entries()){const h=!Y(f,i[c]),p=!Y(f,r[c]);if(h&&p&&!Y(i[c],r[c]))return ge(t,i,r,n);s.push(h?i[c]:r[c])}return s}return ge(t,i,r,n)}function ge(t,e,i,r){return r.conflicts?.push(t),r.prefer==="theirs"?i:e}function Wt(t){return t.replaceAll("~","~0").replaceAll("/","~1")}function Y(t,e){return U(t)===U(e)}function ie(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function Jt(t){return t?1e3:700}function ne(t){return!!t&&typeof t=="object"&&t.keptTheirs===!0}const W=new Map,Zt=20,Xt=200,Kt=1500;function Ce(t){const e=W.get(t);W.delete(t);const i=e??[];if(W.set(t,i),W.size>Xt){const r=W.keys().next().value;r!==void 0&&W.delete(r)}return i}function ei(t,e){const i=Ce(t);i.push(U(e)),i.length>Zt&&i.shift()}function ti(t,e){return Ce(t).includes(U(e))}async function ii(t,e){if(e){if(e.value===void 0)return{[t]:null};try{return{[t]:await Re(e.value)}}catch{return}}}function ni({orgSlug:t,virtualMcpId:e,branch:i},r){const n=xe(),s=Nt()?.taskId??null,c=Ke(e),f=Xe(e).runtime==="cms",{url:h}=et(e),p=Se(e,i),y=p.kind==="protocol"?p:null,u=tt({orgSlug:t,virtualMcpId:e,branch:i}),k=V(),w=y?.source==="github",[m]=L.useState(()=>r?.holdsCopy?new wt(()=>gt(n,u)):null);m?.settle();const g=w?m:null,S=async(l,a,d,j)=>{if(h)return{blockKey:l,data:a};if(f){const v=async($,E)=>{const B=await ii(l,E);return ht({orgSlug:t,virtualMcpId:e,branch:i},{set:{[l]:$},...B?{expect:B}:{}})},b=`${u}:${l}`,P=($,E=[])=>new _($,E.length>0?k("sectionsEditor.sectionsEditor.blockFieldsChangedElsewhere",{fields:He(E)}):k("sectionsEditor.sectionsEditor.blockChangedElsewhere"),E),D=async $=>{await n.invalidateQueries({queryKey:Q.decofile(u)});const E=n.getQueryData(Q.decofile(u))?.[l];if(d&&ti(b,E)&&U(E)!==U(d.value))return await At(Kt),{draft:await v(a,d),written:a};const B=[],G=j&&d?.fromCache?Yt(d.value,a,E,{prefer:"theirs",conflicts:B}):void 0;if(G===void 0||B.length>0)throw P($.blocks,B);const I=oe(G);return{draft:await v(I,{value:E}),written:I}};let R=a,F;try{F=await v(a,d)}catch($){if(!($ instanceof _))throw $;try{({draft:F,written:R}=await D($))}catch(E){throw!(E instanceof _)||E.fields.length>0?E:(await n.invalidateQueries({queryKey:Q.decofile(u)}),P(E.blocks))}}return ei(b,R),ut(n,{orgSlug:t,virtualMcpId:e,branch:i},F),await n.invalidateQueries({queryKey:Ct({orgSlug:t,virtualMcpId:e,branch:i,threadId:s})}),{...F,written:R}}const x=dt(c,Tt(l)),N=JSON.stringify(a,null,2),A=await fetch(Dt({orgSlug:t,virtualMcpId:e,branch:i,threadId:s},"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:x,content:N})});return A.ok?A.json():mt(A,"Write")},C=async(l,a,d,j,x,N)=>{const A=y,v={queryClient:n,backend:A,params:l,cacheKey:u};let b=d,P=x?void 0:N?N.value:j?.value,D=x?{[a]:null}:N?{[a]:await vt(N,Me(n,u,a))}:await kt(v,[a],j?{[a]:j.value}:void 0);for(let R=0;;R++)try{return{...await te(n,A,l,u,{set:{[a]:b}},D),written:b}}catch(F){if(!X(F))throw F;const $=await ue(n,A,l,u,a,F),E=n.getQueryData(Q.decofile(u))?.[a],B=de(n,u,a,A),G=b;if(R+1>=me||!le()||B===void 0||!J(G)||E!==void 0&&!J(E))throw new _([a],R+1>=me?k("siteEditor.save.keptChanging"):k("siteEditor.save.conflict"),[],$);if(D={[a]:B},!J(E)){if(!J(P))continue;if(await ae({kind:"theyDeleted",label:he(a,P,G)})==="theirs")return{keptTheirs:!0,deleted:!0};P=void 0;continue}const I=Oe({ancestor:J(P)?P:{},mine:G,theirs:E}),se=I.pointers.length===0?{}:await Fe(I,ze(I,T(l,E),!0),{block:bt(a,E),author:{draft:l,blockKey:a}});if(b=I.pointers.length===0?I.merged:Le(I,se),St(se)&&U(b)===U(E))return{keptTheirs:!0,deleted:!1};P=E}},T=(l,a)=>{const d=a.__resolveType,j=n.getQueryData(ft(l,y));if(typeof d!="string"||!j?.manifest)return null;try{return Pt(d,j)}catch{return null}},z=async(l,a,d,j,x)=>{const N=y,A=n.getQueryData(Q.decofile(u));if(A&&Object.hasOwn(A,a)||!le()||!J(d))return;if(await ae({kind:"theyDeleted",label:he(a,x?.value,d)})==="theirs")return{keptTheirs:!0,deleted:!0};const b=de(n,u,a,N);if(b===void 0)return;const P=await te(n,N,l,u,{set:{[a]:d}},{[a]:b});return j.onApplied?.(P.versions),{...P,written:d}},M=Ae({mutationKey:at(t,e,i),scope:lt(t,e,i),mutationFn:async({blockKey:l,data:a,base:d,rebaseOnConflict:j=!0,guard:x,create:N=!1,edit:A})=>{if(p.kind==="pending"||p.kind==="unavailable")throw rt("CMS storage");if(y?.source!=="github"&&(a=oe(a)),y){const v={orgSlug:t,virtualMcpId:e,branch:i},b=D=>{!g||ne(D)||U(D.written)===U(a)&&D.versions[l]&&g.saved(l,a)};if(w&&!x){const D=await C(v,l,a,d,N,N?void 0:g?.guardOf(l,A));return b(D),D}if(w&&x&&!x.reloadOnConflict){const D=await x.ifMatch(l),R=N||!!D&&D[l]===null;try{const F=await C(v,l,a,d,R,R?void 0:g?.guardOf(l,A));return b(F),x.onApplied?.(ne(F)?{}:F.versions),F}catch(F){throw x.onRejected?.(F),F}}let P=await x?.ifMatch(l);if(x&&!P&&w&&(await st(n,y,v,u).catch(()=>{throw new fe}),P=await x.ifMatch(l),!P))throw new fe;try{const D=await te(n,y,v,u,{set:{[l]:a}},P);return P&&x?.onApplied?.(D.versions),D}catch(D){if(P&&x?.onRejected?.(D),P&&x?.reloadOnConflict&&X(D)){const R=await ue(n,y,v,u,l,D);if(w)try{const F=await z(v,l,a,x,d);if(F)return F}catch(F){if(!X(F))throw F}throw new _([l],k("sectionsEditor.sectionsEditor.blockChangedElsewhere"),[],R)}throw D}}return ot({queryClient:n,orgSlug:t,virtualMcpId:e,branch:i,backend:p,cacheKey:u},{kind:"edit",write:()=>S(l,a,d,j)})},onMutate:async({blockKey:l,data:a})=>{const d=Q.decofile(u);await n.cancelQueries({queryKey:d});const j=n.getQueryData(d),x=!!j&&l in j,N=j?.[l];return n.setQueryData(d,A=>({...A??{},[l]:a})),{queryKey:d,blockKey:l,hadKey:x,previousValue:N}},onError:(l,a,d)=>{nt(k,l),!(!d||l instanceof _)&&(X(l)&&n.invalidateQueries({queryKey:d.queryKey}),n.setQueryData(d.queryKey,j=>{if(!j)return j;if(!d.hadKey){const{[d.blockKey]:x,...N}=j;return N}return{...j,[d.blockKey]:d.previousValue}}))},onSuccess:(l,{blockKey:a,data:d})=>{const j=()=>{if(!g)return;const N=jt({orgSlug:t,virtualMcpId:e,branch:i});Ee.schedule(()=>xt(N,a))};if(ne(l)){it(k,l.deleted,l.deleted&&je(n,u,a)),j();return}const x=l&&typeof l=="object"&&"written"in l?l.written:d;n.setQueryData(Q.decofile(u),N=>({...N??{},[a]:x})),U(x)!==U(d)&&j()}}),O=l=>{if(l.base)return l;const a=n.getQueryData(Q.decofile(u));return a?{...l,base:{value:a[l.blockKey],fromCache:!0}}:l};return{...M,v8:p.kind!=="legacy",mutate:(l,a)=>M.mutate(O(l),a),mutateAsync:(l,a)=>M.mutateAsync(O(l),a),reportError:l=>ct(k,l,y?.source??null),hold:l=>m?.hold(l),holdsCopy:g!==null,autosaveDelay:Jt(y!==null),edited:l=>g?.edited(l),shown:l=>g?.get(l)}}function tn(t,e){const i=H.c(29),r=e?.holdsCopy;let n;i[0]!==r?(n={holdsCopy:r},i[0]=r,i[1]=n):n=i[1];const s=ni(t,n);let c;i[2]===Symbol.for("react.memo_cache_sentinel")?(c=new Map,i[2]=c):c=i[2];const f=L.useRef(c);let h;i[3]===Symbol.for("react.memo_cache_sentinel")?(h=new Map,i[3]=h):h=i[3];const p=L.useRef(h);let y;i[4]===Symbol.for("react.memo_cache_sentinel")?(y=new Map,i[4]=y):y=i[4];const u=L.useRef(y);let k;i[5]===Symbol.for("react.memo_cache_sentinel")?(k=new Set,i[5]=k):k=i[5];const w=L.useRef(k);let m;i[6]===Symbol.for("react.memo_cache_sentinel")?(m=new Set,i[6]=m):m=i[6];const g=L.useRef(m);let S,C;i[7]!==e||i[8]!==s?(S=v=>{if(w.current.has(v)){g.current.add(v);return}const b=f.current.get(v);if(!b)return;const P=typeof b=="function"?b():b;f.current.delete(v);const D=p.current.get(v);p.current.delete(v),P&&(w.current.add(v),s.mutateAsync({blockKey:v,data:P,guard:e?.guard,edit:D}).then(()=>e?.onSaved?.(),s.reportError).finally(()=>{w.current.delete(v),g.current.delete(v)&&S(v)}))},C=()=>{for(const v of u.current.values())clearTimeout(v);u.current.clear();for(const v of[...f.current.keys()])S(v)},i[7]=e,i[8]=s,i[9]=S,i[10]=C):(S=i[9],C=i[10]);const T=C;let z;i[11]===Symbol.for("react.memo_cache_sentinel")?(z=v=>{for(const b of v){const P=u.current.get(b);P&&clearTimeout(P),u.current.delete(b),f.current.delete(b),p.current.delete(b),g.current.delete(b)}},i[11]=z):z=i[11],pt(t.orgSlug,t.virtualMcpId,z);let M,O;i[12]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{const v=b=>{(f.current.size>0||w.current.size>0)&&b.preventDefault()};return window.addEventListener("beforeunload",v),()=>window.removeEventListener("beforeunload",v)},M=[],i[12]=M,i[13]=O):(M=i[12],O=i[13]),L.useEffect(O,M);let l;i[14]!==T||i[15]!==s.holdsCopy?(l=()=>(s.holdsCopy&&T(),s.holdsCopy),i[14]=T,i[15]=s.holdsCopy,i[16]=l):l=i[16];const a=L.useEffectEvent(l);let d;i[17]!==a?(d=()=>{const v=u.current;return()=>{if(!a())for(const b of v.values())clearTimeout(b)}},i[17]=a,i[18]=d):d=i[18];let j;i[19]===Symbol.for("react.memo_cache_sentinel")?(j=[],i[19]=j):j=i[19],L.useEffect(d,j);let x;i[20]!==S||i[21]!==s?(x=(v,b)=>{if(!p.current.has(v)){const D=s.edited(v);D&&p.current.set(v,D)}f.current.set(v,b);const P=u.current.get(v);P&&clearTimeout(P),u.current.set(v,setTimeout(()=>{u.current.delete(v),S(v)},s.autosaveDelay))},i[20]=S,i[21]=s,i[22]=x):x=i[22];const N=x;let A;return i[23]!==T||i[24]!==N||i[25]!==s.hold||i[26]!==s.isPending||i[27]!==s.v8?(A={save:N,flush:T,isPending:s.isPending,hold:s.hold,v8:s.v8},i[23]=T,i[24]=N,i[25]=s.hold,i[26]=s.isPending,i[27]=s.v8,i[28]=A):A=i[28],A}function J(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}const Ne="file-picker:last-config-id";function nn(t){const e=H.c(31),i=V(),r=t.open,n=t.onOpenChange;let s;e[0]!==t.mode||e[1]!==i?(s=t.mode==="image"?i("filePicker.filePickerDialog.pickAnImage"):i("filePicker.filePickerDialog.pickAFile"),e[0]=t.mode,e[1]=i,e[2]=s):s=e[2];let c;e[3]!==s?(c=o.jsx(Ue,{children:s}),e[3]=s,e[4]=c):c=e[4];let f;e[5]!==i?(f=i("filePicker.filePickerDialog.description"),e[5]=i,e[6]=f):f=e[6];let h;e[7]!==f?(h=o.jsx($e,{children:f}),e[7]=f,e[8]=h):h=e[8];let p;e[9]!==c||e[10]!==h?(p=o.jsxs(Be,{children:[c,h]}),e[9]=c,e[10]=h,e[11]=p):p=e[11];let y;e[12]!==i?(y=C=>{const{error:T}=C;return o.jsx(ri,{error:T??new Error(i("filePicker.filePickerDialog.failedToLoadBuckets"))})},e[12]=i,e[13]=y):y=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Ie,{className:"h-64 w-full"}),e[14]=u):u=e[14];let k;e[15]!==t?(k=C=>{t.onSelect(C),t.onOpenChange(!1)},e[15]=t,e[16]=k):k=e[16];let w;e[17]!==t.lockedConfigId||e[18]!==t.mode||e[19]!==k?(w=o.jsx(L.Suspense,{fallback:u,children:o.jsx(si,{mode:t.mode,lockedConfigId:t.lockedConfigId,onSelect:k})}),e[17]=t.lockedConfigId,e[18]=t.mode,e[19]=k,e[20]=w):w=e[20];let m;e[21]!==w||e[22]!==y?(m=o.jsx(Qe,{fallback:y,children:w}),e[21]=w,e[22]=y,e[23]=m):m=e[23];let g;e[24]!==m||e[25]!==p?(g=o.jsxs(Ve,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[p,m]}),e[24]=m,e[25]=p,e[26]=g):g=e[26];let S;return e[27]!==t.onOpenChange||e[28]!==t.open||e[29]!==g?(S=o.jsx(qe,{open:r,onOpenChange:n,children:g}),e[27]=t.onOpenChange,e[28]=t.open,e[29]=g,e[30]=S):S=e[30],S}function ri(t){const e=H.c(3),{error:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(Et,{size:16}),e[0]=r):r=e[0];let n;return e[1]!==i.message?(n=o.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[r,o.jsx("span",{className:"text-sm font-medium",children:i.message})]}),e[1]=i.message,e[2]=n):n=e[2],n}function si(t){const e=H.c(32),{mode:i,lockedConfigId:r,onSelect:n}=t,s=Bt();if(s.length===0){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ai,{}),e[0]=m):m=e[0],m}if(r){let m;if(e[1]!==s||e[2]!==r){let S;e[4]!==r?(S=C=>C.id===r,e[4]=r,e[5]=S):S=e[5],m=s.find(S),e[1]=s,e[2]=r,e[3]=m}else m=e[3];const g=m;if(g){let S;return e[6]!==g||e[7]!==i||e[8]!==n?(S=o.jsx(re,{config:g,mode:i,onSelect:n}),e[6]=g,e[7]=i,e[8]=n,e[9]=S):S=e[9],S}}if(s.length===1){const m=s[0];let g;return e[10]!==m||e[11]!==i||e[12]!==n?(g=o.jsx(re,{config:m,mode:i,onSelect:n}),e[10]=m,e[11]=i,e[12]=n,e[13]=g):g=e[13],g}let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=typeof window<"u"?window.localStorage.getItem(Ne):null,e[14]=c):c=e[14];const f=c;let h;e[15]!==s?(h=s.find(m=>m.id===f)?.id??s[0].id,e[15]=s,e[16]=h):h=e[16];const p=h;let y;e[17]!==s?(y=s.map(oi),e[17]=s,e[18]=y):y=e[18];let u;e[19]!==y?(u=o.jsx(Ht,{className:"self-start",children:y}),e[19]=y,e[20]=u):u=e[20];let k;if(e[21]!==s||e[22]!==i||e[23]!==n){let m;e[25]!==i||e[26]!==n?(m=g=>o.jsx(Rt,{value:g.id,className:"min-h-0 flex-1 overflow-hidden flex flex-col",children:o.jsx(re,{config:g,mode:i,onSelect:n})},g.id),e[25]=i,e[26]=n,e[27]=m):m=e[27],k=s.map(m),e[21]=s,e[22]=i,e[23]=n,e[24]=k}else k=e[24];let w;return e[28]!==p||e[29]!==u||e[30]!==k?(w=o.jsxs(Ut,{defaultValue:p,onValueChange:li,className:"min-h-0 flex-1 flex flex-col",children:[u,k]}),e[28]=p,e[29]=u,e[30]=k,e[31]=w):w=e[31],w}function oi(t){return o.jsx(Lt,{value:t.id,children:t.name},t.id)}function li(t){typeof window<"u"&&window.localStorage.setItem(Ne,t)}function ai(){const t=H.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:o.jsx(we,{size:20,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("filePicker.filePickerDialog.noBucketConfigured"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=o.jsx("p",{className:"font-medium text-sm",children:r}),t[3]=r,t[4]=n):n=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noBucketDescription"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==n||t[10]!==c?(f=o.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,o.jsxs("div",{children:[n,c]})]}),t[9]=n,t[10]=c,t[11]=f):f=t[11],f}function re({config:t,mode:e,onSelect:i}){const r=V(),[n,s]=L.useState(""),c=$t(n,300),f=It({configId:t.id,search:c,imageOnly:e==="image"}),h=Qt(),[p,y]=L.useState(!1),u=L.useRef(null),k=e==="image"?"image/*":void 0;async function w(a){if(!a)return;const d=Array.from(a);if(d.length===0)return;let j=null;const x=[];for(const N of d)try{const A=await h.mutateAsync({configId:t.id,file:N});j??=A.publicUrl}catch(A){x.push(`${N.name} (${A instanceof Error?A.message:"upload failed"})`)}await f.refetch(),x.length>0&&ke.error(x.length===d.length?r("filePicker.filePickerDialog.uploadFailedAll",{errors:x.join("; ")}):r("filePicker.filePickerDialog.uploadFailedSome",{errors:x.join("; ")})),j&&i(j)}function m(a){a.preventDefault(),y(!0)}function g(){y(!1)}function S(a){a.preventDefault(),a.stopPropagation(),y(!1),w(a.dataTransfer.files)}const T=(f.data?.pages??[]).flatMap(a=>a.items),z=T.filter(a=>e==="image"?be(a.key):!0),M=c.trim(),O=T.length>0||n.trim().length>0,l=n!==c||f.isFetching&&!f.isFetchingNextPage;return o.jsxs("div",{className:"flex flex-col gap-3 min-h-0 flex-1",children:[o.jsxs("button",{type:"button",onClick:()=>u.current?.click(),onDragOver:m,onDragLeave:g,onDrop:S,className:Ge("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",p&&"border-primary bg-primary/5",h.isPending&&"opacity-60 pointer-events-none"),children:[o.jsx(we,{size:18,className:"text-muted-foreground"}),o.jsx("p",{className:"text-sm font-medium",children:h.isPending?r("filePicker.filePickerDialog.uploading"):r("filePicker.filePickerDialog.dropFilesOrClick")}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:[r("filePicker.filePickerDialog.uploadSizeLimit")," ",r(e==="image"?"filePicker.filePickerDialog.imagesOnlyTypes":"filePicker.filePickerDialog.commonMediaTypes")]}),o.jsx("input",{ref:u,type:"file",accept:k,multiple:!0,className:"hidden",onChange:a=>{const d=Array.from(a.target.files??[]);a.target.value="",w(d)}})]}),O?o.jsx(zt,{value:n,onChange:s,isSearching:l,placeholder:r(e==="image"?"filePicker.filePickerDialog.searchImagesPlaceholder":"filePicker.filePickerDialog.searchFilesPlaceholder"),className:"shrink-0"}):null,o.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[z.length===0?M?o.jsx(ui,{query:M}):e==="image"&&T.length>0?o.jsx(fi,{}):o.jsx(ci,{}):e==="image"?o.jsx(di,{items:z,onSelect:i}):o.jsx(mi,{items:z,onSelect:i}),f.hasNextPage&&o.jsx("div",{className:"flex justify-center py-4",children:o.jsx(ve,{type:"button",variant:"outline",size:"sm",disabled:f.isFetchingNextPage,onClick:()=>f.fetchNextPage(),children:f.isFetchingNextPage?o.jsxs(o.Fragment,{children:[o.jsx(_e,{className:"size-3.5"}),r("filePicker.filePickerDialog.loading")]}):r("filePicker.filePickerDialog.loadMore")})})]})]})}function ci(){const t=H.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("filePicker.filePickerDialog.noFilesYet"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=o.jsx("p",{className:"text-sm font-medium",children:r}),t[3]=r,t[4]=n):n=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.dropFileToGetStarted"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==n||t[10]!==c?(f=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,n,c]}),t[9]=n,t[10]=c,t[11]=f):f=t[11],f}function fi(){const t=H.c(12),e=V();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("filePicker.filePickerDialog.noImagesYet"),t[1]=e,t[2]=r):r=t[2];let n;t[3]!==r?(n=o.jsx("p",{className:"text-sm font-medium",children:r}),t[3]=r,t[4]=n):n=t[4];let s;t[5]!==e?(s=e("filePicker.filePickerDialog.noImagesFormatDesc"),t[5]=e,t[6]=s):s=t[6];let c;t[7]!==s?(c=o.jsx("p",{className:"text-xs text-muted-foreground",children:s}),t[7]=s,t[8]=c):c=t[8];let f;return t[9]!==n||t[10]!==c?(f=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[i,n,c]}),t[9]=n,t[10]=c,t[11]=f):f=t[11],f}function ui(t){const e=H.c(13),{query:i}=t,r=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:o.jsx(K,{size:18,className:"text-muted-foreground"})}),e[0]=n):n=e[0];let s;e[1]!==i||e[2]!==r?(s=r("filePicker.filePickerDialog.noMatches",{query:i}),e[1]=i,e[2]=r,e[3]=s):s=e[3];let c;e[4]!==s?(c=o.jsx("p",{className:"text-sm font-medium",children:s}),e[4]=s,e[5]=c):c=e[5];let f;e[6]!==r?(f=r("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore"),e[6]=r,e[7]=f):f=e[7];let h;e[8]!==f?(h=o.jsx("p",{className:"text-xs text-muted-foreground",children:f}),e[8]=f,e[9]=h):h=e[9];let p;return e[10]!==c||e[11]!==h?(p=o.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[n,c,h]}),e[10]=c,e[11]=h,e[12]=p):p=e[12],p}function di(t){const e=H.c(7),{items:i,onSelect:r}=t;let n;if(e[0]!==i||e[1]!==r){let c;e[3]!==r?(c=f=>o.jsx(De,{item:f,variant:"image",onSelect:r},f.key),e[3]=r,e[4]=c):c=e[4],n=i.map(c),e[0]=i,e[1]=r,e[2]=n}else n=e[2];let s;return e[5]!==n?(s=o.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:n}),e[5]=n,e[6]=s):s=e[6],s}function mi(t){const e=H.c(7),{items:i,onSelect:r}=t;let n;if(e[0]!==i||e[1]!==r){let c;e[3]!==r?(c=f=>o.jsx("li",{children:o.jsx(De,{item:f,variant:"row",onSelect:r})},f.key),e[3]=r,e[4]=c):c=e[4],n=i.map(c),e[0]=i,e[1]=r,e[2]=n}else n=e[2];let s;return e[5]!==n?(s=o.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:n}),e[5]=n,e[6]=s):s=e[6],s}function De(t){const e=H.c(58),{item:i,variant:r,onSelect:n}=t;let s;e[0]!==i.key?(s=Vt(i.key),e[0]=i.key,e[1]=s):s=e[1];const c=s;if(r==="image"){let z;e[2]!==i.publicUrl||e[3]!==n?(z=()=>n(i.publicUrl),e[2]=i.publicUrl,e[3]=n,e[4]=z):z=e[4];let M;e[5]!==i.key||e[6]!==i.publicUrl?(M=o.jsx("img",{src:i.publicUrl,alt:i.key,loading:"lazy",className:"h-full w-full object-cover",onError:hi}),e[5]=i.key,e[6]=i.publicUrl,e[7]=M):M=e[7];let O;e[8]!==i.key||e[9]!==z||e[10]!==M?(O=o.jsx("button",{type:"button",onClick:z,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:i.key,children:M}),e[8]=i.key,e[9]=z,e[10]=M,e[11]=O):O=e[11];let l;e[12]!==c?(l=o.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-2xs font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:c}),e[12]=c,e[13]=l):l=e[13];let a;e[14]!==i||e[15]!==n?(a=o.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx(ye,{item:i,onSelect:n})}),e[14]=i,e[15]=n,e[16]=a):a=e[16];let d;e[17]!==i.key?(d=pe(i.key),e[17]=i.key,e[18]=d):d=e[18];let j;e[19]!==d?(j=o.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:o.jsx("p",{className:"truncate text-xs text-white",children:d})}),e[19]=d,e[20]=j):j=e[20];let x;return e[21]!==O||e[22]!==l||e[23]!==a||e[24]!==j?(x=o.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[O,l,a,j]}),e[21]=O,e[22]=l,e[23]=a,e[24]=j,e[25]=x):x=e[25],x}let f;e[26]!==i.publicUrl||e[27]!==n?(f=()=>n(i.publicUrl),e[26]=i.publicUrl,e[27]=n,e[28]=f):f=e[28];let h;e[29]!==i.key?(h=o.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:be(i.key)?o.jsx(K,{size:16,className:"text-muted-foreground"}):o.jsx(Mt,{size:16,className:"text-muted-foreground"})}),e[29]=i.key,e[30]=h):h=e[30];let p;e[31]!==i.key?(p=pe(i.key),e[31]=i.key,e[32]=p):p=e[32];let y;e[33]!==p?(y=o.jsx("p",{className:"truncate text-sm font-medium",children:p}),e[33]=p,e[34]=y):y=e[34];let u;e[35]!==i.key?(u=o.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:i.key}),e[35]=i.key,e[36]=u):u=e[36];let k;e[37]!==y||e[38]!==u?(k=o.jsxs("div",{className:"min-w-0 flex-1",children:[y,u]}),e[37]=y,e[38]=u,e[39]=k):k=e[39];let w;e[40]!==c?(w=o.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-2xs font-medium uppercase text-muted-foreground",children:c}),e[40]=c,e[41]=w):w=e[41];let m;e[42]!==i.size?(m=qt(i.size),e[42]=i.size,e[43]=m):m=e[43];let g;e[44]!==m?(g=o.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:m}),e[44]=m,e[45]=g):g=e[45];let S;e[46]!==g||e[47]!==f||e[48]!==h||e[49]!==k||e[50]!==w?(S=o.jsxs("button",{type:"button",onClick:f,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[h,k,w,g]}),e[46]=g,e[47]=f,e[48]=h,e[49]=k,e[50]=w,e[51]=S):S=e[51];let C;e[52]!==i||e[53]!==n?(C=o.jsx(ye,{item:i,onSelect:n}),e[52]=i,e[53]=n,e[54]=C):C=e[54];let T;return e[55]!==S||e[56]!==C?(T=o.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-accent",children:[S,C]}),e[55]=S,e[56]=C,e[57]=T):T=e[57],T}function hi(t){t.target.style.display="none"}function ye(t){const e=H.c(39),{item:i,onSelect:r}=t,n=V(),[s,c]=L.useState(!1);let f;e[0]!==i.publicUrl||e[1]!==n?(f=async function(x){x.preventDefault(),x.stopPropagation();try{await navigator.clipboard.writeText(i.publicUrl),c(!0),window.setTimeout(()=>c(!1),1500)}catch{ke.error(n("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=i.publicUrl,e[1]=n,e[2]=f):f=e[2];const h=f;let p;e[3]!==n?(p=n("filePicker.filePickerDialog.assetActions"),e[3]=n,e[4]=p):p=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx(Ft,{size:14}),e[5]=y):y=e[5];let u;e[6]!==p?(u=o.jsx(Ye,{asChild:!0,children:o.jsx(ve,{type:"button",variant:"ghost",size:"icon-sm",className:"bg-background/80 backdrop-blur-sm",onClick:yi,"aria-label":p,children:y})}),e[6]=p,e[7]=u):u=e[7];let k;e[8]!==i.publicUrl||e[9]!==r?(k=()=>r(i.publicUrl),e[8]=i.publicUrl,e[9]=r,e[10]=k):k=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(ce,{size:14}),e[11]=w):w=e[11];let m;e[12]!==n?(m=n("filePicker.filePickerDialog.useThis"),e[12]=n,e[13]=m):m=e[13];let g;e[14]!==k||e[15]!==m?(g=o.jsxs(ee,{onClick:k,children:[w,m]}),e[14]=k,e[15]=m,e[16]=g):g=e[16];let S;e[17]!==s?(S=s?o.jsx(ce,{size:14}):o.jsx(Ot,{size:14}),e[17]=s,e[18]=S):S=e[18];let C;e[19]!==s||e[20]!==n?(C=n(s?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[19]=s,e[20]=n,e[21]=C):C=e[21];let T;e[22]!==h||e[23]!==C||e[24]!==S?(T=o.jsxs(ee,{onClick:h,children:[S,C]}),e[22]=h,e[23]=C,e[24]=S,e[25]=T):T=e[25];const z=i.publicUrl;let M;e[26]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(We,{size:14}),e[26]=M):M=e[26];let O;e[27]!==n?(O=n("filePicker.filePickerDialog.openInNewTab"),e[27]=n,e[28]=O):O=e[28];let l;e[29]!==i.publicUrl||e[30]!==O?(l=o.jsx(ee,{asChild:!0,children:o.jsxs("a",{href:z,target:"_blank",rel:"noreferrer",onClick:pi,children:[M,O]})}),e[29]=i.publicUrl,e[30]=O,e[31]=l):l=e[31];let a;e[32]!==T||e[33]!==l||e[34]!==g?(a=o.jsxs(Je,{align:"end",onClick:gi,children:[g,T,l]}),e[32]=T,e[33]=l,e[34]=g,e[35]=a):a=e[35];let d;return e[36]!==a||e[37]!==u?(d=o.jsxs(Ze,{children:[u,a]}),e[36]=a,e[37]=u,e[38]=d):d=e[38],d}function pi(t){return t.stopPropagation()}function gi(t){return t.stopPropagation()}function yi(t){return t.stopPropagation()}function rn(t,e,i){return e||(t.length===1?t[0].id:t.length===0?null:t.some(r=>r.id===i)?i:null)}const xi=new Set(["http:","https:"]),vi=/[\u0000-\u001F\u007F]/g;function ki(t){return t.replace(vi,"").trim()}const Si=/^[a-zA-Z][a-zA-Z0-9+.-]*:/;function sn(t){return ji(t)!==""}function ji(t){const e=ki(t);if(!e)return"";if(!Si.test(e))try{return encodeURI(e)}catch{return""}try{const i=new URL(e);return xi.has(i.protocol)||i.protocol==="data:"&&/^data:image\//i.test(i.href)?i.href:""}catch{return""}}const wi=q.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(i=>e.updateAttributes(i,{textAlign:t})).some(i=>i):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:i})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?i.unsetTextAlign():i.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}});var on=wi;const bi=20,Te=(t,e=0)=>{const i=[];return!t.children.length||e>bi||Array.from(t.children).forEach(r=>{r.tagName==="SPAN"?i.push(r):r.children.length&&i.push(...Te(r,e+1))}),i},Pi=t=>{if(!t.children.length)return;const e=Te(t);e&&e.forEach(i=>{var r;const n=i.getAttribute("style"),s=(r=i.parentElement)===null||r===void 0||(r=r.closest("span"))===null||r===void 0?void 0:r.getAttribute("style");i.setAttribute("style",`${s};${n}`)})},Ci=Gt.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&Pi(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",_t(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleTextStyle:t=>({commands:e})=>e.toggleMark(this.name,t),removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(i,r)=>{if(!i.isInline)return!0;i.marks.filter(n=>n.type===this.type).some(n=>Object.values(n.attrs).some(s=>!!s))||t.removeMark(r,r+i.nodeSize,this.type)}),!0}}}}),Ni=q.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:t=>{var e;const i=(e=Z(t,"background-color"))!==null&&e!==void 0?e:t.style.backgroundColor;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.backgroundColor?{style:`background-color: ${t.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:t=>({chain:e})=>e().setMark("textStyle",{backgroundColor:t}).run(),unsetBackgroundColor:()=>({chain:t})=>t().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),Di=q.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;const i=(e=Z(t,"color"))!==null&&e!==void 0?e:t.style.color;return i?.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),Ti=q.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>{var e;return(e=Z(t,"font-family"))!==null&&e!==void 0?e:t.style.fontFamily},renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),Ai=q.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:t=>{var e;return(e=Z(t,"font-size"))!==null&&e!==void 0?e:t.style.fontSize},renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),Ei=q.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>{var e;return(e=Z(t,"line-height"))!==null&&e!==void 0?e:t.style.lineHeight},renderHTML:t=>t.lineHeight?{style:`line-height: ${t.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:t=>({chain:e})=>e().setMark("textStyle",{lineHeight:t}).run(),unsetLineHeight:()=>({chain:t})=>t().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});q.create({name:"textStyleKit",addExtensions(){const t=[];return this.options.backgroundColor!==!1&&t.push(Ni.configure(this.options.backgroundColor)),this.options.color!==!1&&t.push(Di.configure(this.options.color)),this.options.fontFamily!==!1&&t.push(Ti.configure(this.options.fontFamily)),this.options.fontSize!==!1&&t.push(Ai.configure(this.options.fontSize)),this.options.lineHeight!==!1&&t.push(Ei.configure(this.options.lineHeight)),this.options.textStyle!==!1&&t.push(Ci.configure(this.options.textStyle)),t}});function ln(t){const e=H.c(6),i=xe(),r=Se(t.virtualMcpId,t.branch);if(r.kind!=="protocol"||r.source!=="github")return Mi;let n;e[0]!==r||e[1]!==t?(n=yt(t,r),e[0]=r,e[1]=t,e[2]=n):n=e[2];const s=n;let c;return e[3]!==s||e[4]!==i?(c=f=>je(i,s,f),e[3]=s,e[4]=i,e[5]=c):c=e[5],c}function Mi(){return!1}export{Di as C,nn as F,Ne as L,Ci as T,ln as a,tn as b,Ai as c,on as d,Jt as e,sn as i,ne as k,rn as r,ji as s,ni as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as v,a4 as W,dS as y,gS as B,i as C,K as N}from"./index-DDDWDv4s.js";import{m as F}from"./match-site-slug-config-D3fUJ6vX.js";import{u as J}from"./use-file-configs-Dee9WDV4.js";import{f as K}from"./use-view-draft-kind-BG2f-NWf.js";import{e as U}from"./use-organization-settings-CdJMCbcP.js";import{b as $}from"./use-blocks-v8-project-Byep-1Pa.js";const u=["overview","context","monitor","plan","reports","board","site-editor","calendar","experiments","blog","assets","releases","hosting","e2e","automations"],k=["overview","reports","board","site-editor","blog"],O=1,h=["overview","context","monitor","plan","board"],q=["blog"],L=["calendar","experiments"],Q=["hosting"],H={calendar:!1,hosting:!1,"site-editor":!1,blog:!1};function T(t){return[...h,...t.calendar?L:[],...t.hosting&&t["site-editor"]?Q:[],...t.blog?q:[]]}function Y(t,e){const n=new Set(t??[]);return T(e).filter(s=>!n.has(s))}function ae(t,e,n){const s=new Set([...t??[],...T({...e,"site-editor":e["site-editor"]&&n.includes("site-editor")})]);return u.filter(r=>s.has(r))}function le(t,e){if(!t&&e===void 0)return new Set(h);const n=new Set(e!==void 0?g(e,O):g(G(t),t?.sidebarViewsVersion,Y(t?.sidebarViewsSeen,H)));return new Set(h.filter(s=>n.has(s)))}const z=["calendar","experiments","assets","releases","hosting","e2e"];function fe(t,e,n){if(!t)return{project:n??null,resolvedScopeId:null};const s=e?.id===t?e:n?.id===t?n:null;return{project:s,resolvedScopeId:s?t:null}}function G(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function g(t,e,n=[]){const s=new Set(t??[]);if(e!==O)for(const r of k)s.add(r);for(const r of n)r==="hosting"&&!s.has("site-editor")||s.add(r);return u.filter(r=>s.has(r))}function X(t){return u.some(e=>e===t)}function Z(t){return z.some(e=>e===t)}function M(t,e){return{overview:t,context:!0,monitor:!0,plan:!0,reports:t,board:t,"site-editor":t,blog:t&&e.blog===!0,assets:e.assets,releases:t&&e.releases,hosting:e.hosting,e2e:e.e2e,calendar:t&&e.calendar,experiments:t&&e.experiments,automations:!0}}function ue(t,e,n){const s=M(e,n);return t?s:{...s,overview:!0,reports:!0,board:!0}}function de(t,e,n,s=[]){const r=new Set(g(t,n,s));return u.filter(o=>e[o]&&r.has(o))}function Se(t,e,n){return n||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function be(t){return u.filter(e=>t[e])}function ee(t,e,n){return!X(t)||e[t]?!1:t==="blog"?n.blog!==!0:!Z(t)||t==="releases"||t==="calendar"||t==="experiments"?!0:!(t==="assets"?n.assets:n.siteAccess)}function Ve(t,e,n,s,r){return ee(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,n)||t==="content"&&!s.includes("content")||t==="code"&&r&&!s.includes("code")}function ge(t,e,n,s){const r=new Set(g(t,s));return n?r.add(e):r.delete(e),u.filter(o=>r.has(o))}function we(t){const e=v.c(21),{org:n}=W(),s=y(),r=U(),o=K(),i=J();let c;e[0]!==t?(c=$(t),e[0]=t,e[1]=c):c=e[1];const d=c;let S;e[2]!==t?(S=B(t),e[2]=t,e[3]=S):S=e[3];const a=S,w=s.hostingEnabled===!0,x=w&&!!a,D=te(n.slug,a,x),R=D.data?.owned===!0;let l;e[4]!==i.data?.configs?(l=i.data?.configs??[],e[4]=i.data?.configs,e[5]=l):l=e[5];let b;e[6]!==a||e[7]!==l?(b=F(l,a),e[6]=a,e[7]=l,e[8]=b):b=e[8];const P=!!b,E=d&&!!t?.metadata?.siteSlug,m=w&&R&&r.hosting,p=w&&R&&r.e2e,_=o===!0;let f;e[9]!==P||e[10]!==E||e[11]!==m||e[12]!==p||e[13]!==_||e[14]!==d?(f={assets:P,releases:E,hosting:m,e2e:p,calendar:d,experiments:d,blog:_},e[9]=P,e[10]=E,e[11]=m,e[12]=p,e[13]=_,e[14]=d,e[15]=f):f=e[15];const A=!!a&&i.isPending,I=x&&D.isPending,j=o===void 0;let V;return e[16]!==A||e[17]!==I||e[18]!==j||e[19]!==f?(V={presence:f,assetsPending:A,siteAccessPending:I,blogPending:j},e[16]=A,e[17]=I,e[18]=j,e[19]=f,e[20]=V):V=e[20],V}function te(t,e,n){const s=v.c(10);let r;s[0]!==t||s[1]!==e?(r=N.hostingAccess(t,e??""),s[0]=t,s[1]=e,s[2]=r):r=s[2];let o;s[3]!==t||s[4]!==e?(o=async()=>{const c=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return c.ok?await c.json():{owned:!1,canWrite:!1}},s[3]=t,s[4]=e,s[5]=o):o=s[5];let i;return s[6]!==n||s[7]!==r||s[8]!==o?(i={queryKey:r,queryFn:o,enabled:n,staleTime:6e4},s[6]=n,s[7]=r,s[8]=o,s[9]=i):i=s[9],C(i)}export{u as P,de as a,O as b,fe as c,ue as d,Ve as e,ee as f,g,be as h,Z as i,h as j,ae as k,Se as l,Y as o,M as p,G as r,le as s,ge as t,we as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-ktArfc_t.js";import{d$ as i}from"./index-DDDWDv4s.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-ktArfc_t.js";import{d$ as u,e7 as n}from"./index-DDDWDv4s.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};
|