decocms 4.597.1 → 4.599.0
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-CYAsQRdT.js → AlertCircle-Dr1ViwHB.js} +1 -1
- package/dist/client/assets/{AreaChart-WJ2lLKy4.js → AreaChart-BCKy2Jxj.js} +1 -1
- package/dist/client/assets/{ArrowLeft-zHVY_XX0.js → ArrowLeft-BJt47AXk.js} +1 -1
- package/dist/client/assets/{ArrowRight-B6vgPWbg.js → ArrowRight-Cg3uCD_Y.js} +1 -1
- package/dist/client/assets/{ArrowUp-CsFg9VL2.js → ArrowUp-B-dFH2VR.js} +1 -1
- package/dist/client/assets/{BookOpen01-AamEOlRO.js → BookOpen01-lT9BWW-H.js} +1 -1
- package/dist/client/assets/{CartesianChart-BxFiyXVM.js → CartesianChart-C3qFBpBM.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DfjY1woJ.js → CategoricalChart-BMr9bE-c.js} +1 -1
- package/dist/client/assets/{CheckCircle-BB00e9u8.js → CheckCircle-Dpv0K-wT.js} +1 -1
- package/dist/client/assets/{ChevronDown-CD0tZl8C.js → ChevronDown-c4hMcbFC.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CmQsMnAL.js → ChevronSelectorVertical-Cu_CcFkc.js} +1 -1
- package/dist/client/assets/{ChevronUp-DGDvzrMe.js → ChevronUp-wxnDMhL8.js} +1 -1
- package/dist/client/assets/{CreditCard01-W8t7hmzJ.js → CreditCard01-CXzILq41.js} +1 -1
- package/dist/client/assets/{Eye-nqlQ004P.js → Eye-BDYUNLe8.js} +1 -1
- package/dist/client/assets/{File02-o8s5093L.js → File02-CtYD3Dn6.js} +1 -1
- package/dist/client/assets/{Fingerprint04-DY8McBak.js → Fingerprint04-FJcG-_I8.js} +1 -1
- package/dist/client/assets/{Globe04-OZ9xS3Lx.js → Globe04-BF2tGIgL.js} +1 -1
- package/dist/client/assets/{Image01-DZmu7hyy.js → Image01-d21w7OHW.js} +1 -1
- package/dist/client/assets/{Key01-CSQOqmIz.js → Key01-BzovYSYV.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BSo5LCFE.js → LayoutLeft-Dp4ZUqqK.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BxVMIk5A.js → LinkBroken01-5RBoXynI.js} +1 -1
- package/dist/client/assets/{MessageCircle01-D1dT92x6.js → MessageCircle01-Dq3lvloU.js} +1 -1
- package/dist/client/assets/{Minus-D2jrgo3d.js → Minus-KzVfkGc_.js} +1 -1
- package/dist/client/assets/{Monitor01-COmDHQ1j.js → Monitor01-t-3KO9Zg.js} +1 -1
- package/dist/client/assets/{Play-JVQd8C8L.js → Play-C2pea_sT.js} +1 -1
- package/dist/client/assets/{Plus-CF8KlFVc.js → Plus-Bj2ueTnN.js} +1 -1
- package/dist/client/assets/{ReferenceLine-8082t01S.js → ReferenceLine-CvZZlJrZ.js} +1 -1
- package/dist/client/assets/{SearchMd-Cw05gj7E.js → SearchMd-CHnW2xqw.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-Cc2EJvA-.js → ShoppingBag01-BozczI7x.js} +1 -1
- package/dist/client/assets/{Sun-Bji8LMRX.js → Sun-DDPVFiks.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BSGnkDXI.js → SwitchHorizontal01-BHqVa7GU.js} +1 -1
- package/dist/client/assets/{Tool01-BpBS8dw-.js → Tool01-DAec-7-l.js} +1 -1
- package/dist/client/assets/{Tooltip-DvEW-S9l.js → Tooltip-B6fGfZRs.js} +1 -1
- package/dist/client/assets/{Trash01-DXQWI50A.js → Trash01-Dw5Hpxfs.js} +1 -1
- package/dist/client/assets/{Upload01-BXiTGuBV.js → Upload01-D94zAnnL.js} +1 -1
- package/dist/client/assets/{UserCheck01-DLUgjW3m.js → UserCheck01-CcHavIpR.js} +1 -1
- package/dist/client/assets/{UserSquare-a_XazovD.js → UserSquare-Dsw-UGYE.js} +1 -1
- package/dist/client/assets/{Users01-BpOXj9ap.js → Users01-Be3R0wsB.js} +1 -1
- package/dist/client/assets/{XClose-DxbjiApV.js → XClose-9QxUt8RG.js} +1 -1
- package/dist/client/assets/{Zap-QnlW2BG3.js → Zap-CcwjTDI3.js} +1 -1
- package/dist/client/assets/{access-gate-BvopvGmx.js → access-gate-ULRUfO_Z.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-DaxWAHW0.js → add-connection-dialog-BLv21b0Y.js} +1 -1
- package/dist/client/assets/agent-app-DrZQ5WdH.js +1 -0
- package/dist/client/assets/agent-assets-CwtN6moS.js +1 -0
- package/dist/client/assets/{agent-automation-D8HHkTDn.js → agent-automation-BkHbdpSq.js} +2 -2
- package/dist/client/assets/agent-automations-CNALPtM6.js +1 -0
- package/dist/client/assets/agent-blog-CRsOYvej.js +2 -0
- package/dist/client/assets/agent-blog-post-z8ooVCuH.js +2 -0
- package/dist/client/assets/agent-calendar-CQexDexH.js +1 -0
- package/dist/client/assets/{agent-capabilities-CPNkpGBe.js → agent-capabilities-BQXMqj7S.js} +1 -1
- package/dist/client/assets/agent-connect-sources-Cfo7yGsi.js +1 -0
- package/dist/client/assets/agent-deck-B1qfJCFV.js +1 -0
- package/dist/client/assets/agent-e2e-SGTH8_nH.js +1 -0
- package/dist/client/assets/agent-experiments-BtznUrXi.js +1 -0
- package/dist/client/assets/agent-file-P-2vCLvE.js +1 -0
- package/dist/client/assets/agent-hosting-D9TeZHkz.js +1 -0
- package/dist/client/assets/agent-icon-Wd2oqTo4.js +1 -0
- package/dist/client/assets/agent-library-DVlSWutq.js +1 -0
- package/dist/client/assets/agent-library-file-BglGEoEO.js +1 -0
- package/dist/client/assets/agent-overview-CyV0CsDN.js +1 -0
- package/dist/client/assets/{agent-releases-CctvTAm_.js → agent-releases-CHpW5bCN.js} +1 -1
- package/dist/client/assets/agent-settings-D81MS4ZQ.js +1 -0
- package/dist/client/assets/{agent-site-editor-jPhFhiaS.js → agent-site-editor-ClTRzSPH.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DnCdennX.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BCW36Ake.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-D7CfNCNg.js +1 -0
- package/dist/client/assets/agent-view-Dz1EHJVL.js +1 -0
- package/dist/client/assets/{agent-view-guard-DDiVN0Sq.js → agent-view-guard-DL4JbWo-.js} +1 -1
- package/dist/client/assets/{ai-providers-OuekM_ro.js → ai-providers-DyzeYAWz.js} +1 -1
- package/dist/client/assets/{alert-PbrLNRQ0.js → alert-saAGPYIY.js} +1 -1
- package/dist/client/assets/{analytics-sections-DWAL7IVe.js → analytics-sections-LXw79xlq.js} +1 -1
- package/dist/client/assets/{api-keys-CKMEwhf6.js → api-keys-CUuj2JqO.js} +1 -1
- package/dist/client/assets/api-keys-DWAaUyWQ.js +1 -0
- package/dist/client/assets/app-editor-Dp5hRiES.js +1 -0
- package/dist/client/assets/{asset-utils-CJa90ZGO.js → asset-utils-Cbx5Agmu.js} +1 -1
- package/dist/client/assets/{auth-C---Zkvq.js → auth-DUER-xlT.js} +1 -1
- package/dist/client/assets/{auth-catchall-DgTfFPJA.js → auth-catchall-LWGtUBzf.js} +1 -1
- package/dist/client/assets/{auth-entry-Bdlo1esb.js → auth-entry-BackQqrG.js} +1 -1
- package/dist/client/assets/{auth-split-layout-C7aM0bmC.js → auth-split-layout-BdSg3Faz.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-D1SCK9qV.js → authenticate-and-persist-oauth-BO5lZsPs.js} +1 -1
- package/dist/client/assets/{automation-list-row-CmL2MF72.js → automation-list-row-y5qYvi6i.js} +1 -1
- package/dist/client/assets/{automation-runs-BabYNmi9.js → automation-runs-CEOu2TF6.js} +1 -1
- package/dist/client/assets/automations-vKOYR5Qw.js +1 -0
- package/dist/client/assets/{badge-BcMIPtVj.js → badge-Dwnfk4Yb.js} +1 -1
- package/dist/client/assets/{block-document-BBR-lAQh.js → block-document-CylE4YPV.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-D-FzlGyh.js → blocks-preview-workspace-context-tUo-d-u0.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CmsgKSWv.js → blocks-tab-states-TCxKWKwr.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DZyvHdU6.js → blog-preview-url-CWYs4VKf.js} +1 -1
- package/dist/client/assets/{blog-schema-DbGoS5dM.js → blog-schema-BSCYWeCO.js} +1 -1
- package/dist/client/assets/{blog-source-gate-BYUxeuY-.js → blog-source-gate-0CYD6eqT.js} +1 -1
- package/dist/client/assets/{blog-view-gate-D1VDGt0q.js → blog-view-gate-Bs5gXjQs.js} +1 -1
- package/dist/client/assets/{buckets-CpBc4NBs.js → buckets-BiTKvRl7.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DsNhI5c0.js → build-improve-prompt-doc-UnFsYnmP.js} +1 -1
- package/dist/client/assets/{calendar-oyktWjjy.js → calendar-BOzLQEHv.js} +1 -1
- package/dist/client/assets/{capability-load-error-CZr_hpNK.js → capability-load-error-CWl6nBKL.js} +1 -1
- package/dist/client/assets/category-editor-BOPnQkcE.js +1 -0
- package/dist/client/assets/{category-tree-CUP3rQKK.js → category-tree-CPnG7VyJ.js} +1 -1
- package/dist/client/assets/{chart-L_rdD8Fy.js → chart-Dep8-8-Z.js} +1 -1
- package/dist/client/assets/{chat-context-BXxmldjV.js → chat-context-DnXLbAar.js} +1 -1
- package/dist/client/assets/{chat-draft-Bu5orWL5.js → chat-draft-UVZa1lni.js} +1 -1
- package/dist/client/assets/{checkbox-DcLJM3uK.js → checkbox-BovdIh33.js} +1 -1
- package/dist/client/assets/choose-editor-B3xattAd.js +1 -0
- package/dist/client/assets/{cli-auth-success-CmXNeNAR.js → cli-auth-success-y2QurzPM.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DvfcHXCQ.js +1 -0
- package/dist/client/assets/{cms-store-drafts-B3P79s_J.js → cms-store-drafts-Dx38ZAio.js} +1 -1
- package/dist/client/assets/{collapsible-B8lX7LSm.js → collapsible-CDgzJUgW.js} +1 -1
- package/dist/client/assets/collection-detail-DNovU1Ty.js +1 -0
- package/dist/client/assets/{collection-display-button-CIMd2CCY.js → collection-display-button-Cepryz7Q.js} +1 -1
- package/dist/client/assets/{collection-search-ioGjJlri.js → collection-search-B7LiPm5S.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-d2v3Inn9.js → collection-table-wrapper-DyABq-jZ.js} +1 -1
- package/dist/client/assets/{collection-tabs-CpA2E5BB.js → collection-tabs-CaakRo-3.js} +1 -1
- package/dist/client/assets/{combobox-3XSCcZHm.js → combobox-CDjUSbip.js} +1 -1
- package/dist/client/assets/{command-CjjWneJ9.js → command-Dwru2A-r.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BfugnMSL.js → companion-mcps-section-DNWb-J6w.js} +1 -1
- package/dist/client/assets/{config-DMRaGUqI.js → config-DIz2hlNm.js} +1 -1
- package/dist/client/assets/{connect-DPlH2AuB.js → connect-CLPslvs-.js} +3 -3
- package/dist/client/assets/{connect-key-DXsdNQDg.js → connect-key-DcOOPQPd.js} +1 -1
- package/dist/client/assets/{connect-layout-BOatW4CZ.js → connect-layout-C26kLy8_.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CXL8Ll8J.js → connect-source-dialog-BbIogg2r.js} +1 -1
- package/dist/client/assets/{connection-card-CIdpI2wF.js → connection-card-C3Tt9ly2.js} +1 -1
- package/dist/client/assets/connection-detail-Gac9deZ6.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CI-MD64a.js → connection-form-helpers-C82iQ64T.js} +1 -1
- package/dist/client/assets/{connection-DMyObHFk.js → connection-s-WUHznp.js} +1 -1
- package/dist/client/assets/{connection-slug-CoQLu_eQ.js → connection-slug-CPQCfzpG.js} +1 -1
- package/dist/client/assets/connections-BDwDV_q8.js +1 -0
- package/dist/client/assets/content-changes-Bc-XDPsg.js +1 -0
- package/dist/client/assets/{content-tab-D0dI2BbM.js → content-tab-B40o24Nk.js} +3 -3
- package/dist/client/assets/context-CQ_Gp4W5.js +1 -0
- package/dist/client/assets/{context-menu-B1dAG0Wr.js → context-menu-DEYRpNpK.js} +1 -1
- package/dist/client/assets/{context-shell-547AgBrw.js → context-shell-_Qk0Oz-d.js} +4 -4
- package/dist/client/assets/{create-organization-dialog-BKxedScB.js → create-organization-dialog-CrEduzn1.js} +1 -1
- package/dist/client/assets/{daily-pulse-aiJY3gnz.js → daily-pulse-DiGNPvb8.js} +1 -1
- package/dist/client/assets/{delete-copy-CGGKQ10f.js → delete-copy-D0oAW2-7.js} +1 -1
- package/dist/client/assets/{device-hint-QYtktsO0.js → device-hint-CUoc-bO7.js} +1 -1
- package/dist/client/assets/{discover-BZAuq37N.js → discover-Dlum8nJE.js} +1 -1
- package/dist/client/assets/{domain-settings-BuaKW4Rw.js → domain-settings-Csa72f0f.js} +1 -1
- package/dist/client/assets/{drawer-JbzUShND.js → drawer-C7IzwNNi.js} +1 -1
- package/dist/client/assets/{editor-BR1a7qGD.js → editor-Bg2tA9ZH.js} +1 -1
- package/dist/client/assets/{editor-classes-D4G_DIGw.js → editor-classes-C2vnPPs3.js} +1 -1
- package/dist/client/assets/{empty-state-BnFVKQvv.js → empty-state-DDSvM9FE.js} +1 -1
- package/dist/client/assets/{empty-state-C0MDzZBx.js → empty-state-DtGI3l3W.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-DIRzwSia.js → experiments-tab-choice-DErw0cXC.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DtWfSA7r.js → extract-connection-data-CDaeKQrw.js} +1 -1
- package/dist/client/assets/{feature-gate-BfrcuviK.js → feature-gate-GXsTPAJ7.js} +1 -1
- package/dist/client/assets/{feature-paywall-DNnv958-.js → feature-paywall-D8FSnQYy.js} +1 -1
- package/dist/client/assets/file-explorer-I2e9zAq6.js +2 -0
- package/dist/client/assets/{file-preview-CC2pttDX.js → file-preview-gWgurqbp.js} +1 -1
- package/dist/client/assets/{file-share-button-dJsfWtiJ.js → file-share-button-GPtfYDoC.js} +2 -2
- package/dist/client/assets/{file-type-icon-nU6c9OQr.js → file-type-icon-XrV5Ieuz.js} +1 -1
- package/dist/client/assets/{folder-icon-Wp7wbxIQ.js → folder-icon-CQENUo6t.js} +1 -1
- package/dist/client/assets/{form-Dx1EBvxh.js → form-CbxKt8nG.js} +1 -1
- package/dist/client/assets/{frame-navigation-aPmo2U0P.js → frame-navigation-Bk4Q3OFb.js} +1 -1
- package/dist/client/assets/{gateway-client-BQlD2psO.js → gateway-client-DtSk1YTz.js} +1 -1
- package/dist/client/assets/general-C-fd-_vs.js +1 -0
- package/dist/client/assets/{github-icon-hFwcbgKP.js → github-icon-D00byCoC.js} +1 -1
- package/dist/client/assets/{held-block-view-ByNmqPhe.js → held-block-view-Bo1JFNYN.js} +1 -1
- package/dist/client/assets/home-Bu7BMkwd.js +1 -0
- package/dist/client/assets/{home-overview-BJLt3O6I.js → home-overview-TgZjYYkW.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-CgC-Mb3M.js → hosted-reconcile-BnpWtsdy.js} +1 -1
- package/dist/client/assets/{icon-button-8qhGM4eg.js → icon-button-BWb9J8DL.js} +1 -1
- package/dist/client/assets/{index-B_eoP-Gi.js → index-1IhamFHO.js} +2 -2
- package/dist/client/assets/{index-CqirF9LN.js → index-B0fs_OlI.js} +1 -1
- package/dist/client/assets/{index-D-cQHZ9D.js → index-C0xWdfcr.js} +1 -1
- package/dist/client/assets/{index-MxNSCTK9.js → index-C3wWrA5_.js} +1 -1
- package/dist/client/assets/index-C9ybKZad.css +1 -0
- package/dist/client/assets/{index-BR0U8TgB.js → index-CJ8IFZmE.js} +1 -1
- package/dist/client/assets/{index-ByOLAuLS.js → index-CR11mRVw.js} +1 -1
- package/dist/client/assets/{index-l6F0wrxq.js → index-CenYtz6p.js} +1 -1
- package/dist/client/assets/{index-C6-0Ff1m.js → index-ClPlP45u.js} +52 -40
- package/dist/client/assets/{index-CMjqNIsi.js → index-D0Hmc4jj.js} +1 -1
- package/dist/client/assets/{index-ZdVMGNX_.js → index-DCzsCyZ2.js} +1 -1
- package/dist/client/assets/{index-DHE6Gmv8.js → index-DE18eqpk.js} +8 -8
- package/dist/client/assets/index-DZaHrkyR.js +4 -0
- package/dist/client/assets/{index-B7i_xJl4.js → index-D_RSBRov.js} +1 -1
- package/dist/client/assets/{index-bfIJKw2l.js → index-bEMTLjWE.js} +1 -1
- package/dist/client/assets/{index-BPvQqOSy.js → index-bqo35_Ca.js} +1 -1
- package/dist/client/assets/index-fC7zChWN.js +1 -0
- package/dist/client/assets/{index-DWqgNqna.js → index-qWnn1ltH.js} +1 -1
- package/dist/client/assets/{index-redirect-D-0BmEsE.js → index-redirect-D18UczKn.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CiZgrwb3.js → infiniteQueryObserver-DYdGO-kr.js} +1 -1
- package/dist/client/assets/{infra-billing-DMYQXPE8.js → infra-billing-B-ZOG8LZ.js} +1 -1
- package/dist/client/assets/{input-_oxlM42n.js → input-DIM-or4Z.js} +1 -1
- package/dist/client/assets/{input-BvykudC_.js → input-Hb-JxHfj.js} +3 -3
- package/dist/client/assets/{integration-icon-BIQ_3p0x.js → integration-icon-BudGWb95.js} +1 -1
- package/dist/client/assets/{item-actions-BoAVVq18.js → item-actions-BqhjhXJI.js} +1 -1
- package/dist/client/assets/{jira-icon-BYAb-E8q.js → jira-icon-QWcyJt80.js} +1 -1
- package/dist/client/assets/{label-Cq7ohFeR.js → label-BLa2fMY4.js} +1 -1
- package/dist/client/assets/{layout-DKgi2pWo.js → layout-BDPjhvCW.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-Cdla_zr3.js → legacy-admin-welcome-dialog-4fFtxryj.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-C4yyRVHA.js → legacy-agents-deep-D86OVdKd.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CUxGG29A.js → legacy-main-redirect-8LgUmeE4.js} +1 -1
- package/dist/client/assets/library-CnGNe9ae.js +1 -0
- package/dist/client/assets/{library-tab-DnuxDKa_.js → library-tab-iAK1-J8f.js} +1 -1
- package/dist/client/assets/{login-21wHOzeO.js → login-PlpgFWjy.js} +1 -1
- package/dist/client/assets/{markdown-5RMcvWqV.js → markdown-WowE7Mxe.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BV5sVhom.js → mcp-app-renderer-DMIprf7C.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BU0x_iDk.js → mcp-oauth-B98YYbEl.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CeIVSnSu.js → mcp-oauth-BZi74ITV.js} +1 -1
- package/dist/client/assets/{members-BNWyDABE.js → members-DSA0lnhm.js} +1 -1
- package/dist/client/assets/{memory-d-IFBAud.js → memory-CDQpsK3i.js} +2 -2
- package/dist/client/assets/{mock-board-Y-hiGSHf.js → mock-board-DA12ASEo.js} +3 -3
- package/dist/client/assets/{monaco-editor-d8C00Vbh.js → monaco-editor-C7xV1tFr.js} +1 -1
- package/dist/client/assets/monitoring-HEIO3f1x.js +2 -0
- package/dist/client/assets/{monitoring-stats-row-BdeLiDjT.js → monitoring-stats-row-Xz5U7Rhj.js} +1 -1
- package/dist/client/assets/{multi-select-D6S763-B.js → multi-select-DJcQLTmy.js} +1 -1
- package/dist/client/assets/{mustache-CH8IdNgC.js → mustache-B-kKrPiJ.js} +1 -1
- package/dist/client/assets/{named-rule-step-ISshG07e.js → named-rule-step-Df6xV5B1.js} +1 -1
- package/dist/client/assets/named-rule-view-B7FeGwwg.js +1 -0
- package/dist/client/assets/{new-project-dialog-Ch6wUMKc.js → new-project-dialog-CokRpX7A.js} +1 -1
- package/dist/client/assets/{new-project-store-BJVEZe7t.js → new-project-store-DvAGMn6J.js} +1 -1
- package/dist/client/assets/{oauth-callback-DF-qannK.js → oauth-callback-DF5l3U-R.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BPFWE8hJ.js → oauth-callback-ai-provider-Bm0rdkVk.js} +1 -1
- package/dist/client/assets/{oauth-consent-DEVHlJrJ.js → oauth-consent-Cm0m8ySQ.js} +1 -1
- package/dist/client/assets/{onboarding-BBiIM9eH.js → onboarding-od1kwJku.js} +1 -1
- package/dist/client/assets/openai-conversation-BmC8O_tJ.js +3 -0
- package/dist/client/assets/{optimistic-project-sidebar-views-DoJ93lgL.js → optimistic-project-sidebar-views-CSVfStlk.js} +1 -1
- package/dist/client/assets/{order-monitor-day-C4bwqh_Q.js → order-monitor-day-CVaYfxhN.js} +1 -1
- package/dist/client/assets/{organization-choice-CAc73DMC.js → organization-choice-CvOWeTDx.js} +1 -1
- package/dist/client/assets/{orgs-DlLRdIR1.js → orgs-DWjvuN1q.js} +1 -1
- package/dist/client/assets/{own-accounts-section-L5xwUYxF.js → own-accounts-section-BRRQLOxB.js} +1 -1
- package/dist/client/assets/{pair-BKCcX4sy.js → pair-BoOeVbrZ.js} +8 -8
- package/dist/client/assets/{parse-sections-CBJ8clfr.js → parse-sections-DPFcZZpf.js} +3 -3
- package/dist/client/assets/plan-Bq-SDb6_.js +1 -0
- package/dist/client/assets/{plan-ladder-DDAcm-ji.js → plan-ladder-Bw-AFjhC.js} +1 -1
- package/dist/client/assets/{plan-usage-card-BwiinbGT.js → plan-usage-card-CCBkqgqN.js} +1 -1
- package/dist/client/assets/{popover-DTBVeUtG.js → popover-Bw63s7Zw.js} +1 -1
- package/dist/client/assets/post-calendar-B572bD-C.js +1 -0
- package/dist/client/assets/{post-editor-CaTAhhxB.js → post-editor-DDAplVFO.js} +2 -2
- package/dist/client/assets/{preview-content-BGfL4iXO.js → preview-content-B5NeROky.js} +1 -1
- package/dist/client/assets/{preview-dialog-BHh0s5Ms.js → preview-dialog-DNldfBkc.js} +1 -1
- package/dist/client/assets/{preview-panel-HHRrVU4R.js → preview-panel-BVJOVaW-.js} +1 -1
- package/dist/client/assets/{preview-tab-S2hZUwsX.js → preview-tab-mk1rOYLl.js} +3 -3
- package/dist/client/assets/{primitives-K9ug68v7.js → primitives-DHjn8wRP.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-ujfDfMoL.js → product-picker-dialog-CCFgTWsP.js} +1 -1
- package/dist/client/assets/{profile-Dc_w4Cyx.js → profile-BHgi2p-D.js} +1 -1
- package/dist/client/assets/project-app-view-DZWN6HIG.js +1 -0
- package/dist/client/assets/project-apps-B9UIbfx6.js +1 -0
- package/dist/client/assets/{project-icon-CGc9ojaV.js → project-icon-CVFg7D6I.js} +1 -1
- package/dist/client/assets/{project-index-I2IwZ_L4.js → project-index-C8VPprC_.js} +1 -1
- package/dist/client/assets/project-reports-Das6UQ4V.js +1 -0
- package/dist/client/assets/project-tasks-DcW3g3Je.js +1 -0
- package/dist/client/assets/projects-D8VCwPpL.js +1 -0
- package/dist/client/assets/{projects-empty-state-B5Z0ROP0.js → projects-empty-state-Bpk0G34Z.js} +1 -1
- package/dist/client/assets/{prompts-DQItNyVW.js → prompts-DzdzaMmV.js} +1 -1
- package/dist/client/assets/record-editor-B_cxLrL3.js +1 -0
- package/dist/client/assets/redirect-editor-Dk-VRqLC.js +1 -0
- package/dist/client/assets/reports-BNJte_NJ.js +1 -0
- package/dist/client/assets/{reports-B3-NqRd1.js → reports-CWMbliea.js} +1 -1
- package/dist/client/assets/reports-onboarding-DY4SQKRR.js +1 -0
- package/dist/client/assets/reports-tab-Bd5_oeBY.js +2 -0
- package/dist/client/assets/repositories-4oT9xNoj.js +1 -0
- package/dist/client/assets/{repositories-Cf9nYfd0.js → repositories-DSZ35mc8.js} +1 -1
- package/dist/client/assets/{repository-binding-Do6sAdct.js → repository-binding-CBZAcVdT.js} +1 -1
- package/dist/client/assets/{repository-picker-B9qWS0uH.js → repository-picker-Dr0vGXA-.js} +1 -1
- package/dist/client/assets/{require-capability-DdgYI50p.js → require-capability-C571Rd7M.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BwuuU3bJ.js → required-auth-layout-CZD_kzpb.js} +1 -1
- package/dist/client/assets/{reset-password-CFvEOHUE.js → reset-password-DHljzTtu.js} +1 -1
- package/dist/client/assets/{resizable-DbjoRAK-.js → resizable-C2REFh_s.js} +1 -1
- package/dist/client/assets/resolve-tab-icon-olSvP0do.js +1 -0
- package/dist/client/assets/review-settings-DW-Fs2KH.js +1 -0
- package/dist/client/assets/{role-color-AmMn6ZIX.js → role-color-DuU08WGm.js} +1 -1
- package/dist/client/assets/roles-BAnO1bxC.js +1 -0
- package/dist/client/assets/route-C3kg399e.js +1 -0
- package/dist/client/assets/route-D-hDzKGG.js +1 -0
- package/dist/client/assets/route-pVOTW3qW.js +1 -0
- package/dist/client/assets/{route-page-header-D8CuFczr.js → route-page-header-BvIVBU1I.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-B3EnJ01P.js → sandbox-git-api-CsC_kLYw.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-BiHehEOC.js → sandbox-lifecycle-context-BFxUlDZX.js} +1 -1
- package/dist/client/assets/{save-status-DEylj8_h.js → save-status-BhhBg1LB.js} +1 -1
- package/dist/client/assets/schema-0QFmTfwT.js +1 -0
- package/dist/client/assets/{schema-C9B5bAQC.js → schema-DMwdKCRw.js} +1 -1
- package/dist/client/assets/{scroll-area-BSx_oSJx.js → scroll-area-BVXpOwrz.js} +1 -1
- package/dist/client/assets/{search-input-DE_voviB.js → search-input-BfMLQbA4.js} +1 -1
- package/dist/client/assets/{search-toggle-DeMaHCKK.js → search-toggle-Bl_64444.js} +1 -1
- package/dist/client/assets/{secret-picker-Dslhp0Eb.js → secret-picker-BxraR3Bw.js} +1 -1
- package/dist/client/assets/{secrets-BFU0jWBM.js → secrets-CAerHiUa.js} +1 -1
- package/dist/client/assets/{section-array-field-dPI_sYd7.js → section-array-field-BuCy_-8y.js} +1 -1
- package/dist/client/assets/{sections-BCyCfgtK.js → sections-ByKxkNrM.js} +1 -1
- package/dist/client/assets/sections-editor-CslnNFSG.js +1 -0
- package/dist/client/assets/{select-Chdk1xe9.js → select-DHsPH2VK.js} +1 -1
- package/dist/client/assets/{select-model-DNsDO7Yn.js → select-model-jx1UOTVg.js} +1 -1
- package/dist/client/assets/{seo-editor-ByqHZOIr.js → seo-editor-NBHCEWp9.js} +1 -1
- package/dist/client/assets/{separator-CnEC83tf.js → separator-B3dgbL-b.js} +1 -1
- package/dist/client/assets/{session-runtime-fXa5psFL.js → session-runtime-CkB4lbnk.js} +1 -1
- package/dist/client/assets/settings-tab-C_5LpHfa.js +1 -0
- package/dist/client/assets/{sheet-XJvcudCi.js → sheet-CgCtLAPr.js} +1 -1
- package/dist/client/assets/shell-layout-2OfWqqpL.js +1 -0
- package/dist/client/assets/{site-draft-actions-BJiaSwYy.js → site-draft-actions-eDLqULJB.js} +5 -5
- package/dist/client/assets/{site-draft-view-9aqy4RF0.js → site-draft-view-9C4Or_b0.js} +1 -1
- package/dist/client/assets/site-editor-DuNfD6N_.js +1 -0
- package/dist/client/assets/site-editor-toast-tsmLr7N9.js +1 -0
- package/dist/client/assets/skills-CBfw-WRU.js +1 -0
- package/dist/client/assets/{slider-DaeRBQVD.js → slider-uFsmSrp-.js} +1 -1
- package/dist/client/assets/{sortable.esm-BulVoRsH.js → sortable.esm-BYPSpCxr.js} +1 -1
- package/dist/client/assets/{sso-ptIJoXni.js → sso-DmL40NiM.js} +1 -1
- package/dist/client/assets/{suggestion-DoHjrPPW.js → suggestion-D0LHp9x9.js} +1 -1
- package/dist/client/assets/{super-agent-icon-VandTz-0.js → super-agent-icon-DUDwpRyF.js} +1 -1
- package/dist/client/assets/{switch-6JKp3FKO.js → switch-HBMWXplH.js} +1 -1
- package/dist/client/assets/{synced-repos-DJpcOxmB.js → synced-repos-DnXa3ecf.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BMUkOrax.js → tab-icon-glyph-B_v_Zs9m.js} +1 -1
- package/dist/client/assets/{table-Dqj9d5ax.js → table-CbT1E0c6.js} +1 -1
- package/dist/client/assets/{tabs-CT50lxBB.js → tabs-CvvF82Z_.js} +1 -1
- package/dist/client/assets/{task-board-DNboqZMy.js → task-board-Dvyf6ap1.js} +1 -1
- package/dist/client/assets/{task-key-DgbGUF2j.js → task-key-BEZJzL6A.js} +1 -1
- package/dist/client/assets/{task-route-DUKKS-kP.js → task-route-Bdia0g-K.js} +1 -1
- package/dist/client/assets/{task-status-BadjzsyY.js → task-status-uTQfnANJ.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-PY56GOP9.js → taskboard-analytics-Cc5fecFr.js} +1 -1
- package/dist/client/assets/tasks-BLmEOXpC.js +1 -0
- package/dist/client/assets/{tasks-BXwt_hky.js → tasks-CEYTc2jk.js} +1 -1
- package/dist/client/assets/{textarea-C3LFFo0w.js → textarea-Cv0NJoJx.js} +1 -1
- package/dist/client/assets/thread-analytics-D7RfN4cT.js +1 -0
- package/dist/client/assets/{thread-button-CrjY15ns.js → thread-button-BeeMwJqK.js} +1 -1
- package/dist/client/assets/{thread-intent-j3i3V7mR.js → thread-intent-W_IEI6nJ.js} +1 -1
- package/dist/client/assets/{thread-route-DY_UV0gu.js → thread-route-DISpcVnB.js} +1 -1
- package/dist/client/assets/thread-route-DU18R3Gp.js +1 -0
- package/dist/client/assets/{thread-sheet-body-DE05uWNv.js → thread-sheet-body-CKrAdloG.js} +1 -1
- package/dist/client/assets/{time-range-picker-Bbk_8gb1.js → time-range-picker-BlqMyEID.js} +1 -1
- package/dist/client/assets/{toggle-group-CbJrGPYf.js → toggle-group-SgDZBs4q.js} +1 -1
- package/dist/client/assets/{tool-set-selector-z6gFzWDr.js → tool-set-selector-D7ikqnRL.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CEZ74wIz.js → toolbar-icon-button-DYRDau7a.js} +1 -1
- package/dist/client/assets/{tooltip-BnL5r8Gv.js → tooltip-CGN_6DeF.js} +1 -1
- package/dist/client/assets/{tooltipContext-DvsqpzJf.js → tooltipContext-eVDhb73X.js} +1 -1
- package/dist/client/assets/{track-PLvkvo8B.js → track-Bh6fl8gW.js} +1 -1
- package/dist/client/assets/{types-9tZ4hN1z.js → types-BkNfEl9r.js} +1 -1
- package/dist/client/assets/{url-slug-C2KUvR2X.js → url-slug-DUNky036.js} +1 -1
- package/dist/client/assets/{usage-stats-DX8XXFQ9.js → usage-stats-Bwzv7gJS.js} +1 -1
- package/dist/client/assets/{use-ai-providers-pXYGEzkI.js → use-ai-providers-CGemSkMu.js} +1 -1
- package/dist/client/assets/{use-api-keys-B03kdPI3.js → use-api-keys-BxTxBWKs.js} +1 -1
- package/dist/client/assets/use-apply-named-rule-B1QyblBm.js +1 -0
- package/dist/client/assets/use-ask-in-chat-Dq1xCBZg.js +1 -0
- package/dist/client/assets/{use-automations-D6sS4b2K.js → use-automations-B4WYUKq9.js} +1 -1
- package/dist/client/assets/{use-autosave-ONtBLfOU.js → use-autosave-Bxa3t18Q.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DCws5iN8.js +1 -0
- package/dist/client/assets/use-blog-view-C47yXPR5.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-BNCeIaIM.js → use-chat-layout-state-CuVcequZ.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-DMDZLoe0.js → use-cms-publish-actions-DvvIIK2j.js} +1 -1
- package/dist/client/assets/{use-connect-companion-Ez7z63oH.js → use-connect-companion-LTJyJEhg.js} +1 -1
- package/dist/client/assets/{use-connection-D5_bE1jX.js → use-connection-0kaw-viE.js} +1 -1
- package/dist/client/assets/{use-content-sync-D4PlAahX.js → use-content-sync-Bm1rLpJJ.js} +1 -1
- package/dist/client/assets/{use-copy-BRwsGSGM.js → use-copy-fJr-XPX_.js} +1 -1
- package/dist/client/assets/{use-current-view-0HWp9lHl.js → use-current-view-fejotmWd.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DiJmvXQv.js → use-date-fns-locale-CqTBdTHk.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BmZISibb.js → use-debounced-autosave-DI2sQjS_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dw3dFt4C.js → use-debounced-value-Bs-Y5g0H.js} +1 -1
- package/dist/client/assets/{use-deco-credits-r1_nX8wr.js → use-deco-credits-Cg-UwseL.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B1JmbrrX.js → use-decopilot-events-B4kbCyNj.js} +1 -1
- package/dist/client/assets/{use-delete-block-DDUTXhNF.js → use-delete-block-AF5l4Su2.js} +1 -1
- package/dist/client/assets/{use-delete-connection-C3dK-V2D.js → use-delete-connection-CO-mWloY.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-KnQTKRss.js → use-deployment-admin-DeOF0N3m.js} +1 -1
- package/dist/client/assets/{use-entitlements-DIoZnc_q.js → use-entitlements-COvx8BQY.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-D9LB_eIt.js → use-fast-preview-draft-url-n5D1fCyt.js} +1 -1
- package/dist/client/assets/{use-file-configs-I6vvS9gB.js → use-file-configs-B4kZBoAU.js} +1 -1
- package/dist/client/assets/{use-id-selection-BAv2DcG7.js → use-id-selection-CxnUpm45.js} +1 -1
- package/dist/client/assets/{use-in-settings-DxzX6GVb.js → use-in-settings-Bg62knvP.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BwP3VnzE.js → use-inbox-feed-2oay1Ojg.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DZHKJp2V.js → use-infinite-scroll-lHPh-Yvw.js} +1 -1
- package/dist/client/assets/{use-join-requests-DqFzxVX_.js → use-join-requests-CpVDmUgP.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-D2eQ46eC.js → use-main-panel-tabs-CrEUNv8z.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-C6_TAde2.js → use-mcp-auth-status-B9qs8Lf1.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Bg8mQo9f.js → use-mcp-client-dkGf3c-E.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DPiL3LQv.js → use-mcp-prompts-Z_xSH25a.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-C5OR9KZ9.js → use-mcp-tools-B2bfT_oc.js} +1 -1
- package/dist/client/assets/{use-mobile-IMVhNYT_.js → use-mobile-Cy6DWmWG.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BVaiu02r.js → use-move-blocks-BH1QFXG7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-WJ7w-8ZZ.js → use-navigate-to-agent-DxeGRa4v.js} +1 -1
- package/dist/client/assets/{use-never-published-DpnSCkDS.js → use-never-published-DEcA4Hbs.js} +1 -1
- package/dist/client/assets/{use-org-fs-C4V7-QNj.js → use-org-fs-B4D19LqS.js} +1 -1
- package/dist/client/assets/{use-org-notice-DOVWyuaL.js → use-org-notice-B56NP705.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BukrXch8.js → use-org-repo-syncs-C7MIWYMD.js} +1 -1
- package/dist/client/assets/{use-org-sso-D7w6nhfD.js → use-org-sso-B3qglS8n.js} +1 -1
- package/dist/client/assets/use-organization-settings-BvXRnnJ1.js +1 -0
- package/dist/client/assets/{use-panel-navigate-CkYTugDF.js → use-panel-navigate-Bpj7I2DF.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-CkqC328s.js → use-project-native-view-presence-Ceku4NdE.js} +1 -1
- package/dist/client/assets/{use-project-scope-DwQViH2f.js → use-project-scope-Dia8NJ1H.js} +1 -1
- package/dist/client/assets/{use-recent-apps-4wYjA0CX.js → use-recent-apps-mEzRcm14.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DKW88lIw.js → use-reports-diagnostic-CMVtGrNW.js} +1 -1
- package/dist/client/assets/use-sandbox-events-CiJHLRnB.js +2 -0
- package/dist/client/assets/{use-secrets-BW5HFrjP.js → use-secrets-C-eAikTf.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-D61lHpgT.js → use-section-preview-base-CTZKrxgl.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CvPku1YI.js → use-sidebar-collapsed-dlIrMSiG.js} +1 -1
- package/dist/client/assets/{use-tags-B-VIOJFl.js → use-tags-BwHQUj22.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-pNXfpx7q.js → use-task-board-analytics-DODGW_Te.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CXo3bcGf.js → use-task-board-item-prs-C7zHMStw.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CygST8NV.js → use-task-board-items-nWuZe0f_.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DYeH1UKB.js → use-task-board-prompts-HDr5AWXo.js} +1 -1
- package/dist/client/assets/{use-task-metadata-BKyg4fwU.js → use-task-metadata-BJxHXINN.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-U0o_TC58.js → use-thread-outputs-DYM4oYgt.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-DrDbO3-P.js → use-view-draft-kind-B892eFBY.js} +1 -1
- package/dist/client/assets/{use-voice-input-ChVzBkTC.js → use-voice-input-cXH_HvvV.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DrScE9OA.js +1 -0
- package/dist/client/assets/{useQueries-Cmvk9UMI.js → useQueries-Cf8Rjcj6.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-I6lFGYNo.js +1 -0
- package/dist/client/assets/{users-S8nniBNq.js → users-DDPndyl-.js} +1 -1
- package/dist/client/assets/{utils-CalvUBc1.js → utils-Ch5vvMzn.js} +1 -1
- package/dist/client/assets/variant-calendar-P0edtDTc.js +1 -0
- package/dist/client/assets/{variant-matcher-override-DY5ZfO62.js → variant-matcher-override-Cihlbmny.js} +1 -1
- package/dist/client/assets/{view-header-Dlc9W8Ql.js → view-header-CLwDrXI9.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BYga37_3.js → virtual-mcp-DkL4WzFc.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DdE7kwP2.js → watch-sse-pool-C3-S_EPD.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/migrate-dbos.js +2 -2
- package/dist/server/migrate.js +210 -210
- package/dist/server/server.js +774 -761
- package/package.json +1 -1
- package/dist/client/assets/TrendUp01-CdeGaAD9.js +0 -1
- package/dist/client/assets/agent-app-zt9yWAWY.js +0 -1
- package/dist/client/assets/agent-assets-B4BoOCbn.js +0 -1
- package/dist/client/assets/agent-automations-CR47ElS_.js +0 -1
- package/dist/client/assets/agent-blog-kn7H8WW9.js +0 -2
- package/dist/client/assets/agent-blog-post-CWEMwEqA.js +0 -2
- package/dist/client/assets/agent-calendar-DER04lJC.js +0 -1
- package/dist/client/assets/agent-connect-sources-BBjozm2U.js +0 -1
- package/dist/client/assets/agent-deck-DD0U8VAD.js +0 -1
- package/dist/client/assets/agent-e2e-CQFRJ0Om.js +0 -1
- package/dist/client/assets/agent-experiments-Dz3AvJ4-.js +0 -1
- package/dist/client/assets/agent-file-CpVkBu0J.js +0 -1
- package/dist/client/assets/agent-hosting-BFGfgXWM.js +0 -1
- package/dist/client/assets/agent-icon-SasBmPrY.js +0 -1
- package/dist/client/assets/agent-library-Cn9MXoTF.js +0 -1
- package/dist/client/assets/agent-library-file-CafoXKvT.js +0 -1
- package/dist/client/assets/agent-overview-9j5_NkHV.js +0 -1
- package/dist/client/assets/agent-settings-e6iND6rW.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Detw-R2f.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BeFIR9Nd.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-B4G1bvsT.js +0 -1
- package/dist/client/assets/agent-view-CHrkfSe7.js +0 -1
- package/dist/client/assets/api-keys-CtDwFEqi.js +0 -1
- package/dist/client/assets/app-editor-aGklcq_V.js +0 -1
- package/dist/client/assets/automations-CJM7s6OS.js +0 -1
- package/dist/client/assets/category-editor-Btv0sSPl.js +0 -1
- package/dist/client/assets/choose-editor-DQyXDHRD.js +0 -1
- package/dist/client/assets/cms-settings-editor-CHvYFO6g.js +0 -1
- package/dist/client/assets/collection-detail-GsM61XEt.js +0 -1
- package/dist/client/assets/connection-detail-CQX5UnUU.js +0 -1
- package/dist/client/assets/connections-CUnudfuh.js +0 -1
- package/dist/client/assets/context-BzsV0hxX.js +0 -1
- package/dist/client/assets/file-explorer-D_6SsDXA.js +0 -2
- package/dist/client/assets/general-CAva67lN.js +0 -1
- package/dist/client/assets/home-5ZWRmhLp.js +0 -1
- package/dist/client/assets/index-B5WGiIKx.js +0 -4
- package/dist/client/assets/index-BU3n1igW.js +0 -1
- package/dist/client/assets/index-C4wvi2v7.css +0 -1
- package/dist/client/assets/library-D6WcKfwU.js +0 -1
- package/dist/client/assets/monitoring-3bxUWuJM.js +0 -2
- package/dist/client/assets/named-rule-view-CXMDYxKO.js +0 -1
- package/dist/client/assets/openai-conversation-Cc0ggxu_.js +0 -3
- package/dist/client/assets/plan-Basau5px.js +0 -1
- package/dist/client/assets/post-calendar-CkZvvgA_.js +0 -1
- package/dist/client/assets/project-app-view-mLEnCg4s.js +0 -1
- package/dist/client/assets/project-apps-C4vT9LXH.js +0 -1
- package/dist/client/assets/project-reports-BlDDRtjQ.js +0 -1
- package/dist/client/assets/project-tasks-DpoEijNI.js +0 -1
- package/dist/client/assets/projects-BQZSr4gE.js +0 -1
- package/dist/client/assets/record-editor-BOQ2W0wP.js +0 -1
- package/dist/client/assets/redirect-editor-BrgJRHSk.js +0 -1
- package/dist/client/assets/reports-Bsc_XwTm.js +0 -1
- package/dist/client/assets/reports-onboarding-Beggk42B.js +0 -1
- package/dist/client/assets/reports-tab-CQP_rzUZ.js +0 -2
- package/dist/client/assets/repositories-CfgaBNdf.js +0 -1
- package/dist/client/assets/resolve-tab-icon-zc5Xnngt.js +0 -1
- package/dist/client/assets/review-settings-C_jx0NLX.js +0 -1
- package/dist/client/assets/roles-b_L0oOYd.js +0 -1
- package/dist/client/assets/route-Bahv9n22.js +0 -1
- package/dist/client/assets/route-D2bkX53_.js +0 -1
- package/dist/client/assets/route-Da-mMBjf.js +0 -1
- package/dist/client/assets/schema-DiSJ8SEc.js +0 -1
- package/dist/client/assets/sections-editor-CD9jVbGW.js +0 -1
- package/dist/client/assets/settings-tab-DG4z8CKo.js +0 -1
- package/dist/client/assets/shell-layout-CuBXiCpv.js +0 -1
- package/dist/client/assets/site-editor-BSb_9CNK.js +0 -1
- package/dist/client/assets/site-editor-toast-C2OaHizl.js +0 -1
- package/dist/client/assets/skills-DQnklyjk.js +0 -1
- package/dist/client/assets/tasks-74JzN4W9.js +0 -1
- package/dist/client/assets/thread-analytics-BmSAMduA.js +0 -1
- package/dist/client/assets/thread-route-DGrdxDp1.js +0 -1
- package/dist/client/assets/use-apply-named-rule-Cc4ACfQP.js +0 -1
- package/dist/client/assets/use-ask-in-chat-B6pTgaei.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-z5uA6d0S.js +0 -1
- package/dist/client/assets/use-blog-view-BHifDign.js +0 -1
- package/dist/client/assets/use-organization-settings-BmAIEgEL.js +0 -1
- package/dist/client/assets/use-sandbox-events-DwjSc3R2.js +0 -2
- package/dist/client/assets/useInfiniteQuery-B5jgBAwp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D3Nn_2Nf.js +0 -1
- package/dist/client/assets/variant-calendar-C-1HVzQo.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as _,a6 as X,m as L,j as n,B as Pe,a7 as xs,b as E,a as Te,d as Re,a8 as hs,J as bt,r as ae,t as gt,o as Me,a9 as jt,aa as bs,ab as gs,C as vt,E as fe,ac as St,ad as js,ae as vs,L as Qe,af as yt,$ as oe,ag as re,ah as Ge,ai as Ss,aj as ys,ak as ks,al as Ns,q as Je,K as Ee,i as Ye,am as Ze,an as _s,e as ws,_ as Xe,X as et,ao as tt,Z as st,Y as pe,D as kt,v as Nt,x as _t,w as wt,ap as $s,aq as Cs,ar as Is,I as Ps,y as Ts,as as zs,at as As,au as $t,av as Fs,aw as Os,ax as Ds,ay as Ms,az as Es,aA as Rs,aB as Ls,f as qs,l as Bs,aC as Us,R as Vs,u as Ks,O as Hs}from"./index-C6-0Ff1m.js";import{L as Be}from"./index-B7i_xJl4.js";import{u as Ws,L as ke,I as Qs,i as Ct}from"./use-org-notice-DOVWyuaL.js";import{u as It}from"./use-in-settings-DxzX6GVb.js";import{P as Pt,a as Tt,b as zt}from"./popover-DTBVeUtG.js";import{D as Gs,a as Js,b as Ys}from"./drawer-JbzUShND.js";import{T as Zs,a as Xs,b as en,c as tn}from"./tooltip-BnL5r8Gv.js";import{u as sn}from"./use-mobile-IMVhNYT_.js";import{i as Ke,a as nn,b as on,c as ln,d as rn,e as an,f as cn,g as At,s as Ft,h as dn,n as Ot,j as mn,k as Dt,l as un,m as fn,o as pn,p as Mt,q as xn}from"./agent-icon-SasBmPrY.js";import{i as Et}from"./Monitor01-COmDHQ1j.js";import{n as hn,a as bn}from"./Sun-Bji8LMRX.js";import{a as Rt,i as gn}from"./Tool01-BpBS8dw-.js";import{t as jn,a as vn,n as Sn}from"./UserCheck01-DLUgjW3m.js";import{S as Ie,a as te,b as we,u as nt,c as it,d as Lt,e as yn,f as kn}from"./use-sidebar-collapsed-CvPku1YI.js";import{u as Nn}from"./use-deployment-admin-KnQTKRss.js";import{u as _n}from"./use-deco-credits-r1_nX8wr.js";import{u as wn,a as qt}from"./use-entitlements-DIoZnc_q.js";import{u as $n,P as Cn}from"./plan-ladder-DDAcm-ji.js";import{u as In}from"./use-organization-settings-BmAIEgEL.js";import{S as Pn}from"./scroll-area-BSx_oSJx.js";import{u as Bt}from"./use-inbox-feed-BwP3VnzE.js";import{t as Ut}from"./task-key-DgbGUF2j.js";import{S as Tn}from"./super-agent-icon-VandTz-0.js";import{i as zn,n as An}from"./TrendUp01-CdeGaAD9.js";import{B as Fn}from"./badge-BcMIPtVj.js";import{i as Vt}from"./ArrowLeft-zHVY_XX0.js";import{u as Kt,a as ze}from"./use-project-scope-DwQViH2f.js";import{u as Ht}from"./optimistic-project-sidebar-views-DoJ93lgL.js";import{s as On,u as Dn,p as Mn,r as En,a as Rn,o as Ln,P as qn,i as Bn}from"./use-project-native-view-presence-CkqC328s.js";import{P as Un}from"./ai-providers-logos-DD3qZ33J.js";import{u as Vn,O as Kn}from"./own-accounts-section-L5xwUYxF.js";import{i as Wt}from"./LayoutLeft-BSo5LCFE.js";import{T as Qt}from"./toolbar-icon-button-CEZ74wIz.js";import{S as Gt}from"./thread-button-CrjY15ns.js";import{u as Hn}from"./thread-route-DY_UV0gu.js";import{n as Wn}from"./BookOpen01-AamEOlRO.js";import{a as Qn}from"./Image01-DZmu7hyy.js";import{P as Gn}from"./project-apps-C4vT9LXH.js";import{u as Jn}from"./use-panel-navigate-CkYTugDF.js";import{a as Yn}from"./agent-capabilities-CPNkpGBe.js";import{k as Zn,p as Xn}from"./use-recent-apps-4wYjA0CX.js";import{u as Jt}from"./use-navigate-to-agent-WJ7w-8ZZ.js";import{r as ei}from"./resolve-tab-icon-zc5Xnngt.js";import{T as ti}from"./tab-icon-glyph-BMUkOrax.js";import{t as Yt}from"./ChevronDown-CD0tZl8C.js";import{s as He}from"./Plus-CF8KlFVc.js";import{C as ue,a as si,b as ni,c as ii,d as Ue,e as oi,f as li,g as ri}from"./context-menu-B1dAG0Wr.js";import{t as ai}from"./daily-pulse-aiJY3gnz.js";import{o as Zt}from"./new-project-store-BJVEZe7t.js";import{P as Xt}from"./project-icon-CGc9ojaV.js";import{E as ci,p as di,P as mi}from"./watch-sse-pool-DdE7kwP2.js";import{t as ui}from"./use-task-board-items-CygST8NV.js";import{b as fi,p as pi}from"./project-index-I2IwZ_L4.js";import{C as xi}from"./checkbox-DcLJM3uK.js";import{I as We}from"./icon-button-8qhGM4eg.js";import{S as hi}from"./switch-6JKp3FKO.js";import{t as bi}from"./Globe04-OZ9xS3Lx.js";import{i as gi}from"./CreditCard01-W8t7hmzJ.js";import{i as ji}from"./Key01-CSQOqmIz.js";import{i as vi}from"./Zap-QnlW2BG3.js";import{u as Si}from"./use-join-requests-DqFzxVX_.js";import{p as yi,q as ki}from"./question-004-sINsf4GQ.js";import{u as Ni}from"./use-decopilot-events-B1JmbrrX.js";import"./sheet-XJvcudCi.js";import"./sortable.esm-BulVoRsH.js";import"./UserSquare-a_XazovD.js";import"./XClose-DxbjiApV.js";import"./create-organization-dialog-BKxedScB.js";import"./form-Dx1EBvxh.js";import"./label-Cq7ohFeR.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.js";import"./SearchMd-Cw05gj7E.js";import"./use-debounced-value-Dw3dFt4C.js";import"./feedback-BqoIMOg7.js";import"./textarea-C3LFFo0w.js";import"./thread-intent-j3i3V7mR.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-fXa5psFL.js";import"./index-ZdVMGNX_.js";import"./AlertCircle-CYAsQRdT.js";import"./ArrowUp-CsFg9VL2.js";import"./ArrowRight-B6vgPWbg.js";import"./CheckCircle-BB00e9u8.js";import"./ChevronSelectorVertical-CmQsMnAL.js";import"./ChevronUp-DGDvzrMe.js";import"./LinkBroken01-BxVMIk5A.js";import"./File02-o8s5093L.js";import"./MessageCircle01-D1dT92x6.js";import"./SwitchHorizontal01-BSGnkDXI.js";import"./Eye-nqlQ004P.js";import"./Fingerprint04-DY8McBak.js";import"./Minus-D2jrgo3d.js";import"./Play-JVQd8C8L.js";import"./ShoppingBag01-Cc2EJvA-.js";import"./Trash01-DXQWI50A.js";import"./Upload01-BXiTGuBV.js";import"./Users01-BpOXj9ap.js";import"./use-ai-providers-pXYGEzkI.js";import"./schema-DiSJ8SEc.js";import"./task-board-DNboqZMy.js";import"./index-BdQq_4o_.js";import"./useInfiniteQuery-B5jgBAwp.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./repository-binding-Do6sAdct.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-I6vvS9gB.js";import"./use-blog-view-BHifDign.js";import"./use-blocks-v8-project-z5uA6d0S.js";import"./github-icon-hFwcbgKP.js";import"./use-date-fns-locale-DiJmvXQv.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./use-chat-layout-state-BNCeIaIM.js";import"./config-DMRaGUqI.js";function _i(){const t=_.c(19),{org:e}=X(),{data:i}=Ws(e.slug);if(!i)return null;const s=i.severity==="block",o=s?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let l;t[0]!==o?(l=L("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=l):l=t[1];const r=s?void 0:"text-warning";let a;t[2]!==r?(a=L("size-4 shrink-0",r),t[2]=r,t[3]=a):a=t[3];let c;t[4]!==a?(c=n.jsx(xs,{className:a}),t[4]=a,t[5]=c):c=t[5];let f;t[6]!==i.title?(f=n.jsx("span",{className:"font-medium",children:i.title}),t[6]=i.title,t[7]=f):f=t[7];let m;t[8]!==i.message?(m=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:i.message}),t[8]=i.message,t[9]=m):m=t[9];let d;t[10]!==i.ctaLabel||t[11]!==i.ctaUrl?(d=i.ctaUrl&&i.ctaLabel?n.jsx(Pe,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:i.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:i.ctaLabel})}):null,t[10]=i.ctaLabel,t[11]=i.ctaUrl,t[12]=d):d=t[12];let p;return t[13]!==l||t[14]!==c||t[15]!==f||t[16]!==m||t[17]!==d?(p=n.jsxs("div",{role:"alert",className:l,children:[c,f,m,d]}),t[13]=l,t[14]=c,t[15]=f,t[16]=m,t[17]=d,t[18]=p):p=t[18],p}const ct="size-4 shrink-0";function ot(t){const e=_.c(5),{children:i,className:s}=t;let o;e[0]!==s?(o=L("flex w-4 shrink-0 items-center justify-center",s),e[0]=s,e[1]=o):o=e[1];let l;return e[2]!==i||e[3]!==o?(l=n.jsx("span",{className:o,children:i}),e[2]=i,e[3]=o,e[4]=l):l=e[4],l}function Ce(t){const e=_.c(26),{item:i,onClose:s}=t;let o;e[0]!==i.className?(o=L("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",i.className),e[0]=i.className,e[1]=o):o=e[1];const l=o;if(i.href){const m=i.external?"_blank":void 0,d=i.external?"noopener noreferrer":void 0;let p;e[2]!==i.icon?(p=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:i.icon}),e[2]=i.icon,e[3]=p):p=e[3];let u;e[4]!==i.label?(u=n.jsx("span",{className:"flex-1",children:i.label}),e[4]=i.label,e[5]=u):u=e[5];let x;return e[6]!==l||e[7]!==i.href||e[8]!==s||e[9]!==m||e[10]!==d||e[11]!==p||e[12]!==u?(x=n.jsxs("a",{href:i.href,target:m,rel:d,className:l,onClick:s,children:[p,u]}),e[6]=l,e[7]=i.href,e[8]=s,e[9]=m,e[10]=d,e[11]=p,e[12]=u,e[13]=x):x=e[13],x}let r;e[14]!==i||e[15]!==s?(r=()=>{i.onClick?.(),s()},e[14]=i,e[15]=s,e[16]=r):r=e[16];let a;e[17]!==i.icon?(a=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:i.icon}),e[17]=i.icon,e[18]=a):a=e[18];let c;e[19]!==i.label?(c=n.jsx("span",{className:"flex-1",children:i.label}),e[19]=i.label,e[20]=c):c=e[20];let f;return e[21]!==l||e[22]!==r||e[23]!==a||e[24]!==c?(f=n.jsxs("button",{type:"button",onClick:r,className:l,children:[a,c]}),e[21]=l,e[22]=r,e[23]=a,e[24]=c,e[25]=f):f=e[25],f}function wi(){const t=_.c(4),e=E();let i;t[0]!==e?(i=e("common.accountPopover.impersonating"),t[0]=e,t[1]=i):i=t[1];let s;return t[2]!==i?(s=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-2xs font-medium text-warning",children:i}),t[2]=i,t[3]=s):s=t[3],s}function dt(t){const e=_.c(38),{user:i,userImage:s,isImpersonating:o,isMobile:l}=t,r=E(),a=l?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==a?(c=L("flex items-center gap-3 px-4",a),e[0]=a,e[1]=c):c=e[1];const f=i?.name??"U";let m;e[2]!==f||e[3]!==s?(m=n.jsx(Me,{url:s,fallback:f,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=f,e[3]=s,e[4]=m):m=e[4];let d;e[5]!==r||e[6]!==i?.name?(d=i?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=i?.name,e[7]=d):d=e[7];let p;e[8]!==d?(p=n.jsx("p",{className:"text-sm font-medium truncate",children:d}),e[8]=d,e[9]=p):p=e[9];let u;e[10]!==o?(u=o&&n.jsx(wi,{}),e[10]=o,e[11]=u):u=e[11];let x;e[12]!==p||e[13]!==u?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[p,u]}),e[12]=p,e[13]=u,e[14]=x):x=e[14];const b=i?.email;let h;e[15]!==b?(h=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:b}),e[15]=b,e[16]=h):h=e[16];let g;e[17]!==h||e[18]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,h]}),e[17]=h,e[18]=x,e[19]=g):g=e[19];let y;e[20]!==r||e[21]!==i?(y=()=>{i?.id&&navigator.clipboard.writeText(i.id).then(()=>{gt.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=i,e[22]=y):y=e[22];let j;e[23]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(an,{size:14}),e[23]=j):j=e[23];let v;e[24]!==y?(v=n.jsx(Zs,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:y,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:j})}),e[24]=y,e[25]=v):v=e[25];let S;e[26]!==r?(S=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=S):S=e[27];let k;e[28]!==S?(k=n.jsx(Xs,{side:"right",children:n.jsx("p",{className:"text-xs",children:S})}),e[28]=S,e[29]=k):k=e[29];let w;e[30]!==v||e[31]!==k?(w=n.jsx(en,{delayDuration:300,children:n.jsxs(tn,{children:[v,k]})}),e[30]=v,e[31]=k,e[32]=w):w=e[32];let $;return e[33]!==g||e[34]!==w||e[35]!==c||e[36]!==m?($=n.jsxs("div",{className:c,children:[m,g,w]}),e[33]=g,e[34]=w,e[35]=c,e[36]=m,e[37]=$):$=e[37],$}function mt(t){const e=_.c(35),{themeOptions:i,preferences:s,setPreferences:o,isMobile:l}=t,r=E(),a=l?"size-8":"size-7",c=l?"px-3 py-3":"px-2 py-1.5";let f;e[0]!==c?(f=L("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=f):f=e[1];let m;if(e[2]!==a||e[3]!==s.theme||e[4]!==o||e[5]!==i){let S;e[7]!==a||e[8]!==s.theme||e[9]!==o?(S=k=>{const{value:w,icon:$,label:N}=k;return n.jsx("button",{type:"button","aria-label":N,onClick:()=>o(C=>({...C,theme:w})),className:L(a,"rounded-lg flex items-center justify-center transition-colors",s.theme===w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent hover:text-foreground"),children:$},w)},e[7]=a,e[8]=s.theme,e[9]=o,e[10]=S):S=e[10],m=i.map(S),e[2]=a,e[3]=s.theme,e[4]=o,e[5]=i,e[6]=m}else m=e[6];let d;e[11]!==m?(d=n.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=d):d=e[12];let p;e[13]!==s.enableSounds||e[14]!==r?(p=s.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=s.enableSounds,e[14]=r,e[15]=p):p=e[15];let u;e[16]!==o?(u=()=>o($i),e[16]=o,e[17]=u):u=e[17];const x=s.enableSounds?"text-foreground hover:bg-sidebar-accent":"text-muted-foreground hover:bg-sidebar-accent hover:text-foreground";let b;e[18]!==a||e[19]!==x?(b=L(a,"rounded-lg flex items-center justify-center transition-colors",x),e[18]=a,e[19]=x,e[20]=b):b=e[20];let h;e[21]!==s.enableSounds?(h=s.enableSounds?n.jsx(ln,{size:14}):n.jsx(rn,{size:14}),e[21]=s.enableSounds,e[22]=h):h=e[22];let g;e[23]!==p||e[24]!==u||e[25]!==b||e[26]!==h?(g=n.jsx("button",{type:"button","aria-label":p,onClick:u,className:b,children:h}),e[23]=p,e[24]=u,e[25]=b,e[26]=h,e[27]=g):g=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.597.1"]}),e[28]=y):y=e[28];let j;e[29]!==g?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[g,y]}),e[29]=g,e[30]=j):j=e[30];let v;return e[31]!==j||e[32]!==f||e[33]!==d?(v=n.jsxs("div",{className:f,children:[d,j]}),e[31]=j,e[32]=f,e[33]=d,e[34]=v):v=e[34],v}function $i(t){return{...t,enableSounds:!t.enableSounds}}function ut(t){const e=_.c(54),{user:i,userImage:s,menuItems:o,signOutItem:l,stopImpersonatingItem:r,isImpersonating:a,themeOptions:c,preferences:f,setPreferences:m,close:d,isMobile:p}=t;if(p){let v;e[0]!==a||e[1]!==i||e[2]!==s?(v=n.jsx(dt,{user:i,userImage:s,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=i,e[2]=s,e[3]=v):v=e[3];let S;if(e[4]!==d||e[5]!==o){let I;e[7]!==d?(I=A=>n.jsx(Ce,{item:A,onClose:d},A.key),e[7]=d,e[8]=I):I=e[8],S=o.map(I),e[4]=d,e[5]=o,e[6]=S}else S=e[6];let k;e[9]!==d||e[10]!==r?(k=r&&n.jsx(Ce,{item:r,onClose:d}),e[9]=d,e[10]=r,e[11]=k):k=e[11];let w;e[12]!==d||e[13]!==l?(w=n.jsx(Ce,{item:l,onClose:d}),e[12]=d,e[13]=l,e[14]=w):w=e[14];let $;e[15]!==S||e[16]!==k||e[17]!==w?($=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[S,k,w]})}),e[15]=S,e[16]=k,e[17]=w,e[18]=$):$=e[18];let N;e[19]!==f||e[20]!==m||e[21]!==c?(N=n.jsx(mt,{themeOptions:c,preferences:f,setPreferences:m,isMobile:!0}),e[19]=f,e[20]=m,e[21]=c,e[22]=N):N=e[22];let C;return e[23]!==v||e[24]!==$||e[25]!==N?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,$,N]}),e[23]=v,e[24]=$,e[25]=N,e[26]=C):C=e[26],C}let u;e[27]!==a||e[28]!==i||e[29]!==s?(u=n.jsx(dt,{user:i,userImage:s,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=i,e[29]=s,e[30]=u):u=e[30];let x;if(e[31]!==d||e[32]!==o){let v;e[34]!==d?(v=S=>n.jsx(Ce,{item:S,onClose:d},S.key),e[34]=d,e[35]=v):v=e[35],x=o.map(v),e[31]=d,e[32]=o,e[33]=x}else x=e[33];let b;e[36]!==d||e[37]!==r?(b=r&&n.jsx(Ce,{item:r,onClose:d}),e[36]=d,e[37]=r,e[38]=b):b=e[38];let h;e[39]!==d||e[40]!==l?(h=n.jsx(Ce,{item:l,onClose:d}),e[39]=d,e[40]=l,e[41]=h):h=e[41];let g;e[42]!==x||e[43]!==b||e[44]!==h?(g=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,b,h]}),e[42]=x,e[43]=b,e[44]=h,e[45]=g):g=e[45];let y;e[46]!==f||e[47]!==m||e[48]!==c?(y=n.jsx(mt,{themeOptions:c,preferences:f,setPreferences:m,isMobile:!1}),e[46]=f,e[47]=m,e[48]=c,e[49]=y):y=e[49];let j;return e[50]!==u||e[51]!==g||e[52]!==y?(j=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[u,g,y]})}),e[50]=u,e[51]=g,e[52]=y,e[53]=j):j=e[53],j}function es(){const t=_.c(98),e=E(),{data:i}=Te.useSession(),{org:s}=X(),o=Re();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org",shouldThrow:!1},t[0]=l):l=t[0];const a=hs(l)?.params.org,[c,f]=bt(),m=sn(),{isAdmin:d}=Nn(),[p,u]=ae.useState(!1),x=i?.user,b=x?.image,h=!!i?.session?.impersonatedBy;let g;t[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>u(!1),t[1]=g):g=t[1];const y=g;let j;t[2]!==e?(j=e("common.accountPopover.preferences"),t[2]=e,t[3]=j):j=t[3];let v;t[4]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Rt,{size:16}),t[4]=v):v=t[4];let S;t[5]!==o||t[6]!==a?(S=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=S):S=t[7];let k;t[8]!==j||t[9]!==S?(k={key:"preferences",label:j,icon:v,onClick:S},t[8]=j,t[9]=S,t[10]=k):k=t[10];let w;t[11]!==s||t[12]!==o?(w=s?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(jt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:s.slug}})}}]:[],t[11]=s,t[12]=o,t[13]=w):w=t[13];let $;t[14]!==e?($=e("common.accountPopover.termsOfUse"),t[14]=e,t[15]=$):$=t[15];let N;t[16]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(nn,{size:16}),t[16]=N):N=t[16];let C;t[17]!==$?(C={key:"terms",label:$,icon:N,href:"https://www.decocms.com/terms-of-use",external:!0},t[17]=$,t[18]=C):C=t[18];let I;t[19]!==e?(I=e("common.accountPopover.privacyPolicy"),t[19]=e,t[20]=I):I=t[20];let A;t[21]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(bs,{size:16}),t[21]=A):A=t[21];let q;t[22]!==I?(q={key:"privacy",label:I,icon:A,href:"https://www.decocms.com/privacy-policy",external:!0},t[22]=I,t[23]=q):q=t[23];let B;t[24]!==e?(B=e("common.accountPopover.repository"),t[24]=e,t[25]=B):B=t[25];let J;t[26]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(gs,{className:"w-4 h-4"}),t[26]=J):J=t[26];let G;t[27]!==B?(G={key:"github",label:B,icon:J,href:"https://github.com/decocms/studio",external:!0},t[27]=B,t[28]=G):G=t[28];let V;t[29]!==e?(V=e("common.accountPopover.community"),t[29]=e,t[30]=V):V=t[30];let ee;t[31]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(vt,{size:16}),t[31]=ee):ee=t[31];let W;t[32]!==V?(W={key:"community",label:V,icon:ee,href:"https://decocms.com/discord",external:!0},t[32]=V,t[33]=W):W=t[33];let K;t[34]!==e?(K=e("common.accountPopover.homepage"),t[34]=e,t[35]=K):K=t[35];let Y;t[36]===Symbol.for("react.memo_cache_sentinel")?(Y=n.jsx(on,{size:16}),t[36]=Y):Y=t[36];let U;t[37]!==K?(U={key:"homepage",label:K,icon:Y,href:"https://decocms.com",external:!0},t[37]=K,t[38]=U):U=t[38];let Q;t[39]!==d||t[40]!==o||t[41]!==e?(Q=d?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(jn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[39]=d,t[40]=o,t[41]=e,t[42]=Q):Q=t[42];let Z;t[43]!==q||t[44]!==G||t[45]!==W||t[46]!==U||t[47]!==Q||t[48]!==k||t[49]!==w||t[50]!==C?(Z=[k,...w,C,q,G,W,U,...Q],t[43]=q,t[44]=G,t[45]=W,t[46]=U,t[47]=Q,t[48]=k,t[49]=w,t[50]=C,t[51]=Z):Z=t[51];const z=Z;let R;t[52]!==e?(R=e("common.accountPopover.signOut"),t[52]=e,t[53]=R):R=t[53];let P;t[54]===Symbol.for("react.memo_cache_sentinel")?(P=n.jsx(Ke,{size:16}),t[54]=P):P=t[54];let O;t[55]!==R?(O={key:"logout",label:R,icon:P,onClick:Ii},t[55]=R,t[56]=O):O=t[56];const D=O;let H;t[57]!==h||t[58]!==e?(H=h?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ke,{size:16}),onClick:async()=>{const{error:_e}=await Te.admin.stopImpersonating();if(_e){gt.error(_e.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[57]=h,t[58]=e,t[59]=H):H=t[59];const Se=H;let ce;t[60]===Symbol.for("react.memo_cache_sentinel")?(ce=n.jsx(hn,{size:14}),t[60]=ce):ce=t[60];let se;t[61]!==e?(se=e("common.accountPopover.lightTheme"),t[61]=e,t[62]=se):se=t[62];let ne;t[63]!==se?(ne={value:"light",icon:ce,label:se},t[63]=se,t[64]=ne):ne=t[64];let xe;t[65]===Symbol.for("react.memo_cache_sentinel")?(xe=n.jsx(bn,{size:14}),t[65]=xe):xe=t[65];let M;t[66]!==e?(M=e("common.accountPopover.darkTheme"),t[66]=e,t[67]=M):M=t[67];let ie;t[68]!==M?(ie={value:"dark",icon:xe,label:M},t[68]=M,t[69]=ie):ie=t[69];let he;t[70]===Symbol.for("react.memo_cache_sentinel")?(he=n.jsx(Et,{size:14}),t[70]=he):he=t[70];let de;t[71]!==e?(de=e("common.accountPopover.systemTheme"),t[71]=e,t[72]=de):de=t[72];let me;t[73]!==de?(me={value:"system",icon:he,label:de},t[73]=de,t[74]=me):me=t[74];let be;t[75]!==ne||t[76]!==ie||t[77]!==me?(be=[ne,ie,me],t[75]=ne,t[76]=ie,t[77]=me,t[78]=be):be=t[78];const ye=be;let ge;t[79]!==h||t[80]!==m||t[81]!==z||t[82]!==c||t[83]!==f||t[84]!==D||t[85]!==Se||t[86]!==ye||t[87]!==x||t[88]!==b?(ge={user:x,userImage:b,menuItems:z,signOutItem:D,stopImpersonatingItem:Se,isImpersonating:h,themeOptions:ye,preferences:c,setPreferences:f,close:y,isMobile:m},t[79]=h,t[80]=m,t[81]=z,t[82]=c,t[83]=f,t[84]=D,t[85]=Se,t[86]=ye,t[87]=x,t[88]=b,t[89]=ge):ge=t[89];const je=ge;let ve;return t[90]!==h||t[91]!==m||t[92]!==p||t[93]!==je||t[94]!==e||t[95]!==x?.name||t[96]!==b?(ve=m?n.jsxs(Gs,{open:p,onOpenChange:u,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>u(!0),className:L("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",h&&"border-2 border-dashed border-warning"),children:[n.jsx(Me,{url:b,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Js,{className:"h-[80dvh] p-0",children:[n.jsx(Ys,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(ut,{...je})]})]}):n.jsxs(Pt,{open:p,onOpenChange:u,children:[n.jsx(Tt,{asChild:!0,children:n.jsxs(Ie,{"data-tour":ke.account,tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:L(h&&"border-2 border-dashed border-warning"),children:[n.jsx(ot,{children:n.jsx(Me,{url:b,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(zt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ci,children:n.jsx(ut,{...je})})]}),t[90]=h,t[91]=m,t[92]=p,t[93]=je,t[94]=e,t[95]=x?.name,t[96]=b,t[97]=ve):ve=t[97],ve}function Ci(t){return t.preventDefault()}function Ii(){fe("signed_out",{source:"account_popover"}),St(),Te.signOut()}class Pi extends ae.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,i){}render(){return this.state.hasError?null:this.props.children}}function Ti(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function zi(){const t=_.c(17),e=Re(),{org:i}=X(),{hasDecoKey:s,balanceDollars:o}=_n();if(!s)return null;let l;t[0]!==o?(l=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=l):l=t[1];let r;t[2]!==o?(r=L(o!=null&&Ti(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==i.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:i.slug}}),t[4]=e,t[5]=i.slug,t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(cn,{}),t[7]=c):c=t[7];let f;t[8]!==o?(f=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=f):f=t[9];let m;t[10]!==f?(m=n.jsx("span",{children:f}),t[10]=f,t[11]=m):m=t[11];let d;return t[12]!==l||t[13]!==r||t[14]!==a||t[15]!==m?(d=n.jsx(te,{children:n.jsx(we,{children:n.jsxs(Ie,{tooltip:l,className:r,onClick:a,children:[c,m]})})}),t[12]=l,t[13]=r,t[14]=a,t[15]=m,t[16]=d):d=t[16],d}const Ai={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Fi(){const t=_.c(32),e=E(),i=Re(),{org:s}=X(),{data:o}=qt();if(!o?.usage||!o.features.chat)return null;let l,r;if(t[0]!==o.usage.percent?(l=Math.round(o.usage.percent*100),r=Number.isFinite(l),t[0]=o.usage.percent,t[1]=l,t[2]=r):(l=t[1],r=t[2]),!r)return null;const a=Math.min(100,Math.max(0,l)),c=o.plan.name;let f;t[3]!==e?(f=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=f):f=t[4];const m=`${c} · ${f} ${a}%`;let d;t[5]!==i||t[6]!==s.slug?(d=()=>i({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[5]=i,t[6]=s.slug,t[7]=d):d=t[7];let p;t[8]!==o.plan.id?(p=n.jsx(ot,{className:"-ml-px",children:n.jsx(Oi,{planId:o.plan.id})}),t[8]=o.plan.id,t[9]=p):p=t[9];let u;t[10]!==o.plan.name?(u=n.jsx("span",{className:"truncate font-medium",children:o.plan.name}),t[10]=o.plan.name,t[11]=u):u=t[11];let x;t[12]!==a?(x=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[a,"%"]}),t[12]=a,t[13]=x):x=t[13];let b;t[14]!==u||t[15]!==x?(b=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[u,x]}),t[14]=u,t[15]=x,t[16]=b):b=t[16];const h=Ai[o.usage.state];let g;t[17]!==h?(g=L("block h-full rounded-full",h),t[17]=h,t[18]=g):g=t[18];const y=`${a}%`;let j;t[19]!==y?(j={width:y},t[19]=y,t[20]=j):j=t[20];let v;t[21]!==g||t[22]!==j?(v=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:g,style:j})}),t[21]=g,t[22]=j,t[23]=v):v=t[23];let S;t[24]!==v||t[25]!==b?(S=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[b,v]}),t[24]=v,t[25]=b,t[26]=S):S=t[26];let k;return t[27]!==S||t[28]!==m||t[29]!==d||t[30]!==p?(k=n.jsx(te,{children:n.jsx(we,{children:n.jsxs(Ie,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:d,children:[p,S]})})}),t[27]=S,t[28]=m,t[29]=d,t[30]=p,t[31]=k):k=t[31],k}function Oi(t){const e=_.c(6),{planId:i}=t,{data:s}=$n();let o;e[0]!==i||e[1]!==s?(o=s?.findIndex(a=>a.id===i)??-1,e[0]=i,e[1]=s,e[2]=o):o=e[2];const l=o;if(l<0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(At,{className:ct}),e[3]=a):a=e[3],a}let r;return e[4]!==l?(r=n.jsx(Cn,{index:l,className:ct}),e[4]=l,e[5]=r):r=e[5],r}function Di(){return wn()?n.jsx(Fi,{}):n.jsx(zi,{})}function Mi(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Pi,{children:n.jsx(ae.Suspense,{fallback:null,children:n.jsx(Di,{})})}),t[0]=e):e=t[0],e}function Ei(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":case"order_incident":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function Ri(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");case"order_incident":return e("sidebar.inbox.actionOrderIncident");default:{const i=t.action;return String(i)}}}function Li(t){const e=_.c(36),{update:i,orgSlug:s,onSelect:o}=t,l=E();let r;e[0]!==s||e[1]!==i.taskKeySeq?(r=Ut(s,i.taskKeySeq),e[0]=s,e[1]=i.taskKeySeq,e[2]=r):r=e[2];const a=r,c=!i.actorName;let f;e[3]!==c||e[4]!==i.actorImage||e[5]!==i.actorName?(f=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(Tn,{size:24}):n.jsx(Me,{url:i.actorImage??void 0,fallback:i.actorName??"?",shape:"circle",size:"xs"})}),e[3]=c,e[4]=i.actorImage,e[5]=i.actorName,e[6]=f):f=e[6];let m;e[7]!==i.taskTitle?(m=n.jsx("p",{className:"min-w-0 flex-1 line-clamp-2 break-words text-sm font-medium text-foreground",children:i.taskTitle}),e[7]=i.taskTitle,e[8]=m):m=e[8];let d;e[9]!==i.occurredAt?(d=js(new Date(i.occurredAt)),e[9]=i.occurredAt,e[10]=d):d=e[10];let p;e[11]!==d?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:d}),e[11]=d,e[12]=p):p=e[12];let u;e[13]!==m||e[14]!==p?(u=n.jsxs("div",{className:"flex items-baseline gap-2",children:[m,p]}),e[13]=m,e[14]=p,e[15]=u):u=e[15];let x;e[16]!==a?(x=a&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:a})," · "]}),e[16]=a,e[17]=x):x=e[17];let b;e[18]!==i.action?(b=L(Ei(i.action)),e[18]=i.action,e[19]=b):b=e[19];let h;e[20]!==l||e[21]!==i?(h=Ri(i,l),e[20]=l,e[21]=i,e[22]=h):h=e[22];let g;e[23]!==b||e[24]!==h?(g=n.jsx("span",{className:b,children:h}),e[23]=b,e[24]=h,e[25]=g):g=e[25];let y;e[26]!==g||e[27]!==x?(y=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[x,g]}),e[26]=g,e[27]=x,e[28]=y):y=e[28];let j;e[29]!==y||e[30]!==u?(j=n.jsxs("div",{className:"min-w-0 flex-1",children:[u,y]}),e[29]=y,e[30]=u,e[31]=j):j=e[31];let v;return e[32]!==o||e[33]!==j||e[34]!==f?(v=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-accent",children:[f,j]}),e[32]=o,e[33]=j,e[34]=f,e[35]=v):v=e[35],v}function ts(){const t=ae.useContext(vs),{data:e,refetch:i}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>i?.()}}function qi(t){const e=_.c(2),{onReach:i}=t;let s;return e[0]!==i?(s=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const l=new IntersectionObserver(r=>{r.some(Bi)&&i()});return l.observe(o),()=>l.disconnect()}}),e[0]=i,e[1]=s):s=e[1],s}function Bi(t){return t.isIntersecting}function Ui(t){const e=_.c(28),{onClose:i}=t,s=E(),o=Re(),{org:l}=X(),{updates:r,markAllRead:a,markRead:c,hasMore:f,fetchMore:m}=Bt(),d=ts(),p=d.invitations,u=d.refetch;let x;e[0]!==s?(x=s("sidebar.inbox.title"),e[0]=s,e[1]=x):x=e[1];let b;e[2]!==x?(b=n.jsx("h3",{className:"text-sm font-medium",children:x}),e[2]=x,e[3]=b):b=e[3];let h;e[4]!==a||e[5]!==s||e[6]!==r.length?(h=r.length>0&&n.jsx(Pe,{size:"sm",variant:"ghost",className:"text-muted-foreground",onClick:a,children:s("sidebar.inbox.markAllRead")}),e[4]=a,e[5]=s,e[6]=r.length,e[7]=h):h=e[7];let g;e[8]!==b||e[9]!==h?(g=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[b,h]}),e[8]=b,e[9]=h,e[10]=g):g=e[10];let y;e[11]!==p||e[12]!==u?(y=p.length>0&&n.jsx("div",{className:"shrink-0 border-border border-b p-2",children:p.map(S=>n.jsx(Qs,{invitation:S,onChanged:u},S.id))}),e[11]=p,e[12]=u,e[13]=y):y=e[13];let j;e[14]!==m||e[15]!==f||e[16]!==p.length||e[17]!==c||e[18]!==o||e[19]!==i||e[20]!==l||e[21]!==s||e[22]!==r?(j=r.length===0&&p.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(Ft,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:s("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:s("sidebar.inbox.emptyBody")})]}):n.jsxs(Pn,{className:"min-h-0 flex-1",children:[r.map(S=>{const k=Ut(l.slug,S.taskKeySeq);return n.jsx(Li,{update:S,orgSlug:l.slug,onSelect:()=>{c(S.id),i(),k&&o({to:"/$org/tasks/{-$taskKey}",params:{org:l.slug,taskKey:k}})}},S.id)}),f&&n.jsx(qi,{onReach:m})]}),e[14]=m,e[15]=f,e[16]=p.length,e[17]=c,e[18]=o,e[19]=i,e[20]=l,e[21]=s,e[22]=r,e[23]=j):j=e[23];let v;return e[24]!==g||e[25]!==y||e[26]!==j?(v=n.jsxs(n.Fragment,{children:[g,y,j]}),e[24]=g,e[25]=y,e[26]=j,e[27]=v):v=e[27],v}function Vi(){const t=_.c(1),{redDotCount:e}=Bt(),{invitations:i}=ts();if(e===0&&i.length===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function Ki(t){const e=_.c(10),{open:i,onOpenChange:s,children:o}=t;let l;e[0]!==s||e[1]!==i?(l=i&&n.jsx(Ui,{onClose:()=>s(!1)}),e[0]=s,e[1]=i,e[2]=l):l=e[2];let r;e[3]!==l?(r=n.jsx(zt,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(460px,calc(100vw-2rem))] flex-col p-0",children:l}),e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==o||e[6]!==s||e[7]!==i||e[8]!==r?(a=n.jsxs(Pt,{open:i,onOpenChange:s,children:[o,r]}),e[5]=o,e[6]=s,e[7]=i,e[8]=r,e[9]=a):a=e[9],a}function ss(){const t=_.c(9),e=E(),[i,s]=ae.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let l,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ft,{size:15}),r=n.jsx(Vi,{}),t[2]=l,t[3]=r):(l=t[2],r=t[3]);let a;t[4]!==o?(a=n.jsx(Tt,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[l,r]})}),t[4]=o,t[5]=a):a=t[5];let c;return t[6]!==i||t[7]!==a?(c=n.jsx(Ki,{open:i,onOpenChange:s,children:a}),t[6]=i,t[7]=a,t[8]=c):c=t[8],c}function Ne(t){const e=_.c(35),{icon:i,label:s,isActive:o,link:l,onSelect:r,ariaLabel:a,className:c,dataTour:f,children:m,trailing:d,contextId:p}=t,u=o===void 0?!1:o,x=nt(),b=a??s,h=x?b:void 0;let g;e[0]!==c||e[1]!==f||e[2]!==u||e[3]!==h?(g={isActive:u,tooltip:h,className:c,"data-tour":f},e[0]=c,e[1]=f,e[2]=u,e[3]=h,e[4]=g):g=e[4];const y=g;let j;e[5]!==d?(j=d&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:d}),e[5]=d,e[6]=j):j=e[6];let v;e[7]!==s?(v=n.jsx("span",{className:"truncate",children:s}),e[7]=s,e[8]=v):v=e[8];let S;e[9]!==i||e[10]!==j||e[11]!==v?(S=n.jsxs(n.Fragment,{children:[i,j,v]}),e[9]=i,e[10]=j,e[11]=v,e[12]=S):S=e[12];const k=S;if(l){const N=u?"page":void 0;let C;e[13]!==k||e[14]!==l||e[15]!==b||e[16]!==r||e[17]!==N?(C=n.jsx(Qe,{...l,"aria-label":b,"aria-current":N,onClick:r,children:k}),e[13]=k,e[14]=l,e[15]=b,e[16]=r,e[17]=N,e[18]=C):C=e[18];let I;e[19]!==y||e[20]!==C?(I=n.jsx(Ie,{asChild:!0,...y,children:C}),e[19]=y,e[20]=C,e[21]=I):I=e[21];let A;return e[22]!==m||e[23]!==p||e[24]!==I?(A=n.jsxs(we,{"data-context-id":p,children:[I,m]}),e[22]=m,e[23]=p,e[24]=I,e[25]=A):A=e[25],A}let w;e[26]!==k||e[27]!==b||e[28]!==r||e[29]!==y?(w=n.jsx(Ie,{...y,"aria-label":b,onClick:r,children:k}),e[26]=k,e[27]=b,e[28]=r,e[29]=y,e[30]=w):w=e[30];let $;return e[31]!==m||e[32]!==p||e[33]!==w?($=n.jsxs(we,{"data-context-id":p,children:[w,m]}),e[31]=m,e[32]=p,e[33]=w,e[34]=$):$=e[34],$}function Hi(t){const e=_.c(5),{label:i,link:s,onSelect:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Vt,{size:16}),e[0]=l):l=e[0];let r;return e[1]!==i||e[2]!==s||e[3]!==o?(r=n.jsx("div",{className:"contents",children:n.jsx(te,{className:"shrink-0",children:n.jsx(Ne,{icon:l,label:i,className:"text-sidebar-foreground/70",link:s,onSelect:o})})}),e[1]=i,e[2]=s,e[3]=o,e[4]=r):r=e[4],r}function Wi(t){return t==="board"?"kanban":Ct(t)?"cms":null}function ns(){const t=_.c(2),{data:e}=qt();let i;return t[0]!==e?(i=s=>{const o=Wi(s);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=i):i=t[1],i}const Le="settings",ft=["overview","files","monitor","plan","tasks"];function Qi(t){return t?[...ft,Le]:ft}const Gi={overview:"overview",files:"context",monitor:"monitor",plan:"plan",tasks:"board"};function Ji(t,e){return Qi(t).filter(i=>!t||i===Le||e.has(Gi[i]))}function Yi(){const t=_.c(13),e=E(),{org:i}=X(),s=yt(),o=Kt(),{project:l}=ze(),r=Ht(l?.id);let a;if(t[0]!==s||t[1]!==i.slug||t[2]!==r||t[3]!==l?.metadata||t[4]!==o||t[5]!==e){const c=On(l?.metadata,r);let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(dn,{size:16}),t[7]=f):f=t[7];let m;t[8]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(zn,{size:16}),t[8]=m):m=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(Ot,{size:16}),t[9]=d):d=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(mn,{size:16}),t[10]=p):p=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(vn,{size:16}),t[11]=u):u=t[11];let x;t[12]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Dt,{size:16}),t[12]=x):x=t[12];const b={overview:{key:"overview",label:e("sidebar.navDestinations.overview"),icon:f,isActive:o?s===oe.root||s===`${oe.root}/`:s===re.home||s===re.orgIndex,trackAs:"overview",link:o?{to:oe.root,params:{org:i.slug,agentId:o}}:{to:re.home,params:{org:i.slug}}},plan:{key:"plan",label:e("sidebar.navDestinations.plan"),icon:m,isActive:s===re.plan||s===oe.plan,trackAs:"plan",soon:!0,link:o?{to:oe.plan,params:{org:i.slug,agentId:o}}:{to:re.plan,params:{org:i.slug}}},tasks:{key:"tasks",label:e("sidebar.navDestinations.spineTasks"),icon:d,isActive:s===re.tasks||s===oe.tasks,trackAs:"board",link:o?{to:oe.tasks,params:{org:i.slug,agentId:o,taskKey:void 0}}:{to:re.tasks,params:{org:i.slug,taskKey:void 0}}},monitor:{key:"monitor",label:e("sidebar.navDestinations.monitor"),icon:p,isActive:s===re.monitoring||s===oe.monitoring,trackAs:"monitor",link:o?{to:oe.monitoring,params:{org:i.slug,agentId:o}}:{to:re.monitoring,params:{org:i.slug}}},settings:{key:"settings",label:e("sidebar.navDestinations.settings"),icon:u,isActive:s===oe.settings,trackAs:Le,link:{to:oe.settings,params:{org:i.slug,agentId:o??""}}},files:{key:"files",label:e("sidebar.navDestinations.context"),icon:x,isActive:s===re.library||s===oe.library,trackAs:"files",link:o?{to:oe.library,params:{org:i.slug,agentId:o}}:{to:re.library,params:{org:i.slug}}}};a=Ji(!!o,c).map(h=>b[h]),t[0]=s,t[1]=i.slug,t[2]=r,t[3]=l?.metadata,t[4]=o,t[5]=e,t[6]=a}else a=t[6];return a}function Zi(t){const e=_.c(11),{onNavigate:i}=t,s=E(),o=Yi(),l=ns();let r;if(e[0]!==o||e[1]!==l||e[2]!==i||e[3]!==s){let c;e[5]!==l||e[6]!==i||e[7]!==s?(c=f=>n.jsx(Ne,{icon:f.icon,label:f.label,isActive:f.isActive,link:f.link,trailing:f.soon?n.jsx(Fn,{variant:"muted",children:s("common.soon")}):l(f.key)?n.jsx(Ge,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{fe("nav_destination_clicked",{destination:f.trackAs}),i?.()}},f.key),e[5]=l,e[6]=i,e[7]=s,e[8]=c):c=e[8],r=o.map(c),e[0]=o,e[1]=l,e[2]=i,e[3]=s,e[4]=r}else r=e[4];let a;return e[9]!==r?(a=n.jsx(te,{className:"gap-1",children:r}),e[9]=r,e[10]=a):a=e[10],a}function Xi(){const t=_.c(7),{org:e}=X(),{setOpenMobile:i}=it();let s;t[0]!==e.slug?(s={org:e.slug},t[0]=e.slug,t[1]=s):s=t[1];let o;t[2]!==i?(o=()=>{fe("nav_destination_clicked",{destination:Le,target:"org"}),i(!1)},t[2]=i,t[3]=o):o=t[3];let l;return t[4]!==s||t[5]!==o?(l={to:"/$org/settings",params:s,onClick:o},t[4]=s,t[5]=o,t[6]=l):l=t[6],l}function is(){const t=_.c(6),e=E(),i=Xi();let s;t[0]!==e?(s=e("sidebar.navDestinations.settings"),t[0]=e,t[1]=s):s=t[1];const o=s;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Rt,{size:15}),t[2]=l):l=t[2];let r;return t[3]!==o||t[4]!==i?(r=n.jsx(Qe,{...i,"aria-label":o,title:o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground","data-tour":ke.settings,children:l}),t[3]=o,t[4]=i,t[5]=r):r=t[5],r}function eo(){const t=_.c(14),e=E(),{org:i}=X(),{setOpenMobile:s}=it(),{status:o,connected:l,expired:r}=Vn();if(!o.isSuccess||l)return null;let a;t[0]!==r||t[1]!==e?(a=e(r?"sidebar.linkClaude.relink":"sidebar.linkClaude.button"),t[0]=r,t[1]=e,t[2]=a):a=t[2];const c=a;let f;t[3]!==i.slug?(f={org:i.slug},t[3]=i.slug,t[4]=f):f=t[4];let m;t[5]!==s?(m=()=>s(!1),t[5]=s,t[6]=m):m=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(ot,{children:n.jsx("img",{src:Un["claude-code"],alt:"",className:"size-4 object-contain"})}),t[7]=d):d=t[7];let p;t[8]!==c?(p=n.jsx("span",{children:c}),t[8]=c,t[9]=p):p=t[9];let u;return t[10]!==f||t[11]!==m||t[12]!==p?(u=n.jsx(we,{children:n.jsx(Ie,{asChild:!0,children:n.jsxs(Qe,{to:"/$org/settings/ai-providers",params:f,hash:Kn,onClick:m,children:[d,p]})})}),t[10]=f,t[11]=m,t[12]=p,t[13]=u):u=t[13],u}function to(t){const e=_.c(4),{showLinkClaude:i}=t;let s;e[0]!==i?(s=i&&n.jsx(eo,{}),e[0]=i,e[1]=s):s=e[1];let o;return e[2]!==s?(o=n.jsx(te,{className:"gap-0.5",children:s}),e[2]=s,e[3]=o):o=e[3],o}function so(){const t=_.c(8),e=In(),i=!e;let s;t[0]!==i?(s=i&&n.jsx(Mi,{}),t[0]=i,t[1]=s):s=t[1];const o=!e;let l;t[2]!==o?(l=n.jsx(to,{showLinkClaude:o}),t[2]=o,t[3]=l):l=t[3];let r;t[4]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(te,{className:"gap-0.5",children:n.jsx(we,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(es,{})}),n.jsx(is,{}),n.jsx(ss,{})]})})}),t[4]=r):r=t[4];let a;return t[5]!==s||t[6]!==l?(a=n.jsxs(Lt,{className:"px-2 pb-3 gap-0.5",children:[s,l,r]}),t[5]=s,t[6]=l,t[7]=a):a=t[7],a}function no(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Lt,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(te,{children:n.jsx(we,{children:n.jsx(es,{})})})}),n.jsx(is,{}),n.jsx(ss,{})]})}),t[0]=e):e=t[0],e}function io(){const t=_.c(3),{setScope:e}=ze(),i=Hn();let s;return t[0]!==i||t[1]!==e?(s=()=>{const o=i!==void 0?"route_resolves_scope":null;fe("scope_cleared",{relocated:o!==null,reason:o}),e(null)},t[0]=i,t[1]=e,t[2]=s):s=t[2],s}function oo(){const t=_.c(2),{org:e}=X();let i;return t[0]!==e.name?(i=n.jsx("div",{className:"flex min-w-0 flex-1 items-center py-1.5 pr-1.5 pl-2 md:h-[34px] md:py-0","data-tour":ke.switcher,children:n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground text-sm",children:e.name})}),t[0]=e.name,t[1]=i):i=t[1],i}function os(t){const e=_.c(14),{onNavigate:i}=t,s=E(),{org:o}=X(),{project:l}=ze(),r=io();if(!l){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(oo,{}),e[0]=u):u=e[0],u}let a;e[1]!==o.name||e[2]!==s?(a=s("sidebar.scope.backTo",{name:o.name}),e[1]=o.name,e[2]=s,e[3]=a):a=e[3];const c=a;let f;e[4]!==r||e[5]!==i?(f=()=>{r(),i?.()},e[4]=r,e[5]=i,e[6]=f):f=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Vt,{size:16,className:"shrink-0 text-muted-foreground"}),e[7]=m):m=e[7];let d;e[8]!==l.title?(d=n.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-foreground text-sm",children:l.title}),e[8]=l.title,e[9]=d):d=e[9];let p;return e[10]!==c||e[11]!==f||e[12]!==d?(p=n.jsxs("button",{type:"button",title:c,"aria-label":c,onClick:f,className:"flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pr-1.5 pl-2 text-left transition-colors hover:bg-sidebar-accent md:h-[34px] md:py-0",children:[m,d]}),e[10]=c,e[11]=f,e[12]=d,e[13]=p):p=e[13],p}const ls=16;function lo(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsxs(n.Fragment,{children:[n.jsx(os,{}),n.jsx(ao,{}),n.jsx(Gt,{})]}),t[0]=e):e=t[0],e}function ro(t){const e=_.c(12),{onClose:i}=t,s=E();let o;e[0]!==i?(o=n.jsx(os,{onNavigate:i}),e[0]=i,e[1]=o):o=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Gt,{}),e[2]=l):l=e[2];let r;e[3]!==s?(r=s("sidebar.header.closeSidebar"),e[3]=s,e[4]=r):r=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Wt,{size:ls}),e[5]=a):a=e[5];let c;e[6]!==i||e[7]!==r?(c=n.jsx(Qt,{onClick:i,"aria-label":r,children:a}),e[6]=i,e[7]=r,e[8]=c):c=e[8];let f;return e[9]!==o||e[10]!==c?(f=n.jsxs(n.Fragment,{children:[o,l,c]}),e[9]=o,e[10]=c,e[11]=f):f=e[11],f}function ao(){const t=_.c(6),e=E(),{toggleSidebar:i}=it();let s;t[0]!==e?(s=e("page.collapseSidebar"),t[0]=e,t[1]=s):s=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Wt,{size:ls}),t[2]=o):o=t[2];let l;return t[3]!==s||t[4]!==i?(l=n.jsx(Qt,{"aria-label":s,onClick:i,className:"shrink-0 size-7",children:o}),t[3]=s,t[4]=i,t[5]=l):l=t[5],l}function co(t){const e=_.c(27),{onNavigate:i}=t,s=E(),{project:o}=ze(),l=Jt(),r=yt(),a=Jn(),c=Dn(o),f=ns(),m=Ht(o?.id);if(!o)return null;let d;if(e[0]!==c.presence||e[1]!==m||e[2]!==o.metadata){const k=Yn(o.metadata),w=c.presence,$=Mn(k,w),N=m??En(o.metadata);d=new Set(Rn(N,$,m!==void 0?1:o.metadata.sidebarViewsVersion,m!==void 0?[]:Ln(o.metadata.sidebarViewsSeen,$))),e[0]=c.presence,e[1]=m,e[2]=o.metadata,e[3]=d}else d=e[3];const p=d;let u,x,b,h;if(e[4]!==a||e[5]!==f||e[6]!==r||e[7]!==l||e[8]!==i||e[9]!==o||e[10]!==p||e[11]!==s){h=[],p.has("site-editor")&&h.push({key:"site-editor",label:s("sidebar.projectNav.siteEditor"),icon:n.jsx(Et,{size:16}),panel:"site-editor",isActive:xo,dataTour:ke.siteEditor});const k={blog:{label:s("sidebar.projectNav.blog"),icon:n.jsx(Wn,{size:16}),isActive:po},assets:{label:s("common.mainPanelTabs.assets"),icon:n.jsx(Qn,{size:16})},releases:{label:s("common.mainPanelTabs.releases"),icon:n.jsx(pn,{size:16})},hosting:{label:s("common.mainPanelTabs.hosting"),icon:n.jsx(ys,{size:16})},e2e:{label:s("common.mainPanelTabs.e2e"),icon:n.jsx(An,{size:16})},calendar:{label:s("common.mainPanelTabs.calendar"),icon:n.jsx(Sn,{size:16})},experiments:{label:s("common.mainPanelTabs.experiments"),icon:n.jsx(fn,{size:16})}};for(const N of qn){if(N!=="blog"&&!Bn(N)||!p.has(N))continue;const C=k[N];h.push({key:N,label:C.label,icon:C.icon,panel:N,isActive:C.isActive??(I=>I===N)})}for(const N of Zn(Xn(o),(o.connections??[]).map(fo))){if(N.toolName==="fetch_assets")continue;const C=Ss(N.connectionId,N.toolName),I=ei({tabId:C,kind:"expanded",iconUrl:N.icon,connections:[]}),A=N.label||N.toolName,{IconComp:q}=un(A);h.push({key:`pinned:${N.connectionId}:${N.toolName}`,label:A,icon:I.kind==="fallback"?n.jsx(q,{size:16}):n.jsx(ti,{icon:I}),panel:C,isActive:B=>B===C})}p.has("automations")&&h.push({key:"automations",label:s("sidebar.projectNav.automations"),icon:n.jsx(At,{size:16}),panel:"automations",isActive:uo,dataTour:ke.automations});const w=r.startsWith(re.projects),$=mo;u=te,x="gap-1",b=h.map(N=>n.jsx(Ne,{icon:$(N),label:N.label,dataTour:N.dataTour,isActive:w&&N.isActive(a),trailing:f(N.panel)?n.jsx(Ge,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{fe("project_nav_clicked",{surface:N.key}),l(o.id,{panel:N.panel}),i?.()}},N.key)),e[4]=a,e[5]=f,e[6]=r,e[7]=l,e[8]=i,e[9]=o,e[10]=p,e[11]=s,e[12]=u,e[13]=x,e[14]=b,e[15]=h}else u=e[12],x=e[13],b=e[14],h=e[15];let g;e[16]!==u||e[17]!==x||e[18]!==b?(g=n.jsx(u,{className:x,children:b}),e[16]=u,e[17]=x,e[18]=b,e[19]=g):g=e[19];const y=g;if(h.length===0)return null;let j;e[20]!==s?(j=s("sidebar.projectNav.apps"),e[20]=s,e[21]=j):j=e[21];let v;e[22]!==j?(v=n.jsx("div",{className:"flex h-6 items-center px-2 group-data-[state=collapsed]/sidebar:hidden",children:n.jsx("span",{className:"truncate font-medium text-xs text-muted-foreground",children:j})}),e[22]=j,e[23]=v):v=e[23];let S;return e[24]!==y||e[25]!==v?(S=n.jsxs("div",{className:"flex flex-col gap-1",children:[v,y]}),e[24]=y,e[25]=v,e[26]=S):S=e[26],S}function mo(t){const e=Gn[t.panel];return n.jsx("span",{className:L("flex size-5 shrink-0 items-center justify-center rounded-md [&_svg]:size-3",e?e.tone:"bg-muted text-muted-foreground"),children:e?n.jsx(e.Icon,{size:12,className:"text-current"}):t.icon})}function uo(t){return t==="automations"||Ns(t)!==null}function fo(t){return t.connection_id}function po(t){return t==="blog"||ks(t)!==null}function xo(t){return!!t&&Ct(t)}const De={folders:[],preferences:ci,joinedAt:null};function ho(){const t=_.c(11),{org:e}=X(),i=Je();let s;t[0]!==e.id?(s=Ee.projectSidebar(e.id),t[0]=e.id,t[1]=s):s=t[1];const o=s;let l;t[2]!==e.slug||t[3]!==i||t[4]!==o?(l=f=>di.subscribe(e.slug,()=>{i.invalidateQueries({queryKey:o}),f()},()=>i.invalidateQueries({queryKey:o})),t[2]=e.slug,t[3]=i,t[4]=o,t[5]=l):l=t[5],ae.useSyncExternalStore(l,go,bo);let r;t[6]!==e.slug?(r=async()=>await _s(e.slug,"SIDEBAR_GET",{}),t[6]=e.slug,t[7]=r):r=t[7];let a;t[8]!==o||t[9]!==r?(a={queryKey:o,queryFn:r,staleTime:6e4},t[8]=o,t[9]=r,t[10]=a):a=t[10];const{data:c}=Ye(a);return c??De}function bo(){return 0}function go(){return 0}function rs(t,e,i){const s=_.c(25),{org:o}=X(),l=Je();let r,a,c,f;s[0]!==o.id||s[1]!==l?(r=Ee.projectSidebar(o.id),a=()=>l.getQueryData(r)??De,f=ws,c=[...r,"write"],s[0]=o.id,s[1]=l,s[2]=r,s[3]=a,s[4]=c,s[5]=f):(r=s[2],a=s[3],c=s[4],f=s[5]);let m;s[6]!==t||s[7]!==a||s[8]!==i?(m=async b=>i(t(a())),s[6]=t,s[7]=a,s[8]=i,s[9]=m):m=s[9];let d;s[10]!==r||s[11]!==t||s[12]!==e||s[13]!==l?(d=b=>{const h=l.getQueryData(r),g=h??De;return l.setQueryData(r,e(g,b(t(g)))),{prev:h}},s[10]=r,s[11]=t,s[12]=e,s[13]=l,s[14]=d):d=s[14];let p,u;s[15]!==r||s[16]!==l?(p=(b,h,g)=>{l.setQueryData(r,g?.prev??De)},u=()=>{l.isMutating({mutationKey:[...r,"write"]})===1&&l.invalidateQueries({queryKey:r})},s[15]=r,s[16]=l,s[17]=p,s[18]=u):(p=s[17],u=s[18]);let x;return s[19]!==c||s[20]!==m||s[21]!==d||s[22]!==p||s[23]!==u?(x={mutationKey:c,mutationFn:m,onMutate:d,onError:p,onSettled:u},s[19]=c,s[20]=m,s[21]=d,s[22]=p,s[23]=u,s[24]=x):x=s[24],f(x)}function jo(){const t=_.c(2),e=Ze();let i;return t[0]!==e?(i=async s=>await e.call("SIDEBAR_PREFERENCES_SET",s),t[0]=e,t[1]=i):i=t[1],rs(So,vo,i)}function vo(t,e){return{...t,preferences:e}}function So(t){return t.preferences}function yo(){const t=_.c(2),e=Ze();let i;return t[0]!==e?(i=async s=>(await e.call("PROJECT_FOLDERS_SET",{folders:s})).folders,t[0]=e,t[1]=i):i=t[1],rs(No,ko,i)}function ko(t,e){return{...t,folders:e}}function No(t){return t.folders}function _o({projects:t,folders:e,preferences:i}){const s=new Map(t.map(u=>[u.id,u])),o=new Set(i.pinned),l=new Set(i.hidden),r=new Set(i.hiddenFolders),a=new Map;for(const u of e)for(const x of u.projectIds)a.set(x,u.id);const c=u=>u.map(x=>s.get(x)).filter(x=>!!x),f=c(i.pinned),m=u=>!o.has(u.id)&&!l.has(u.id),d=[],p=[];for(const u of e){const x=c(u.projectIds).filter(m);(r.has(u.id)?p:d).push({folder:u,projects:x})}return{pinned:f,folders:d,loose:t.filter(u=>!a.has(u.id)&&m(u)),hiddenFolders:p,hidden:t.filter(u=>l.has(u.id)&&!o.has(u.id))}}function pt(t,e,i){const s=l=>l.filter(r=>r!==e),o={...t,pinned:s(t.pinned),hidden:s(t.hidden),dismissed:s(t.dismissed)};return i&&(o[i]=[...o[i],e]),o}function wo(t,e,i){const s=t.hiddenFolders.filter(o=>o!==e);return{...t,hiddenFolders:i?[...s,e]:s}}function $o(t,e,i){return[...t,{id:e,name:i,projectIds:[]}]}function Co(t,e,i){return t.map(s=>s.id===e?{...s,name:i}:s)}function Ve(t,e){return t.filter(i=>i.id!==e)}function xt(t,e,i){return t.map(s=>{const o=s.projectIds.filter(l=>l!==e);return{...s,projectIds:s.id===i?[...o,e]:o}})}function Io(t){const e=_.c(97),{open:i,onOpenChange:s,projects:o,folders:l,preferences:r,canManage:a,onPin:c,onHide:f,onHideFolder:m,onMove:d,onRequestFolderName:p,onDeleteFolder:u}=t,x=E();let b,h,g,y,j,v,S,k,w,$;if(e[0]!==a||e[1]!==l||e[2]!==u||e[3]!==f||e[4]!==m||e[5]!==d||e[6]!==s||e[7]!==c||e[8]!==p||e[9]!==i||e[10]!==r.hidden||e[11]!==r.hiddenFolders||e[12]!==r.pinned||e[13]!==o||e[14]!==x){const A=new Map(o.map(Ao));let q;e[25]!==l?(q=new Set(l.flatMap(zo)),e[25]=l,e[26]=q):q=e[26];const B=q;let J;e[27]!==r.pinned?(J=new Set(r.pinned),e[27]=r.pinned,e[28]=J):J=e[28];const G=J;let V;e[29]!==r.hidden?(V=new Set(r.hidden),e[29]=r.hidden,e[30]=V):V=e[30];const ee=V;let W;e[31]!==r.hiddenFolders?(W=new Set(r.hiddenFolders),e[31]=r.hiddenFolders,e[32]=W):W=e[32];const K=W;let Y;e[33]!==a||e[34]!==l||e[35]!==ee||e[36]!==K||e[37]!==f||e[38]!==d||e[39]!==c||e[40]!==p||e[41]!==G||e[42]!==x?(Y=(z,R)=>{const P=G.has(z.id),O=R!==null&&K.has(R.id)&&!P,D=!ee.has(z.id)&&!O;return n.jsxs("li",{className:"group/row flex h-11 items-center gap-3 px-3 transition-colors hover:bg-accent",children:[n.jsx("span",{className:L("flex size-4 shrink-0 items-center justify-center",!D&&"opacity-50"),children:n.jsx(Xt,{icon:z.icon,name:z.title})}),n.jsx("span",{className:L("min-w-0 flex-1 truncate text-sm",D?"text-foreground":"text-muted-foreground"),children:z.title}),a&&n.jsx("span",{className:"opacity-0 transition-opacity group-hover/row:opacity-100 has-[[data-state=open]]:opacity-100",children:n.jsx(Fo,{project:z,folder:R,folders:l,onMove:d,onRequestFolderName:p})}),n.jsx("span",{className:L("transition-opacity",!P&&"opacity-0 group-hover/row:opacity-100"),children:n.jsx(We,{label:x(P?"sidebar.projects.unpin":"sidebar.projects.pin"),variant:P?"secondary":"ghost","aria-pressed":P,onClick:()=>c(z.id,!P),children:P?n.jsx(Oo,{}):n.jsx(Mt,{size:14})})}),n.jsx(xi,{checked:D,disabled:O,"aria-label":`${x("sidebar.customize.showInSidebar")}: ${z.title}`,title:O?x("sidebar.customize.stateWithFolder"):void 0,onCheckedChange:H=>f(z.id,H!==!0)})]},z.id)},e[33]=a,e[34]=l,e[35]=ee,e[36]=K,e[37]=f,e[38]=d,e[39]=c,e[40]=p,e[41]=G,e[42]=x,e[43]=Y):Y=e[43];const U=Y;let Q;e[44]!==a||e[45]!==K||e[46]!==u||e[47]!==m||e[48]!==p||e[49]!==U||e[50]!==x?(Q=(z,R,P,O)=>{const D=P!==null&&K.has(P.id);return n.jsxs("section",{className:"flex flex-col gap-2",children:[n.jsxs("div",{className:"flex h-7 items-center gap-2",children:[n.jsx("h3",{className:L("min-w-0 flex-1 truncate text-sm font-medium",D?"text-muted-foreground":"text-foreground"),children:R}),P&&n.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[x("sidebar.customize.showFolder"),n.jsx(hi,{checked:!D,onCheckedChange:H=>m(P.id,!H)})]}),P&&a&&n.jsxs(Xe,{children:[n.jsx(et,{asChild:!0,children:n.jsx(We,{label:x("sidebar.customize.folderOptions"),children:n.jsx(tt,{size:14})})}),n.jsxs(st,{align:"end",children:[n.jsx(pe,{onSelect:()=>p({kind:"rename",folderId:P.id,name:P.name}),children:x("sidebar.projects.renameFolder")}),n.jsx(pe,{variant:"destructive",onSelect:()=>u(P.id),children:x("sidebar.projects.deleteFolder")})]})]})]}),n.jsx("ul",{className:"flex flex-col divide-y divide-border overflow-hidden surface",children:O.length===0?n.jsx("li",{className:"flex h-11 items-center px-3 text-sm text-muted-foreground",children:x("sidebar.customize.empty")}):O.map(H=>U(H,P))})]},z)},e[44]=a,e[45]=K,e[46]=u,e[47]=m,e[48]=p,e[49]=U,e[50]=x,e[51]=Q):Q=e[51];const Z=Q;if(e[52]!==a||e[53]!==Z||e[54]!==s||e[55]!==p||e[56]!==i||e[57]!==B||e[58]!==o||e[59]!==x){let z;e[69]!==B?(z=H=>!B.has(H.id),e[69]=B,e[70]=z):z=e[70];const R=o.filter(z);h=kt,w=i,$=s,b=Nt,v="flex max-h-[85vh] flex-col gap-5 sm:max-w-2xl",S=To;let P;e[71]!==x?(P=x("sidebar.projects.customize"),e[71]=x,e[72]=P):P=e[72];let O;e[73]!==P?(O=n.jsx(_t,{children:P}),e[73]=P,e[74]=O):O=e[74];let D;e[75]!==a||e[76]!==p||e[77]!==x?(D=a&&n.jsxs(Pe,{variant:"secondary",size:"sm",className:"shrink-0",onClick:()=>p({kind:"create"}),children:[n.jsx(He,{size:14}),x("sidebar.projects.newFolder")]}),e[75]=a,e[76]=p,e[77]=x,e[78]=D):D=e[78],e[79]!==O||e[80]!==D?(k=n.jsxs(wt,{className:"flex-row items-center justify-between gap-4 pr-8",children:[O,D]}),e[79]=O,e[80]=D,e[81]=k):k=e[81],g="-mx-6 flex min-h-0 flex-col gap-6 overflow-y-auto px-6 pb-1",y=Z("loose",x("sidebar.projects.heading"),null,R),e[52]=a,e[53]=Z,e[54]=s,e[55]=p,e[56]=i,e[57]=B,e[58]=o,e[59]=x,e[60]=b,e[61]=h,e[62]=g,e[63]=y,e[64]=v,e[65]=S,e[66]=k,e[67]=w,e[68]=$}else b=e[60],h=e[61],g=e[62],y=e[63],v=e[64],S=e[65],k=e[66],w=e[67],$=e[68];j=l.map(z=>Z(z.id,z.name,z,z.projectIds.map(R=>A.get(R)).filter(Po))),e[0]=a,e[1]=l,e[2]=u,e[3]=f,e[4]=m,e[5]=d,e[6]=s,e[7]=c,e[8]=p,e[9]=i,e[10]=r.hidden,e[11]=r.hiddenFolders,e[12]=r.pinned,e[13]=o,e[14]=x,e[15]=b,e[16]=h,e[17]=g,e[18]=y,e[19]=j,e[20]=v,e[21]=S,e[22]=k,e[23]=w,e[24]=$}else b=e[15],h=e[16],g=e[17],y=e[18],j=e[19],v=e[20],S=e[21],k=e[22],w=e[23],$=e[24];let N;e[82]!==g||e[83]!==y||e[84]!==j?(N=n.jsxs("div",{className:g,children:[y,j]}),e[82]=g,e[83]=y,e[84]=j,e[85]=N):N=e[85];let C;e[86]!==b||e[87]!==v||e[88]!==S||e[89]!==k||e[90]!==N?(C=n.jsxs(b,{className:v,onOpenAutoFocus:S,children:[k,N]}),e[86]=b,e[87]=v,e[88]=S,e[89]=k,e[90]=N,e[91]=C):C=e[91];let I;return e[92]!==h||e[93]!==C||e[94]!==w||e[95]!==$?(I=n.jsx(h,{open:w,onOpenChange:$,children:C}),e[92]=h,e[93]=C,e[94]=w,e[95]=$,e[96]=I):I=e[96],I}function Po(t){return!!t}function To(t){return t.preventDefault()}function zo(t){return t.projectIds}function Ao(t){return[t.id,t]}function Fo(t){const e=_.c(41),{project:i,folder:s,folders:o,onMove:l,onRequestFolderName:r}=t,a=E();let c;e[0]!==a?(c=a("sidebar.customize.projectOptions"),e[0]=a,e[1]=c):c=e[1];let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(tt,{size:14}),e[2]=f):f=e[2];let m;e[3]!==c?(m=n.jsx(et,{asChild:!0,children:n.jsx(We,{label:c,children:f})}),e[3]=c,e[4]=m):m=e[4];let d;e[5]!==a?(d=a("sidebar.projects.moveTo"),e[5]=a,e[6]=d):d=e[6];let p;e[7]!==d?(p=n.jsx($s,{children:d}),e[7]=d,e[8]=p):p=e[8];let u;if(e[9]!==s?.id||e[10]!==o||e[11]!==l||e[12]!==i.id){let S;e[14]!==s?.id||e[15]!==l||e[16]!==i.id?(S=k=>n.jsx(pe,{disabled:k.id===s?.id,onSelect:()=>l(i.id,k.id),children:k.name},k.id),e[14]=s?.id,e[15]=l,e[16]=i.id,e[17]=S):S=e[17],u=o.map(S),e[9]=s?.id,e[10]=o,e[11]=l,e[12]=i.id,e[13]=u}else u=e[13];let x;e[18]!==s||e[19]!==l||e[20]!==i.id||e[21]!==a?(x=s&&n.jsx(pe,{onSelect:()=>l(i.id,null),children:a("sidebar.projects.noFolder")}),e[18]=s,e[19]=l,e[20]=i.id,e[21]=a,e[22]=x):x=e[22];let b;e[23]!==r||e[24]!==i.id?(b=()=>r({kind:"create",projectId:i.id}),e[23]=r,e[24]=i.id,e[25]=b):b=e[25];let h;e[26]!==a?(h=a("sidebar.projects.newFolder"),e[26]=a,e[27]=h):h=e[27];let g;e[28]!==b||e[29]!==h?(g=n.jsx(pe,{onSelect:b,children:h}),e[28]=b,e[29]=h,e[30]=g):g=e[30];let y;e[31]!==g||e[32]!==u||e[33]!==x?(y=n.jsxs(Cs,{children:[u,x,g]}),e[31]=g,e[32]=u,e[33]=x,e[34]=y):y=e[34];let j;e[35]!==y||e[36]!==p?(j=n.jsx(st,{align:"end",children:n.jsxs(Is,{children:[p,y]})}),e[35]=y,e[36]=p,e[37]=j):j=e[37];let v;return e[38]!==j||e[39]!==m?(v=n.jsxs(Xe,{children:[m,j]}),e[38]=j,e[39]=m,e[40]=v):v=e[40],v}function Oo(){const t=_.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Mt,{size:14}),t[0]=e):e=t[0];let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("span",{className:"relative flex size-3.5",children:[e,n.jsx("svg",{viewBox:"0 0 14 14",className:"absolute inset-0 size-3.5","aria-hidden":"true",children:n.jsx("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"12.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})]}),t[1]=i):i=t[1],i}function Do(t){const e=_.c(10),{request:i,onClose:s,onSave:o}=t,l=i!==null;let r;e[0]!==s?(r=f=>!f&&s(),e[0]=s,e[1]=r):r=e[1];let a;e[2]!==s||e[3]!==o||e[4]!==i?(a=i&&n.jsx(Mo,{request:i,onClose:s,onSave:o},i.kind==="rename"?i.folderId:"create"),e[2]=s,e[3]=o,e[4]=i,e[5]=a):a=e[5];let c;return e[6]!==l||e[7]!==r||e[8]!==a?(c=n.jsx(kt,{open:l,onOpenChange:r,children:a}),e[6]=l,e[7]=r,e[8]=a,e[9]=c):c=e[9],c}function Mo(t){const e=_.c(39),{request:i,onClose:s,onSave:o}=t,l=E(),[r,a]=ae.useState(i.kind==="rename"?i.name:"");let c;e[0]!==r?(c=r.trim(),e[0]=r,e[1]=c):c=e[1];const f=c;let m;e[2]!==s||e[3]!==o||e[4]!==i||e[5]!==f?(m=N=>{N.preventDefault(),f&&(o(i,f),s())},e[2]=s,e[3]=o,e[4]=i,e[5]=f,e[6]=m):m=e[6];const d=i.kind==="rename"?"sidebar.projects.renameFolder":"sidebar.projects.newFolder";let p;e[7]!==l||e[8]!==d?(p=l(d),e[7]=l,e[8]=d,e[9]=p):p=e[9];let u;e[10]!==p?(u=n.jsx(wt,{children:n.jsx(_t,{children:p})}),e[10]=p,e[11]=u):u=e[11];let x;e[12]!==l?(x=l("sidebar.projects.folderName"),e[12]=l,e[13]=x):x=e[13];let b;e[14]!==l?(b=l("sidebar.projects.folderName"),e[14]=l,e[15]=b):b=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=N=>a(N.target.value),e[16]=h):h=e[16];let g;e[17]!==r||e[18]!==x||e[19]!==b?(g=n.jsx(Ps,{autoFocus:!0,value:r,maxLength:mi,placeholder:x,"aria-label":b,onChange:h}),e[17]=r,e[18]=x,e[19]=b,e[20]=g):g=e[20];let y;e[21]!==l?(y=l("sidebar.projects.folderCancel"),e[21]=l,e[22]=y):y=e[22];let j;e[23]!==s||e[24]!==y?(j=n.jsx(Pe,{type:"button",variant:"ghost",onClick:s,children:y}),e[23]=s,e[24]=y,e[25]=j):j=e[25];const v=!f;let S;e[26]!==l?(S=l("sidebar.projects.folderSave"),e[26]=l,e[27]=S):S=e[27];let k;e[28]!==v||e[29]!==S?(k=n.jsx(Pe,{type:"submit",disabled:v,children:S}),e[28]=v,e[29]=S,e[30]=k):k=e[30];let w;e[31]!==j||e[32]!==k?(w=n.jsxs(Ts,{children:[j,k]}),e[31]=j,e[32]=k,e[33]=w):w=e[33];let $;return e[34]!==w||e[35]!==m||e[36]!==u||e[37]!==g?($=n.jsx(Nt,{className:"sm:max-w-sm",children:n.jsxs("form",{className:"flex flex-col gap-4",onSubmit:m,children:[u,g,w]})}),e[34]=w,e[35]=m,e[36]=u,e[37]=g,e[38]=$):$=e[38],$}function Eo(t){const e=t.target.closest("[data-context-id]")?.getAttribute("data-context-id");return e?.startsWith("project:")?{kind:"project",id:e.slice(8)}:e?.startsWith("folder:")?{kind:"folder",id:e.slice(7)}:{kind:"none"}}function Ro(t){const e=_.c(8),{locator:i}=X(),s=Ze(),{data:o}=Te.useSession();let l;e[0]!==i||e[1]!==s?(l=ui(i,s),e[0]=i,e[1]=s,e[2]=l):l=e[2];const{data:r}=Ye(l);let a,c;if(e[3]!==r||e[4]!==t||e[5]!==o?.user?.id){c=Symbol.for("react.early_return_sentinel");e:{if(a=new Map,!r){c=a;break e}const f=fi(t);for(const m of ai(r.items,o?.user?.id)){const d=pi(m,f);d&&a.set(d.id,(a.get(d.id)??0)+1)}}e[3]=r,e[4]=t,e[5]=o?.user?.id,e[6]=a,e[7]=c}else a=e[6],c=e[7];return c!==Symbol.for("react.early_return_sentinel")?c:a}function Lo(t){const e=_.c(5),{label:i,action:s}=t;let o;e[0]!==i?(o=n.jsx("p",{className:"font-medium text-xs text-muted-foreground",children:i}),e[0]=i,e[1]=o):o=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsxs("div",{className:"flex h-6 items-center justify-between gap-2 px-2",children:[o,s]}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function as(t){const e=_.c(24),{project:i,onNavigate:s,waiting:o,trailing:l,children:r}=t,a=o===void 0?0:o,c=E(),f=Jt();let m;e[0]!==c||e[1]!==a?(m=a>0?c("sidebar.projects.waiting",{count:a}):null,e[0]=c,e[1]=a,e[2]=m):m=e[2];const d=m;let p;e[3]!==i.icon||e[4]!==i.title?(p=n.jsx(Xt,{icon:i.icon,name:i.title}),e[3]=i.icon,e[4]=i.title,e[5]=p):p=e[5];const u=i.title,x=`project:${i.id}`;let b;e[6]!==l||e[7]!==d?(b=d?n.jsx("span",{title:d,className:"mr-1 size-2 rounded-full bg-warning group-hover/menu-item:invisible"}):l,e[6]=l,e[7]=d,e[8]=b):b=e[8];const h=d&&"font-semibold";let g;e[9]!==h?(g=L(h),e[9]=h,e[10]=g):g=e[10];const y=d?`${i.title}, ${d}`:void 0;let j;e[11]!==f||e[12]!==s||e[13]!==i.id?(j=()=>{fe("sidebar_project_clicked"),f(i.id),s?.()},e[11]=f,e[12]=s,e[13]=i.id,e[14]=j):j=e[14];let v;return e[15]!==r||e[16]!==i.title||e[17]!==j||e[18]!==p||e[19]!==x||e[20]!==b||e[21]!==g||e[22]!==y?(v=n.jsx(Ne,{icon:p,label:u,contextId:x,trailing:b,className:g,ariaLabel:y,onSelect:j,children:r}),e[15]=r,e[16]=i.title,e[17]=j,e[18]=p,e[19]=x,e[20]=b,e[21]=g,e[22]=y,e[23]=v):v=e[23],v}function ht(t){const e=_.c(26),{label:i,contextId:s,folderId:o,projects:l,onNavigate:r,actions:a,waitingByProject:c}=t,{locator:f}=X();let m;e[0]!==o||e[1]!==f?(m=Fs.sidebarSectionOpen(f,o??"loose"),e[0]=o,e[1]=f,e[2]=m):m=e[2];const[d,p]=As(m,!0),u=d?Yt:$t;let x;e[3]!==p?(x=()=>p(qo),e[3]=p,e[4]=x):x=e[4];let b;e[5]!==i?(b=n.jsx("span",{className:"truncate font-medium text-xs text-muted-foreground transition-colors group-hover/folder:text-sidebar-foreground",children:i}),e[5]=i,e[6]=b):b=e[6];let h;e[7]!==u?(h=n.jsx(u,{size:12,className:"shrink-0 text-muted-foreground"}),e[7]=u,e[8]=h):h=e[8];let g;e[9]!==d||e[10]!==x||e[11]!==b||e[12]!==h?(g=n.jsxs("button",{type:"button","aria-expanded":d,onClick:x,className:"group/folder flex min-w-0 items-center gap-1 rounded-md text-left",children:[b,h]}),e[9]=d,e[10]=x,e[11]=b,e[12]=h,e[13]=g):g=e[13];let y;e[14]!==a||e[15]!==g?(y=n.jsxs("div",{className:"flex h-6 items-center justify-between gap-2 px-2",children:[g,a]}),e[14]=a,e[15]=g,e[16]=y):y=e[16];let j;e[17]!==r||e[18]!==d||e[19]!==l||e[20]!==c?(j=d&&l.length>0&&n.jsx(te,{className:"gap-1",children:l.map(S=>n.jsx(as,{project:S,onNavigate:r,waiting:c.get(S.id)},S.id))}),e[17]=r,e[18]=d,e[19]=l,e[20]=c,e[21]=j):j=e[21];let v;return e[22]!==s||e[23]!==y||e[24]!==j?(v=n.jsxs("div",{className:"flex flex-col gap-1","data-context-id":s,children:[y,j]}),e[22]=s,e[23]=y,e[24]=j,e[25]=v):v=e[25],v}function qo(t){return!t}function Bo(t){const e=_.c(141),{onNavigate:i}=t,s=E(),o=nt(),{granted:l}=zs("agents:manage"),{projects:r}=ze(),a=Kt(),c=ho(),f=Ro(r),m=jo(),d=yo();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={kind:"none"},e[0]=p):p=e[0];const[u,x]=ae.useState(p),[b,h]=ae.useState(null),[g,y]=ae.useState(!1);if(a||r.length===0&&!l)return null;let j,v,S,k,w,$,N,C,I,A,q,B,J,G,V,ee,W,K,Y,U;if(e[1]!==l||e[2]!==o||e[3]!==i||e[4]!==r||e[5]!==c.folders||e[6]!==c.preferences||e[7]!==s||e[8]!==u.id||e[9]!==u.kind||e[10]!==d||e[11]!==m||e[12]!==f){const M=_o({projects:r,folders:c.folders,preferences:c.preferences});w=M.hidden.length+M.hiddenFolders.reduce(Ko,0);let ie;e[33]!==m?(ie=(T,F)=>{fe(F?"sidebar_project_pinned":"sidebar_project_unpinned"),m.mutate(le=>pt(le,T,F?"pinned":null))},e[33]=m,e[34]=ie):ie=e[34],A=ie;let he;e[35]!==m?(he=(T,F)=>{fe(F?"sidebar_project_hidden":"sidebar_project_shown"),m.mutate(le=>pt(le,T,F?"hidden":null))},e[35]=m,e[36]=he):he=e[36],N=he;let de;e[37]!==m?(de=(T,F)=>m.mutate(le=>wo(le,T,F)),e[37]=m,e[38]=de):de=e[38],C=de;let me;e[39]!==d?(me=(T,F)=>d.mutate(le=>xt(le,T,F)),e[39]=d,e[40]=me):me=e[40],I=me;let be;e[41]!==d?(be=(T,F)=>{if(T.kind==="rename"){d.mutate(qe=>Co(qe,T.folderId,F));return}const le=crypto.randomUUID();fe("sidebar_folder_created"),d.mutate(qe=>{const at=$o(qe,le,F);return T.projectId?xt(at,T.projectId,le):at})},e[41]=d,e[42]=be):be=e[42],B=be;let ye;e[43]!==c.preferences.pinned?(ye=new Set(c.preferences.pinned),e[43]=c.preferences.pinned,e[44]=ye):ye=e[44],q=ye;let ge;e[45]!==c.preferences.hidden?(ge=new Set(c.preferences.hidden),e[45]=c.preferences.hidden,e[46]=ge):ge=e[46],$=ge;let je;e[47]!==c.folders||e[48]!==u.id||e[49]!==u.kind?(je=u.kind==="project"?c.folders.find(T=>T.projectIds.includes(u.id))?.id:void 0,e[47]=c.folders,e[48]=u.id,e[49]=u.kind,e[50]=je):je=e[50],k=je;let ve;e[51]!==c.folders||e[52]!==u.id||e[53]!==u.kind?(ve=u.kind==="folder"?c.folders.find(T=>T.id===u.id):void 0,e[51]=c.folders,e[52]=u.id,e[53]=u.kind,e[54]=ve):ve=e[54],U=ve;let _e;e[55]===Symbol.for("react.memo_cache_sentinel")?(_e=()=>y(!0),e[55]=_e):_e=e[55];let $e;e[56]!==s?($e=s("sidebar.projects.customize"),e[56]=s,e[57]=$e):$e=e[57];let Ae;e[58]!==$e?(Ae=n.jsx(ue,{onSelect:_e,children:$e}),e[58]=$e,e[59]=Ae):Ae=e[59],S=Ae;let Fe;e[60]!==l||e[61]!==C||e[62]!==I||e[63]!==s||e[64]!==d?(Fe=T=>n.jsxs("span",{className:"-mr-1 flex shrink-0 items-center gap-0.5",children:[n.jsxs(Xe,{children:[n.jsx(et,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":s(T?"sidebar.customize.folderOptions":"sidebar.projects.more"),title:s(T?"sidebar.customize.folderOptions":"sidebar.projects.more"),className:"flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:n.jsx(tt,{size:14})})}),n.jsxs(st,{align:"start",children:[T&&n.jsx(pe,{onSelect:()=>C(T.id,!0),children:s("sidebar.projects.hideFolder")}),T&&l&&n.jsxs(n.Fragment,{children:[n.jsx(pe,{onSelect:()=>h({kind:"rename",folderId:T.id,name:T.name}),children:s("sidebar.projects.renameFolder")}),n.jsx(pe,{variant:"destructive",onSelect:()=>d.mutate(F=>Ve(F,T.id)),children:s("sidebar.projects.deleteFolder")})]}),T&&n.jsx(Os,{}),l&&n.jsx(pe,{onSelect:()=>h({kind:"create"}),children:s("sidebar.projects.newFolder")}),n.jsx(pe,{onSelect:()=>y(!0),children:s("sidebar.projects.customize")})]})]}),l&&n.jsx("button",{type:"button","aria-label":s("projects.home.newProject"),title:s("projects.home.newProject"),onClick:()=>Zt("sidebar",T?{onCreated:F=>I(F,T.id)}:void 0),className:"flex size-5 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:n.jsx(He,{size:14})})]}),e[60]=l,e[61]=C,e[62]=I,e[63]=s,e[64]=d,e[65]=Fe):Fe=e[65];const lt=Fe;let Oe;e[66]!==i||e[67]!==f?(Oe=T=>T.map(F=>n.jsx(as,{project:F,onNavigate:i,waiting:f.get(F.id)},F.id)),e[66]=i,e[67]=f,e[68]=Oe):Oe=e[68];const rt=Oe;v=oi,j=li,Y=!0,J="flex flex-col gap-4",G=ke.projects,e[69]===Symbol.for("react.memo_cache_sentinel")?(V=T=>x(Eo(T)),e[69]=V):V=e[69],ee=M.pinned.length>0&&n.jsxs("div",{className:"flex flex-col gap-1",children:[!o&&n.jsx(Lo,{label:s("sidebar.projects.pinned")}),n.jsx(te,{className:"gap-1",children:rt(M.pinned)})]}),W=o?n.jsxs(te,{className:"gap-1",children:[rt([...M.folders.flatMap(Vo),...M.loose]),l&&n.jsx(Ne,{icon:n.jsx(He,{size:16}),label:s("projects.home.newProject"),onSelect:Uo})]}):n.jsx(ht,{label:s("sidebar.projects.heading"),projects:M.loose,onNavigate:i,waitingByProject:f,actions:lt(null)}),K=!o&&M.folders.map(T=>{const{folder:F,projects:le}=T;return n.jsx(ht,{label:F.name,contextId:`folder:${F.id}`,folderId:F.id,projects:le,onNavigate:i,waitingByProject:f,actions:lt(F)},F.id)}),e[1]=l,e[2]=o,e[3]=i,e[4]=r,e[5]=c.folders,e[6]=c.preferences,e[7]=s,e[8]=u.id,e[9]=u.kind,e[10]=d,e[11]=m,e[12]=f,e[13]=j,e[14]=v,e[15]=S,e[16]=k,e[17]=w,e[18]=$,e[19]=N,e[20]=C,e[21]=I,e[22]=A,e[23]=q,e[24]=B,e[25]=J,e[26]=G,e[27]=V,e[28]=ee,e[29]=W,e[30]=K,e[31]=Y,e[32]=U}else j=e[13],v=e[14],S=e[15],k=e[16],w=e[17],$=e[18],N=e[19],C=e[20],I=e[21],A=e[22],q=e[23],B=e[24],J=e[25],G=e[26],V=e[27],ee=e[28],W=e[29],K=e[30],Y=e[31],U=e[32];let Q;e[70]!==o||e[71]!==w||e[72]!==s?(Q=w>0&&!o&&n.jsx(te,{children:n.jsx(Ne,{icon:n.jsx(gn,{size:16}),label:s("sidebar.projects.hiddenCount",{count:w}),className:"text-muted-foreground",onSelect:()=>y(!0)})}),e[70]=o,e[71]=w,e[72]=s,e[73]=Q):Q=e[73];let Z;e[74]!==J||e[75]!==G||e[76]!==V||e[77]!==ee||e[78]!==W||e[79]!==K||e[80]!==Q?(Z=n.jsxs("div",{className:J,"data-tour":G,onContextMenu:V,children:[ee,W,K,Q]}),e[74]=J,e[75]=G,e[76]=V,e[77]=ee,e[78]=W,e[79]=K,e[80]=Q,e[81]=Z):Z=e[81];let z;e[82]!==j||e[83]!==Z||e[84]!==Y?(z=n.jsx(j,{asChild:Y,children:Z}),e[82]=j,e[83]=Z,e[84]=Y,e[85]=z):z=e[85];let R;e[86]!==l||e[87]!==S||e[88]!==k||e[89]!==$||e[90]!==N||e[91]!==I||e[92]!==A||e[93]!==q||e[94]!==c.folders||e[95]!==s||e[96]!==u.id||e[97]!==u.kind?(R=u.kind==="project"&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{onSelect:()=>A(u.id,!q.has(u.id)),children:s(q.has(u.id)?"sidebar.projects.unpin":"sidebar.projects.pin")}),n.jsx(ue,{onSelect:()=>N(u.id,!$.has(u.id)),children:s($.has(u.id)?"sidebar.projects.show":"sidebar.projects.hide")}),l&&n.jsxs(si,{children:[n.jsx(ni,{children:s("sidebar.projects.moveTo")}),n.jsxs(ii,{className:"w-48",children:[c.folders.map(M=>n.jsx(ue,{disabled:M.id===k,onSelect:()=>I(u.id,M.id),children:M.name},M.id)),k&&n.jsx(ue,{onSelect:()=>I(u.id,null),children:s("sidebar.projects.noFolder")}),c.folders.length>0&&n.jsx(Ue,{}),n.jsx(ue,{onSelect:()=>h({kind:"create",projectId:u.id}),children:s("sidebar.projects.newFolder")})]})]}),n.jsx(Ue,{}),S]}),e[86]=l,e[87]=S,e[88]=k,e[89]=$,e[90]=N,e[91]=I,e[92]=A,e[93]=q,e[94]=c.folders,e[95]=s,e[96]=u.id,e[97]=u.kind,e[98]=R):R=e[98];let P;e[99]!==l||e[100]!==S||e[101]!==C||e[102]!==s||e[103]!==u.kind||e[104]!==U||e[105]!==d?(P=u.kind==="folder"&&U&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{onSelect:()=>C(U.id,!0),children:s("sidebar.projects.hideFolder")}),l&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{onSelect:()=>h({kind:"rename",folderId:U.id,name:U.name}),children:s("sidebar.projects.renameFolder")}),n.jsx(ue,{variant:"destructive",onSelect:()=>d.mutate(M=>Ve(M,U.id)),children:s("sidebar.projects.deleteFolder")})]}),n.jsx(Ue,{}),l&&n.jsx(ue,{onSelect:()=>h({kind:"create"}),children:s("sidebar.projects.newFolder")}),S]}),e[99]=l,e[100]=S,e[101]=C,e[102]=s,e[103]=u.kind,e[104]=U,e[105]=d,e[106]=P):P=e[106];let O;e[107]!==l||e[108]!==S||e[109]!==s||e[110]!==u.kind?(O=u.kind==="none"&&n.jsxs(n.Fragment,{children:[l&&n.jsx(ue,{onSelect:()=>h({kind:"create"}),children:s("sidebar.projects.newFolder")}),S]}),e[107]=l,e[108]=S,e[109]=s,e[110]=u.kind,e[111]=O):O=e[111];let D;e[112]!==R||e[113]!==P||e[114]!==O?(D=n.jsxs(ri,{className:"w-52",children:[R,P,O]}),e[112]=R,e[113]=P,e[114]=O,e[115]=D):D=e[115];let H;e[116]!==v||e[117]!==z||e[118]!==D?(H=n.jsxs(v,{children:[z,D]}),e[116]=v,e[117]=z,e[118]=D,e[119]=H):H=e[119];let Se;e[120]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>h(null),e[120]=Se):Se=e[120];let ce;e[121]!==b||e[122]!==B?(ce=n.jsx(Do,{request:b,onClose:Se,onSave:B}),e[121]=b,e[122]=B,e[123]=ce):ce=e[123];let se;e[124]!==d?(se=M=>d.mutate(ie=>Ve(ie,M)),e[124]=d,e[125]=se):se=e[125];let ne;e[126]!==l||e[127]!==g||e[128]!==N||e[129]!==C||e[130]!==I||e[131]!==A||e[132]!==r||e[133]!==c.folders||e[134]!==c.preferences||e[135]!==se?(ne=n.jsx(Io,{open:g,onOpenChange:y,projects:r,folders:c.folders,preferences:c.preferences,canManage:l,onPin:A,onHide:N,onHideFolder:C,onMove:I,onRequestFolderName:h,onDeleteFolder:se}),e[126]=l,e[127]=g,e[128]=N,e[129]=C,e[130]=I,e[131]=A,e[132]=r,e[133]=c.folders,e[134]=c.preferences,e[135]=se,e[136]=ne):ne=e[136];let xe;return e[137]!==H||e[138]!==ce||e[139]!==ne?(xe=n.jsxs(n.Fragment,{children:[H,ce,ne]}),e[137]=H,e[138]=ce,e[139]=ne,e[140]=xe):xe=e[140],xe}function Uo(){return Zt("sidebar")}function Vo(t){return t.projects}function Ko(t,e){return t+e.projects.length}function Ho(){const t=_.c(8),e=E(),{capabilities:i,isPrivileged:s,loading:o,error:l}=Ds(),r=Si().length,a=Ms();let c;return t[0]!==i||t[1]!==l||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==e||t[6]!==a?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(Es,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(bi,{size:14}),to:"/$org/settings/general"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(gi,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(jt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Ot,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"projects",label:e("projects.settings.title"),icon:n.jsx(Dt,{size:14}),to:"/$org/settings/projects"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(vi,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(xn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(vt,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(ji,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(Rs,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(Ge,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(m=>({...m,items:m.items.flatMap(d=>{if(d.group){const[p]=a[d.group];return p?[{...d,to:p.to}]:Ls(d.group)?[]:[d]}return o||l?[d]:d.privilegedOnly?s?[d]:[]:d.requires?s||i[d.requires]?[d]:[]:[d]})})).filter(Wo),t[0]=i,t[1]=l,t[2]=s,t[3]=r,t[4]=o,t[5]=e,t[6]=a,t[7]=c):c=t[7],c}function Wo(t){return t.items.length>0}function cs(){const t=_.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:i}=qs(e);let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={select:Qo},t[1]=s):s=t[1];const o=Bs(s);let l;if(t[2]!==i||t[3]!==o){const c=f=>{const m=f.replace("$org",i);return o===m||o.startsWith(`${m}/`)};l=f=>[f.to,...f.group?Us(f.group):[]].some(c),t[2]=i,t[3]=o,t[4]=l}else l=t[4];const r=l;let a;return t[5]!==r||t[6]!==i?(a={org:i,isActive:r},t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Qo(t){return t.location.pathname}function Go(){const t=_.c(9),{isActive:e}=cs();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={},t[0]=i):i=t[0];const[s,o]=ae.useState(i);let l;t[1]!==e||t[2]!==s?(l=m=>s[m.key]??(!m.collapsible||m.items.some(e)),t[1]=e,t[2]=s,t[3]=l):l=t[3];const r=l;let a;t[4]!==r?(a=m=>o(d=>({...d,[m.key]:!r(m)})),t[4]=r,t[5]=a):a=t[5];const c=a;let f;return t[6]!==r||t[7]!==c?(f={isOpen:r,toggle:c},t[6]=r,t[7]=c,t[8]=f):f=t[8],f}function Jo(t){const e=_.c(21),{group:i,open:s,onToggle:o,className:l}=t;let r,a,c,f,m;if(e[0]!==l||e[1]!==i.collapsible||e[2]!==i.label||e[3]!==o||e[4]!==s){m=Symbol.for("react.early_return_sentinel");e:{const x=L("text-xs font-medium text-muted-foreground/60 truncate",l);if(!i.collapsible){m=n.jsx("p",{className:x,children:i.label});break e}r="button",a=o,c=s,f=L("flex w-full items-center gap-1 rounded-lg hover:text-muted-foreground",x)}e[0]=l,e[1]=i.collapsible,e[2]=i.label,e[3]=o,e[4]=s,e[5]=r,e[6]=a,e[7]=c,e[8]=f,e[9]=m}else r=e[5],a=e[6],c=e[7],f=e[8],m=e[9];if(m!==Symbol.for("react.early_return_sentinel"))return m;let d;e[10]!==s?(d=s?n.jsx(Yt,{size:12}):n.jsx($t,{size:12}),e[10]=s,e[11]=d):d=e[11];let p;e[12]!==i.label?(p=n.jsx("span",{className:"truncate",children:i.label}),e[12]=i.label,e[13]=p):p=e[13];let u;return e[14]!==r||e[15]!==a||e[16]!==c||e[17]!==f||e[18]!==d||e[19]!==p?(u=n.jsxs("button",{type:r,onClick:a,"aria-expanded":c,className:f,children:[d,p]}),e[14]=r,e[15]=a,e[16]=c,e[17]=f,e[18]=d,e[19]=p,e[20]=u):u=e[20],u}function Yo(t){const e=_.c(5),{icon:i,badge:s}=t;let o;e[0]!==s?(o=s?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=s,e[1]=o):o=e[1];let l;return e[2]!==i||e[3]!==o?(l=n.jsxs("span",{className:"relative shrink-0",children:[i,o]}),e[2]=i,e[3]=o,e[4]=l):l=e[4],l}function ds(t){const e=_.c(24),{onNavigate:i}=t,s=nt(),o=E(),l=Ho(),{org:r,isActive:a}=cs(),{isOpen:c,toggle:f}=Go();let m;if(e[0]!==s||e[1]!==l||e[2]!==a||e[3]!==c||e[4]!==i||e[5]!==r||e[6]!==f){let h;e[8]!==s||e[9]!==a||e[10]!==c||e[11]!==i||e[12]!==r||e[13]!==f?(h=(g,y)=>n.jsxs("div",{className:"flex flex-col",children:[g.label&&!s&&n.jsx(Jo,{group:g,open:c(g),onToggle:()=>f(g),className:L("px-2 pt-1.5 pb-0.5",y>0&&"mt-3")}),(s||c(g))&&n.jsx(te,{className:"gap-0.5",children:g.items.map(j=>n.jsx(Ne,{icon:n.jsx(Yo,{icon:j.icon,badge:j.badge}),label:j.label,isActive:a(j),link:{to:j.to,params:{org:r}},className:"gap-2.5",onSelect:()=>{fe("settings_nav_clicked",{section_key:j.key,group_key:g.key}),i?.()}},j.key))})]},g.key),e[8]=s,e[9]=a,e[10]=c,e[11]=i,e[12]=r,e[13]=f,e[14]=h):h=e[14],m=l.map(h),e[0]=s,e[1]=l,e[2]=a,e[3]=c,e[4]=i,e[5]=r,e[6]=f,e[7]=m}else m=e[7];let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50 hidden"}),e[15]=d):d=e[15];let p;e[16]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx("span",{className:"shrink-0",children:n.jsx(Ke,{size:14})}),e[16]=p):p=e[16];let u;e[17]!==o?(u=o("settings.nav.signOut"),e[17]=o,e[18]=u):u=e[18];let x;e[19]!==u?(x=n.jsxs("div",{className:"mt-auto flex flex-col pt-4",children:[d,n.jsx(te,{className:"gap-0.5",children:n.jsx(Ne,{icon:p,label:u,className:"gap-2.5",onSelect:Zo})})]}),e[19]=u,e[20]=x):x=e[20];let b;return e[21]!==m||e[22]!==x?(b=n.jsxs(n.Fragment,{children:[m,x]}),e[21]=m,e[22]=x,e[23]=b):b=e[23],b}function Zo(){fe("signed_out",{source:"settings_sidebar"}),St(),Te.signOut()}function ms(t){const e=_.c(8),{onNavigate:i}=t,s=E(),{org:o}=X();let l;e[0]!==s?(l=s("settings.nav.backToHome"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==o.slug?(r={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=r):r=e[3];let a;return e[4]!==i||e[5]!==l||e[6]!==r?(a=n.jsx(Hi,{label:l,link:r,onSelect:i}),e[4]=i,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function us(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1 group-data-[state=collapsed]/sidebar:hidden",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.597.1"]})}),t[0]=e):e=t[0],e}const Xo="pt-1.5";function fs(t){const e=_.c(18),{header:i,back:s,body:o,footer:l,sheet:r}=t;let a;e[0]!==i?(a=i&&n.jsx("div",{"data-slot":"sidebar-picker-header",className:"flex h-12 shrink-0 flex-row items-center gap-1 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:gap-2 group-data-[state=collapsed]/sidebar:py-2",children:i}),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==i?(c=i&&n.jsx("div",{className:"hidden mt-1.5 h-px shrink-0 bg-sidebar-border"}),e[2]=i,e[3]=c):c=e[3];let f;e[4]!==s?(f=s&&n.jsx("div",{className:"sticky top-0 z-10 hidden shrink-0 bg-sidebar pb-2 not-empty:block",children:s}),e[4]=s,e[5]=f):f=e[5];let m;e[6]!==o||e[7]!==f?(m=n.jsxs(yn,{className:"gap-0 overflow-y-auto px-2 pt-3 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:[f,o]}),e[6]=o,e[7]=f,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==a||e[11]!==c||e[12]!==m?(d=n.jsxs(n.Fragment,{children:[a,c,m,l]}),e[9]=l,e[10]=a,e[11]=c,e[12]=m,e[13]=d):d=e[13];const p=d;if(r){let x;return e[14]!==p?(x=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":ke.nav,children:p}),e[14]=p,e[15]=x):x=e[15],x}let u;return e[16]!==p?(u=n.jsx(kn,{className:Xo,"data-tour":ke.nav,children:p}),e[16]=p,e[17]=u):u=e[17],u}function ps(t){const e=_.c(2),{onNavigate:i}=t;let s;return e[0]!==i?(s=n.jsx(Vs,{children:n.jsxs("div",{className:"flex flex-col gap-6",children:[n.jsx(Zi,{onNavigate:i}),n.jsx(co,{onNavigate:i}),n.jsx(Bo,{onNavigate:i})]})}),e[0]=i,e[1]=s):s=e[1],s}function el(){const t=_.c(10),e=It();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(lo,{}),t[0]=i):i=t[0];let s;t[1]!==e?(s=e&&n.jsx(ms,{}),t[1]=e,t[2]=s):s=t[2];let o,l;t[3]!==e?(o=e?n.jsx(ds,{}):n.jsx(ps,{}),l=e?n.jsx(us,{}):n.jsx(so,{}),t[3]=e,t[4]=o,t[5]=l):(o=t[4],l=t[5]);let r;return t[6]!==s||t[7]!==o||t[8]!==l?(r=n.jsx(fs,{header:i,back:s,body:o,footer:l}),t[6]=s,t[7]=o,t[8]=l,t[9]=r):r=t[9],r}function tl(t){const e=_.c(15),{onClose:i}=t,s=It();let o;e[0]!==i?(o=n.jsx(ro,{onClose:i}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==s||e[3]!==i?(l=s&&n.jsx(ms,{onNavigate:i}),e[2]=s,e[3]=i,e[4]=l):l=e[4];let r;e[5]!==s||e[6]!==i?(r=s?n.jsx(ds,{onNavigate:i}):n.jsx(ps,{onNavigate:i}),e[5]=s,e[6]=i,e[7]=r):r=e[7];let a;e[8]!==s?(a=s?n.jsx(us,{}):n.jsx(no,{}),e[8]=s,e[9]=a):a=e[9];let c;return e[10]!==o||e[11]!==l||e[12]!==r||e[13]!==a?(c=n.jsx(fs,{sheet:!0,header:o,back:l,body:r,footer:a}),e[10]=o,e[11]=l,e[12]=r,e[13]=a,e[14]=c):c=e[14],c}const sl=new Set(["completed","failed","requires_action"]);function nl(t){const e=_.c(5),[i]=bt();let s;e[0]!==i?(s=l=>{i.enableSounds&&sl.has(l.data.status)&&yi(ki.dataUri).catch(il)},e[0]=i,e[1]=s):s=e[1];let o;e[2]!==t||e[3]!==s?(o={orgSlug:t,onTaskStatus:s},e[2]=t,e[3]=s,e[4]=o):o=e[4],Ni(o)}function il(t){console.warn("[status-sounds] playback failed:",t)}const ol=2e3,ll=4e4;function rl(t){return t==="success"||t==="updated"}function al(t){const e=_.c(15);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const s=Ks(i),o=Je();let l;e[1]!==s.checkout?(l=rl(s.checkout),e[1]=s.checkout,e[2]=l):l=e[2];const r=l,[a]=ae.useState(cl);let c;e[3]!==t?(c=Ee.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let f;e[5]!==a?(f=()=>Date.now()<a?ol:!1,e[5]=a,e[6]=f):f=e[6];let m;e[7]!==t||e[8]!==o?(m=async()=>(await o.invalidateQueries({queryKey:Ee.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=m):m=e[9];let d;e[10]!==r||e[11]!==c||e[12]!==f||e[13]!==m?(d={queryKey:c,enabled:r,gcTime:0,staleTime:0,refetchInterval:f,queryFn:m},e[10]=r,e[11]=c,e[12]=f,e[13]=m,e[14]=d):d=e[14],Ye(d)}function cl(){return Date.now()+ll}function va(){const t=_.c(3),{org:e}=X();nl(e.slug),al(e.id);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(_i,{}),t[0]=i):i=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Be.Sidebar,{renderMobile:dl,children:n.jsx(el,{})}),t[1]=s):s=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs(Be,{notice:i,children:[s,n.jsx(Be.Content,{children:n.jsx(Hs,{})})]}),t[2]=o):o=t[2],o}function dl(t){const{onClose:e}=t;return n.jsx(tl,{onClose:e})}export{va as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as x,l as h,m as j,j as e,P as u,aT as g,O as P,n as R}from"./index-C6-0Ff1m.js";import{u as b}from"./use-mobile-IMVhNYT_.js";import{R as v}from"./route-page-header-D8CuFczr.js";import{A as _}from"./plan-usage-card-BwiinbGT.js";import"./LayoutLeft-BSo5LCFE.js";import"./use-sidebar-collapsed-CvPku1YI.js";import"./sheet-XJvcudCi.js";import"./tooltip-BnL5r8Gv.js";import"./index-ZdVMGNX_.js";import"./toolbar-icon-button-CEZ74wIz.js";import"./use-project-scope-DwQViH2f.js";import"./repository-binding-Do6sAdct.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.js";import"./use-current-view-0HWp9lHl.js";import"./use-in-settings-DxzX6GVb.js";import"./thread-route-DY_UV0gu.js";import"./Plus-CF8KlFVc.js";import"./badge-BcMIPtVj.js";import"./popover-DTBVeUtG.js";import"./toggle-group-CbJrGPYf.js";import"./active-indicator-CCMhAsc_.js";import"./use-ai-providers-pXYGEzkI.js";import"./use-entitlements-DIoZnc_q.js";import"./plan-ladder-DDAcm-ji.js";function V(){const t=x.c(16),d=b();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={select:B},t[0]=n):n=t[0];const p=h(n),c=!d&&"p-1.5";let i;t[1]!==c?(i=j("flex-1 min-h-0 min-w-0",c),t[1]=c,t[2]=i):i=t[2];const f=d?"plain":"card";let o;t[3]!==p?(o=p?e.jsx(_,{}):void 0,t[3]=p,t[4]=o):o=t[4];let r;t[5]!==o?(r=e.jsx(v,{actions:o}),t[5]=o,t[6]=r):r=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(u.Content,{children:e.jsx(g,{children:e.jsx(P,{})})}),t[7]=a):a=t[7];let s;t[8]!==r?(s=e.jsxs(R.Breadcrumbs.Provider,{children:[r,a]}),t[8]=r,t[9]=s):s=t[9];let m;t[10]!==f||t[11]!==s?(m=e.jsx(u,{"data-testid":"settings-panel",variant:f,children:s}),t[10]=f,t[11]=s,t[12]=m):m=t[12];let l;return t[13]!==i||t[14]!==m?(l=e.jsx("div",{className:i,children:m}),t[13]=i,t[14]=m,t[15]=l):l=t[15],l}function B(t){return t.location.pathname.endsWith("/settings/ai-providers")}export{V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aH as s,cp as e,aI as a,cq as d,bC as l}from"./index-C6-0Ff1m.js";const o=500;s({title:a().max(o),url:a().max(o),icon:a().max(o)});const t=s({keyId:a().max(o),modelId:a().max(o),title:a().max(o).optional()}).nullable();d(["fast","smart","thinking","image","web_search","deep_research"]);d(["fast","smart","thinking"]);const b=s({tiers:s({fast:t,smart:t,thinking:t,image:t,web_search:t,deep_research:t})});s({tiers:s({fast:t.optional(),smart:t.optional(),thinking:t.optional()})});const f=50,c=/^[a-zA-Z0-9.-]+(?::[0-9]+)?$/;s({host:a().trim().toLowerCase().min(1).max(o).regex(c).describe("Git host, e.g. 'github.com' (bare hostname, no scheme)."),secretId:a().min(1).max(o).describe("Vault secret id holding the PAT used to authenticate this host.")});s({ids:l(a().max(o)).describe("Ordered list of custom virtual MCP agent ids to show on the home view.")});const u=s({voice_mode:e().optional(),home_task_intake_enabled:e().optional().describe("Show Task mode on the Home composer and allow reports to start tasks."),demo_mode:e().optional().describe("Curated demo org: the commerce connect modal proceeds without a configured required data source."),demo_board_reset:e().optional().describe("Curated demo org: every morning the task board returns to its captured snapshot, and admins can reset or recapture it on demand."),reports_only:e().optional().describe("Curated Deco Score look: hides agent navigation, the home Customize button, and the Settings/Automations tabs. Defaulted on for orgs created by commerce onboarding."),reviewer_enabled:e().optional().describe("Run the Reviewer on a task's pull request when the card reaches In Review — it reviews the code with the repo's stack-appropriate skills, fixes what it finds on the PR's own branch, then exercises the change on the deploy preview and approves or hands the card to a human."),qa_agent_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),code_reviewer_enabled:e().optional().describe("Deprecated: see reviewer_enabled."),auto_merge:e().optional().describe("When a card reaches Ready for Deployment, merge its pull request automatically instead of waiting for someone to press Ship."),auto_resolve_conflicts:e().optional().describe("When a pull request in Ready for Deployment can't be merged because it conflicts with its base branch, hand it back to the Super Agent to resolve the conflict (check out the branch, merge the base, push). Unset, it follows `auto_merge`; set it explicitly to run one without the other."),cheap_reviewer_model:e().optional().describe("Run the Reviewer on a cheaper model than the Super Agent that wrote the code. On by default — turning it off trades cost for some review depth."),coding_agent_org_mcps:e().optional().describe("Give a coding-agent run (the claude-code harness in a sandbox) every MCP connection in the org as its own MCP server, on top of the narrow Studio surface it always gets. Off by default: each connection is one more server the agent connects to at session start, and all of their tools land in its context."),coding_agents_claude_code:e().optional().describe("Run chats on a Code Agent (an agent imported from a GitHub repo) with the claude-code harness inside its sandbox, instead of hosted Decopilot. Off by default: it changes the runtime of every such chat, and claude-code flushes whole turns rather than streaming tokens."),task_board_codex:e().optional().describe("Allow tasks to select the Codex harness. Off by default; existing tasks keep Claude Code. Reviewers keep their own runtime."),chat_harness_codex:e().optional().describe("Use Codex for new sandbox chats. Off by default; requires hosted sandboxes and a ChatGPT subscription or Responses API provider. Existing chats keep their pinned runtime."),chat_harness_sandbox_only:e().optional().describe("Run every chat with the claude-code harness in its own sandbox instead of hosted Decopilot. On by default (see DEFAULT_ON_FLAGS); a deployment without hosted sandboxes keeps Decopilot regardless."),sandbox_run_metadata:e().optional().describe("Forward a sandbox run's metadata (such as a webhook trigger's run_metadata) to the MCP tools it calls, as hosted Decopilot runs do. Off by default."),sandbox_repo_snapshots:e().optional().describe("Keep a Freestyle snapshot of each project repo at its default branch's head, with its dependencies installed and its dev server running, so a new sandbox for that repo starts already serving. Off by default: each push to a default branch costs a snapshot build the next time a sandbox starts."),auto_assign_report_tasks_to_super_agent:e().optional().describe("When a Deco Score import creates a task board item without an assignee, delegate it to the Super Agent automatically instead of leaving it unassigned."),hosting_enabled:e().optional().describe("Per-site Hosting tab (deployments, domains, deploy outcomes). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),deco_analytics_enabled:e().optional().describe("Per-site Deco Analytics tab (traffic, realtime, usage & limits). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),e2e_enabled:e().optional().describe("Per-site E2E tab (end-to-end test runs). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. `HOSTING_CONTROL_PLANE_GA` opens it (and its peers) to every org at once."),experiments_enabled:e().optional().describe("Per-site Experiments tab (A/B tests + variant results). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org."),experiments_v2_enabled:e().optional().describe("Rebuilt Experiments tab: describe the test in prose and an agent drafts it, plus inline editing and the implement/preview tools that write the split into the site. Off by default — an org without it keeps the table-and-dialog tab, which only records experiment metadata. Requires `experiments_enabled`, which still decides whether the tab exists at all."),monitor_enabled:e().optional().describe("Per-site Monitor tab (CDN Performance + Audience from the stats-lake warehouse). Off by default. deco.cx staff and local dev always see it; this flag is the per-client lever to open it to one external org. Its own deployment-wide switch `MONITOR_GA` opens it to every org at once (independent of the control-plane trio)."),site_create_enabled:e().optional().describe('The "Create a new site" option under New project: generates a GitHub repository from a site template in an account the org connected, and opens it as a project. Off by default, for every org — deco.cx staff included.'),new_blocks_editor:e().optional().describe("Use the redesigned blocks editor for every member of the organization. Off by default — the classic editor stays until an admin opts the org in."),blog_ai_enabled:e().optional().describe("The blog's brand context tab and its agentic generation — campaigns, post drafting and link suggestions. Off by default; with it off the blog is written by hand and every BLOG_* tool refuses, over MCP and in the app alike, so an agent cannot spend the organization's credits on a feature it turned off."),site_apps_install_enabled:e().optional().describe("Installing a site app from the Apps tab: writes the app module, registers it (the manifest on Deno, APP_REGISTRY on TanStack), adds the npm dependency, then reinstalls dependencies and restarts the dev script on the running sandbox. Off by default — it writes code and restarts the dev server on install, and the restart only works on a daemon new enough to honour a forced step, so an org opts in once its pods are running one. With it off the catalogue stays browsable and nothing is installable, which is also the lever for an org that does not want the CMS writing code."),multi_app_preview:e().optional().describe("Previewing more than one app of a monorepo: an Apps list in project settings, app tabs with a split view in the preview, and a dev server per extra app in the sandbox, served at its own preview host. Off by default."),cms_auto_commit:e().optional().describe("Fast Preview: commit each CMS save to the editing branch. On by default (see DEFAULT_ON_FLAGS). Off, saves are kept in Studio and shown in the editor and the preview, and reach the branch in one commit when someone publishes or submits for review."),hide_default_blog_blocks:e().optional().describe("Hide the `deco-cms/blog` app's own blocks (`blog/*`) everywhere a post is written — the inserter, the format briefs, and generated drafts — so only the site's own `site/sections/Blog/Post/*` blocks are eligible, plus, in the inserter, the sections under the blog app's `customSectionPaths`. Off by default. Blocks already present in a post keep rendering; this only governs what can be added."),blog_view_enabled:e().optional().describe("Blog as a project view of its own (a sidebar row, an app tile and `/blog`), edited on Blog drafts with each post beside the site's render of it. Off by default: the blog stays in the Site Editor's Content tab, and `blog-draft-` branches are ordinary drafts.")}),h=new Set(["reviewer_enabled","cheap_reviewer_model","chat_harness_sandbox_only","cms_auto_commit"]);function g(i,n){const r=i?.[n];return h.has(n)?r!==!1:r===!0}function m(i){const n=i?.auto_resolve_conflicts;return typeof n=="boolean"?n:i?.auto_merge===!0}export{h as D,f as G,u as O,b as S,m as a,c as b,g as o};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ia as ti,br as ni,c as wn,b as Rn,r as b,m as le,j as r,ca as si,bo as Cs,ib as Mo,B as It,Y as on,aw as ri,_ as oi,bq as ai,Z as ii,q as li,ic as bs,hI as ci,id as ui,ie as di,h as fi,bs as wt,ig as Qr,ih as xs,ii as mi,ij as pt,ik as Yr,il as pi,fS as hi,im as gi,io as Xr,ip as vi,t as H,fw as Zr,iq as yi,ir as Bt,is as Si,it as bi,iu as xi,fk as eo,iv as _s,iw as _i,ix as ki,iy as wi,fh as Ri,fT as ji,iz as Ei,iA as Vi,fv as Ti,K as Ai,iB as to,eP as Ni,fL as Hn,fQ as no,iC as so,iD as Ci,iE as Pi,iF as Bi,iG as Ki,iH as Di,iI as Mi,iJ as ro,iK as Fi,iL as Ii,fj as oo,iM as Li,iN as Oi,fN as ao,iO as zi,ff as $i}from"./index-C6-0Ff1m.js";import{u as Wi}from"./chat-context-BXxmldjV.js";import{a as Zn,M as io}from"./save-status-DEylj8_h.js";import{p as kn,f as Hi,n as qi}from"./parse-sections-CBJ8clfr.js";import{a as Gi}from"./repository-binding-Do6sAdct.js";import{t as Ui}from"./ChevronDown-CD0tZl8C.js";import{d as Fo,b as Ji}from"./UserCheck01-DLUgjW3m.js";import{n as Qi}from"./ChevronUp-DGDvzrMe.js";import{b as Xn,e as Yi,P as lo,K as co}from"./agent-icon-SasBmPrY.js";import{S as an}from"./scroll-area-BSx_oSJx.js";import{c as Rt,T as jt,a as Et}from"./tooltip-BnL5r8Gv.js";import{g as Xi,h as Zi,i as el,E as tl,j as nl,V as sl,k as rl,l as ol,G as al,s as Jn,v as Qn,u as il,a as qn,p as Io,m as ll,n as cl,c as uo,o as ul,q as dl,A as Gn,P as fo,w as mo,x as po,y as ks,z as fl,B as ml,D as ho,F as pl,J as go,K as vo,L as yo,M as hl,Q as So,T as ln,U as gl,W as vl}from"./held-block-view-ByNmqPhe.js";import{j as yl,u as Sl,i as bl,v as xl,aB as _l,U as kl,k as bo,aU as xo,a9 as Kt,aa as Dt,aq as wl,aV as Rl,aW as jl,aO as _o,at as El,aA as Vl}from"./site-editor-toast-C2OaHizl.js";import{u as Tl,ao as ko,c as wo,k as Al,A as Nl,ad as Cl,ae as Pl,aj as Bl}from"./blocks-tab-states-CmsgKSWv.js";import{u as Kl}from"./use-delete-block-DDUTXhNF.js";import{b as Dl,u as Ml,k as Un,e as xn}from"./use-never-published-DpnSCkDS.js";import{a as Es,e as Lo}from"./UserSquare-a_XazovD.js";import{b as Fl}from"./MessageCircle01-D1dT92x6.js";import{i as Ro}from"./Tool01-BpBS8dw-.js";import{s as jo}from"./Eye-nqlQ004P.js";import{s as Il}from"./Plus-CF8KlFVc.js";import{s as Ll}from"./Trash01-DXQWI50A.js";import{i as Vs}from"./Zap-QnlW2BG3.js";import{u as Ol,a as Eo,n as zl,P as $l,o as Wl,C as Hl,D as ql,c as Gl}from"./task-key-DgbGUF2j.js";import{u as Ul,s as Jl,a as Yn,S as Ql,v as Yl}from"./sortable.esm-BulVoRsH.js";import{s as Xl,g as Zl,u as ec,A as tc}from"./use-section-preview-base-D61lHpgT.js";import{m as nc,P as sc}from"./mustache-CH8IdNgC.js";import{aR as Vo,aS as rc,X as oc,aT as ac,aU as ic,k as lc}from"./category-tree-CUP3rQKK.js";import{u as cc,a as uc,P as To,w as dc,b as fc}from"./seo-editor-ByqHZOIr.js";import{v as mc,k as ws,x as Ao,j as pc,y as hc}from"./named-rule-step-ISshG07e.js";import{u as gc}from"./use-apply-named-rule-Cc4ACfQP.js";import{o as Jt,f as Ts,y as As,q as Ft,h as cn,u as vc,n as Ut,r as Rs,m as Mt,k as _n,b as yc,s as No,z as Sc,A as bc,B as xc}from"./section-array-field-dPI_sYd7.js";import{b as Co,a as _c}from"./variant-matcher-override-DY5ZfO62.js";import"./use-panel-navigate-CkYTugDF.js";import"./thread-route-DY_UV0gu.js";import"./use-project-scope-DwQViH2f.js";import"./use-view-draft-kind-DrDbO3-P.js";import"./use-blog-view-BHifDign.js";import"./use-organization-settings-BmAIEgEL.js";import"./schema-DiSJ8SEc.js";import"./task-board-DNboqZMy.js";import"./thread-intent-j3i3V7mR.js";import"./use-mcp-client-Bg8mQo9f.js";import"./auth-C---Zkvq.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DdE7kwP2.js";import"./session-runtime-fXa5psFL.js";import"./use-entitlements-DIoZnc_q.js";import"./use-ai-providers-pXYGEzkI.js";import"./use-current-view-0HWp9lHl.js";import"./use-in-settings-DxzX6GVb.js";import"./use-decopilot-events-B1JmbrrX.js";import"./Image01-DZmu7hyy.js";import"./Upload01-BXiTGuBV.js";import"./label-Cq7ohFeR.js";import"./SwitchHorizontal01-BSGnkDXI.js";import"./popover-DTBVeUtG.js";import"./switch-6JKp3FKO.js";import"./toggle-group-CbJrGPYf.js";import"./active-indicator-CCMhAsc_.js";import"./match-site-slug-config-B47_xZCi.js";import"./use-file-configs-I6vvS9gB.js";import"./asset-utils-CJa90ZGO.js";import"./useInfiniteQuery-B5jgBAwp.js";import"./infiniteQueryObserver-CiZgrwb3.js";import"./AlertCircle-CYAsQRdT.js";import"./hosted-reconcile-CgC-Mb3M.js";import"./SearchMd-Cw05gj7E.js";import"./textarea-C3LFFo0w.js";import"./use-copy-BRwsGSGM.js";import"./ChevronSelectorVertical-CmQsMnAL.js";import"./command-CjjWneJ9.js";import"./index-BPvQqOSy.js";import"./Play-JVQd8C8L.js";import"./monaco-editor-d8C00Vbh.js";import"./editor-BR1a7qGD.js";import"./ArrowUp-CsFg9VL2.js";import"./ArrowLeft-zHVY_XX0.js";import"./ArrowRight-B6vgPWbg.js";import"./BookOpen01-AamEOlRO.js";import"./Globe04-OZ9xS3Lx.js";import"./CheckCircle-BB00e9u8.js";import"./TrendUp01-CdeGaAD9.js";import"./LinkBroken01-BxVMIk5A.js";import"./CreditCard01-W8t7hmzJ.js";import"./File02-o8s5093L.js";import"./Fingerprint04-DY8McBak.js";import"./Key01-CSQOqmIz.js";import"./LayoutLeft-BSo5LCFE.js";import"./Minus-D2jrgo3d.js";import"./Monitor01-COmDHQ1j.js";import"./Sun-Bji8LMRX.js";import"./ShoppingBag01-Cc2EJvA-.js";import"./Users01-BpOXj9ap.js";import"./XClose-DxbjiApV.js";import"./index-BdQq_4o_.js";import"./index-ZdVMGNX_.js";import"./utils-CalvUBc1.js";import"./calendar-oyktWjjy.js";import"./usage-stats-DX8XXFQ9.js";import"./utils-CVEq3hMx.js";import"./markdown-5RMcvWqV.js";import"./use-mobile-IMVhNYT_.js";import"./gateway-client-BQlD2psO.js";import"./form-Dx1EBvxh.js";import"./select-Chdk1xe9.js";import"./editor-classes-D4G_DIGw.js";import"./combobox-3XSCcZHm.js";import"./use-sandbox-events-DwjSc3R2.js";import"./sandbox-url-D3mC8qhT.js";import"./use-blocks-v8-project-z5uA6d0S.js";import"./use-voice-input-ChVzBkTC.js";import"./drawer-JbzUShND.js";import"./index-CqirF9LN.js";import"./checkbox-DcLJM3uK.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-B3EnJ01P.js";import"./empty-state-BnFVKQvv.js";import"./search-input-DE_voviB.js";import"./tabs-CT50lxBB.js";import"./use-debounced-value-Dw3dFt4C.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-BKCcX4sy.js";import"./collapsible-B8lX7LSm.js";import"./use-task-board-items-CygST8NV.js";import"./config-DMRaGUqI.js";import"./task-route-DUKKS-kP.js";import"./project-index-I2IwZ_L4.js";import"./shell-layout-CuBXiCpv.js";import"./use-deployment-admin-KnQTKRss.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-DOVWyuaL.js";import"./integration-icon-BIQ_3p0x.js";import"./project-icon-CGc9ojaV.js";import"./use-navigate-to-agent-WJ7w-8ZZ.js";import"./new-project-dialog-Ch6wUMKc.js";import"./repository-picker-B9qWS0uH.js";import"./github-icon-hFwcbgKP.js";import"./collection-search-ioGjJlri.js";import"./new-project-store-BJVEZe7t.js";import"./legacy-admin-welcome-dialog-Cdla_zr3.js";import"./required-auth-layout-BwuuU3bJ.js";import"./use-org-sso-D7w6nhfD.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BV5sVhom.js";import"./types-9tZ4hN1z.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./sheet-XJvcudCi.js";import"./use-connection-D5_bE1jX.js";import"./use-mcp-prompts-DPiL3LQv.js";import"./use-thread-outputs-U0o_TC58.js";import"./file-type-icon-nU6c9OQr.js";import"./slider-DaeRBQVD.js";import"./index-DWqgNqna.js";import"./tooltipContext-DvsqpzJf.js";import"./CategoricalChart-DfjY1woJ.js";import"./index-CMjqNIsi.js";import"./use-move-blocks-BVaiu02r.js";const kc={escape:Xi};function wc(g,e){for(const p of Xl(g,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function Rc(g,e){if(!e)return;const p=ti(g,ni(e));if(p)try{const S=wc(p.resolveType,e);return S&&nc.render(S,p.data,{},kc).trim()||void 0}catch{return}}function jc(g){const e=wn.c(13),{icon:p,label:S,className:x}=g;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(jt,{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(Rt,{children:[_,P]}),e[10]=_,e[11]=P,e[12]=k):k=e[12],k}const Ec="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 Po(g){return Array.from({length:g},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Oo(g){return g.map((e,p)=>({...e,index:p}))}function Vc(g,e){if(e===g.length)return g;if(e<g.length)return Oo(g.slice(0,e));const p=Array.from({length:e-g.length},(S,x)=>({id:crypto.randomUUID(),index:g.length+x}));return[...g,...p]}function zo(g){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=g,C=Rn(),_=Zn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let X;e[0]!==x||e[1]!==S?(X=S&&x?Zl(S,x):void 0,e[0]=x,e[1]=S,e[2]=X):X=e[2];const ge=X;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?Rc(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?Xn:k?Fo:Lo;let G;e[16]!==k||e[17]!==P?(G=P?{color:ai}:k?{color:"oklch(0.65 0.15 160)"}:void 0,e[16]=k,e[17]=P,e[18]=G):G=e[18];const _e=G;let F;e[19]!==xe||e[20]!==_?(F=_?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(Fl,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=F):F=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 Z=Le??p.label;let ze;e[30]!==Ee||e[31]!==Z?(ze=r.jsx("span",{className:Ee,children:Z}),e[30]=Ee,e[31]=Z,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(io,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(io,{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]!==F||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[F,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=F,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const Tc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ac="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 $o(g,e,p){if(p)return ol({selected:e});const S=g.isSavedBlock===!0,x=g.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?Tc:x?Ac:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function js(g,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]":g?"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 Nc(g){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:X,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=g,w=Rn(),c=Zn(),xe=S?Cs(S.__resolveType??""):!1,G=p.isHidden===!0,_e=xe||G;let F;e[0]!==p?(F=Mo(p),e[0]=p,e[1]=F):F=e[1];const ke=F,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Bc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:Z,transform:ze,isDragging:nt}=Ul(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 v=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 I;e[11]!==P?(I=M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),P())},e[11]=P,e[12]=I):I=e[12];const Ze=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Ze?(A=le("touch-none transition-colors",Ze,$o(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Ze,e[17]=A):A=e[17];let Qe;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Qe=r.jsx(zo,{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 W=!c&&d&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender"),className:le(js(_e,xe)),onClick:M=>{M.stopPropagation(),Le?.()},onPointerDown:Pc,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(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:G,onToggle:Ue,children:G?r.jsx(Ro,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})}):r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx(It,{type:"button",variant:"ghost",size:"icon","aria-label":w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),className:le(js(_e,G)),onClick:M=>{M.stopPropagation(),Ue()},onPointerDown:Cc,children:G?r.jsx(Ro,{className:"h-3.5 w-3.5"}):r.jsx(jo,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),fe=oi,Ye=nl;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=le(js(_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:M=>{M.stopPropagation(),Le?.()},children:[r.jsx(Vs,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(ri,{})]}),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]!==X?(Ke=M=>{M.stopPropagation(),X()},e[35]=X,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(Yi,{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:M=>{M.stopPropagation(),Ce()},children:[r.jsx(Fo,{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&&Ec),onClick:M=>{M.stopPropagation(),ge()},children:[c?r.jsx(Xn,{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:M=>{M.stopPropagation(),Je()},children:[c?r.jsx(Lo,{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 We;e[59]!==k?(We=M=>{M.stopPropagation(),k()},e[59]=k,e[60]=We):We=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Ll,{className:"h-4 w-4"}),e[61]=et):et=e[61];let De;e[62]!==w?(De=w("sectionsEditor.sectionList.deleteMenuItem"),e[62]=w,e[63]=De):De=e[63];let $;e[64]!==We||e[65]!==De?($=r.jsxs(on,{variant:"destructive",onClick:We,children:[et,De]}),e[64]=We,e[65]=De,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(ii,{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]!==Z||e[82]!==v||e[83]!==A||e[84]!==Qe||e[85]!==W||e[86]!==at||e[87]!==Ve||e[88]!==I?(Te=r.jsxs("div",{ref:Z,style:v,...u,...Ee,role:ot,tabIndex:m,onClick:P,onKeyDown:I,className:A,children:[Qe,W,at,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=Z,e[82]=v,e[83]=A,e[84]=Qe,e[85]=W,e[86]=at,e[87]=Ve,e[88]=I,e[89]=Te):Te=e[89],Te}function Cc(g){return g.stopPropagation()}function Pc(g){return g.stopPropagation()}function Bc(){return!1}function Ns(g){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=g,C=Rn();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(Il,{size:14}),e[2]=k):k=e[2];let X;e[3]!==C?(X=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=X):X=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==X?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,X]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=X,e[10]=ge):ge=e[10],ge}function Kc(g){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:X,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=g,G=xe===void 0?!0:xe,_e=Rn(),F=Zn();let ke;e[0]!==x.length?(ke=()=>Po(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[Z,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);Z!==p?(ze(p),Pe(x.length),Oe(Po(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Vc(tt,x.length)));let de;e[2]===Symbol.for("react.memo_cache_sentinel")?(de={activationConstraint:{distance:8}},e[2]=de):de=e[2];let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v={coordinateGetter:Jl},e[3]=v):v=e[3];const we=Ol(Eo($l,de),Eo(zl,v));let rt;e[4]!==d?(rt=d.map(Dc),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 I=m;let Ze;e[7]!==ot||e[8]!==k?(Ze=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const He=ot.indexOf(String(O.id)),ht=ot.indexOf(String(Ae.id));He===-1||ht===-1||(Oe(bt=>Oo(Yn([...bt],He,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(He,ht))},e[7]=ot,e[8]=k,e[9]=Ze):Ze=e[9];const A=Ze;let Qe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Qe=()=>{Ee(null)},e[10]=Qe):Qe=e[10];const W=Qe;let at,fe,Ye,ve,it,$e,Be,Ke,se,Y,ee,D,T,me,We;if(e[11]!==u||e[12]!==G||e[13]!==F||e[14]!==C||e[15]!==d||e[16]!==ot||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==X||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]!==G||e[50]!==F||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 He;e[61]!==Ae?(He=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=He):He=e[62];const ht=He;let bt;e[63]!==G||e[64]!==F||e[65]!==ht||e[66]!==c?(bt=F?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm"})]}),e[63]=G,e[64]=F,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]=G,e[50]=F,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=ql,Ke=we,se=Gl,Y=I,ee=A,D=W,at=Ql,$e=ot,Be=Yl,We="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Nc,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>X(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]=G,e[13]=F,e[14]=C,e[15]=d,e[16]=ot,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=X,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]=We}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],We=e[47];if(me!==Symbol.for("react.early_return_sentinel"))return me;let et;e[68]!==it||e[69]!==We?(et=r.jsx("div",{className:We,children:it}),e[68]=it,e[69]=We,e[70]=et):et=e[70];let De;e[71]!==at||e[72]!==$e||e[73]!==Be||e[74]!==et?(De=r.jsx(at,{items:$e,strategy:Be,children:et}),e[71]=at,e[72]=$e,e[73]=Be,e[74]=et,e[75]=De):De=e[75];let $;e[76]!==Ye||e[77]!==ve||e[78]!==F||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:le("cursor-grabbing shadow-lift",$o(ve,!1,F)),children:r.jsx(zo,{section:ve,raw:Ye,meta:V,decofile:C})}):null,e[76]=Ye,e[77]=ve,e[78]=F,e[79]=C,e[80]=V,e[81]=$):$=e[81];let ie;e[82]!==$?(ie=si.createPortal(r.jsx(Wl,{dropAnimation:Zi,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]!==De||e[91]!==ie?(Ve=r.jsxs(fe,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:D,children:[De,ie]}),e[84]=fe,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=D,e[90]=De,e[91]=ie,e[92]=Ve):Ve=e[92];let Te;e[93]!==G||e[94]!==F||e[95]!==c?(Te=!F&&r.jsx(Ns,{canAddSection:G,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=G,e[94]=F,e[95]=c,e[96]=Te):Te=e[96];let M;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(M=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=M):M=e[100],M}function Dc(g){return g.id}function Mc(g,e,p,S){if(!g||typeof g!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(g,p,S)?{kind:"inline",blockKey:g.__resolveType??"",inlinedRule:Ts(g,p,S)}:{kind:"noop"};const V=As(g,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 Bo="section-form-stale-save",Fc=3;function Ko(g,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Io(e.pageKey?g[e.pageKey]?.sections:void 0,g,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,g,p)}}const Do=new WeakMap;let Ic=0;function Lc(g){let e=Do.get(g);return e===void 0&&(e=++Ic,Do.set(g,e)),e}function $f({orgSlug:g,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:X=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=Rn(),xe=Wi(),G=xe?.taskId??null,_e=S?{orgSlug:g,virtualMcpId:e,branch:p,threadId:G,previewUrl:x}:null,[F,ke]=b.useState([]),{data:d,isLoading:Oe}=yl(_e,{pollWhile:F.length>0}),{data:u,isLoading:Ee}=Tl(_e),Z=Zn(),ze=xe?.virtualMcpId,Pe=Gi(ze===e?e:null)?.metadata?.siteSlug??null,st=ec({virtualMcpId:e,branch:p,sandboxUrl:x}),de=Sl(e,p),v=bl(de),we=Ti(v),rt=!v,ot=!!st||v,[m,I]=b.useState(null),[Ze,A]=b.useState(null),[Qe,W]=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),[We,et]=b.useState(D.length);We!==D.length&&(et(D.length),requestAnimationFrame(()=>{me.current&&(me.current.scrollTop=0)}));const[De,$]=b.useState(0),[ie,Ve]=b.useState(null),[Te,M]=b.useState(null),[tt,O]=b.useState(null),[Ae,He]=b.useState(!1),[ht,bt]=b.useState(!1),jn=b.useRef(null),[En,Wo]=b.useState(!0),[Qt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[Re,un]=b.useState(X),[Ps,Bs]=b.useState(X);X&&!Ps&&(Bs(!0),un(!0),I(null),A(null),W(null),T([])),!X&&Ps&&Bs(!1);const[Ho,dn]=b.useState(null),[Ks,An]=b.useState(void 0),[Ds,Ot]=b.useState([]),[Ms,Yt]=b.useState(0),[Me,lt]=b.useState(0),[qo,Fe]=b.useState(null),[Xt,qe]=b.useState(null),[Fs,Is]=b.useState(null),Nn=li(),Cn=xl({orgSlug:g,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Dl({orgSlug:g,virtualMcpId:e,branch:p}),[Go,Uo]=b.useState(V),[Jo,Qo]=b.useState(C),[Yo,Xo]=b.useState(_);(Go!==V||Jo!==C||Yo!==_)&&(queueMicrotask(()=>fn.flush()),Uo(V),Qo(C),Xo(_),I(null),A(null),W(null),fe(0),se(null),ee(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1));const L=Ml({orgSlug:g,virtualMcpId:e,branch:p}),Ls=il({orgSlug:g,virtualMcpId:e,branch:p},d??{},{onSaved:k}),mn=Ls.save,Pn=Kl({orgSlug:g,virtualMcpId:e,branch:p}),Os=gc({orgSlug:g,virtualMcpId:e,branch:p}),[Zt,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(g,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],j=l==null?void 0:o[l],h=f&&j?.isSavedBlock?bs(f,j):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}),[zs,$s]=b.useState(0),[Zo,ea]=b.useState(0),Ws=ci(de,{orgSlug:g,virtualMcpId:e,branch:p}),Hs=ui(Ws,F[0]?.blockKey??null,di(d,F[0]?.blockKey??null)),[ta,na]=b.useState(null),ts=kl(g,e).epoch,[sa,ra]=b.useState(ts);cc(Re?{orgSlug:g,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const qs=_??(d&&u?ko(wo(d,u),V,C)?.key??null:null),ns=bo({orgSlug:g,virtualMcpId:e,branch:p},qs?[qs]:[],{withRefs:!0}),[Gs,oa]=b.useState(!1),ss=bo({orgSlug:g,virtualMcpId:e,branch:p},Gs?Al:[]),Us={ready:!(de.kind==="protocol"&&de.hosted)||Gs&&ss.ready,failed:ss.failed,retry:ss.retry,request:()=>oa(!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(fi,{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 aa=wo(d,u),q=!!_,oe=q?null:ko(aa,V,C),y=q?_:oe?.key??null,rs=q&&_?d[_]:void 0,Js=q&&_&&rs?Nl(_,rs):q&&_?_:"",nn=!q&&y&&d[y]?d[y]:null,os=Re&&d&&u&&y&&oe?Vo(d,{kind:"page",pageKey:y,pageName:String(oe.name??""),path:String(oe.path??"")},u):null,ia=Re?nn?.seo:void 0,Kn=Ks!==void 0?Ks:ia,la=Re?rc(Kn):void 0,Qs=os?.seoTypeOptions??[],Ys=Re&&u?oc(u):"",as=Ho??la??{},Dn=Re&&os?uc(as,os):null,Xs=Re&&Dn&&ac(Kn)?qn(Dn,u):null,Zs=Re?ic(d,u)?.seoData:void 0,pe=q?[{label:"Default",sections:[{__resolveType:_}]}]:Io(nn?.sections,d??{},v),yt=pe.length>1,te=Math.min(at,pe.length-1),Se=pe[te],B=Se?.sections??[],ce=kn(B,d,v),Mn=!q&&vc(nn?.sections,v);if(q&&_&&Fs!==_){Is(_);const t=B[0],n=ce[0];if(t&&n){I(0),lt(0),T([]);const s=wt(t,n,d,v);s&&(A(s.data),W(s.resolveType),qe(null),Fe(null))}}!q&&Fs!==null&&Is(null),re.current={rawSections:B,parsedSections:ce,decofile:d??{},activePageKey:y,pageVariants:pe,variantIndex:te,sectionVariantIndex:Me,selectedSectionIndex:m};const ca=()=>({multivariate:Mn,index:te,variants:pe.map(t=>({rule:t.rule})),lazyValues:v&&Mn&&Ni(nn?.sections?.variants?.[te]?.value)}),is=(t,n)=>{if(!w)return;if(!y||!Mn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},o=v?xo(y,s):Co(y,s,d,u);w(o.length>0?o:null)},ls=w&&y&&Mn&&yt&&!Oe&&!Ee?y:null;if(ls!==ta&&(na(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=ca(),a=v?xo(y,o):Co(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=v?Rl(i):_c({...i,decofile:d,meta:u}),f=v?jl(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),W(null),qe(null),Fe(null),a&&$t(null,o,s);return}const f=Yr(i,we)[s];if(!f){A(null),W(null),qe(null),Fe(null),a&&$t(null,o,s);return}const j=gi(f.value,d);A(j?.data??null),W(j?.resolveType??null);const{resolveType:h,formValue:R}=Ut(f.rule,d,u??void 0);qe(h),Fe(R),a&&$t(i,o,s)},cs=t=>{M(null),fe(t),I(null),A(null),W(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)},ua=(t,n)=>{const s=B[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(I(t),lt(i),T([]),$(l=>l+1),o.isMultivariate)xt(s,o,i,t);else{const l=wt(s,o,d,v);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),qe(null),Fe(null)}return!0},er=P?.index;if(P!==void 0&&(P?.seq??null)!==Ye&&(ve(P?.seq??null),typeof er=="number"&&ua(er,0)),ts!==sa){ra(ts);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||L.isPending||Ls.isPending||fn.isPending||F.length>0,n=m!==null&&Qr(me.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=B[m],o=ce[m];if(T([]),$(a=>a+1),!s||!o)I(null),A(null),W(null);else if(o.isMultivariate)xt(s,o,Me,m);else{const a=wt(s,o,d,v);A(a?.data??null),W(a?.resolveType??null)}}!t&&Re&&(dn(null),An(void 0),Yt(s=>s+1))}if(zs!==Zo){ea(zs);const t=m!==null?B[m]:null,n=m!==null?ce[m]:null;if(t&&n&&m!==null)if(T([]),$(s=>s+1),n.isMultivariate)xt(t,n,Me,m);else{const s=wt(t,n,d,v);A(s?.data??null),W(s?.resolveType??null)}}const ut=F[0];if(ut){const{formBase:t,target:n}=ut,s=Ko(d,n,v),o=t.sectionIndex,a=s.rawSections.length===t.sectionCount?xs(s.rawSections[o],s.parsedSections[o],n.sectionVariantIndex,d,v):null,i=mi(ut,a,l=>Xr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...F.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:g,virtualMcpId:e,branch:p,threadId:G,previewUrl:v?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);L.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:o=>{n?.onError?.(),L.reportError(o)}})},Wt=()=>{Ce?.(null),I(null),Tn(!1),A(null),W(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1)},tr=()=>Qr(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,H.error(t,{id:Bo}),tr()){tn.current=!0;return}$s(n=>n+1)},nr=()=>{!tn.current||tr()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,$s(t=>t+1))},sr=()=>{tn.current&&setTimeout(nr,0)},rr=de.kind==="protocol"&&de.source==="github",or=t=>Vl(Nn,Cn,t,de.kind==="protocol"?de:null),ar=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)},da=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:q,pageVariantIndex:s,sectionVariantIndex:o,schema:Fn}},vn=t=>{ct.current=t,ke(t)},fa=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:so(o.plan,o.choices,t.plan),fresh:Li(o.plan,t.plan,o.fresh),changedAgain:o.changedAgain||Hn(o.plan.theirs)!==Hn(t.plan.theirs)}):[...n,{...t,changedAgain:es.current.has(t.formBase)}];vn(a)},ir=(t,n)=>{const s=ct.current,o=s.findIndex(l=>l.formBase===t),a=s[o];if(!a)return!1;if(Hn(a.plan.mine)===Hn(n))return!0;const i=no({...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:so(a.plan,a.choices,i)})),!0},ma=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},pa=()=>{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"&&!ir(n,o)&&yn(o,n.sectionIndex,0,s),ct.current[0]??null},ha=()=>{const t=ct.current[0],n=pa();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"&&Ei(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||ma(n))&&(zt.current=o,A(s),$(i=>i+1)),yn(s,o.sectionIndex,0,a)},ga=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,o,a=!1)=>{const i=o??da(n),l=i.sectionVariantIndex,f=i.formBase,j=a||to(ct.current,f,i,n,v).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const R=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(R,E);return}const K=typeof t=="function"?t():t,z=to(ct.current,f,i,n,v).base;if(z&&ir(z,K))return;const ne=re.current.decofile,{rawSections:J,parsedSections:Ne,pageVariants:Q,variantIndex:be}=Ko(ne,i,v),Ie=i.pageKey,he=J[n];if(!he)return;const ue=Ne[n];if(!ue)return;const Ge=f?.base,Xe=xs(he,ue,l,ne,v),Nt=!!Ge&&!!Xe&&Ci(Ge,Xe)&&!(f&&Xr(f,Xe));if(Nt&&Ge&&Xe){if(Pi(Ge,Xe)){us(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const U=ue.isSavedBlock?"here":Bi(Ge,J.map((ae,mt)=>xs(ae,Ne[mt],l,ne,v)),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&&I(U),yn(K,U,s,i);return}}const Ct=Nt&&Ge&&Xe?no({ancestor:Ge,mine:K,theirs:Xe}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=J.length,fa({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Ki(Ct),changedAgain:!1,blockKey:ue.isSavedBlock?bs(he,ue):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??K,Gr=Di({merged:!!Pt,tracked:f,current:zt.current,saved:K});Pt&&H.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Bo}),Gr&&f&&(f.emitted=Pt,A(Pt));const Ss=Gr||!Pt?rn:K;f&&(f.base=Ss,f.sectionCount=J.length,Mi(f,Ss));const Ur={onSuccess:()=>{f&&es.current.delete(f),k?.()},onError:U=>{if(f?.base===Ss&&Ge&&(f.base=Ge),U instanceof El){if(f&&(f.version=void 0),s<Fc){ye.current.delete(R),hn.current=!0;const ae=Oi(s,U.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:K},n,s+1,i,ae.immediate),ye.current.delete(R),ar(xn(v))},ae.delay)}else us();return}L.reportError(U)}},Jr=U=>{pn.current=!0;let ae=!1;L.mutateAsync(U).then(()=>Ur.onSuccess(),mt=>{ae=!0,Ur.onError(mt)}).finally(()=>{pn.current=!1,ar(ae?xn(v):0),nr()})};if(ue.isSavedBlock){const U=bs(he,ue);if(!U)return;Jr({blockKey:U,data:rn,...Ge?{base:{value:Fi({startedFrom:Ge,stored:Xe,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:ro({formBase:f,rebased:!!Pt,versionOf:or,productionVersionOf:ae=>ao(Nn,Cn,ae),...rr?{copy:{value:ne[U]}}:{}})});return}if(!Ie)return;const Wn={...ne[Ie]},Gt=[...J];if(ue.isMultivariate){const U=pt(he,ue);if(!U||!Ie)return;const ae=Ii(U,l,rn);Gt[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]=oo(ae.__resolveType,mt[0],rn)),ae.variants=mt,U?Gt[n]={...he,section:ae}:Gt[n]=ae}else ue.isLazy?Gt[n]={...he,section:rn}:Gt[n]=rn;if(Q.length>1){const U=Wn.sections,ae=[...U?.variants??[]];ae[be]&&(ae[be]=oo(U?.__resolveType,ae[be],Gt)),Wn.sections={...U,variants:ae}}else Wn.sections=Gt;Jr({blockKey:Ie,data:Wn,rebaseOnConflict:!1,guard:ro({formBase:null,rebased:!1,versionOf:or,productionVersionOf:U=>ao(Nn,Cn,U),...rr?{copy:{value:ne[Ie]}}:{}})})};if(_t.current={sectionIndex:n,sectionVariantIndex:l,write:E},j){_t.current=null,E();return}N.current=setTimeout(()=>{N.current=null,E()},xn(v))},va=t=>{tn.current=!1,I(t),lt(0),T([]),$(a=>a+1);const n=B[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,v);if(!o){A(null),W(null),qe(null),Fe(null),$t(null,t,0);return}A(o.data),W(o.resolveType),qe(null),Fe(null),$t(null,t,0)},lr=t=>{const n=t;m!==null&&(zt.current=Vi(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Ze,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=Vo(d,n,u);s&&fn.save(y,()=>{const o=Nn.getQueryData(Ai.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?dc(a,t.raw,u):t?.inner!==void 0?fc(n,s,a,t.inner):a})},cr=(t,n)=>{y&&(Bn.current[t]=n,ds())},ya=(t,n)=>{if(!y)return;const s=Yn([...B],t,n);m!==null&&(m===t?I(n):t<m&&n>=m?I(m-1):t>m&&n<=m&&I(m+1)),dt(s)},Sa=t=>{if(!y)return;const n=B.filter((s,o)=>o!==t);m===t?Wt():m!==null&&m>t&&I(m-1),dt(n)},ba=t=>{if(!y)return;const n=B[t];if(!n)return;const s=[...B];s.splice(t+1,0,gl(n)),m!==null&&m>t&&I(m+1),dt(s)},xa=t=>{if(!y)return;const n=B[t],s=ce[t];if(!n||!s)return;const o=s.isHidden?ki(n,v):wi(n,u);if(!o)return;const a=[...B];a[t]=o,m===t&&Wt(),dt(a)},_a=t=>{if(!y)return;const n=B[t],s=ce[t];if(!n||!s||s.isMultivariate)return;const o=_i(n);if(!o)return;const a=[...B];a[t]=o,m===t&&Wt(),dt(a)},ka=t=>{if(!y)return;const n=B[t],s=ce[t];if(!n||!s?.isSavedBlock)return;const o=wt(n,s,d,v);if(!o?.data)return;const{name:a,...i}=o.data,l=[...B];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Wt(),dt(l)},wa=t=>{if(!y)return;const n=qi(ce),s=[...B.slice(0,n),{__resolveType:t.resolveType},...B.slice(n)];dt(s,{onError:()=>{re.current.selectedSectionIndex===n&&Wt()}}),He(!1),I(n),lt(0),T([]),$(l=>l+1);const o=s[n],a=kn(s,d,v)[n];if(!o||!a)return;if(a.isMultivariate){xt(o,a,0);return}const i=wt(o,a,d,v);if(!i){A(null),W(null),qe(null),Fe(null);return}A(i.data),W(i.resolveType),qe(null),Fe(null)},ur=t=>{jn.current=t.append,He(!0)},Ra=t=>{const n=jn.current;if(!n){wa(t);return}n({__resolveType:t.resolveType}),He(!1),jn.current=null},dr=t=>{if(m===null)return;const n=B[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=B[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=bi(o,t);if(!a){H.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...B];i[m]=Bt(n,s,a);const l=a.variants;let f=Me;t===Me?f=Math.min(t,l.length-1):t<Me&&(f=Me-1),lt(f),T([]),$(j=>j+1),xt(i[m],s,f),dt(i)},Ea=t=>{if(m===null||!y)return;const n=B[m],s=ce[m];if(!n||!s?.isMultivariate)return;const o=pt(n,s);if(!o)return;const a=xi(o,t,v),i=[...B];i[m]=Bt(n,s,a);const l=eo(o.variants??[],t,v);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,v),dt(i)},Va=(t,n)=>{if(m===null||!y||t===n)return;const s=B[m],o=ce[m];if(!s||!o?.isMultivariate)return;const a=pt(s,o);if(!a)return;const i=yi(a,t,n),l=[...B];l[m]=Bt(s,o,i);let f=Me;Me===t?f=n:t<Me&&n>=Me?f=Me-1:t>Me&&n<=Me&&(f=Me+1),lt(f),xt(l[m],o,f,m,v),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=B[n],o=ce[n];if(!s||!o)return;const a=vi(s,o,void 0,u,v);if(!a){H.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...B];i[n]=a.section;const l=kn(i,d,v)[n];if(!l?.isMultivariate){H.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}I(n),lt(a.newVariantIndex),T([]),$(f=>f+1),xt(a.section,l,a.newVariantIndex,n,v),dt(i)},fr=()=>{if(m===null||!y)return;const t=B[m],n=ce[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const o=Si(t,n,s);if(!o){H.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const a=[...B];a[m]=o;const i=kn(a,d,v)[m];if(!i)return;lt(0),qe(null),Fe(null),T([]),$(f=>f+1);const l=wt(o,i,d,v);l?(A(l.data),W(l.resolveType)):(A(null),W(null)),$t(null,m,0),dt(a)},Ta=async t=>{if(ie===null||!y)return;const n=Qn(t,d,u);if(n){H.error(n);return}const s=B[ie],o=ce[ie];if(!s||!o)return;const a=wt(s,o,d,v);if(!a){H.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...a.data,name:t};try{const l=await L.mutateAsync({blockKey:t,data:i,create:!0}),f=[...B];f[ie]={__resolveType:t},await L.mutateAsync({blockKey:y,data:ln(d,y,f,te,pe)}),m===ie&&Wt(),Ve(null),Un(l)||H.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){H.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Dt(l))})}},mr=Se?.rule;if(yt&&m===null&&Y===null&&mr){const{resolveType:t,formValue:n}=Ut(mr,d??{},u??void 0);ee(t),se(n)}const sn=u?ll(u):[],fs=u&&d?cl(u,d):[],Ht=v&&u&&d?mc(u,d):[],ms=(t,n)=>{if(Ht.length===0)return;const s=Cl(t);return{kinds:Ht,selected:s,campaignPrefill:pc(t),onPick:n,load:Us}},pr=!q&&!!(ot&&u&&d),hr=Y&&u?qn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},qt=async(t,n)=>{if(bc(n,t,u,v))try{await Pn.mutateAsync({blockKey:t})}catch(s){H.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Dt(s))})}},gr=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],j=f?.rule;if(Jt(j,s,u)){const h=j?.__resolveType??"",R=s[h],E=typeof R?.name=="string"?R.name:h,{__resolveType:K,...z}=t;L.mutate({blockKey:h,data:Ft(K??"",z,E)},{onSuccess:()=>k?.(),onError:L.reportError});return}f&&(l[o]={...f,rule:t}),a.sections={...i,variants:l},L.mutate({blockKey:n,data:a},{onSuccess:()=>k?.(),onError:L.reportError})},xn(v))},vr=t=>{ee(t);const n=t?No(t,u):{__resolveType:Zr(u)};se(t?n:{}),gr(n)},yr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};gr(s)},In=async(t,n,s)=>{const o=hc(n,t);if(!o.ok)return o.reason==="conflict"&&H.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),_o),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 Os.apply({writes:a})).ok?null:(o.blockWrite&&H.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{..._o,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:o.rule,projected:{...n,...a}})},Sr=Ht.length>0?{kinds:Ht,load:Us,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 Os.apply({writes:{[Bl(t).blockKey]:n.block}})).ok}}:null,br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:o}=re.current;if(!n)return;const a=await In(t,s,f=>{const j=s[n],h=j?.sections;if(!h||typeof h!="object"||Array.isArray(h))return null;const R=h;if(!Array.isArray(R.variants))return null;const E=[...R.variants],K=E[o];return K?(E[o]={...K,rule:f},{blockKey:n,data:{...j,sections:{...R,variants:E}}}):null});if(!a)return;const{resolveType:i,formValue:l}=Ut(a.rule,a.projected,u??void 0);ee(i),se(l),k?.()},xr=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],j=f[o];if(!j)return;const h=Mt(j.rule,s,u),R=cn(t);f[o]={...j,rule:R};const E={...s,[n]:{...a,sections:{...l,variants:f}}},{resolveType:K,formValue:z}=Ut(R,E,u??void 0);ee(K),se(z);try{await L.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await qt(h,E),k?.()}catch(ne){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(ne))})}},_r=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:j}=re.current;if(!l)return;const h=o[n],R=a[n];if(!h||!R?.isMultivariate)return;const E=pt(h,R);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;L.mutate({blockKey:Q,data:Ft(he??"",ue,Ie)},{onSuccess:()=>k?.(),onError:L.reportError});return}const ne=_s(E,s,t),J=[...o];J[n]=Bt(h,R,ne);const Ne=ln(i,l,J,j,f);L.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:L.reportError})},xn(v)))},Aa=t=>{qe(t);const n=t?No(t,u):{__resolveType:Zr(u)};Fe(t?n:{}),_r(n)},Na=t=>{const n=t;Fe(n);const s=Xt?{__resolveType:Xt,...n}:{...n};_r(s)},Ca=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(n===null||!l)return;const h=await In(t,i,K=>{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,_s(J,s,K)),{blockKey:l,data:ln(i,l,Ne,j,f)}});if(!h)return;const{resolveType:R,formValue:E}=Ut(h.rule,h.projected,u??void 0);qe(R),Fe(E),k?.()},Pa=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:o,parsedSections:a,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(n===null||!l)return;const h=o[n],R=a[n];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const K=E.variants??[],z=Mt(K[s]?.rule,i,u),ne=cn(t),J=_s(E,s,ne),Ne=[...o];Ne[n]=Bt(h,R,J);const Q=ln(i,l,Ne,j,f),be={...i,[l]:Q},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);qe(Ie),Fe(he);try{await L.mutateAsync({blockKey:l,data:Q}),z&&z!==t&&await qt(z,be),k?.()}catch(ue){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(ue))})}};if(!q&&!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(q&&!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 je=m!==null?ce[m]??null:null,kr=m!==null?B[m]:null,wr=kr&&je?.isMultivariate?pt(kr,je):null,Vt=wr?Yr(wr,we,v):[],Ln=Math.min(Me,Math.max(Vt.length-1,0)),kt=Vt[Ln]??null,Tt=je?.isMultivariate===!0,ps=m!==null&&je!==null,At=ps&&(Tt||!!(Fn&&Ze)),Ba=At&&!q&&je?.isSavedBlock===!0,ft=q||Ba,Rr=q?Js:je?.label??"",Ka=Xt&&u?qn(Xt,u):null,jr=(t,n)=>n&&Z?`${t} · ${n}`:t,Er=je?je.variantOf??je.label:"",Da=(()=>{const t=Tt&&kt?kt.label:null;return t?Z?[jr(Er,t)]:[je.label,t]:[je?.label??""]})(),hs=jr(oe?.name??"",yt?Se?.label:null),On=At&&(!q||D.length>0)?q?[Js,...D]:[hs,...Da,...D]:[],Vr=Re&&oe?[oe.name,"SEO",...Ds]:[],Tr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Ar=Qt&&oe?[oe.name,Tr]:Lt&&oe&&je?[hs,Er,Tr]:[],zn=Ar.length>0?Ar:Vr.length>0?Vr:ft?On.length>0?On:[Rr]:On.length>0?On:[hs],Nr=ps&&!Tt&&!je?.isHidden&&!!y,Ma=ft||!q&&yt&&!!Se||Nr,Fa=ps&&!Tt&&!q&&D.length===0&&!!je&&Mo(je)&&!!y,Ia=Z&&At&&!Lt&&Tt&&D.length===0&&!!kt,Cr=Z&&D.length>0?uo(D[D.length-1]):null,La=D.length>1?uo(D[D.length-2]):null,Pr=ft?Rr:At?je?.label??"":oe?.name??"",Oa=Qt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):Re?c("sectionsEditor.panelSections.seo"):Cr??Pr,Br=Lt?je?.variantOf??je?.label??"":Qt||Re?oe?.name??"":Cr?La??Pr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?oe?.name??"":oe?.path??"",gs=!Qt&&!Lt&&!Re&&!At&&!ft,za=!Z&&!Re&&!q&&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=yc(t.sections,B,u,v);if(!n)return;const{sections:s,newVariantIndex:o}=n;L.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{fe(o),I(null),A(null),W(null),T([]),se(null),ee(null)},onError:L.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=Sc(i,l),j={...d,[y]:{...o,sections:f}};L.mutate({blockKey:y,data:j[y]},{onSuccess:()=>{n?.();const h=typeof s=="string"?[s]:s??[];(async()=>{for(const R of h)await qt(R,j)})()},onError:L.reportError})},Kr=(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))},Dr=t=>{const n=pe[t]?.rule,s=Mt(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)),I(null),A(null),W(null),T([]),se(null),ee(null)},s)},$a=()=>{const t=pe.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!Ri(n.rule)).map(({variant:n})=>Mt(n.rule,d??{},u??void 0)).filter(n=>!!n);$n(n=>{const s=zi({variants:n}),o=n[s];return o?[{...o,rule:$i(u)}]:null},()=>{fe(0),I(null),A(null),W(null),T([]),se(null),ee(null),Vn(!1)},t)},Mr=t=>{let n=t+1;$n(s=>(n=eo(s,t,v),xc(s,t,v)),()=>{fe(n),I(null),A(null),W(null),T([]),se(null),ee(null)})},Wa=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],j=f[t];if(!j?.rule||typeof j.rule!="object"){H.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=j.rule,R=n.trim();en(!0);try{if(!R){if(!Jt(h,o,u)){M(null);return}const Q=h.__resolveType??"";f[t]={...j,rule:Ts(h,o,u)};const be={...o,[s]:{...a,sections:{...l,variants:f}}};await L.mutateAsync({blockKey:s,data:be[s]}),await qt(Q,be),M(null),k?.();return}const E=As(h,o,u);if(!E){H.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await L.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,R)}),M(null),k?.();return}const K=Jn(R),z=Qn(K,o,u);if(z){H.error(z);return}const ne=Ft(E.resolveType,E.data,R);let J=null,Ne=!1;try{const Q=await L.mutateAsync({blockKey:K,data:ne,create:!0});Ne=Un(Q),J=Ne?null:K,f[t]={...j,rule:cn(K)},await L.mutateAsync({blockKey:s,data:{...a,sections:{...l,variants:f}}}),J=null}catch(Q){throw J&&await Pn.mutateAsync({blockKey:J}).catch(()=>{}),Q}M(null),Ne||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:R})),k?.()}catch(E){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(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:j}=re.current;if(s===null||!l)return;const h=o[s],R=a[s];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const K=E.variants??[],z=K[t];if(!z?.rule||typeof z.rule!="object"){H.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,R,be);const he=ln(i,l,Ie,j,f);return await L.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!J){if(!Jt(ne,i,u)){O(null);return}const Xe=ne.__resolveType??"",Nt=[...K];Nt[t]={...z,rule:Ts(ne,i,u)};const Ct=await Ne(Nt);await qt(Xe,Ct),O(null),k?.();return}const Q=As(ne,i,u);if(!Q){H.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(Q.blockKey){await L.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){H.error(Ie);return}const he=Ft(Q.resolveType,Q.data,J);let ue=null,Ge=!1;try{const Xe=await L.mutateAsync({blockKey:be,data:he,create:!0});Ge=Un(Xe),ue=Ge?null:be;const Nt=[...K];Nt[t]={...z,rule:cn(be)},await Ne(Nt),ue=null}catch(Xe){throw ue&&await Pn.mutateAsync({blockKey:ue}).catch(()=>{}),Xe}O(null),Ge||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:J})),k?.()}catch(Q){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(Q))})}finally{en(!1)}},Fr=async(t,n,s)=>{A(s);try{await L.mutateAsync({blockKey:t,data:s})}catch(o){throw A(a=>a===s?n:a),o}},qa={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,j=async R=>{const E={...t,variants:R};return await Fr(o,t,E),{...a,[o]:E}},h=Mc(f,s,a,u);if(h.kind!=="noop"){if(h.kind==="error"){H.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 K=[...i];K[n]={...l,rule:h.inlinedRule};const z=await j(K);await qt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await L.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let R=null,E=!1;try{const K=await L.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Un(K),R=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await j(z),R=null}catch(K){throw R&&await Pn.mutateAsync({blockKey:R}).catch(()=>{}),K}E||H.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(R){H.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(R))})}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=Mt(l.rule,a,u);i[n]={...l,rule:cn(s)};const j={...t,variants:i},h={...a,[o]:j};try{await Fr(o,t,j),f&&f!==s&&await qt(f,h),k?.()}catch(R){H.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(R))})}},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 j=Array.isArray(t.variants)?[...t.variants]:[],h=j[n];return h?(j[n]={...h,rule:f},i={...t,variants:j},{blockKey:o,data:i}):null})||!i||(A(i),k?.())}},Ir=()=>{Wt(),v&&$t(null,-1,0)},Lr=t=>{dn(t),ds({inner:t})},Or=t=>{An(t),ds({raw:t})},zr=()=>{dn(null),Ot([])},$r=()=>Yt(t=>t+1),Wr=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Yt(t=>t+1),ge?.()},Ga=()=>{Vn(!1),Tn(!1),I(null),un(!0)},Ua=()=>{Re&&Wr(),I(null),Vn(!0)},Ja=()=>Tn(!0),vs=t=>{if(Qt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&I(null);return}if(Re){if(t===0){Wr();return}if(t===1){Ot([]),Yt(s=>s+1);return}Ot(Ds.slice(0,t-1)),Yt(s=>s+1);return}if(q){T(D.slice(0,t)),$(s=>s+1);return}if(t===0){Ir();return}if(t===1){T([]),$(s=>s+1);return}const n=!Z&&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:za})),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(Ji,{className:"size-4"})}):null,Qa=ft||At||Re?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:[!q&&yt&&Se&&r.jsxs("button",{type:"button",onClick:Ir,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",dl),children:[r.jsx(ul,{rule:Rs(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(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Xn,{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")})]}),Nr&&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(fo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:cr,variant:"header"})}),r.jsxs(Rt,{children:[r.jsx(jt,{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(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),r.jsxs(Rt,{children:[r.jsx(jt,{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(co,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Gn,{onClick:bn})]}),Ya=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(mo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Kr,onRename:M,onDuplicate:Mr,onDelete:Dr,onAdd:bn}),yt&&Y!==null&&r.jsx(po,{className:"mt-3",children:r.jsx("div",{className:le("space-y-3",Zt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:vr,onSelectGlobal:xr,named:ms(Se?.rule,br),namedRow:ws(Se?.rule,Ht),rule:Se?.rule,schema:hr,formValue:Ke,onChange:yr,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(fl,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Ln,onSelect:dr,onRename:O,onDuplicate:Ea,onDelete:ja,onRemoveAll:fr,onReorder:Va,onAdd:()=>Sn()}),r.jsx(po,{children:r.jsx(ks,{currentRt:Xt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:Aa,onSelectGlobal:Pa,named:ms(kt?.rule,Ca),namedRow:ws(kt?.rule,Ht),rule:kt?.rule,schema:Ka,formValue:qo,onChange:Na,formKey:`${m??"none"}:${Ln}:${Xt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),qr=r.jsx("div",{className:le(Z?"px-2":"p-2 pt-3"),children:r.jsx(Kc,{listKey:`${y??""}-${te}`,rawSections:B,sections:ce,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{va(t),Je?.(t)},onReorder:ya,onDelete:Sa,onDuplicate:ba,onMakeReusable:Ve,onToggleHidden:xa,onToggleLazy:rt?_a:void 0,onAddVariant:Sn,onDetach:ka,onAddSection:()=>He(!0),canAddSection:pr})}),Xa=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&oe&&r.jsx(fo,{pageKey:y,initialName:oe.name,initialPath:oe.path,onFieldChange:cr}),nn&&y?r.jsx(To,{rawSeo:Kn,innerSeo:as,defaultResolveType:Ys,seoTypesLoading:v&&!u,seoSchema:Xs,activeResolveType:Dn,seoTypeOptions:Qs,formResetKey:Ms,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Or,onInnerChange:Lr,onClearForm:zr,onBumpFormKey:$r,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(To,{rawSeo:Kn,innerSeo:as,defaultResolveType:Ys,seoTypesLoading:v&&!u,seoSchema:Xs,activeResolveType:Dn,seoTypeOptions:Qs,formResetKey:Ms,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Or,onInnerChange:Lr,onClearForm:zr,onBumpFormKey:$r,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),ei=r.jsxs(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(mo,{listKey:y,variants:pe,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:cs,onReorder:Kr,onRename:M,onDuplicate:Mr,onDelete:Dr,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:()=>Wo(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",Zt&&"pointer-events-none opacity-50"),children:r.jsx(ks,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:fs,onSelect:vr,onSelectGlobal:xr,named:ms(Se?.rule,br),namedRow:ws(Se?.rule,Ht),rule:Se?.rule,schema:hr,formValue:Ke,onChange:yr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),qr]},"editor-section-list");return r.jsx(lc,{value:v,children:r.jsx(ml,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!Z&&ys&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:ys}),(Z||zn.length>1)&&r.jsx(Hi,{crumbs:zn,onSelect:vs,onSelectRoot:()=>{fn.flush(),Ue?Ue():vs(0)}}),r.jsx("div",{className:"shrink-0",children:Z?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:[Z&&ys,ft&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Xn,{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:Oa}),Br&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Br})]}),gs&&yt&&Se&&r.jsx(ho,{variants:pe,activeIndex:te,onSelect:cs,onManage:Ua,onRemoveAll:$a}),Ia&&r.jsx(ho,{variants:Vt,activeIndex:Ln,onSelect:dr,onManage:Ja,onRemoveAll:fr}),gs&&!yt&&r.jsx(Gn,{onClick:bn}),Fa&&r.jsx(Gn,{onClick:()=>Sn()}),r.jsx(pl,{}),gs&&r.jsxs(r.Fragment,{children:[r.jsxs(Rt,{children:[r.jsx(jt,{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(lo,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.editSeo")})]}),!Le&&r.jsxs(Rt,{children:[r.jsx(jt,{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(co,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Qa}),ut&&r.jsx(pi,{open:!0,fields:hi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:Ws!==null,fresh:ut.fresh,keepTyping:v,onChoose:(t,n)=>ga({...ut.choices,[t]:n}),onApply:ha},Lc(ut.formBase)),Lt?r.jsx(go,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(an,{viewportRef:me,onBlur:sr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!Z&&Tt&&Vt.length>0&&D.length===0&&Hr,r.jsx(Ao,{value:Sr,children:r.jsx(vo,{value:q&&v?Be:null,children:r.jsx(yo,{activeSchema:Fn,formValue:Ze,formResetKey:De,onFormChange:lr,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:ur,onVariantMatcherOp:q?qa:void 0})})})]},"editor-section-form"):q?r.jsx(an,{viewportRef:me,onBlur:sr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(Ao,{value:Sr,children:r.jsx(vo,{value:q&&v?Be:null,children:r.jsx(yo,{activeSchema:Fn,formValue:Ze,formResetKey:De,onFormChange:lr,onBreadcrumbChange:T,breadcrumbPath:D,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:ur})})})},"editor-global-block"):Re?Z?r.jsx(an,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Xa})},"editor-seo"):Za:Qt?r.jsx(go,{onAdd:bn,children:Ya},"editor-variants"):Z?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:qr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ns,{canAddSection:pr,onAddSection:()=>He(!0)})})]},"editor-section-list"):ei,r.jsx(hl,{open:ie!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:ie!==null?Jn(ce[ie]?.label??""):"",isPending:L.isPending,onSubmit:Ta}),ot&&r.jsx(tc,{open:Ae,onOpenChange:t=>{He(t),t||(jn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:Ra}),ht&&y&&d&&r.jsx(sc,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(So,{open:!0,initialName:Jt(pe[Te]?.rule,d??{},u??void 0)?_n(pe[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(Rs(pe[Te]?.rule,d??{},u??void 0)),isPending:Zt,onSubmit:async t=>{await Wa(Te,t)},onOpenChange:t=>{!t&&!Zt&&M(null)}}),tt!==null&&r.jsx(So,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(Rs(Vt[tt]?.rule,d??{},u??void 0)),isPending:Zt,onSubmit:async t=>{await Ha(tt,t)},onOpenChange:t=>{!t&&!Zt&&O(null)}})]})})})}export{$f as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-C6-0Ff1m.js";import{V as a}from"./index-B5WGiIKx.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};
|