decocms 4.573.0 → 4.574.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-Cn7aLqGD.js → AlertCircle-Co3RPbIZ.js} +1 -1
- package/dist/client/assets/{AreaChart-CMeTgrZu.js → AreaChart-BvS2pAoE.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Clex4DU3.js → ArrowLeft-XBSBGQal.js} +1 -1
- package/dist/client/assets/{ArrowUp-DPT2wlR7.js → ArrowUp-DLnkUu9S.js} +1 -1
- package/dist/client/assets/{CartesianChart-B2gOTKNo.js → CartesianChart-DOb1QHVF.js} +1 -1
- package/dist/client/assets/{CategoricalChart-Djc5Q1Zp.js → CategoricalChart-BkeCXQf9.js} +1 -1
- package/dist/client/assets/{CheckCircle-l0BgBdex.js → CheckCircle-kNwBDDVU.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BbXlLdNT.js → ChevronSelectorVertical-Gg7YcxlH.js} +1 -1
- package/dist/client/assets/{ChevronUp-D0xD4CWi.js → ChevronUp-D1T3kSyr.js} +1 -1
- package/dist/client/assets/{CreditCard01-CAgfpVLC.js → CreditCard01-D65BAIaV.js} +1 -1
- package/dist/client/assets/{Globe04-DFwi3CoQ.js → Globe04-D17A2x5l.js} +1 -1
- package/dist/client/assets/{Key01-q3498IuC.js → Key01-awxHKnoL.js} +1 -1
- package/dist/client/assets/{LinkBroken01-BkclpWPr.js → LinkBroken01-loTkm0G5.js} +1 -1
- package/dist/client/assets/{Minus-D2H1757g.js → Minus-CYrsmoRb.js} +1 -1
- package/dist/client/assets/{Monitor01-pdAw5Hpb.js → Monitor01-DalIAdj7.js} +1 -1
- package/dist/client/assets/{Play-mj0Zbxy1.js → Play-C6Weq-wk.js} +1 -1
- package/dist/client/assets/{Plus-DD-WVS1P.js → Plus-D7X8Q2-q.js} +1 -1
- package/dist/client/assets/{ReferenceLine-obrmbgU1.js → ReferenceLine-HGyXAqMo.js} +1 -1
- package/dist/client/assets/{SearchMd-D2GFNI7a.js → SearchMd-e6xPeRPD.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BQMf6OTu.js → ShoppingBag01-zloi0TDl.js} +1 -1
- package/dist/client/assets/{Sun-BWeGTNdA.js → Sun-C1lyqton.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-amrllZXH.js → SwitchHorizontal01-elXb4-4d.js} +1 -1
- package/dist/client/assets/{Tool01-CMaWHp8E.js → Tool01-Bo2g-Ylw.js} +1 -1
- package/dist/client/assets/{Tooltip-DFEqzaZu.js → Tooltip-C2g-R1Ae.js} +1 -1
- package/dist/client/assets/{Trash01-CrG-kC_D.js → Trash01-C-PU5Hm-.js} +1 -1
- package/dist/client/assets/{Upload01-CyQARd6T.js → Upload01-NPnXKs-J.js} +1 -1
- package/dist/client/assets/{UserSquare-CPjVW48L.js → UserSquare-Qd-FKVqK.js} +1 -1
- package/dist/client/assets/{Users01-BPY3vewQ.js → Users01-CTNixqdX.js} +1 -1
- package/dist/client/assets/{XClose-BBI2UlVL.js → XClose-BuJ6u6eL.js} +1 -1
- package/dist/client/assets/{Zap-B1DyovfK.js → Zap-pmN7zSOE.js} +1 -1
- package/dist/client/assets/{access-gate-ZWgi9qYj.js → access-gate-Bj4L1Bay.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BQNXbA5n.js → add-connection-dialog-BL3Uj9Py.js} +1 -1
- package/dist/client/assets/agent-app-C3J9IT10.js +1 -0
- package/dist/client/assets/agent-assets-CvnH7aBA.js +1 -0
- package/dist/client/assets/{agent-automation-CU9zTpQA.js → agent-automation-Bea1eB6T.js} +2 -2
- package/dist/client/assets/agent-automations-R-Eaz2To.js +1 -0
- package/dist/client/assets/agent-calendar-Cd8km6Ln.js +1 -0
- package/dist/client/assets/{agent-capabilities-C8QrjnQn.js → agent-capabilities-BGShibnD.js} +1 -1
- package/dist/client/assets/agent-connect-sources-BrM4y83H.js +1 -0
- package/dist/client/assets/agent-deck-DRKoTD-S.js +1 -0
- package/dist/client/assets/agent-e2e-BuKHozb1.js +1 -0
- package/dist/client/assets/agent-experiments-CgtwbbvZ.js +1 -0
- package/dist/client/assets/agent-file-wlYMcv_9.js +1 -0
- package/dist/client/assets/agent-hosting-BaITgwKU.js +1 -0
- package/dist/client/assets/{agent-icon-2MzErGc_.js → agent-icon-CTbTFMnU.js} +1 -1
- package/dist/client/assets/agent-library-CC7Sh_px.js +1 -0
- package/dist/client/assets/agent-library-file-DB9_i_YI.js +1 -0
- package/dist/client/assets/agent-overview-BkJ7Az2Q.js +1 -0
- package/dist/client/assets/agent-releases-Dh0xH2nd.js +2 -0
- package/dist/client/assets/agent-settings-B8F88lFa.js +1 -0
- package/dist/client/assets/{agent-site-editor-BpKx1qkb.js → agent-site-editor-D_QBdAc9.js} +2 -2
- package/dist/client/assets/agent-site-editor-code-TQZ-nnUV.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CAE4z8AF.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-gLgYeQTA.js +1 -0
- package/dist/client/assets/{agent-view-guard-4G3ZLLJ6.js → agent-view-guard-CL3qLzE2.js} +1 -1
- package/dist/client/assets/agent-view-mJs78en_.js +1 -0
- package/dist/client/assets/{ai-providers-uRKTNSKv.js → ai-providers-CKuZmBiu.js} +1 -1
- package/dist/client/assets/{alert-DEZDXwhI.js → alert-wYcDlQSf.js} +1 -1
- package/dist/client/assets/{analytics-sections-CyCVHqsU.js → analytics-sections-BjzpdbBT.js} +1 -1
- package/dist/client/assets/api-keys-BtDMAyj2.js +1 -0
- package/dist/client/assets/{api-keys-DpXs9tft.js → api-keys-am7hNPgd.js} +1 -1
- package/dist/client/assets/app-editor-D88RxUP1.js +1 -0
- package/dist/client/assets/{asset-utils-CksrawxC.js → asset-utils-C5mv1eiH.js} +1 -1
- package/dist/client/assets/{auth-Zsy5lyIS.js → auth-CQxDIkM-.js} +1 -1
- package/dist/client/assets/{auth-catchall-BA7Y2mUQ.js → auth-catchall-DX0dhfK_.js} +1 -1
- package/dist/client/assets/{auth-entry-DTgpDRCa.js → auth-entry-Bkznmv5L.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DnneloZ-.js → auth-split-layout-BRZioxOZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DNTXHLOn.js → authenticate-and-persist-oauth-o7XKLq_6.js} +1 -1
- package/dist/client/assets/{automation-list-row-DBYEb7yh.js → automation-list-row-knBDKeRb.js} +1 -1
- package/dist/client/assets/{automation-runs-WkjLeJLn.js → automation-runs-CvC4BqLv.js} +1 -1
- package/dist/client/assets/{automations-DQbfRFSm.js → automations-Ajx2woko.js} +1 -1
- package/dist/client/assets/{autosend-C5Y0g7p2.js → autosend-B0POegpm.js} +1 -1
- package/dist/client/assets/{badge-CR0zmQ24.js → badge-BpzeYR5Z.js} +1 -1
- package/dist/client/assets/{block-document-C3eGsk46.js → block-document-DIhkVhEf.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BSZxdExq.js → blocks-preview-workspace-context-BnkXYZX_.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-WlRP2osS.js → blocks-tab-states-BRjgrPty.js} +1 -1
- package/dist/client/assets/{blog-schema-KDZONLbr.js → blog-schema-BdMdKJFM.js} +1 -1
- package/dist/client/assets/{buckets-BleX9NUY.js → buckets-C62arTZK.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BoBB4xB3.js → build-improve-prompt-doc-DNVGwsoG.js} +1 -1
- package/dist/client/assets/{calendar-BK-qPKHr.js → calendar-SB5YBzj8.js} +1 -1
- package/dist/client/assets/{capability-load-error-C9JRNP4k.js → capability-load-error-BkOUGX51.js} +1 -1
- package/dist/client/assets/category-editor-CozNeVRI.js +1 -0
- package/dist/client/assets/{chart-C9hiF3-H.js → chart-D-gatwT8.js} +1 -1
- package/dist/client/assets/{chat-context-DyGpAf46.js → chat-context-PvP_Q1CV.js} +6 -6
- package/dist/client/assets/{chat-draft-CD_ST5_c.js → chat-draft-C714j1Wd.js} +1 -1
- package/dist/client/assets/{checkbox-HvlgUNAP.js → checkbox-Bk98t4UK.js} +1 -1
- package/dist/client/assets/{choose-editor-CnjAnqj_.js → choose-editor-DmqmkbHo.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bwy0nso2.js → cli-auth-success-D4NODEkN.js} +1 -1
- package/dist/client/assets/{client-icons-Be9kjZ93.js → client-icons-WHlOXnmn.js} +1 -1
- package/dist/client/assets/cms-settings-editor-kiB9O6al.js +1 -0
- package/dist/client/assets/{cms-store-drafts-BISchbEr.js → cms-store-drafts-DEGbfccc.js} +1 -1
- package/dist/client/assets/collapsible-C7N88_dp.js +1 -0
- package/dist/client/assets/collection-detail-a6oC0bB8.js +1 -0
- package/dist/client/assets/{collection-display-button-ES-6OdCv.js → collection-display-button-Dl9vfdLR.js} +1 -1
- package/dist/client/assets/{collection-search-EpeR-DRK.js → collection-search-Din8SB5Y.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-KbLz2yHx.js → collection-table-wrapper-BYDcFi4z.js} +1 -1
- package/dist/client/assets/{collection-tabs-B_be-L9Y.js → collection-tabs-BJDa_4_F.js} +1 -1
- package/dist/client/assets/{combobox-B18VgXI1.js → combobox-CVchGkTE.js} +1 -1
- package/dist/client/assets/{command-BNUAVYAm.js → command-DA2t4jTW.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CxXAX0y8.js → companion-mcps-section-BKP3xr1j.js} +1 -1
- package/dist/client/assets/{config-TryZ4RX0.js → config-B1mE6oOL.js} +1 -1
- package/dist/client/assets/{connect-CoilE_s4.js → connect-CAAYdS8d.js} +2 -2
- package/dist/client/assets/{connect-layout-BhfEVfq1.js → connect-layout-DUesEwTl.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DPKdRpQi.js → connect-source-dialog-DQtWLoYH.js} +1 -1
- package/dist/client/assets/{connection-card-CNcOtDo-.js → connection-card-CPhS4jEh.js} +1 -1
- package/dist/client/assets/{connection-detail-DxRuUlKe.js → connection-detail-D0-sYPQS.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-UVT13B_U.js → connection-form-helpers-CRMRmqMW.js} +1 -1
- package/dist/client/assets/{connection-8A6_dw75.js → connection-giFDA0-u.js} +1 -1
- package/dist/client/assets/{connection-slug-C2s7RBeT.js → connection-slug-DTdYIX0A.js} +1 -1
- package/dist/client/assets/{connections-tE6aWKQG.js → connections-D-1tH9cf.js} +1 -1
- package/dist/client/assets/{content-tab-qUSnNt0b.js → content-tab-DH5bq_bz.js} +3 -3
- package/dist/client/assets/context-DK_qXRQL.js +1 -0
- package/dist/client/assets/{context-menu-DtOAkxnl.js → context-menu-CsBFFEsr.js} +1 -1
- package/dist/client/assets/{context-shell-ClsbZC3c.js → context-shell-l0daBgQ1.js} +3 -3
- package/dist/client/assets/{core.esm-rLLWAwJX.js → core.esm-tIHbtjKb.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BX56eATK.js → create-organization-dialog-Dy6I2vcX.js} +1 -1
- package/dist/client/assets/{device-hint-CUm6BAQf.js → device-hint-DslC2w9a.js} +1 -1
- package/dist/client/assets/discover-DzzEIO43.js +1 -0
- package/dist/client/assets/{domain-settings-CKu_dJSz.js → domain-settings-Dq_m7HYl.js} +1 -1
- package/dist/client/assets/{drawer-Cn25WPda.js → drawer-BYGTIOoj.js} +1 -1
- package/dist/client/assets/{editor-classes-fUC3onT7.js → editor-classes-LFKjNX_0.js} +1 -1
- package/dist/client/assets/{editor-D2cdCxzq.js → editor-x1lgFdfy.js} +1 -1
- package/dist/client/assets/{empty-state-Ced795Fu.js → empty-state-CH3GYanB.js} +1 -1
- package/dist/client/assets/{empty-state-BBHWcru0.js → empty-state-CtwVPMDf.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-BTxa6G1X.js → experiments-tab-choice-DMVM7f3S.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DPARA3fa.js → extract-connection-data-hvaA6rrK.js} +1 -1
- package/dist/client/assets/{feature-gate-DmEXSzsv.js → feature-gate-ru6FBLZU.js} +1 -1
- package/dist/client/assets/{feature-paywall-CnmlocfU.js → feature-paywall-eifo7eqe.js} +1 -1
- package/dist/client/assets/file-explorer-Bgho9rLt.js +2 -0
- package/dist/client/assets/{file-preview-DDtKFulA.js → file-preview-BzUEEwEK.js} +1 -1
- package/dist/client/assets/{file-share-button-z-0u2RSG.js → file-share-button-CFBrVPAQ.js} +1 -1
- package/dist/client/assets/{file-type-icon-DKzfESDS.js → file-type-icon-DM9o0Fkb.js} +1 -1
- package/dist/client/assets/{folder-icon-D5X4rDtM.js → folder-icon-DSGoR_x6.js} +1 -1
- package/dist/client/assets/{form-DlOI0nvB.js → form-gd_hA5VT.js} +1 -1
- package/dist/client/assets/{general-BaTc6G8G.js → general-Cn8XvemK.js} +1 -1
- package/dist/client/assets/{github-icon-Fl1CK57w.js → github-icon-BVy-v7gH.js} +1 -1
- package/dist/client/assets/home-C9onXt5U.js +1 -0
- package/dist/client/assets/{home-overview-BFMTQOYy.js → home-overview-DZBjDQoG.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DlXpLWPa.js → hosted-reconcile-DNkBVm-1.js} +1 -1
- package/dist/client/assets/{icon-button-igm3gACH.js → icon-button-Ze0c1pwp.js} +1 -1
- package/dist/client/assets/{index-B9BVHbVj.js → index-B-T__H4R.js} +1 -1
- package/dist/client/assets/{index-BvVW5l1B.js → index-Bbmo8mh-.js} +1 -1
- package/dist/client/assets/{index-CZHAvvQX.js → index-Bgxp_wDH.js} +1 -1
- package/dist/client/assets/index-BkJtJQz4.css +1 -0
- package/dist/client/assets/{index-DWwfYL9X.js → index-C3XZ4Hr3.js} +2 -2
- package/dist/client/assets/{index-BiDkG-fY.js → index-CQQpem-0.js} +1 -1
- package/dist/client/assets/{index-BqYmVY5c.js → index-CnOVjrIG.js} +1 -1
- package/dist/client/assets/{index-D13d0Rz8.js → index-D5i1_B2b.js} +1 -1
- package/dist/client/assets/{index-BvIbbFRO.js → index-D8y5KFA4.js} +1 -1
- package/dist/client/assets/index-DB454549.js +1 -0
- package/dist/client/assets/{index-B0M6fld0.js → index-DEZ1imMJ.js} +41 -41
- package/dist/client/assets/{index-woHs2Bei.js → index-DYgzDE_k.js} +1 -1
- package/dist/client/assets/{index-qF2eIicz.js → index-DkhsKOTp.js} +1 -1
- package/dist/client/assets/{index-BjDHxKQ1.js → index-DsbWutG1.js} +1 -1
- package/dist/client/assets/{index-RvC7A_Zr.js → index-Kbjjvu85.js} +1 -1
- package/dist/client/assets/{index-BK7RpYPl.js → index-_l1iac4T.js} +1 -1
- package/dist/client/assets/{index-bp35vkxQ.js → index-i75UpmlW.js} +1 -1
- package/dist/client/assets/{index-redirect-Y2-2LqtJ.js → index-redirect-BbZ_bzp6.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-CQdhIsL1.js → infiniteQueryObserver-C0Gb02df.js} +1 -1
- package/dist/client/assets/{infra-billing-D0aBn-2W.js → infra-billing-BCVZN9OG.js} +1 -1
- package/dist/client/assets/{input-WEG44w8N.js → input-CxHdmxHa.js} +1 -1
- package/dist/client/assets/{input-DPyEB9OP.js → input-Dla4T1vA.js} +4 -4
- package/dist/client/assets/{integration-icon-CbGo7Hoi.js → integration-icon-CFHOt7sY.js} +1 -1
- package/dist/client/assets/{jira-icon-C8Fhxneh.js → jira-icon-_AEc9Yhw.js} +1 -1
- package/dist/client/assets/{label-C2-_lSSQ.js → label-BEWDSeNl.js} +1 -1
- package/dist/client/assets/{layout-B7jJw3TW.js → layout--y8zVnrP.js} +1 -1
- package/dist/client/assets/legacy-admin-welcome-dialog-B223MrIf.js +1 -0
- package/dist/client/assets/{legacy-agents-deep-ZncRE9wV.js → legacy-agents-deep-PO1FuZ04.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BU-BNhBf.js → legacy-main-redirect-CLP7AoCb.js} +1 -1
- package/dist/client/assets/library-Cx1S-GVi.js +1 -0
- package/dist/client/assets/{library-tab-KFeYjSPq.js → library-tab-CqMcp5u0.js} +1 -1
- package/dist/client/assets/login-BuRZE0OR.js +1 -0
- package/dist/client/assets/{markdown-CBPGMAeL.js → markdown-Db8a3LUX.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-Ct_65kSq.js → mcp-app-renderer-C8G6NLBz.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BRzA5Pv_.js → mcp-oauth-BBT3ip6Z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BzDrrJmr.js → mcp-oauth-CHmbtYyN.js} +1 -1
- package/dist/client/assets/{members-DmQ1d6J9.js → members-CF1S2ayK.js} +1 -1
- package/dist/client/assets/{memory-veer-4dg.js → memory-Bk61fr1m.js} +2 -2
- package/dist/client/assets/{mock-board-CKa4hpGl.js → mock-board-CYJBKLD5.js} +3 -3
- package/dist/client/assets/{monaco-editor-CpFV1RfN.js → monaco-editor-DTwBEUg_.js} +1 -1
- package/dist/client/assets/{monitoring-CBecEU71.js → monitoring-Cqe9DCsk.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-Dn8Q55tj.js → monitoring-stats-row-GkTmJnnE.js} +1 -1
- package/dist/client/assets/{multi-select-CrGD5Ooc.js → multi-select-GRYee_BH.js} +1 -1
- package/dist/client/assets/{mustache-CfZeeK0-.js → mustache-DtDLolVD.js} +1 -1
- package/dist/client/assets/{named-rule-view-DCoLjOb_.js → named-rule-view-BNwXQD8T.js} +1 -1
- package/dist/client/assets/{new-project-dialog-xaa497EH.js → new-project-dialog-Dfe2Pik9.js} +1 -1
- package/dist/client/assets/{oauth-callback-BZYuOZDS.js → oauth-callback-C9LKZChW.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-ht2kAjnJ.js → oauth-callback-ai-provider-C7LWQiJX.js} +1 -1
- package/dist/client/assets/{oauth-consent-Cycay5jx.js → oauth-consent-Dm4zOEtc.js} +1 -1
- package/dist/client/assets/{onboarding-CW6ecLdB.js → onboarding-xP-6CuuS.js} +1 -1
- package/dist/client/assets/{openai-conversation-BIBsPprq.js → openai-conversation-BH1GqT3q.js} +2 -2
- package/dist/client/assets/{optimistic-project-sidebar-views-ClxmmxQQ.js → optimistic-project-sidebar-views-BcV4r24I.js} +1 -1
- package/dist/client/assets/{order-monitor-day-ujguBEEi.js → order-monitor-day-BrCrwZlv.js} +1 -1
- package/dist/client/assets/{organization-choice-Dmg8UAst.js → organization-choice-Bb3OozNa.js} +1 -1
- package/dist/client/assets/{orgs-DwXxjD5w.js → orgs-BwWx4Gpo.js} +1 -1
- package/dist/client/assets/{own-accounts-section-B1_zf8oO.js → own-accounts-section-CL57nUX5.js} +1 -1
- package/dist/client/assets/{pair-CYQ33Koe.js → pair-D5JEvK2M.js} +7 -7
- package/dist/client/assets/{parse-sections-D19DrjFN.js → parse-sections-Ca4qHQSq.js} +3 -3
- package/dist/client/assets/{plan-ladder-DMGBEO8S.js → plan-ladder-DdqVPKf9.js} +1 -1
- package/dist/client/assets/plan-q4Vm_z4g.js +1 -0
- package/dist/client/assets/{plan-usage-card-Dh5aZ9Wu.js → plan-usage-card-397aTXRB.js} +2 -2
- package/dist/client/assets/{popover-CQC-Pea_.js → popover-DsvzKyw_.js} +1 -1
- package/dist/client/assets/post-calendar-CvHtHQHg.js +1 -0
- package/dist/client/assets/{post-editor-Bi0Lvuv1.js → post-editor-0bthmrQK.js} +2 -2
- package/dist/client/assets/{preview-content-DmNC5FDZ.js → preview-content-Bs_qZ8yA.js} +1 -1
- package/dist/client/assets/{preview-dialog-BXuQsxvP.js → preview-dialog-Bn3JJkpc.js} +1 -1
- package/dist/client/assets/{preview-panel-BvPhN_GC.js → preview-panel-CX3l3cru.js} +1 -1
- package/dist/client/assets/{preview-tab-kdq5fsPz.js → preview-tab-C506bsNP.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-BMl-NFfE.js → product-picker-dialog-DRJETx9Q.js} +1 -1
- package/dist/client/assets/{profile-CHLa-N2x.js → profile-BlRaDfot.js} +1 -1
- package/dist/client/assets/project-app-view-CKUZlcwf.js +1 -0
- package/dist/client/assets/{project-apps-DLoX3eK_.js → project-apps-B_xWF85u.js} +1 -1
- package/dist/client/assets/{project-icon-BFEgPANo.js → project-icon-rrJh6PJx.js} +1 -1
- package/dist/client/assets/{project-index-Bt04pJyj.js → project-index-CoA3rtsT.js} +1 -1
- package/dist/client/assets/project-reports-bT7h-_SM.js +1 -0
- package/dist/client/assets/project-tasks-CqL0-1p3.js +1 -0
- package/dist/client/assets/{projects-DBgcy_ko.js → projects-CM1tg94T.js} +1 -1
- package/dist/client/assets/{projects-empty-state-DSl1yjrE.js → projects-empty-state-llpcLXG9.js} +1 -1
- package/dist/client/assets/{prompts-DLHllT_u.js → prompts-B0OAMamK.js} +1 -1
- package/dist/client/assets/record-editor-fYL_geiT.js +1 -0
- package/dist/client/assets/redirect-editor-CqeB0Mu0.js +1 -0
- package/dist/client/assets/reports-CtLMPNBD.js +1 -0
- package/dist/client/assets/{reports-BLJvZSDk.js → reports-Rgui-AzR.js} +1 -1
- package/dist/client/assets/{reports-onboarding-B_ps3py4.js → reports-onboarding-Bb3vI6W8.js} +1 -1
- package/dist/client/assets/reports-tab-BaN84XaS.js +2 -0
- package/dist/client/assets/repositories-DR2_ORl-.js +1 -0
- package/dist/client/assets/{repositories-Bvm6e85d.js → repositories-OwZ7bC1j.js} +1 -1
- package/dist/client/assets/{repository-binding-D5Bfxppj.js → repository-binding-C0msapZZ.js} +1 -1
- package/dist/client/assets/{repository-picker-BG4RNPTd.js → repository-picker-BYFeDBpn.js} +1 -1
- package/dist/client/assets/{require-capability-DRWZ_9vY.js → require-capability-cQiPB2TO.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BDLyo6_T.js → required-auth-layout-DfUx9vzb.js} +1 -1
- package/dist/client/assets/{reset-password-DaveZxAM.js → reset-password-CwNbLDfo.js} +1 -1
- package/dist/client/assets/{resizable-ZTEIsDw7.js → resizable-CHI5UJHW.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-bd7hcPCn.js → resolve-tab-icon-BWeUUKzK.js} +1 -1
- package/dist/client/assets/review-settings-DUhDHWEg.js +1 -0
- package/dist/client/assets/{role-color-BoSKmMc3.js → role-color-DlPdNUQM.js} +1 -1
- package/dist/client/assets/{roles-ll9CMZdV.js → roles-ChXNdo9W.js} +1 -1
- package/dist/client/assets/route-8zXp8Zmg.js +1 -0
- package/dist/client/assets/route-DW6RzQLd.js +1 -0
- package/dist/client/assets/route-oGUs3Dt9.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context--ksv8XqS.js → sandbox-lifecycle-context-WXIR2CMZ.js} +1 -1
- package/dist/client/assets/{schema-DDAhL9Cr.js → schema-9jBUPMLq.js} +1 -1
- package/dist/client/assets/{schema-BObR_fJ_.js → schema-BFmIytlm.js} +1 -1
- package/dist/client/assets/{scroll-area-CYr4aRZr.js → scroll-area-CQ_g6hBm.js} +1 -1
- package/dist/client/assets/search-input-Co3g-t6C.js +1 -0
- package/dist/client/assets/{search-toggle-OJssd2AY.js → search-toggle-CO5TN956.js} +1 -1
- package/dist/client/assets/{secret-picker-wjLxUG7e.js → secret-picker-VlsiGxPi.js} +1 -1
- package/dist/client/assets/{secrets-BYPmdyMN.js → secrets-DJboETC0.js} +1 -1
- package/dist/client/assets/{section-array-field-DZEuNEZT.js → section-array-field-CvmfLv3q.js} +1 -1
- package/dist/client/assets/{sections-BDGuApqp.js → sections-C_Jmzzpn.js} +1 -1
- package/dist/client/assets/sections-editor-D1U5_lZq.js +1 -0
- package/dist/client/assets/{select-taudESnf.js → select-BJaUvbIR.js} +1 -1
- package/dist/client/assets/{select-model-JxuGnGfN.js → select-model-CftP-ks_.js} +1 -1
- package/dist/client/assets/{seo-editor-D7qUpqtC.js → seo-editor-B6UrHPko.js} +1 -1
- package/dist/client/assets/{separator-rYurNu9w.js → separator-BXKmXRi8.js} +1 -1
- package/dist/client/assets/settings-tab-CHBeACws.js +1 -0
- package/dist/client/assets/{sheet-C5Vpqn4B.js → sheet-D2hfPw7P.js} +1 -1
- package/dist/client/assets/shell-layout-BLRNx2fV.js +1 -0
- package/dist/client/assets/{site-draft-actions-I-a6sWGq.js → site-draft-actions-5nXph2SS.js} +1 -1
- package/dist/client/assets/{site-draft-view-B9eorarP.js → site-draft-view-3CfqUHrV.js} +1 -1
- package/dist/client/assets/site-editor-BqlLTFw0.js +1 -0
- package/dist/client/assets/{site-editor-toast-BkfBkyel.js → site-editor-toast-Cgezu0A5.js} +1 -1
- package/dist/client/assets/skills-B_05tfLr.js +1 -0
- package/dist/client/assets/{slider-Va2dwWaV.js → slider-C6h9g0cI.js} +1 -1
- package/dist/client/assets/{sortable.esm-BmFrP3rv.js → sortable.esm-D2_ALuVf.js} +1 -1
- package/dist/client/assets/{sso-BZP02FnS.js → sso-CtTl7KnN.js} +1 -1
- package/dist/client/assets/{suggestion-CJnvcEOz.js → suggestion-C8VoNVDk.js} +2 -2
- package/dist/client/assets/{super-agent-icon-BpFks7bc.js → super-agent-icon-B-73GF60.js} +1 -1
- package/dist/client/assets/{switch-NBzUnGw4.js → switch-C53DVv3y.js} +1 -1
- package/dist/client/assets/{synced-repos-x20dApIj.js → synced-repos-Cqz-evGv.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-De_GoXbo.js → tab-icon-glyph-I3aa1qRZ.js} +1 -1
- package/dist/client/assets/{table-B6HdX-5W.js → table-DjgVXWdP.js} +1 -1
- package/dist/client/assets/{tabs-B9Fkm8UP.js → tabs-DtOFAaIp.js} +1 -1
- package/dist/client/assets/{task-board-r7mBQBfA.js → task-board-D3wT6_aG.js} +1 -1
- package/dist/client/assets/{task-route-DzXY9dAT.js → task-route-DngvTiyh.js} +1 -1
- package/dist/client/assets/{task-status-nf4sWabv.js → task-status-BfFZ6nf8.js} +1 -1
- package/dist/client/assets/taskboard-analytics-D-vAg9Px.js +1 -0
- package/dist/client/assets/{tasks-DiiwePJH.js → tasks-BHa2qCWg.js} +3 -3
- package/dist/client/assets/tasks-adXvugV8.js +1 -0
- package/dist/client/assets/{textarea-8xMov02r.js → textarea-_jcGqOvl.js} +1 -1
- package/dist/client/assets/thread-analytics-DPDga_ap.js +1 -0
- package/dist/client/assets/{thread-intent-B-lUepd6.js → thread-intent-DuI80508.js} +1 -1
- package/dist/client/assets/{thread-route-CidpLna8.js → thread-route-B-uAlF3E.js} +1 -1
- package/dist/client/assets/{thread-route-BHZi-1Lx.js → thread-route-Ci8rIker.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-CJ90Ecr4.js → thread-sheet-body-BiNfUUQ_.js} +1 -1
- package/dist/client/assets/{time-range-picker-Bf3LTcPm.js → time-range-picker-F9SEOG2b.js} +1 -1
- package/dist/client/assets/{toggle-group-GmYScomU.js → toggle-group-C6oiEKlf.js} +1 -1
- package/dist/client/assets/{tool-namespace-BMJphfly.js → tool-namespace-DdU5nhii.js} +1 -1
- package/dist/client/assets/{tool-set-selector-ORY0JK_a.js → tool-set-selector-2nfgy8us.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DLb2L87M.js → toolbar-icon-button-BmJKmAUK.js} +1 -1
- package/dist/client/assets/{tooltip-DUgZeaAs.js → tooltip-Dam-ym8O.js} +1 -1
- package/dist/client/assets/{tooltipContext-DhhamGUz.js → tooltipContext-PzKiic-J.js} +1 -1
- package/dist/client/assets/{track-CDDSJk6a.js → track-Dj7QHX2C.js} +1 -1
- package/dist/client/assets/{types-D5f5_4KC.js → types-gyofjZHf.js} +6 -6
- package/dist/client/assets/{url-slug-BgFXpKTa.js → url-slug-BMHzx0XY.js} +1 -1
- package/dist/client/assets/{usage-stats-Db2409wH.js → usage-stats-C3KvQP9T.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CegsSqNf.js → use-ai-providers-DwpUgHpj.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CoAQZSng.js → use-apply-named-rule-BnEs0jP7.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-BIANNd7Z.js +1 -0
- package/dist/client/assets/{use-automations-IINULJEn.js → use-automations-CyrAu8XA.js} +1 -1
- package/dist/client/assets/{use-autosave-B28tAi82.js → use-autosave-TV-hF63e.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-4PZwWSEO.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-SKM2dTYC.js → use-chat-layout-state-BG2-xqQp.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-D7FBZjX-.js → use-cms-publish-actions-CmQuU9AY.js} +5 -5
- package/dist/client/assets/{use-connect-companion-aYlKXW1g.js → use-connect-companion-CowVgnp9.js} +1 -1
- package/dist/client/assets/use-connection-BozgIoMu.js +1 -0
- package/dist/client/assets/{use-content-sync-Wt7A-cqi.js → use-content-sync-BBbOIir0.js} +1 -1
- package/dist/client/assets/{use-copy-jRaPRTwC.js → use-copy-o0P-kroy.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-C5zF4lje.js → use-date-fns-locale-bKU2Q73X.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DI_mWee1.js → use-debounced-autosave-BmvZzlB_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Df5Y0bKp.js → use-debounced-value-yZdJ1f2K.js} +1 -1
- package/dist/client/assets/{use-deco-credits-IyUHS95H.js → use-deco-credits-Bjfx0bAt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CVaB2Rhy.js → use-decopilot-events-C_C16-Ln.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DrZnUntQ.js → use-delete-connection-B4rX1qgg.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CoSxtFqU.js → use-deployment-admin-CS9K9Ea9.js} +1 -1
- package/dist/client/assets/{use-entitlements-n2MsZM9p.js → use-entitlements-DidlVdLU.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-otug38hg.js → use-fast-preview-draft-url-KJzyk03O.js} +1 -1
- package/dist/client/assets/{use-file-configs-BvpMQAvp.js → use-file-configs-DhXDYO83.js} +1 -1
- package/dist/client/assets/{use-id-selection-DlXip3K9.js → use-id-selection-BHXFVfAt.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CVBam4xO.js → use-inbox-feed-CKkWXum7.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-qE2UPD2B.js → use-infinite-scroll-CED9GMTE.js} +1 -1
- package/dist/client/assets/{use-join-requests-Dmu4TFw2.js → use-join-requests-DAuosANz.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-DfOwinBC.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-CdzqA_1C.js → use-mcp-auth-status-Dls0bLQE.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C8sFqQYs.js → use-mcp-client-DJjkIlNp.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-KGxEzqRw.js → use-mcp-prompts-it9pO2QZ.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DMaf2rKI.js → use-mcp-tools-wfurU0oX.js} +1 -1
- package/dist/client/assets/{use-mobile-JxzmRS3O.js → use-mobile-CJITN8uI.js} +1 -1
- package/dist/client/assets/{use-move-blocks-B66Z69SN.js → use-move-blocks-CC1C41-K.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BPUG-DwT.js → use-navigate-to-agent-MlXDIBYX.js} +1 -1
- package/dist/client/assets/{use-org-fs-BTZCBdxy.js → use-org-fs-BH012Up0.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CBRIaGB1.js → use-org-repo-syncs-jV2kVf-q.js} +1 -1
- package/dist/client/assets/{use-org-sso-CxdxMmbI.js → use-org-sso-Bo72RJ5p.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DgPYo7py.js → use-organization-settings-bWX185lw.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DltS_Jdi.js → use-project-native-view-presence-DhhbOsoh.js} +1 -1
- package/dist/client/assets/use-project-scope-pwqcjGo8.js +1 -0
- package/dist/client/assets/{use-recent-apps-DCrhrE1r.js → use-recent-apps-Rr1jTj-T.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-BMotCZC_.js → use-reports-diagnostic-0n4ScjpC.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-CPma0JnN.js → use-sandbox-events-D1_GHzsF.js} +1 -1
- package/dist/client/assets/{use-secrets-U7VdTPCn.js → use-secrets-Dim43C3b.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CVV-8YE0.js → use-section-preview-base-B6FS0lTt.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-D8frxAVL.js → use-sidebar-collapsed-DcAIYhdp.js} +1 -1
- package/dist/client/assets/{use-tags-zNsAvyT2.js → use-tags-6ljf50Kl.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CE11Vums.js → use-task-board-analytics-5XuzJjLw.js} +1 -1
- package/dist/client/assets/{use-task-board-events-WJfNx3Vw.js → use-task-board-events-DnEp5edD.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BkBj5QMy.js → use-task-board-item-prs-CycVEDhs.js} +1 -1
- package/dist/client/assets/{use-task-board-items-CmUbMz1G.js → use-task-board-items-pvi4Vcv1.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-Dsyp8Uoc.js → use-task-board-prompts-CE5ytMaB.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DRP-RY0l.js → use-task-metadata-D4kXdUwO.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BOXdgR_A.js → use-thread-outputs-BPYn8k3d.js} +1 -1
- package/dist/client/assets/{use-voice-input-CQSYzFMw.js → use-voice-input-BKZpbbiI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CtNfxLxq.js +1 -0
- package/dist/client/assets/{useQueries-BpjN820-.js → useQueries-B3iHMIbL.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-OzDVxqdl.js +1 -0
- package/dist/client/assets/{users-DgPmfgcj.js → users-7Hqe-w13.js} +1 -1
- package/dist/client/assets/{utils-DwY9C3Mj.js → utils-BbEfYi1l.js} +1 -1
- package/dist/client/assets/{variant-calendar-ByGN-Vpc.js → variant-calendar-vayISj1w.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CzeUMJ70.js → variant-matcher-override-ulDJ4YBu.js} +1 -1
- package/dist/client/assets/{view-header-JSqDfdkj.js → view-header-y27ISHbd.js} +1 -1
- package/dist/client/assets/{virtual-mcp-CVLIL1Oq.js → virtual-mcp-vRvxAZ15.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CwQVaju9.js → watch-sse-pool-DhoYakYc.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/legacy-admin-welcome.webp +0 -0
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Bj3EYwlx.js +0 -1
- package/dist/client/assets/agent-assets-DI6qPyKd.js +0 -1
- package/dist/client/assets/agent-automations---UAtRbI.js +0 -1
- package/dist/client/assets/agent-calendar-cf-gDNxH.js +0 -1
- package/dist/client/assets/agent-connect-sources-DWV9WSKP.js +0 -1
- package/dist/client/assets/agent-deck-D0lCoowF.js +0 -1
- package/dist/client/assets/agent-e2e-BOiuADaK.js +0 -1
- package/dist/client/assets/agent-experiments-BMv9LCIg.js +0 -1
- package/dist/client/assets/agent-file-CNp-H5vm.js +0 -1
- package/dist/client/assets/agent-hosting-C-EBAKmR.js +0 -1
- package/dist/client/assets/agent-library-file-Agr0p3aP.js +0 -1
- package/dist/client/assets/agent-library-slTipnE2.js +0 -1
- package/dist/client/assets/agent-overview-BS9_YnvP.js +0 -1
- package/dist/client/assets/agent-releases-KTwDvjK6.js +0 -2
- package/dist/client/assets/agent-settings-DrVJjCl1.js +0 -1
- package/dist/client/assets/agent-site-editor-code-1vmtmGbS.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DLlGzEUS.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Qe8DbwSs.js +0 -1
- package/dist/client/assets/agent-view-B8yeRN99.js +0 -1
- package/dist/client/assets/api-keys-CqXC8hcJ.js +0 -1
- package/dist/client/assets/app-editor-BaI-amod.js +0 -1
- package/dist/client/assets/category-editor-CcG8-9VQ.js +0 -1
- package/dist/client/assets/cms-settings-editor-BrJarYyE.js +0 -1
- package/dist/client/assets/collapsible-f_iRDMCl.js +0 -1
- package/dist/client/assets/collection-detail-C3I3Gpfg.js +0 -1
- package/dist/client/assets/context-5V6pbdZV.js +0 -1
- package/dist/client/assets/discover-C3KntGhQ.js +0 -1
- package/dist/client/assets/file-explorer-BQ3nHrzo.js +0 -2
- package/dist/client/assets/home-_5AX_rte.js +0 -1
- package/dist/client/assets/index-K-NS4tm_.css +0 -1
- package/dist/client/assets/index-cB2W9GP1.js +0 -1
- package/dist/client/assets/library-2jjA6huk.js +0 -1
- package/dist/client/assets/login-CYw53vfL.js +0 -1
- package/dist/client/assets/plan-C3-HdCti.js +0 -1
- package/dist/client/assets/post-calendar-DyAhp07d.js +0 -1
- package/dist/client/assets/project-app-view--F2yE3h6.js +0 -1
- package/dist/client/assets/project-reports-CQX2n1pZ.js +0 -1
- package/dist/client/assets/project-tasks-BxS2RWnj.js +0 -1
- package/dist/client/assets/record-editor-DSuyBQvO.js +0 -1
- package/dist/client/assets/redirect-editor-Dg4EE9RJ.js +0 -1
- package/dist/client/assets/reports-DfhDFmgz.js +0 -1
- package/dist/client/assets/reports-tab-NBJtBy1O.js +0 -2
- package/dist/client/assets/repositories-Cdm1E3kt.js +0 -1
- package/dist/client/assets/review-settings-DWBDMXEy.js +0 -1
- package/dist/client/assets/route-CARtHArs.js +0 -1
- package/dist/client/assets/route-CE2T-4lr.js +0 -1
- package/dist/client/assets/route-apqFkN8H.js +0 -1
- package/dist/client/assets/search-input-CEHMJvIu.js +0 -1
- package/dist/client/assets/sections-editor-w8bIFtKt.js +0 -1
- package/dist/client/assets/settings-tab-BjoW2SLa.js +0 -1
- package/dist/client/assets/shell-layout-B_Je98M9.js +0 -1
- package/dist/client/assets/site-editor-A0UTz4FO.js +0 -1
- package/dist/client/assets/skills-DFP73eqq.js +0 -1
- package/dist/client/assets/taskboard-analytics-sh1MutiR.js +0 -1
- package/dist/client/assets/tasks-CDaME30v.js +0 -1
- package/dist/client/assets/thread-analytics-CI4Ww-tz.js +0 -1
- package/dist/client/assets/use-ask-in-chat-D8s6kqgy.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-390kM-ss.js +0 -1
- package/dist/client/assets/use-connection-BLq1Zghk.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-CmG1gXaL.js +0 -1
- package/dist/client/assets/use-project-scope-BLJIcw6l.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CrPhADUx.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-B5oEM_Vd.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,a5 as ae,a as pe,ak as Ce,K as fe,i as me,b as V,r as z,m as ee,j as n,h as Pe,B as qe,aS as ye,aR as Ie,R as xt,E as he,x as Yt,aT as Zt,w as Xt,v as Qt,D as Jt,ac as es,aU as ts,ar as gt,t as ss,as as ns,d as Me,n as st,aV as as,f as je,U as nt,l as bt,e as rs,u as Ae,aW as is,aX as ls,O as vt,aY as os,aZ as cs,N as ds,a_ as us,P as De}from"./index-B0M6fld0.js";import{i as We}from"./AlertCircle-Cn7aLqGD.js";import{E as fs,F as at,A as ve,G as ms,H as hs,k as ps,I as xs,J as gs,K as bs,L as yt,M as vs,n as ys,m as js,o as Ss}from"./agent-icon-2MzErGc_.js";import{c as ks,u as Ts}from"./use-sidebar-collapsed-D8frxAVL.js";import{T as Ne}from"./toolbar-icon-button-DLb2L87M.js";import{C as q,w as Ns}from"./index-BK7RpYPl.js";import{s as jt,u as St}from"./use-voice-input-CQSYzFMw.js";import{u as Le,b as Ye,c as $e,d as kt,e as _s,s as ws}from"./chat-context-DyGpAf46.js";import{u as Cs,s as Tt}from"./use-ai-providers-CegsSqNf.js";import{b as Nt,a as Ps,u as Is}from"./use-organization-settings-DgPYo7py.js";import{i as Ms}from"./CheckCircle-l0BgBdex.js";import{s as rt}from"./XClose-BBI2UlVL.js";import{u as Ee,a as As,b as _t,g as wt}from"./repository-binding-D5Bfxppj.js";import{I as Ct}from"./integration-icon-CbGo7Hoi.js";import{b as Ls}from"./use-entitlements-n2MsZM9p.js";import{t as Ze}from"./ChevronUp-D0xD4CWi.js";import{O as $s}from"./pair-CYQ33Koe.js";import{u as Es,a as Fs}from"./use-thread-outputs-BOXdgR_A.js";import{u as Rs}from"./use-deco-credits-IyUHS95H.js";import{C as Os,u as Bs,V as Ds,a as zs}from"./input-DPyEB9OP.js";import{a as Gs}from"./agent-capabilities-C8QrjnQn.js";import{g as Pt,u as Hs,a as Ks,i as Vs,n as Us,b as qs}from"./cms-store-drafts-BISchbEr.js";import{u as Ws,d as It,a as Xe,b as Qe,c as Mt,e as Ys}from"./thread-intent-B-lUepd6.js";import{f as Zs,b as At,c as Xs}from"./use-navigate-to-agent-BPUG-DwT.js";import{o as Qs,s as Js,u as en,S as tn}from"./sandbox-lifecycle-context--ksv8XqS.js";import{E as Lt}from"./empty-state-BBHWcru0.js";import{t as sn,m as nn,u as an}from"./use-chat-layout-state-SKM2dTYC.js";import{b as it}from"./use-blocks-v8-project-390kM-ss.js";import{C as lt}from"./index-BqYmVY5c.js";import{a as $t,b as Et,P as Ft}from"./popover-CQC-Pea_.js";import{T as Fe,a as Re,c as Oe}from"./tooltip-DUgZeaAs.js";import{T as rn,a as ln}from"./toggle-group-GmYScomU.js";import{g as Je,j as on,k as cn,L as dn,s as un}from"./shell-layout-B_Je98M9.js";import{u as Rt,a as et,r as fn,b as Ot,c as mn,d as hn}from"./thread-route-CidpLna8.js";import{c as pn,C as xn,e as gn,b as bn,a as vn,f as yn}from"./command-BNUAVYAm.js";import{i as Bt}from"./Zap-B1DyovfK.js";import{g as jn,S as Sn}from"./task-status-nf4sWabv.js";import{a as Dt,u as kn}from"./autosend-C5Y0g7p2.js";import{u as zt}from"./use-main-panel-tabs-CmG1gXaL.js";import{T as _e}from"./tab-icon-glyph-De_GoXbo.js";import{a as Tn}from"./UserSquare-CPjVW48L.js";import{b as Nn,c as Gt,S as _n,d as wn}from"./select-taudESnf.js";import{S as Cn}from"./use-sandbox-events-CPma0JnN.js";import{L as Pn}from"./project-apps-DLoX3eK_.js";import{L as tt,a as In}from"./legacy-main-redirect-BU-BNhBf.js";import{u as Mn}from"./use-mobile-JxzmRS3O.js";import{L as An}from"./preview-dialog-BXuQsxvP.js";import{O as Ln}from"./markdown-CBPGMAeL.js";import{B as ot}from"./blocks-preview-workspace-context-BSZxdExq.js";import{p as $n}from"./virtual-mcp-CVLIL1Oq.js";import"./Tool01-CMaWHp8E.js";import"./ArrowUp-DPT2wlR7.js";import"./ArrowLeft-Clex4DU3.js";import"./LinkBroken01-BkclpWPr.js";import"./ShoppingBag01-BQMf6OTu.js";import"./Globe04-DFwi3CoQ.js";import"./ChevronSelectorVertical-BbXlLdNT.js";import"./CreditCard01-CAgfpVLC.js";import"./SwitchHorizontal01-amrllZXH.js";import"./Key01-q3498IuC.js";import"./Minus-D2H1757g.js";import"./Monitor01-pdAw5Hpb.js";import"./Sun-BWeGTNdA.js";import"./Play-mj0Zbxy1.js";import"./Plus-DD-WVS1P.js";import"./SearchMd-D2GFNI7a.js";import"./Trash01-CrG-kC_D.js";import"./Upload01-CyQARd6T.js";import"./Users01-BPY3vewQ.js";import"./sheet-C5Vpqn4B.js";import"./tool-namespace-BMJphfly.js";import"./drawer-Cn25WPda.js";import"./collection-search-EpeR-DRK.js";import"./use-mcp-client-C8sFqQYs.js";import"./auth-Zsy5lyIS.js";import"./use-mcp-prompts-KGxEzqRw.js";import"./usage-stats-Db2409wH.js";import"./form-DlOI0nvB.js";import"./label-C2-_lSSQ.js";import"./utils-CVEq3hMx.js";import"./use-copy-jRaPRTwC.js";import"./index-CZHAvvQX.js";import"./checkbox-HvlgUNAP.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./feature-paywall-CnmlocfU.js";import"./plan-ladder-DMGBEO8S.js";import"./use-decopilot-events-CVaB2Rhy.js";import"./watch-sse-pool-CwQVaju9.js";import"./task-board-r7mBQBfA.js";import"./schema-DDAhL9Cr.js";import"./collapsible-f_iRDMCl.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Ct_65kSq.js";import"./types-D5f5_4KC.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-connection-BLq1Zghk.js";import"./file-type-icon-DKzfESDS.js";import"./icon-button-igm3gACH.js";import"./chat-draft-CD_ST5_c.js";import"./tabs-B9Fkm8UP.js";import"./active-indicator-CCMhAsc_.js";import"./input-WEG44w8N.js";import"./suggestion-CJnvcEOz.js";import"./use-org-fs-BTZCBdxy.js";import"./useInfiniteQuery-CrPhADUx.js";import"./infiniteQueryObserver-CQdhIsL1.js";import"./question-004-sINsf4GQ.js";import"./add-connection-dialog-BQNXbA5n.js";import"./extract-connection-data-DPARA3fa.js";import"./metadata-D72DunRR.js";import"./connection-8A6_dw75.js";import"./url-slug-BgFXpKTa.js";import"./connection-card-CNcOtDo-.js";import"./connection-slug-C2s7RBeT.js";import"./textarea-8xMov02r.js";import"./schema-BObR_fJ_.js";import"./connection-form-helpers-UVT13B_U.js";import"./authenticate-and-persist-oauth-DNTXHLOn.js";import"./mcp-oauth-BzDrrJmr.js";import"./mcp-oauth-BRzA5Pv_.js";import"./collection-tabs-B_be-L9Y.js";import"./badge-CR0zmQ24.js";import"./use-infinite-scroll-qE2UPD2B.js";import"./useSuspenseInfiniteQuery-B5oEM_Vd.js";import"./use-task-board-events-WJfNx3Vw.js";import"./serial-task-queue-CGOeQgpr.js";import"./delay-CnY5UFtP.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resizable-ZTEIsDw7.js";import"./use-project-scope-BLJIcw6l.js";import"./index-BjDHxKQ1.js";import"./use-deployment-admin-CoSxtFqU.js";import"./admin-fetch-BhTJlAsX.js";import"./project-icon-BFEgPANo.js";import"./use-debounced-value-Df5Y0bKp.js";import"./new-project-dialog-xaa497EH.js";import"./repository-picker-BG4RNPTd.js";import"./github-icon-Fl1CK57w.js";import"./required-auth-layout-BDLyo6_T.js";import"./use-org-sso-CxdxMmbI.js";import"./index-woHs2Bei.js";import"./use-mcp-tools-DMaf2rKI.js";import"./resolve-tab-icon-bd7hcPCn.js";import"./use-task-metadata-DRP-RY0l.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-DltS_Jdi.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-BvpMQAvp.js";import"./index-BdQq_4o_.js";import"./sandbox-url-D3mC8qhT.js";import"./preview-content-DmNC5FDZ.js";import"./file-share-button-z-0u2RSG.js";import"./file-preview-DDtKFulA.js";import"./utils-DwY9C3Mj.js";import"./editor-D2cdCxzq.js";function En({isThreadLocked:t,hasCloudProviderKeys:e,sandboxOnlyChats:s,canRunClaudeCode:r}){return t?null:!e&&!(s&&r)?"provider":s&&!r?"claude-code-provider":null}function Fn(){const t=L.c(26),e=Cs(),s=Le(),r=Nt(),i=Ps("chat_harness_codex"),{org:a}=ae(),{data:l}=pe.useSession(),c=l?.user.id??"",u=Ce(),o=e.some(On);let d;t[0]!==a.id||t[1]!==c?(d=fe.claudeSubscription(a.id,c),t[0]=a.id,t[1]=c,t[2]=d):d=t[2];let m;t[3]!==u?(m=()=>u.call("CLAUDE_SUBSCRIPTION_STATUS",{}),t[3]=u,t[4]=m):m=t[4];const f=r&&!i&&!o;let h;t[5]!==d||t[6]!==m||t[7]!==f?(h={queryKey:d,queryFn:m,enabled:f},t[5]=d,t[6]=m,t[7]=f,t[8]=h):h=t[8];const b=me(h);let g;t[9]!==a.id?(g=fe.githubCopilot(a.id),t[9]=a.id,t[10]=g):g=t[10];let v;t[11]!==u?(v=()=>u.call("GITHUB_COPILOT_STATUS",{}),t[11]=u,t[12]=v):v=t[12];const x=r&&!i&&!o;let y;t[13]!==g||t[14]!==v||t[15]!==x?(y={queryKey:g,queryFn:v,enabled:x},t[13]=g,t[14]=v,t[15]=x,t[16]=y):y=t[16];const j=me(y);let S;t[17]!==a.id||t[18]!==c?(S=fe.codexSubscription(a.id,c),t[17]=a.id,t[18]=c,t[19]=S):S=t[19];let p;t[20]!==u?(p=()=>u.call("CODEX_SUBSCRIPTION_STATUS",{}),t[20]=u,t[21]=p):p=t[21];const k=r&&i;let T;t[22]!==k||t[23]!==S||t[24]!==p?(T={queryKey:S,queryFn:p,enabled:k},t[22]=k,t[23]=S,t[24]=p,t[25]=T):T=t[25];const N=me(T);return r&&i&&!s?.isThreadLocked?e.some(Rn)||N.data?.connected!==!1?null:"codex-provider":En({isThreadLocked:s?.isThreadLocked??!1,hasCloudProviderKeys:e.length>0,sandboxOnlyChats:r,canRunClaudeCode:o||b.data?.connected!==!1||j.data?.connected!==!1||!!j.data?.orgShare})}function Rn(t){return jt(t.providerId)}function On(t){return Tt(t.providerId)}function be(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function ze(t){if(!t)return"—";const e=typeof t=="string"?new Date(t):t;return isNaN(e.getTime())?"—":e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function Bn(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function Dn(t){const e=L.c(4),{items:s}=t;let r;e[0]!==s?(r=s.map(zn),e[0]=s,e[1]=r):r=e[1];let i;return e[2]!==r?(i=n.jsx("div",{className:"grid grid-cols-2 gap-x-8 gap-y-6",children:r}),e[2]=r,e[3]=i):i=e[3],i}function zn(t){return n.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[n.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),n.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function Gn(t){const e=L.c(33),{userTokens:s,assistantTokens:r,otherTokens:i}=t,a=V(),l=s+r+i,c=l>0?s/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let d;e[0]!==c?(d=c>0&&n.jsx("div",{className:"h-full bg-chart-1",style:{width:`${c}%`}}),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==u?(m=u>0&&n.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=m):m=e[3];let f;e[4]!==o?(f=o>0&&n.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=f):f=e[5];let h;e[6]!==d||e[7]!==m||e[8]!==f?(h=n.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[d,m,f]}),e[6]=d,e[7]=m,e[8]=f,e[9]=h):h=e[9];let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=b):b=e[10];let g;e[11]!==a||e[12]!==c?(g=a("chat.contextPanel.userPercent",{pct:c.toFixed(1)}),e[11]=a,e[12]=c,e[13]=g):g=e[13];let v;e[14]!==g?(v=n.jsxs("div",{className:"flex items-center gap-1.5",children:[b,n.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[14]=g,e[15]=v):v=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let y;e[17]!==u||e[18]!==a?(y=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=y):y=e[19];let j;e[20]!==y?(j=n.jsxs("div",{className:"flex items-center gap-1.5",children:[x,n.jsx("span",{className:"text-xs text-muted-foreground",children:y})]}),e[20]=y,e[21]=j):j=e[21];let S;e[22]!==o||e[23]!==i||e[24]!==a?(S=i>0&&n.jsxs("div",{className:"flex items-center gap-1.5",children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.otherPercent",{pct:o.toFixed(1)})})]}),e[22]=o,e[23]=i,e[24]=a,e[25]=S):S=e[25];let p;e[26]!==j||e[27]!==S||e[28]!==v?(p=n.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[v,j,S]}),e[26]=j,e[27]=S,e[28]=v,e[29]=p):p=e[29];let k;return e[30]!==p||e[31]!==h?(k=n.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=k):k=e[32],k}function Hn(t){const e=L.c(14),{agentId:s,isError:r}=t,i=Ee(s),a=V();let l;e[0]!==i?.title||e[1]!==a?(l=i?.title??a("chat.subtask.subtaskNoun"),e[0]=i?.title,e[1]=a,e[2]=l):l=e[2];const c=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==c?(o=n.jsx(Ct,{icon:u,name:c,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=c,e[5]=o):o=e[5];const d=r?"text-destructive":"text-foreground";let m;e[6]!==d?(m=ee("shrink-0 font-medium",d),e[6]=d,e[7]=m):m=e[7];let f;e[8]!==c||e[9]!==m?(f=n.jsx("span",{className:m,children:c}),e[8]=c,e[9]=m,e[10]=f):f=e[10];let h;return e[11]!==o||e[12]!==f?(h=n.jsxs(n.Fragment,{children:[o,f]}),e[11]=o,e[12]=f,e[13]=h):h=e[13],h}function Kn(t){const e=L.c(12),{isError:s}=t,r=V();let i;e[0]!==r?(i=r("chat.contextPanel.subtask"),e[0]=r,e[1]=i):i=e[1];const a=i;let l;e[2]!==a?(l=n.jsx(Ct,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const c=s?"text-destructive":"text-foreground";let u;e[4]!==c?(u=ee("shrink-0 font-medium",c),e[4]=c,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=n.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let d;return e[9]!==l||e[10]!==o?(d=n.jsxs(n.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=d):d=e[11],d}function Vn(t){const e=L.c(18),{part:s}=t,r=s.input?.agent_id,i=s.state==="input-streaming"||s.state==="input-available"||s.state==="output-available"&&s.preliminary===!0,a=s.state==="output-error",l=s.state==="approval-requested";let c;e[0]!==a?(c=n.jsx(Kn,{isError:a}),e[0]=a,e[1]=c):c=e[1];let u;e[2]!==r||e[3]!==a?(u=n.jsx(Hn,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==c||e[6]!==u?(o=n.jsx(z.Suspense,{fallback:c,children:u}),e[5]=c,e[6]=u,e[7]=o):o=e[7];let d;e[8]!==s.input?(d=s.input?.prompt&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"text-muted-foreground/50",children:"·"}),n.jsx("span",{className:"truncate text-muted-foreground",children:s.input.prompt})]}),e[8]=s.input,e[9]=d):d=e[9];let m;e[10]!==l||e[11]!==a||e[12]!==i?(m=n.jsx("span",{className:"ml-auto shrink-0",children:i?n.jsx(Pe,{className:"size-3 text-muted-foreground"}):a?n.jsx(fs,{size:12,className:"text-destructive"}):l?n.jsx(We,{size:12,className:"text-warning"}):n.jsx(Ms,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=m):m=e[13];let f;return e[14]!==o||e[15]!==d||e[16]!==m?(f=n.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,d,m]}),e[14]=o,e[15]=d,e[16]=m,e[17]=f):f=e[17],f}function Un(t){const e=L.c(51),{onClose:s,back:r,className:i}=t,a=V(),[l,c]=z.useState(null),{messages:u}=Ye(),{activeTask:o}=$e(),{selectedModel:d,selectedVirtualMcp:m}=kt(),f=_s(u),h=[...u].reverse().find(aa),b=h?.metadata?.usage,g=[...u].reverse().find(na)?.metadata?.models?.thinking,v=h?.metadata?.modelLimits?.contextWindow??(!g||g.id===d?.modelId?d?.limits?.contextWindow:null)??null,x=b?.contextTokens??0,y=v&&v>0?(x/v*100).toFixed(1):null,j=u;let S;e[0]!==j?(S=j.filter(sa).reduce(ta,0),e[0]=j,e[1]=S):S=e[1];const p=S,k=u;let T;e[2]!==k?(T=k.filter(ea).reduce(Jn,0),e[2]=k,e[3]=T):T=e[3];const N=T,w=Math.max(0,f.totalTokens-p-N),_=u[0],P=u.at(-1),C=_?.metadata?.created_at??o?.created_at,A=P?.metadata?.created_at??o?.updated_at,M=u.filter(Qn),$=u.flatMap(Zn),E=Bn(g?.id??d?.modelId),F=m?.title??"Super Agent",R=Ls(),I=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:M.length},{label:a("chat.contextPanel.agentLabel"),value:F},...R?[{label:a("chat.contextPanel.modelLabel"),value:E}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?be(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:f.totalTokens>0?be(f.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:y!==null?`${y}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:f.inputTokens>0?be(f.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:f.outputTokens>0?be(f.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:f.reasoningTokens>0?be(f.reasoningTokens):"0"},...R?[{label:a("chat.contextPanel.costLabel"),value:f.cost>0?`$${f.cost<.001?f.cost.toFixed(6):f.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:ze(C)},{label:a("chat.contextPanel.lastActivityLabel"),value:ze(A)}];if(!o&&M.length===0){let G;e[4]!==i?(G=ee("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=G):G=e[5];let re;e[6]!==a?(re=a("chat.contextPanel.title"),e[6]=a,e[7]=re):re=e[7];let Q;e[8]!==re?(Q=n.jsx("span",{className:"text-sm font-medium text-foreground",children:re}),e[8]=re,e[9]=Q):Q=e[9];let J;e[10]!==r?(J=r?n.jsx(at,{size:14,className:"text-muted-foreground"}):n.jsx(rt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=J):J=e[11];let te;e[12]!==s||e[13]!==J?(te=n.jsx("button",{type:"button",onClick:s,className:"flex size-6 items-center justify-center hover:bg-accent transition-colors rounded-lg",children:J}),e[12]=s,e[13]=J,e[14]=te):te=e[14];let ne;e[15]!==Q||e[16]!==te?(ne=n.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[Q,te]}),e[15]=Q,e[16]=te,e[17]=ne):ne=e[17];let ie;e[18]!==a?(ie=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=ie):ie=e[19];let se;e[20]!==ie?(se=n.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:n.jsx("p",{className:"text-xs text-muted-foreground",children:ie})}),e[20]=ie,e[21]=se):se=e[21];let oe;return e[22]!==ne||e[23]!==se||e[24]!==G?(oe=n.jsxs("div",{className:G,children:[ne,se]}),e[22]=ne,e[23]=se,e[24]=G,e[25]=oe):oe=e[25],oe}let B;e[26]!==i?(B=ee("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=B):B=e[27];let O;e[28]!==a?(O=a("chat.contextPanel.title"),e[28]=a,e[29]=O):O=e[29];let H;e[30]!==O?(H=n.jsx("span",{className:"text-sm font-medium text-foreground",children:O}),e[30]=O,e[31]=H):H=e[31];let D;e[32]!==r?(D=r?n.jsx(at,{className:"size-3.5"}):n.jsx(rt,{className:"size-3.5"}),e[32]=r,e[33]=D):D=e[33];let U;e[34]!==s||e[35]!==D?(U=n.jsx(qe,{type:"button",variant:"ghost",size:"icon-sm",onClick:s,className:"text-muted-foreground",children:D}),e[34]=s,e[35]=D,e[36]=U):U=e[36];let Z;e[37]!==H||e[38]!==U?(Z=n.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[H,U]}),e[37]=H,e[38]=U,e[39]=Z):Z=e[39];let Y;e[40]!==a?(Y=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=Y):Y=e[41];let X;e[42]!==Y?(X=n.jsx("span",{className:"text-xs text-muted-foreground",children:Y}),e[42]=Y,e[43]=X):X=e[43];let W;e[44]!==N||e[45]!==w||e[46]!==p?(W=n.jsx(Gn,{userTokens:p,assistantTokens:N,otherTokens:w}),e[44]=N,e[45]=w,e[46]=p,e[47]=W):W=e[47];let le;return e[48]!==X||e[49]!==W?(le=n.jsxs("div",{className:"flex flex-col gap-3",children:[X,W]}),e[48]=X,e[49]=W,e[50]=le):le=e[50],n.jsxs("div",{className:B,children:[Z,n.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[$.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:$.map(Yn)})]}),n.jsx(Dn,{items:I}),le,M.length>0&&n.jsxs("div",{className:"flex flex-col gap-3",children:[n.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),n.jsx("div",{className:"flex flex-col gap-1",children:M.map(G=>{const re=G.metadata?.created_at,Q=l?.id===G.id;return n.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[n.jsxs("button",{type:"button",onClick:()=>c(Q?null:G),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent w-full text-left cursor-pointer",children:[n.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[n.jsx("span",{className:ee("shrink-0 font-medium",G.role==="user"?"text-chart-1":"text-chart-2"),children:G.role}),n.jsx("span",{className:"text-muted-foreground",children:"•"}),n.jsx("span",{className:"truncate text-muted-foreground font-mono",children:G.id})]}),re&&n.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:ze(re)})]}),Q&&n.jsxs(n.Fragment,{children:[G.role==="assistant"&&(()=>{const J=G.metadata?._request;if(!J)return null;const te=J.systemSections??[],ne=Math.max(1,...te.map(Wn)),ie=te.reduce(qn,0);return n.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),n.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[J.activeTools??0," / ",J.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),te.length>0&&n.jsxs("div",{className:"space-y-1.5",children:[n.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",n.jsxs("span",{className:"tabular-nums",children:["~",Math.round(ie/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),te.map((se,oe)=>{const ce=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${oe}`,xe=se.chars/ne*100,de=Math.round(se.chars/4);return n.jsxs("div",{className:"space-y-0.5",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("span",{className:"font-mono text-foreground truncate",children:ce}),n.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",de.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),n.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:n.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${xe}%`}})})]},oe)})]})]})})(),n.jsx("pre",{className:"text-xs font-mono bg-muted px-3 py-2 overflow-auto whitespace-pre-wrap break-all border-t border-border/50 max-h-64",children:JSON.stringify(G,null,2)})]})]},G.id)})})]})]})]})}function qn(t,e){return t+e.chars}function Wn(t){return t.chars}function Yn(t,e){return n.jsx(Vn,{part:t},e)}function Zn(t){return(t.parts??[]).filter(Xn)}function Xn(t){return t.type==="tool-subtask"}function Qn(t){return t.role!=="system"}function Jn(t,e){const s=e.metadata?.usage;return t+(s?.outputTokens??0)}function ea(t){return t.role==="assistant"}function ta(t,e){const s=e.metadata?.usage;return t+(s?.inputTokens??0)}function sa(t){return t.role==="user"}function na(t){return t.role==="assistant"&&t.metadata?.models}function aa(t){return t.role==="assistant"&&t.metadata?.usage}function ra(t){const e=L.c(21),{onOpenContextPanel:s}=t,{org:r}=ae(),{selectedVirtualMcp:i}=kt();let a;e[0]!==r.id?(a=ye(r.id),e[0]=r.id,e[1]=a):a=e[1];const c=i??a,o=Ee(c.id)??c,d=o.title??"Super Agent",m=o.icon??null,f=o.description??null;let h;e[2]!==m||e[3]!==d?(h=n.jsx(ve,{icon:m,name:d,size:"lg"}),e[2]=m,e[3]=d,e[4]=h):h=e[4];let b;e[5]!==d?(b=n.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:d}),e[5]=d,e[6]=b):b=e[6];let g;e[7]!==f?(g=f?n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:f}):null,e[7]=f,e[8]=g):g=e[8];let v;e[9]!==b||e[10]!==g?(v=n.jsxs("div",{className:"space-y-1.5",children:[b,g]}),e[9]=b,e[10]=g,e[11]=v):v=e[11];let x;e[12]!==h||e[13]!==v?(x=n.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center gap-4 px-6 text-center overflow-hidden",children:[h,v]}),e[12]=h,e[13]=v,e[14]=x):x=e[14];let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=n.jsx(q.IceBreakers,{className:"pb-3"}),e[15]=y):y=e[15];let j;e[16]!==s?(j=n.jsxs(q.Footer,{children:[y,n.jsx(q.Input,{onOpenContextPanel:s})]}),e[16]=s,e[17]=j):j=e[17];let S;return e[18]!==x||e[19]!==j?(S=n.jsxs(n.Fragment,{children:[x,j]}),e[18]=x,e[19]=j,e[20]=S):S=e[20],S}function ct(t){const e=L.c(17),{outputs:s,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl bg-muted/95 shadow-edge backdrop-blur-sm":"border-b border-border bg-background";let c;e[0]!==l?(c=ee(l),e[0]=l,e[1]=c):c=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("span",{className:"text-sm font-medium text-foreground",children:"Files in this task"}),e[2]=u):u=e[2];const o=r&&"-rotate-90";let d;e[3]!==o?(d=ee("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=d):d=e[4];let m;e[5]!==d?(m=n.jsx(Ze,{className:d}),e[5]=d,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==m?(f=n.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,m]}),e[7]=i,e[8]=m,e[9]=f):f=e[9];let h;e[10]!==r||e[11]!==s?(h=!r&&n.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:s.map(ia)}),e[10]=r,e[11]=s,e[12]=h):h=e[12];let b;return e[13]!==c||e[14]!==f||e[15]!==h?(b=n.jsxs("div",{className:c,children:[f,h]}),e[13]=c,e[14]=f,e[15]=h,e[16]=b):b=e[16],b}function ia(t){return n.jsx($s,{file:t},t.key)}function la(){const t=L.c(13),e=Le()?.taskId??null,s=Es();let r;t[0]!==s?(r={enabled:s},t[0]=s,t[1]=r):r=t[1];const{data:i}=Fs(e,r),[a,l]=z.useState(!1),[c,u]=z.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(ca),t[2]=o):o=t[2];let d;t[3]!==a||t[4]!==i?(d=n.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:n.jsx(ct,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=d):d=t[5];let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>u(oa),t[6]=m):m=t[6];let f;t[7]!==c||t[8]!==i?(f=n.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:n.jsx(ct,{variant:"bar",outputs:i,collapsed:c,onToggle:m})}),t[7]=c,t[8]=i,t[9]=f):f=t[9];let h;return t[10]!==d||t[11]!==f?(h=n.jsxs(n.Fragment,{children:[d,f]}),t[10]=d,t[11]=f,t[12]=h):h=t[12],h}function oa(t){return!t}function ca(t){return!t}function da(){const t=L.c(1);z.use(Ye().ready);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Os,{children:n.jsx(ua,{})}),t[0]=e):e=t[0],e}function ua(){const t=L.c(29),{active:e}=Bs(),{org:s}=ae(),r=Le(),{isChatEmpty:i}=Ye(),[a,l]=z.useState("chat"),c=Rs(),u=V(),o=Fn(),{runtime:d}=St(r?.virtualMcpId);if(o!==null&&d!=="cms"){let N;return t[0]!==o||t[1]!==u?(N=n.jsx(q,{className:"animate-in fade-in-0 duration-200",children:n.jsx(q.Main,{className:"flex flex-col items-center",children:n.jsx(q.EmptyState,{children:o==="codex-provider"?n.jsx(q.NoAiProviderEmptyState,{title:u("settings.codexSubscription.setupHeading"),description:u("settings.codexSubscription.setupDescription"),providerFilter:jt}):o==="claude-code-provider"?n.jsx(q.NoAiProviderEmptyState,{title:u("chat.noAiProviderEmptyState.supportedHeading"),description:u("chat.noAiProviderEmptyState.supportedSubtitle"),providerFilter:Tt}):n.jsx(q.NoAiProviderEmptyState,{})})})}),t[0]=o,t[1]=u,t[2]=N):N=t[2],N}let f;t[3]!==c.hasDecoKey||t[4]!==c.hasOnlyDecoProvider||t[5]!==c.isLoading||t[6]!==c.isZeroBalance||t[7]!==i||t[8]!==s?(f=c.hasDecoKey&&c.isZeroBalance&&c.hasOnlyDecoProvider&&!c.isLoading&&i&&!Ns(s.id),t[3]=c.hasDecoKey,t[4]=c.hasOnlyDecoProvider,t[5]=c.isLoading,t[6]=c.isZeroBalance,t[7]=i,t[8]=s,t[9]=f):f=t[9];const h=f;let b;t[10]!==h?(b=h&&n.jsx(q.CreditsEmptyState,{}),t[10]=h,t[11]=b):b=t[11];let g;t[12]!==a||t[13]!==i||t[14]!==d||t[15]!==e?(g=!e&&n.jsx("div",{inert:a!=="chat"?!0:void 0,"aria-hidden":a!=="chat",className:ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",a!=="chat"?"opacity-0 pointer-events-none":"opacity-100"),children:i&&d!=="cms"?n.jsx(ra,{onOpenContextPanel:()=>l("context")}):n.jsxs(n.Fragment,{children:[n.jsxs(q.Main,{className:"relative flex flex-col overflow-hidden @container",children:[n.jsx(la,{}),n.jsx("div",{className:"min-h-0 flex-1",children:n.jsx(q.Messages,{})})]}),n.jsx(q.Footer,{children:n.jsx(q.Input,{onOpenContextPanel:()=>l("context")})})]})}),t[12]=a,t[13]=i,t[14]=d,t[15]=e,t[16]=g):g=t[16];let v;t[17]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ds,{}),t[17]=v):v=t[17];const x=a!=="context"?!0:void 0,y=a!=="context",j=a==="context"?"opacity-100":"opacity-0 pointer-events-none";let S;t[18]!==j?(S=ee("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",j),t[18]=j,t[19]=S):S=t[19];let p;t[20]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsx(Un,{back:!0,onClose:()=>l("chat")}),t[20]=p):p=t[20];let k;t[21]!==x||t[22]!==y||t[23]!==S?(k=n.jsx("div",{inert:x,"aria-hidden":y,className:S,children:p}),t[21]=x,t[22]=y,t[23]=S,t[24]=k):k=t[24];let T;return t[25]!==b||t[26]!==g||t[27]!==k?(T=n.jsxs(q,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[b,g,v,k]}),t[25]=b,t[26]=g,t[27]=k,t[28]=T):T=t[28],T}function fa(){const t=L.c(7),e=V();let s;t[0]!==e?(s=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=s):s=t[1];let r;t[2]!==s?(r=n.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ie,{children:n.jsx(da,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=n.jsx(xt,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function ma(t){const e=L.c(10),{org:s}=ae(),r=Ws(),{data:i}=pe.useSession(),a=i?.user?.id,l=t?.id??null,c=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==s.id||e[1]!==l?(u=fe.viewedThreadMetadataRefresh(s.id,l??""),e[0]=s.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&c;let d;e[3]!==r||e[4]!==l?(d=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=d):d=e[5];let m;e[6]!==u||e[7]!==o||e[8]!==d?(m={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:d},e[6]=u,e[7]=o,e[8]=d,e[9]=m):m=e[9],me(m)}function Ge(t){const e=L.c(14),{label:s,value:r,onChange:i,options:a}=t;let l;e[0]!==s?(l=n.jsx("span",{className:"text-sm text-muted-foreground",children:s}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==i?(c=m=>m&&i(m),e[2]=i,e[3]=c):c=e[3];let u;e[4]!==a?(u=a.map(ha),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==s||e[7]!==c||e[8]!==u||e[9]!==r?(o=n.jsx(ln,{type:"single",size:"sm",value:r,onValueChange:c,"aria-label":s,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=s,e[7]=c,e[8]=u,e[9]=r,e[10]=o):o=e[10];let d;return e[11]!==l||e[12]!==o?(d=n.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=d):d=e[13],d}function ha(t){return n.jsxs(rn,{value:t.value,className:"h-6 gap-1.5 rounded-lg px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:bg-card data-[state=on]:text-foreground data-[state=on]:shadow-edge",children:[t.icon,t.label]},t.value)}function pa(t){const e=L.c(91),{panel:s,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=V();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(ms,{size:16}),e[2]=c):c=e[2];let u;e[3]!==s.filtersActive?(u=s.filtersActive&&n.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=s.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==s.filtersActive||e[7]!==l||e[8]!==u?(o=n.jsx(Fe,{asChild:!0,children:n.jsx($t,{asChild:!0,children:n.jsxs(Ne,{"aria-label":l,active:s.filtersActive,className:i,children:[c,u]})})}),e[5]=i,e[6]=s.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let d;e[10]!==a?(d=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Re,{side:"bottom",children:d}),e[12]=d,e[13]=m):m=e[13];let f;e[14]!==o||e[15]!==m?(f=n.jsxs(Oe,{children:[o,m]}),e[14]=o,e[15]=m,e[16]=f):f=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const b=s.groupBy;let g;e[19]!==s?(g=G=>{he("tasks_panel_group_by_changed",{to_value:G}),s.setGroupBy(G)},e[19]=s,e[20]=g):g=e[20];let v;e[21]!==a?(v=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=v):v=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(hs,{size:13}),e[23]=x):x=e[23];let y;e[24]!==v?(y={value:"flat",label:v,icon:x},e[24]=v,e[25]=y):y=e[25];let j;e[26]!==a?(j=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=j):j=e[27];let S;e[28]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(ps,{size:13}),e[28]=S):S=e[28];let p;e[29]!==j?(p={value:"status",label:j,icon:S},e[29]=j,e[30]=p):p=e[30];let k;e[31]!==y||e[32]!==p?(k=[y,p],e[31]=y,e[32]=p,e[33]=k):k=e[33];let T;e[34]!==s.groupBy||e[35]!==g||e[36]!==k||e[37]!==h?(T=n.jsx(Ge,{label:h,value:b,onChange:g,options:k}),e[34]=s.groupBy,e[35]=g,e[36]=k,e[37]=h,e[38]=T):T=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const w=s.typeFilter;let _;e[41]!==s?(_=G=>{he("tasks_panel_filter_changed",{to_value:G}),s.setTypeFilter(G)},e[41]=s,e[42]=_):_=e[42];let P;e[43]!==a?(P=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=P):P=e[44];let C;e[45]!==P?(C={value:"all",label:P},e[45]=P,e[46]=C):C=e[46];let A;e[47]!==a?(A=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=A):A=e[48];let M;e[49]!==A?(M={value:"manual",label:A},e[49]=A,e[50]=M):M=e[50];let $;e[51]!==a?($=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=$):$=e[52];let E;e[53]!==$?(E={value:"automation",label:$},e[53]=$,e[54]=E):E=e[54];let F;e[55]!==C||e[56]!==M||e[57]!==E?(F=[C,M,E],e[55]=C,e[56]=M,e[57]=E,e[58]=F):F=e[58];let R;e[59]!==s.typeFilter||e[60]!==N||e[61]!==_||e[62]!==F?(R=n.jsx(Ge,{label:N,value:w,onChange:_,options:F}),e[59]=s.typeFilter,e[60]=N,e[61]=_,e[62]=F,e[63]=R):R=e[63];let I;e[64]!==a?(I=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=I):I=e[65];const B=s.showAll?"team":"mine";let O;e[66]!==s?(O=G=>s.setShowAll(G==="team"),e[66]=s,e[67]=O):O=e[67];let H;e[68]!==a?(H=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=H):H=e[69];let D;e[70]!==H?(D={value:"mine",label:H},e[70]=H,e[71]=D):D=e[71];let U;e[72]!==a?(U=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=U):U=e[73];let Z;e[74]!==U?(Z={value:"team",label:U},e[74]=U,e[75]=Z):Z=e[75];let Y;e[76]!==D||e[77]!==Z?(Y=[D,Z],e[76]=D,e[77]=Z,e[78]=Y):Y=e[78];let X;e[79]!==I||e[80]!==B||e[81]!==O||e[82]!==Y?(X=n.jsx(Ge,{label:I,value:B,onChange:O,options:Y}),e[79]=I,e[80]=B,e[81]=O,e[82]=Y,e[83]=X):X=e[83];let W;e[84]!==T||e[85]!==R||e[86]!==X?(W=n.jsxs(Et,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[T,R,X]}),e[84]=T,e[85]=R,e[86]=X,e[87]=W):W=e[87];let le;return e[88]!==W||e[89]!==f?(le=n.jsxs(Ft,{children:[f,W]}),e[88]=W,e[89]=f,e[90]=le):le=e[90],le}function xa(t,e){return t.filter(s=>s.id===e||!!s.trigger_id||sn(s))}function ga(){const t=L.c(2),e=As()??[];let s;return t[0]!==e?(s=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?It(i.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}function ba(t){const e=L.c(9),{virtualMcpId:s,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=V();let c;e[0]!==a||e[1]!==s?(c=s?n.jsx(va,{virtualMcpId:s,size:a}):n.jsx(ve,{icon:null,name:"?",size:a}),e[0]=a,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&n.jsx("span",{"aria-label":l("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-special border border-special text-special-foreground",children:n.jsx(Bt,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==c||e[7]!==u?(o=n.jsxs("div",{className:"relative shrink-0",children:[c,u]}),e[6]=c,e[7]=u,e[8]=o):o=e[8],o}function va(t){const e=L.c(6),{virtualMcpId:s,size:r}=t,i=_t(s);if(!i){let c;return e[0]!==r?(c=n.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=c):c=e[1],c}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=n.jsx(ve,{icon:a,name:i.title,size:r}),e[2]=i.title,e[3]=r,e[4]=a,e[5]=l):l=e[5],l}const dt=["thread"];function ya(t){const e=L.c(53),{open:s,onOpenChange:r}=t,[i,a]=z.useState(""),{org:l}=ae(),{setTaskId:c}=Je(),u=Ce(),o=V();let d,m,f,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),d=h?20:10,f=me,m=fe.globalSearch(l.id,h,d,dt),e[0]=l.id,e[1]=i,e[2]=d,e[3]=m,e[4]=f,e[5]=h):(d=e[2],m=e[3],f=e[4],h=e[5]);let b;e[6]!==d||e[7]!==u||e[8]!==h?(b=async()=>{const I=await u.call("GLOBAL_SEARCH",{query:h,limit:d,types:[...dt]});return{...I,items:I.items.filter(ja)}},e[6]=d,e[7]=u,e[8]=h,e[9]=b):b=e[9];let g;e[10]!==s||e[11]!==m||e[12]!==b?(g={queryKey:m,enabled:s,queryFn:b,staleTime:1e4},e[10]=s,e[11]=m,e[12]=b,e[13]=g):g=e[13];const{data:v,isFetching:x}=f(g);let y;e[14]!==v?.items?(y=v?.items??[],e[14]=v?.items,e[15]=y):y=e[15];const j=y;let S;e[16]!==r?(S=I=>{I||a(""),r(I)},e[16]=r,e[17]=S):S=e[17];const p=S;let k;e[18]!==p||e[19]!==c?(k=I=>{p(!1),c(I.id,I.virtual_mcp_id??void 0)},e[18]=p,e[19]=c,e[20]=k):k=e[20];const T=k;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let w;e[23]!==N?(w=n.jsx(Yt,{children:N}),e[23]=N,e[24]=w):w=e[24];let _;e[25]!==o?(_=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=_):_=e[26];let P;e[27]!==_?(P=n.jsx(Zt,{children:_}),e[27]=_,e[28]=P):P=e[28];let C;e[29]!==P||e[30]!==w?(C=n.jsxs(Xt,{className:"sr-only",children:[w,P]}),e[29]=P,e[30]=w,e[31]=C):C=e[31];let A;e[32]!==o?(A=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=A):A=e[33];let M;e[34]!==i||e[35]!==A?(M=n.jsx(vn,{value:i,onValueChange:a,placeholder:A}),e[34]=i,e[35]=A,e[36]=M):M=e[36];let $;e[37]!==T||e[38]!==x||e[39]!==j||e[40]!==o||e[41]!==h?($=n.jsx(pn,{children:x&&j.length===0?n.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):j.length===0?n.jsx(xn,{children:o("tasksPanel.globalSearchDialog.noResults")}):n.jsx(gn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:j.map(I=>I.type==="thread"?n.jsxs(bn,{value:`thread:${I.id}:${I.title}`,onSelect:()=>T(I),className:"gap-2.5",children:[n.jsx(ba,{virtualMcpId:I.virtual_mcp_id,size:"xs"}),n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx("div",{className:"text-sm text-foreground truncate",children:I.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),n.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null)})}),e[37]=T,e[38]=x,e[39]=j,e[40]=o,e[41]=h,e[42]=$):$=e[42];let E;e[43]!==M||e[44]!==$?(E=n.jsxs(yn,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[M,$]}),e[43]=M,e[44]=$,e[45]=E):E=e[45];let F;e[46]!==C||e[47]!==E?(F=n.jsxs(Qt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[C,E]}),e[46]=C,e[47]=E,e[48]=F):F=e[48];let R;return e[49]!==p||e[50]!==s||e[51]!==F?(R=n.jsx(Jt,{open:s,onOpenChange:p,children:F}),e[49]=p,e[50]=s,e[51]=F,e[52]=R):R=e[52],R}function ja(t){return t.type==="thread"}function Sa(t,e,s){if(!s)return;const r=t.findIndex(i=>i.id===e);if(r!==-1){for(let i=r+1;i<t.length;i++){const a=t[i];if(a?.created_by===s)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===s)return a}}}function ka(t){return t==="ephemeral"||t.startsWith("thread:")}function Ht(t){const e=L.c(45),{task:s,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:c,hideStatusIdle:u,indented:o}=t,d=V(),m=jn(s.status),f=m.icon,h=s.metadata?.kind==="tool_call_run",b=_t(h?void 0:s.virtual_mcp_id);let g;e[0]!==b?(g=wt(b),e[0]=b,e[1]=g):g=e[1];const v=g;on(6e4);const x=l||!!s.trigger_id,y=s.id,j="button",S=0;let p;e[2]!==i?(p=O=>{O.target===O.currentTarget&&(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),i())},e[2]=i,e[3]=p):p=e[3];const k=o?"-ml-4 pl-6":"pl-[9px]",T=r?"bg-accent text-accent-foreground":"hover:bg-accent";let N;e[4]!==k||e[5]!==T?(N=ee("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",k,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",T),e[4]=k,e[5]=T,e[6]=N):N=e[6];let w;e[7]!==h||e[8]!==c||e[9]!==b?.icon||e[10]!==b?.title?(w=c&&!h&&n.jsx(ve,{icon:b?.icon??null,name:b?.title??"?",size:"2xs"}),e[7]=h,e[8]=c,e[9]=b?.icon,e[10]=b?.title,e[11]=w):w=e[11];let _;e[12]!==x||e[13]!==d?(_=x&&n.jsx(Bt,{size:12,"aria-label":d("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=d,e[14]=_):_=e[14];let P;e[15]!==d||e[16]!==s.title?(P=s.title||d("tasksPanel.taskRow.untitledTask"),e[15]=d,e[16]=s.title,e[17]=P):P=e[17];let C;e[18]!==P?(C=n.jsx("div",{className:"text-sm text-foreground truncate",children:P}),e[18]=P,e[19]=C):C=e[19];let A;e[20]!==_||e[21]!==C?(A=n.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[_,C]}),e[20]=_,e[21]=C,e[22]=A):A=e[22];let M;e[23]!==r||e[24]!==v||e[25]!==s.branch||e[26]!==s.updated_at?(M=s.updated_at&&n.jsxs("div",{className:ee("flex items-center gap-1 text-2xs min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[s.branch&&!ka(s.branch)?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):v?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[v.owner,"/",v.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:es(new Date(s.updated_at))})]}),e[23]=r,e[24]=v,e[25]=s.branch,e[26]=s.updated_at,e[27]=M):M=e[27];let $;e[28]!==A||e[29]!==M?($=n.jsxs("div",{className:"flex-1 min-w-0",children:[A,M]}),e[28]=A,e[29]=M,e[30]=$):$=e[30];const E="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",F=!u&&n.jsx("span",{className:ee("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":d("tasksPanel.taskRow.statusLabel",{status:d(m.labelKey)}),children:s.status==="in_progress"?n.jsx(Pe,{className:ee("size-3.5",m.iconClassName)}):n.jsx(f,{size:14,className:m.iconClassName})});let R;e[31]!==a||e[32]!==d?(R=a&&n.jsxs(Oe,{children:[n.jsx(Fe,{asChild:!0,children:n.jsx(qe,{variant:"ghost",size:"icon","aria-label":d("tasksPanel.taskRow.archiveTask"),onClick:O=>{O.stopPropagation(),a()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto text-muted-foreground",children:n.jsx(ts,{className:"size-3.5"})})}),n.jsx(Re,{side:"right",children:d("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=d,e[33]=R):R=e[33];let I;e[34]!==F||e[35]!==R?(I=n.jsxs("div",{className:E,children:[F,R]}),e[34]=F,e[35]=R,e[36]=I):I=e[36];let B;return e[37]!==i||e[38]!==$||e[39]!==I||e[40]!==p||e[41]!==N||e[42]!==w||e[43]!==s.id?(B=n.jsxs("div",{"data-task-id":y,role:j,tabIndex:S,onClick:i,onKeyDown:p,className:N,children:[w,$,I]}),e[37]=i,e[38]=$,e[39]=I,e[40]=p,e[41]=N,e[42]=w,e[43]=s.id,e[44]=B):B=e[44],B}const ut=["requires_action","in_progress","failed","expired","completed"];function Ta(t){const e=new Map(ut.map(s=>[s,[]]));for(const s of t){const r=s.status??"completed";(e.get(r)??e.get("completed")).push(s)}return ut.map(s=>({status:s,threads:e.get(s)}))}const Na="sidebar.group.expanded.";function _a(t,e){const s=L.c(3),[r,i]=gt(`${Na}${t}`,e);let a;return s[0]!==r||s[1]!==i?(a=[r,i],s[0]=r,s[1]=i,s[2]=a):a=s[2],a}function Kt(t){const e=L.c(18),{onClick:s,isFetching:r,indented:i}=t,a=V();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const c=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==c?(u=ee("flex items-center gap-2 py-1.5 rounded-lg text-sm text-muted-foreground",c,"hover:bg-sidebar-accent hover:text-foreground focus-ring","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=c,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&n.jsx(Pe,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==r||e[7]!==a?(d=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==d?(m=n.jsx("span",{children:d}),e[9]=d,e[10]=m):m=e[10];let f;return e[11]!==r||e[12]!==s||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==m?(f=n.jsxs("button",{type:"button","aria-label":l,onClick:s,disabled:r,className:u,children:[o,m]}),e[11]=r,e[12]=s,e[13]=l,e[14]=u,e[15]=o,e[16]=m,e[17]=f):f=e[17],f}function wa(t,e,s,r){return[t,e,s,r.type,r.member,r.currentUserId??""].join("|")}function Ca(t){return t.member==="mine"&&!t.currentUserId}const Vt=4;let Te=0;const Ve=[];function Pa(){for(;Te<Vt&&Ve.length>0;){const t=Ve.shift();t&&t()}}function Ut(t){return new Promise((e,s)=>{const r=()=>{Te++,t().then(e,s).finally(()=>{Te--,Pa()})};Te<Vt?r():Ve.push(r)})}const Be=10;function ft(t,e,s,r,i){const a={hidden:!1};r.member==="mine"&&r.currentUserId&&(a.created_by=r.currentUserId),r.type==="automation"&&(a.has_trigger=!0),r.type==="manual"&&(a.has_trigger=!1);const l={where:a,limit:i,offset:s,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Ia(t,e,s,r){let i=0;for(const a of t)qt(a,e,s,r)&&i++;return i}function He(t,e,s,r){return Ia(t,e,s,r)}function Ma(t,e){return!!(t>=Be||t===0&&e)}function mt(t,e){return t<e}function Aa(t,e){return e===!1?!1:e===!0?!0:t}function qt(t,e,s,r){return!(t.hidden||(t.status??"completed")!==s||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const we=new Map,ke=new Map;function La(t,e){return e?t>=Be?!0:null:!1}function ht(t){return we.get(t)}function $a(t,e){we.set(t,e)}function Ea(t,e,s){const r=we.get(t);if(r!==void 0){s(r);return}let i=ke.get(t);i||(i=Ut(e).then(a=>(we.set(t,a),ke.delete(t),a)).catch(()=>(ke.delete(t),Promise.reject(new Error("group probe failed")))),ke.set(t,i)),i.then(s,()=>s(!1))}function pt(t){const e=t,s=Array.isArray(e.items)?e.items:[];return{items:s,hasMore:e.hasMore??s.length===Be,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Fa(t,e,s,r,i){let a=0;for(const l of t)e.has(l.id)||qt(l,s,r,i)&&a++;return a}function Ra(t,e,s,r){const i=L.c(8),{org:a}=ae(),l=wa(a.id,t,e,s);let c;i[0]!==s?(c=Ca(s),i[0]=s,i[1]=c):c=i[1];const u=c,[o,d]=z.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const m=Xe(),{threads:f,hasMore:h}=Qe(),b=He(f,t,e,s),g=Ma(b,h),v=La(b,h),x=Ce();if(o.identity===l&&o.serverHasMore===null){const T=v??ht(l);T!==void 0&&d({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:T})}!u&&o.identity===l&&o.serverHasMore===null&&v===null&&ht(l)===void 0&&o.probeSubscribedIdentity!==l&&(d(T=>T.identity===l?{...T,isProbing:!0,probeSubscribedIdentity:l}:T),Ea(l,async()=>{const T=ft(t,e,0,s,1),N=await x.call("COLLECTION_THREADS_LIST",T),{totalCount:w}=pt(N),_=He(m.threads.get(),t,e,s);return w===void 0?!1:mt(_,w)},T=>{d(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:T})}));const j=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;d(w=>w.identity===N?{...w,isFetching:!0}:w);try{const w=He(f,t,e,s),_=ft(t,e,w,s,Be),P=await Ut(()=>x.call("COLLECTION_THREADS_LIST",_)),{items:C,hasMore:A,totalCount:M}=pt(P),$=new Set(f.map(Oa)),E=Fa(C,$,t,e,s),F=w;m.mergeThreads(C),d(R=>{if(R.identity!==N)return R;let I;return M!==void 0?I=mt(F+E,M):I=C.length===0||E===0?!1:A,$a(N,I),{...R,isFetching:!1,serverHasMore:I}})}catch(w){const _=w,P=_ instanceof Error?_.message:String(_);ss.error(`Could not load more tasks: ${P}`),d(C=>C.identity===N?{...C,isFetching:!1}:C)}},S=o.isFetching||o.isProbing,p=!u&&!S&&Aa(g,o.serverHasMore);let k;return i[2]!==S||i[3]!==j||i[4]!==p||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(k={hasMore:p,isFetching:S,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:j},i[2]=S,i[3]=j,i[4]=p,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=k):k=i[7],k}function Oa(t){return t.id}function Ba(t){const e=L.c(20),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,{isFetching:o,isProbing:d,loadMore:m,hasMore:f,serverHasMore:h}=Ra("status",s,u),[b,g]=z.useState(!1);!b&&r.length===0&&h===!0&&!o&&!d&&(g(!0),queueMicrotask(()=>{m()}));let v;if(e[0]!==i||e[1]!==c||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let j;e[7]!==i||e[8]!==c||e[9]!==u||e[10]!==l||e[11]!==a?(j=S=>n.jsx(Ht,{task:S,isActive:i===S.id,onClick:()=>a(S),onArchive:c&&S.created_by===u.currentUserId?()=>l(S):void 0,showAutomationBadge:!!S.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},S.id),e[7]=i,e[8]=c,e[9]=u,e[10]=l,e[11]=a,e[12]=j):j=e[12],v=r.map(j),e[0]=i,e[1]=c,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=v}else v=e[6];let x;e[13]!==f||e[14]!==o||e[15]!==m?(x=(f||o)&&n.jsx(Kt,{onClick:()=>{m()},isFetching:o,indented:!0}),e[13]=f,e[14]=o,e[15]=m,e[16]=x):x=e[16];let y;return e[17]!==v||e[18]!==x?(y=n.jsxs(n.Fragment,{children:[v,x]}),e[17]=v,e[18]=x,e[19]=y):y=e[19],y}function Da(t){const e=L.c(43),{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u}=t,o=V(),d=Sn[s],m=d.icon,[f,h]=_a(`status-${s}`,!1);let b;e[0]!==f||e[1]!==h?(b=function(){h(!f)},e[0]=f,e[1]=h,e[2]=b):b=e[2];const g=b;let v;e[3]!==d.labelKey||e[4]!==o?(v=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(d.labelKey)}),e[3]=d.labelKey,e[4]=o,e[5]=v):v=e[5];let x;e[6]!==g?(x=P=>{P.target===P.currentTarget&&(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),g())},e[6]=g,e[7]=x):x=e[7];let y;e[8]!==m||e[9]!==d.iconClassName?(y=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:n.jsx(m,{size:12,className:d.iconClassName})}),e[8]=m,e[9]=d.iconClassName,e[10]=y):y=e[10];let j;e[11]!==f?(j=n.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:f?n.jsx(Ze,{size:14}):n.jsx(ns,{size:14})}),e[11]=f,e[12]=j):j=e[12];let S;e[13]!==y||e[14]!==j?(S=n.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[y,j]}),e[13]=y,e[14]=j,e[15]=S):S=e[15];let p;e[16]!==d.labelKey||e[17]!==o?(p=o(d.labelKey),e[16]=d.labelKey,e[17]=o,e[18]=p):p=e[18];let k;e[19]!==p?(k=n.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=k):k=e[20];let T;e[21]!==r.length?(T=n.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:n.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=T):T=e[22];let N;e[23]!==f||e[24]!==g||e[25]!==v||e[26]!==x||e[27]!==S||e[28]!==k||e[29]!==T?(N=n.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":f,"aria-label":v,onClick:g,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-sidebar-accent focus-ring transition-colors",children:[S,k,T]}),e[23]=f,e[24]=g,e[25]=v,e[26]=x,e[27]=S,e[28]=k,e[29]=T,e[30]=N):N=e[30];let w;e[31]!==i||e[32]!==c||e[33]!==f||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==s||e[38]!==r?(w=f&&n.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:n.jsx(Ba,{status:s,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:c,filters:u})}),e[31]=i,e[32]=c,e[33]=f,e[34]=u,e[35]=l,e[36]=a,e[37]=s,e[38]=r,e[39]=w):w=e[39];let _;return e[40]!==N||e[41]!==w?(_=n.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,w]}),e[40]=N,e[41]=w,e[42]=_):_=e[42],_}function za(t){const e=L.c(41),{threads:s,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:c,hasMore:u,isFetchingMore:o,onLoadMore:d,filtersActive:m}=t,f=V();if(s.length===0&&!u&&!o){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(xs,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let y;e[1]!==m||e[2]!==f?(y=f(m?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=m,e[2]=f,e[3]=y):y=e[3];let j;return e[4]!==y?(j=n.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,n.jsx("p",{className:"text-sm",children:y})]}),e[4]=y,e[5]=j):j=e[5],j}const h=s.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==c||e[9]!==l||e[10]!==a||e[11]!==s){let j;e[13]!==i||e[14]!==h||e[15]!==c||e[16]!==l||e[17]!==a?(j=S=>n.jsx(Da,{status:S.status,threads:S.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:c},S.status),e[13]=i,e[14]=h,e[15]=c,e[16]=l,e[17]=a,e[18]=j):j=e[18],x=Ta(s).map(j),e[6]=i,e[7]=h,e[8]=c,e[9]=l,e[10]=a,e[11]=s,e[12]=x}else x=e[12];let y;return e[19]!==x?(y=n.jsx(n.Fragment,{children:x}),e[19]=x,e[20]=y):y=e[20],y}let b;if(e[21]!==i||e[22]!==h||e[23]!==c||e[24]!==l||e[25]!==a||e[26]!==s){let x;e[28]!==i||e[29]!==h||e[30]!==c||e[31]!==l||e[32]!==a?(x=y=>n.jsx(Ht,{task:y,isActive:i===y.id,onClick:()=>a(y),onArchive:h&&y.created_by===c.currentUserId?()=>l(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0},y.id),e[28]=i,e[29]=h,e[30]=c,e[31]=l,e[32]=a,e[33]=x):x=e[33],b=s.map(x),e[21]=i,e[22]=h,e[23]=c,e[24]=l,e[25]=a,e[26]=s,e[27]=b}else b=e[27];let g;e[34]!==u||e[35]!==o||e[36]!==d?(g=(u||o)&&n.jsx(Kt,{onClick:d,isFetching:o}),e[34]=u,e[35]=o,e[36]=d,e[37]=g):g=e[37];let v;return e[38]!==b||e[39]!==g?(v=n.jsxs(n.Fragment,{children:[b,g]}),e[38]=b,e[39]=g,e[40]=v):v=e[40],v}function Ga(t){const e=L.c(11),{panel:s}=t;let r;return e[0]!==s.activeTaskId||e[1]!==s.archiveTask||e[2]!==s.filters||e[3]!==s.filtersActive||e[4]!==s.groupBy||e[5]!==s.hasMore||e[6]!==s.isFetchingMore||e[7]!==s.loadMore||e[8]!==s.selectTask||e[9]!==s.threads?(r=n.jsx(za,{threads:s.threads,groupBy:s.groupBy,activeTaskId:s.activeTaskId,onSelectTask:s.selectTask,onArchiveTask:s.archiveTask,filters:s.filters,hasMore:s.hasMore,isFetchingMore:s.isFetchingMore,onLoadMore:s.loadMore,filtersActive:s.filtersActive}),e[0]=s.activeTaskId,e[1]=s.archiveTask,e[2]=s.filters,e[3]=s.filtersActive,e[4]=s.groupBy,e[5]=s.hasMore,e[6]=s.isFetchingMore,e[7]=s.loadMore,e[8]=s.selectTask,e[9]=s.threads,e[10]=r):r=e[10],r}function Ha(t){const e=L.c(67);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:r}=s,{data:i}=pe.useSession(),a=i?.user?.id,{org:l}=ae();let c;e[2]!==l.id?(c=ye(l.id),e[2]=l.id,e[3]=c):c=e[3];const u=c.id,o=ga(),d=Nt(),{threads:m,hasMore:f,isFetchingMore:h,fetchNextPage:b}=Qe(),g=m.filter(qa),{hide:v,setScope:x}=Mt(),y=Me(),{setTaskId:j,createNewTask:S}=Je(),p=Rt(),k=et();let T;e[4]!==k||e[5]!==m||e[6]!==p?(T=fn({routeAgentId:p,threadVirtualMcpId:m.find(K=>K.id===k)?.virtual_mcp_id}),e[4]=k,e[5]=m,e[6]=p,e[7]=T):T=e[7];const N=T;let w;e[8]!==r?(w=()=>{r?.()},e[8]=r,e[9]=w):w=e[9];const _=w,P=[...g].sort(Ua),[C,A]=z.useState("all"),[M,$]=z.useState("flat"),[E,F]=gt("sidebar-threads-scope-all",!1),[R,I]=z.useState(!1),[B,O]=z.useState(!1);let H;e[10]!==I?(H=()=>{he("tasks_panel_search_opened"),O(!0),I(!0)},e[10]=I,e[11]=H):H=e[11];const D=H,U=a??null;let Z;e[12]!==U||e[13]!==C?(Z={type:C,member:"mine",currentUserId:U},e[12]=U,e[13]=C,e[14]=Z):Z=e[14];const Y=Z,X={};E||(X.created_by="me"),x(X);let W;e[15]!==a?(W=K=>a?K.filter(ue=>ue.created_by===a):[],e[15]=a,e[16]=W):W=e[16];const le=W;let G;e[17]!==C?(G=K=>C==="automation"?K.filter(Va):C==="manual"?K.filter(Ka):K,e[17]=C,e[18]=G):G=e[18];const re=G,Q=xa(re(E?P:le(P)),k);let J;e[19]!==k||e[20]!==_||e[21]!==a||e[22]!==v||e[23]!==y||e[24]!==l.slug||e[25]!==j||e[26]!==Q?(J=K=>{if(a&&K.created_by&&K.created_by!==a)return;const ue=K.id===k;if(v(K.id),cn(K.id),!ue)return;const ge=Sa(Q,K.id,a);_(),ge?j(ge.id,ge.virtual_mcp_id):y({to:"/$org",params:{org:l.slug}})},e[19]=k,e[20]=_,e[21]=a,e[22]=v,e[23]=y,e[24]=l.slug,e[25]=j,e[26]=Q,e[27]=J):J=e[27];const te=J;let ne;e[28]!==_||e[29]!==j?(ne=K=>{_(),j(K.id,K.virtual_mcp_id)},e[28]=_,e[29]=j,e[30]=ne):ne=e[30];const ie=ne;let se;e[31]!==N||e[32]!==k||e[33]!==m||e[34]!==_||e[35]!==S||e[36]!==a||e[37]!==u||e[38]!==o||e[39]!==d||e[40]!==j?(se=()=>{const K=N??u;he("sidebar_new_thread_clicked",{virtual_mcp_id:K}),_();const ue=Zs(m,K,a,o(K));if(ue){j(ue.id,ue.virtual_mcp_id,{newThread:!0});return}const ge=d?null:m.find(Wt=>Wt.id===k)?.branch??null;S(K,ge)},e[31]=N,e[32]=k,e[33]=m,e[34]=_,e[35]=S,e[36]=a,e[37]=u,e[38]=o,e[39]=d,e[40]=j,e[41]=se):se=e[41];const oe=se;let ce;e[42]!==b?(ce=()=>{b()},e[42]=b,e[43]=ce):ce=e[43];const xe=M!=="flat"||C!=="all"||E;let de;e[44]!==B||e[45]!==R||e[46]!==I?(de=B?n.jsx(ya,{open:R,onOpenChange:I}):null,e[44]=B,e[45]=R,e[46]=I,e[47]=de):de=e[47];let Se;return e[48]!==k||e[49]!==te||e[50]!==Y||e[51]!==M||e[52]!==f||e[53]!==h||e[54]!==oe||e[55]!==D||e[56]!==ie||e[57]!==$||e[58]!==F||e[59]!==A||e[60]!==E||e[61]!==ce||e[62]!==xe||e[63]!==de||e[64]!==C||e[65]!==Q?(Se={threads:Q,activeTaskId:k,filters:Y,hasMore:f,isFetchingMore:h,loadMore:ce,groupBy:M,setGroupBy:$,typeFilter:C,setTypeFilter:A,showAll:E,setShowAll:F,filtersActive:xe,selectTask:ie,archiveTask:te,newThread:oe,openSearch:D,searchDialog:de},e[48]=k,e[49]=te,e[50]=Y,e[51]=M,e[52]=f,e[53]=h,e[54]=oe,e[55]=D,e[56]=ie,e[57]=$,e[58]=F,e[59]=A,e[60]=E,e[61]=ce,e[62]=xe,e[63]=de,e[64]=C,e[65]=Q,e[66]=Se):Se=e[66],Se}function Ka(t){return!t.trigger_id}function Va(t){return!!t.trigger_id}function Ua(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function qa(t){return!t.hidden}function Wa(){const t=L.c(59),e=V(),[s,r]=z.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=Ha(i),l=Le()?.activeTask;let c;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(c=l?.title||a.threads.find(R=>R.id===a.activeTaskId)?.title||e("tasksPanel.taskRow.untitledTask"),t[1]=l?.title,t[2]=a.activeTaskId,t[3]=a.threads,t[4]=e,t[5]=c):c=t[5];const u=c;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const d=o;let m;t[8]!==e?(m=e("chat.threadsMenu.chats"),t[8]=e,t[9]=m):m=t[9];const f=s&&"bg-sidebar-accent";let h;t[10]!==f?(h=ee("flex h-[34px] min-w-0 shrink items-center gap-1.5 rounded-lg px-2 text-sm text-foreground transition-colors hover:bg-accent focus-ring",f),t[10]=f,t[11]=h):h=t[11];let b;t[12]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(gs,{size:16,className:"shrink-0"}),t[12]=b):b=t[12];let g;t[13]!==u?(g=n.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=g):g=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Ze,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=v):v=t[15];let x;t[16]!==m||t[17]!==h||t[18]!==g?(x=n.jsx(Fe,{asChild:!0,children:n.jsx($t,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":m,className:h,children:[b,g,v]})})}),t[16]=m,t[17]=h,t[18]=g,t[19]=x):x=t[19];let y;t[20]!==e?(y=e("chat.threadsMenu.chats"),t[20]=e,t[21]=y):y=t[21];let j;t[22]!==y?(j=n.jsx(Re,{side:"bottom",children:y}),t[22]=y,t[23]=j):j=t[23];let S;t[24]!==j||t[25]!==x?(S=n.jsxs(Oe,{children:[x,j]}),t[24]=j,t[25]=x,t[26]=S):S=t[26];let p;t[27]!==a?(p=n.jsx(pa,{panel:a,className:"size-8"}),t[27]=a,t[28]=p):p=t[28];let k;t[29]!==e?(k=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=k):k=t[30];let T;t[31]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(bs,{size:16}),t[31]=T):T=t[31];let N;t[32]!==d||t[33]!==k?(N=n.jsx(Ne,{"aria-label":k,onClick:d,className:"size-8",children:T}),t[32]=d,t[33]=k,t[34]=N):N=t[34];let w;t[35]!==e?(w=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=w):w=t[36];let _;t[37]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(yt,{size:16}),t[37]=_):_=t[37];let P;t[38]!==a.newThread||t[39]!==w?(P=n.jsx(Ne,{"aria-label":w,onClick:a.newThread,className:"size-8",children:_}),t[38]=a.newThread,t[39]=w,t[40]=P):P=t[40];let C;t[41]!==N||t[42]!==P?(C=n.jsxs("div",{className:"flex items-center gap-0.5",children:[N,P]}),t[41]=N,t[42]=P,t[43]=C):C=t[43];let A;t[44]!==p||t[45]!==C?(A=n.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,C]}),t[44]=p,t[45]=C,t[46]=A):A=t[46];let M;t[47]!==a?(M=n.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:n.jsx(Ga,{panel:a})}),t[47]=a,t[48]=M):M=t[48];let $;t[49]!==A||t[50]!==M?($=n.jsxs(Et,{align:"start",side:"bottom",onOpenAutoFocus:Ya,className:"flex w-80 flex-col gap-2 p-2",children:[A,M]}),t[49]=A,t[50]=M,t[51]=$):$=t[51];let E;t[52]!==s||t[53]!==S||t[54]!==$?(E=n.jsxs(Ft,{open:s,onOpenChange:r,children:[S,$]}),t[52]=s,t[53]=S,t[54]=$,t[55]=E):E=t[55];let F;return t[56]!==a.searchDialog||t[57]!==E?(F=n.jsxs(n.Fragment,{children:[E,a.searchDialog]}),t[56]=a.searchDialog,t[57]=E,t[58]=F):F=t[58],F}function Ya(t){return t.preventDefault()}function Za(){const t=L.c(20),e=V(),{threads:s}=Qe(),{createNewTask:r}=Je(),i=Ot(),a=et();let l;t[0]!==a||t[1]!==s?(l=s.find(v=>v.id===a)?.branch??null,t[0]=a,t[1]=s,t[2]=l):l=t[2];const c=l;let u;t[3]!==i||t[4]!==r||t[5]!==c?(u=()=>{r(i,c)},t[3]=i,t[4]=r,t[5]=c,t[6]=u):u=t[6];const o=u;let d;t[7]!==e?(d=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(yt,{size:16}),t[9]=m):m=t[9];let f;t[10]!==o||t[11]!==d?(f=n.jsx(Fe,{asChild:!0,children:n.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"flex shrink-0 items-center rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-ring",children:m})}),t[10]=o,t[11]=d,t[12]=f):f=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let b;t[15]!==h?(b=n.jsx(Re,{side:"bottom",children:h}),t[15]=h,t[16]=b):b=t[16];let g;return t[17]!==f||t[18]!==b?(g=n.jsxs(Oe,{children:[f,b]}),t[17]=f,t[18]=b,t[19]=g):g=t[19],g}function Xa(t){const e=L.c(16),{virtualMcpId:s,taskId:r}=t,{openPanel:i}=Dt();let a;e[0]!==r||e[1]!==s?(a={virtualMcpId:s,taskId:r},e[0]=r,e[1]=s,e[2]=a):a=e[2];const{tabs:l,activeTab:c,mainOpen:u}=zt(a);if(l.length===0)return null;let o;if(e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==s){let m;e[9]!==c||e[10]!==u||e[11]!==i||e[12]!==s?(m=f=>{const h=f.id==="automations"?as({activeTab:c,mainOpen:u}):u&&f.id===c;return n.jsxs(st.Tab,{active:h,onClick:()=>{h||(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:f.id,tab_kind:f.kind,was_active:!1}),i(f.id))},children:[n.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:f.icon})}),f.title]},f.id)},e[9]=c,e[10]=u,e[11]=i,e[12]=s,e[13]=m):m=e[13],o=l.map(m),e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=s,e[8]=o}else o=e[8];let d;return e[14]!==o?(d=n.jsx(st.Tabs,{"data-tour":dn.surfaceTabs,children:o}),e[14]=o,e[15]=d):d=e[15],d}function Qa(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Ke="__mobile-main-panel-tab-select__",Ue="main";function Ja({tabs:t,activeTab:e,mainOpen:s,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return s?i?.title??a:i?.title??t[0]?.title??a}const er={kind:"component",Component:vs},tr={kind:"component",Component:ys},sr={kind:"component",Component:js},nr={kind:"component",Component:Tn};function ar({tabs:t,overlayEnabled:e,t:s}){return[{value:"chat",title:s("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:er},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:Ue,title:s("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:nr}],...e?[{value:"board",title:s("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:tr},{value:"files",title:s("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:sr}]:[]]}function rr(t){const e=L.c(53),{virtualMcpId:s,taskId:r}=t,i=V(),a=Me(),{openPanel:l}=Dt();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[0]=c):c=e[0];const u=je(c);let o;e[1]!==r||e[2]!==s?(o={virtualMcpId:s,taskId:r},e[1]=r,e[2]=s,e[3]=o):o=e[3];const{tabs:d,activeTab:m,mainOpen:f}=zt(o),{org:h}=ae(),b=Is();let g;e[4]!==h.id?(g=nt(h.id),e[4]=h.id,e[5]=g):g=e[5];const v=s===g;let x,y,j,S,p,k,T,N,w,_;if(e[6]!==m||e[7]!==f||e[8]!==a||e[9]!==v||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==b||e[15]!==i||e[16]!==d||e[17]!==s){S=Symbol.for("react.early_return_sentinel");e:{const A=ar({tabs:d,overlayEnabled:!!(u.org&&u.taskId),t:i}),M=f?A.find(D=>D.value===m)?.value??Ue:"chat",$=A.find(D=>D.value===M),E=$?.title??Ja({tabs:d,activeTab:m,mainOpen:f,t:i});let F;e[28]!==a?(F=D=>{a({to:".",search:U=>({...U,...nn(D)}),replace:!0})},e[28]=a,e[29]=F):F=e[29];const R=F;let I;e[30]!==v||e[31]!==l||e[32]!==h.id||e[33]!==b||e[34]!==R||e[35]!==s?(I=D=>{if(D!==Ke){if(he("main_panel_tab_clicked",{virtual_mcp_id:s,tab_id:D,source:"mobile_select"}),un({reportsOnly:b,onReportAgent:v,tabId:D})){l(D,{virtualmcpid:nt(h.id),search:or});return}if(D==="chat"||D===Ue){R(D==="chat"?"chat":"main");return}l(D,{search:lr})}},e[30]=v,e[31]=l,e[32]=h.id,e[33]=b,e[34]=R,e[35]=s,e[36]=I):I=e[36];const B=I,O=A.find(D=>D.value!==M);if(A.length===2&&O){S=n.jsxs("button",{type:"button",onClick:()=>B(O.value),"aria-label":i("mainPanelTabs.mobileMainPanelTabSelect.switchTo",{name:O.title}),className:"flex h-10 min-w-0 max-w-[7.5rem] items-center gap-1.5 rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent focus-ring",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:O.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:O.title})]});break e}y=_n,w=Ke,_=B;let H;e[37]!==i?(H=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=H):H=e[38],j=n.jsx(Nn,{"aria-label":H,className:"h-10! w-full min-w-0 max-w-[7.5rem] rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--shadow-edge:none]",children:n.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[$&&n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:$.icon,className:"size-5"})}),n.jsx("span",{className:"min-w-0 truncate",children:E})]})}),x=wn,p="end",k="w-56",e[39]!==E?(T=n.jsx(Gt,{value:Ke,disabled:!0,hideCheck:!0,className:"hidden",children:E}),e[39]=E,e[40]=T):T=e[40],N=A.map(ir)}e[6]=m,e[7]=f,e[8]=a,e[9]=v,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=b,e[15]=i,e[16]=d,e[17]=s,e[18]=x,e[19]=y,e[20]=j,e[21]=S,e[22]=p,e[23]=k,e[24]=T,e[25]=N,e[26]=w,e[27]=_}else x=e[18],y=e[19],j=e[20],S=e[21],p=e[22],k=e[23],T=e[24],N=e[25],w=e[26],_=e[27];if(S!==Symbol.for("react.early_return_sentinel"))return S;let P;e[41]!==x||e[42]!==p||e[43]!==k||e[44]!==T||e[45]!==N?(P=n.jsxs(x,{align:p,className:k,children:[T,N]}),e[41]=x,e[42]=p,e[43]=k,e[44]=T,e[45]=N,e[46]=P):P=e[46];let C;return e[47]!==y||e[48]!==j||e[49]!==P||e[50]!==w||e[51]!==_?(C=n.jsxs(y,{value:w,onValueChange:_,children:[j,P]}),e[47]=y,e[48]=j,e[49]=P,e[50]=w,e[51]=_,e[52]=C):C=e[52],C}function ir(t){return n.jsx(Gt,{value:t.value,children:n.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[n.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:n.jsx(_e,{icon:t.icon})}),n.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function lr(t){return{...t,sidepanel:!1}}function or(t){return{...t,thread:void 0,sidepanel:!1}}function cr(){const t=L.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:dr},t[0]=e):e=t[0];const s=bt(e);if(!s)return!1;let r;return t[1]!==s?(r=s==="app"||Pn.includes(s),t[1]=s,t[2]=r):r=t[2],r}function dr(t){const{staticData:e}=t.matches.findLast(ur)??{};return e?.siteEditorView?"site-editor":e?.mainView}function ur(t){return t.staticData.mainView}function fr(t,e,s){const r=L.c(33),i=Xe(),{locator:a}=ae(),l=z.useSyncExternalStore(i.threads.subscribe,i.threads.get),c=z.useSyncExternalStore(i.threadsStatus.subscribe,i.threadsStatus.get);let u;r[0]!==t||r[1]!==l?(u=t===null?null:l.find(p=>p.id===t&&!p.partial)??null,r[0]=t,r[1]=l,r[2]=u):u=r[2];const o=u,[d,m]=z.useState(void 0),[f,h]=z.useState(t);f!==t&&(h(t),m(void 0));let b,g;r[3]!==d||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==c.kind?(b=()=>{t!==null&&(o||c.kind!=="loading"&&d===void 0&&(m("pending"),i.fetchThreadIntoSlot(t).then(p=>{m(p)})))},g=[t,o,c.kind,d,i],r[3]=d,r[4]=t,r[5]=o,r[6]=i,r[7]=c.kind,r[8]=b,r[9]=g):(b=r[8],g=r[9]),z.useEffect(b,g);let v;r[10]!==s||r[11]!==a||r[12]!==i||r[13]!==e?(v={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...s?{branch:s}:{},...Ys(sessionStorage,a,p)})},r[10]=s,r[11]=a,r[12]=i,r[13]=e,r[14]=v):v=r[14];const x=rs(v);let y,j;if(r[15]!==x||r[16]!==d||r[17]!==t||r[18]!==o||r[19]!==c.kind?(y=()=>{t!==null&&(o||d===null&&c.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},j=[t,o,d,c.kind,x],r[15]=x,r[16]=d,r[17]=t,r[18]=o,r[19]=c.kind,r[20]=y,r[21]=j):(y=r[20],j=r[21]),z.useEffect(y,j),t===null){let p;return r[22]===Symbol.for("react.memo_cache_sentinel")?(p={status:"ready",task:null},r[22]=p):p=r[22],p}if(o){let p;return r[23]!==o?(p={status:"ready",task:o},r[23]=o,r[24]=p):p=r[24],p}if(d&&typeof d=="object"){let p;return r[25]!==d?(p={status:"ready",task:d},r[25]=d,r[26]=p):p=r[26],p}if(x.data){let p;return r[27]!==x.data?(p={status:"ready",task:x.data},r[27]=x.data,r[28]=p):p=r[28],p}if(x.isError){let p;return r[29]!==x.error?(p={status:"error",error:x.error},r[29]=x.error,r[30]=p):p=r[30],p}if(x.isPending||c.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let S;return r[32]===Symbol.for("react.memo_cache_sentinel")?(S={status:"loading"},r[32]=S):S=r[32],S}const mr=50;function hr(t,e){const s=L.c(15),{org:r}=ae(),i=Ce(),{data:a}=pe.useSession(),l=a?.user?.id??"";let c;s[0]!==r.id||s[1]!==l||s[2]!==t?(c=fe.agentEntryThreads(r.id,l,t),s[0]=r.id,s[1]=l,s[2]=t,s[3]=c):c=s[3];const u=e&&!!l;let o;s[4]!==i||s[5]!==t?(o=async()=>{try{return(await i.call("COLLECTION_THREADS_LIST",{limit:mr,offset:0,orderBy:[{field:["updated_at"],direction:"desc"}],where:{hidden:!1,created_by:"me",virtual_mcp_id:t}})).items}catch{return[]}},s[4]=i,s[5]=t,s[6]=o):o=s[6];let d;s[7]!==c||s[8]!==u||s[9]!==o?(d={queryKey:c,enabled:u,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,queryFn:o},s[7]=c,s[8]=u,s[9]=o,s[10]=d):d=s[10];const m=me(d);if(!e||!l){let h;return s[11]===Symbol.for("react.memo_cache_sentinel")?(h={status:"idle"},s[11]=h):h=s[11],h}if(!m.data||m.isFetching){let h;return s[12]===Symbol.for("react.memo_cache_sentinel")?(h={status:"loading"},s[12]=h):h=s[12],h}let f;return s[13]!==m.data?(f={status:"ready",threads:m.data},s[13]=m.data,s[14]=f):f=s[14],f}function pr(t){const e=L.c(13),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=je(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Ae(a);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={select:xr},e[2]=c):c=e[2];const u=bt(c),{org:o}=ae();let d;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(d=i.org?is({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:ye(o.id).id,search:l}):null,e[3]=o,e[4]=i.agentId,e[5]=i.legacyView,e[6]=i.org,e[7]=u,e[8]=l,e[9]=d):d=e[9];const m=d;let f;return e[10]!==s||e[11]!==m?(f=m?n.jsx(tt,{target:m}):s,e[10]=s,e[11]=m,e[12]=f):f=e[12],f}function xr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function gr(){const t=L.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Ae(r),{org:a}=ae(),{org:l,taskId:c}=s;if(!l||c===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==c?(u=ls({org:l,taskId:c,fallbackAgentId:ye(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=c,t[6]=u):u=t[6],u}function br(){const t=L.c(2),e=gr();let s;return t[0]!==e?(s=e?n.jsx(tt,{target:e}):null,t[0]=e,t[1]=s):s=t[1],s}function vr(){const t=L.c(6),e=Mn(),s=Me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Ae(r);if(!e||!i)return null;let a;t[1]!==s?(a=()=>s({to:".",search:yr}),t[1]=s,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=n.jsx(An,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function yr(t){const{preview:e,...s}=t;return s}function jr(t){const e=L.c(11),{children:s}=t,r=V();let i;e[0]!==r?(i=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==i?(a=n.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=a):a=e[3];let l;e[4]!==s?(l=s??n.jsx(fa,{}),e[4]=s,e[5]=l):l=e[5];let c;e[6]!==l?(c=n.jsx(Ie,{children:l}),e[6]=l,e[7]=c):c=e[7];let u;return e[8]!==a||e[9]!==c?(u=n.jsx(xt,{fallback:a,children:c}),e[8]=a,e[9]=c,e[10]=u):u=e[10],u}function Sr(t){const e=L.c(6),{threadId:s,providerKey:r,children:i}=t;let a;e[0]!==r||e[1]!==s?(a=s===null?n.jsx(q.ThreadlessStreamSource,{},r):n.jsx(q.ActiveTaskStreamSource,{taskId:s},r),e[0]=r,e[1]=s,e[2]=a):a=e[2];let l;return e[3]!==i||e[4]!==a?(l=n.jsx(q.StreamHost,{source:a,children:i}),e[3]=i,e[4]=a,e[5]=l):l=e[5],l}function kr(t){const e=L.c(3),{onNewTaskRef:s,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==s?(i=()=>(s.current=r,()=>{s.current=null}),e[0]=r,e[1]=s,e[2]=i):i=e[2],z.useLayoutEffect(i),null}function Tr({virtualMcpId:t,hasActiveRepository:e,sandboxMap:s,children:r}){const i=V(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:c,isThreadLocked:u}=$e(),{data:o}=pe.useSession(),d=o?.user?.id,m=!ws(l?.harness_id),f=Qs({agentSandboxMap:s,threadSandboxMap:l?.metadata?.sandboxMap,userId:d,ownerId:l?.created_by,branch:a}),h=e||Gs(l?.metadata),b=z.useRef(null),g=m&&Js({threadLoaded:!!l,isOwner:!!d&&l?.created_by===d,hasActiveRepository:h,branch:a??null,attempted:b.current===(l?.id??null)});z.useEffect(()=>{!g||!l||(b.current=l.id,c(Pt(o?.user?.name||o?.user?.email?.split("@")[0])))},[g,l,o,c]);const v=St(t),x=v.resolved?v.runtime:null,y=Ee(t),j=At(y,a),{releases:S,createRelease:p,markSandbox:k}=Hs(t),T=Ks(t,it(y)),N=it(y)&&a?Vs(a,T.data):!1,w=!!d&&l?.created_by===d,_=!!x&&w&&!!a&&a!==j&&!S.some(B=>B.branch===a)&&!T.isLoading&&N!==!0,P=z.useRef(null);z.useEffect(()=>{!_||!a||!x||P.current!==a&&(P.current=a,p({branch:a,name:qs(S,i("thread.branchPicker.defaultVersionName")),color:Us(S.length),createdBy:d,createdAt:new Date().toISOString(),runtime:x}).catch(()=>{}))},[_,a,x,S,p,d,i]);const C=x==="sandbox"&&u&&w&&S.some(B=>B.branch===a&&B.runtime!=="sandbox"),[A,M]=z.useState(null);if(C&&a&&A!==a){M(a);const B=a;queueMicrotask(()=>{k(B).catch(()=>{})})}const $=en(t,a??void 0),F=(d&&a?$n(f?.[d]?.[a]):{})["agent-sandbox"]??null,R=F?.previewUrl??null,I=m&&x!=="cms"&&(!!F||$);return m?x==="cms"?n.jsx(ot,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r}):n.jsx(Cn,{resetKey:l?.id??"no-thread",virtualMcpId:t,branch:a??null,previewUrl:R,enabled:I,children:n.jsx(tn,{resetKey:l?.id??"no-thread",executionEnabled:m,virtualMcpId:t,branch:a??null,userId:d??null,hasActiveRepository:h,vmEntry:F,threadId:l?.id??null,children:n.jsx(ot,{resetKey:`${t}:${a??"no-branch"}:${l?.id??""}`,children:r})})}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background shadow-edge",children:n.jsx(Lt,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function Nr(){const t=L.c(19),e=V(),{toggleSidebar:s}=ks(),r=Ts(),{virtualMcpId:i,taskId:a}=$e(),l=!r&&"md:hidden";let c;t[0]!==l?(c=ee(l),t[0]=l,t[1]=c):c=t[1];let u;t[2]!==e?(u=e("layouts.shellControls.toggleSidebar"),t[2]=e,t[3]=u):u=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ss,{size:16}),t[4]=o):o=t[4];let d;t[5]!==c||t[6]!==u||t[7]!==s?(d=n.jsx(Ne,{className:c,onClick:s,"aria-label":u,children:o}),t[5]=c,t[6]=u,t[7]=s,t[8]=d):d=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(Wa,{}),t[9]=m):m=t[9];let f;t[10]!==d?(f=n.jsxs(De.Topbar.Left,{children:[d,m]}),t[10]=d,t[11]=f):f=t[11];let h;t[12]!==a||t[13]!==i?(h=n.jsx("div",{className:"min-w-0 md:hidden",children:n.jsx(rr,{virtualMcpId:i,taskId:a})}),t[12]=a,t[13]=i,t[14]=h):h=t[14];let b;t[15]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(De.Topbar.Right,{className:"shrink-0",children:n.jsx(Za,{})}),t[15]=b):b=t[15];let g;return t[16]!==f||t[17]!==h?(g=n.jsxs(De.Topbar,{className:"border-b border-border/60 px-3",children:[f,h,b]}),t[16]=f,t[17]=h,t[18]=g):g=t[18],g}function _r(t){const e=L.c(25),{layout:s,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=$e(),c=kn()??"overview",u=cr(),[o,d]=z.useState(null),m=o===c,f=u?m:s.threadOpen;let h;e[0]!==c||e[1]!==s||e[2]!==u||e[3]!==m?(h=u?()=>d(m?null:c):s.toggleThread,e[0]=c,e[1]=s,e[2]=u,e[3]=m,e[4]=h):h=e[4];const b=h;let g;e[5]!==i||e[6]!==r?(g=n.jsx(kr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=g):g=e[7];let v;e[8]!==l||e[9]!==a?(v=n.jsx(Xa,{virtualMcpId:a,taskId:l}),e[8]=l,e[9]=a,e[10]=v):v=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Nr,{}),e[11]=x):x=e[11];const y=l??"threadless";let j;e[12]!==y?(j=n.jsx(lt.Thread,{topbar:x,children:n.jsx(jr,{},y)}),e[12]=y,e[13]=j):j=e[13];let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(vt,{}),e[14]=S):S=e[14];let p;e[15]!==c||e[16]!==s||e[17]!==v||e[18]!==j||e[19]!==f||e[20]!==b?(p=n.jsxs(lt,{...s,threadOpen:f,toggleThread:b,contentKey:c,contentNavigation:v,children:[j,S]}),e[15]=c,e[16]=s,e[17]=v,e[18]=j,e[19]=f,e[20]=b,e[21]=p):p=e[21];let k;return e[22]!==g||e[23]!==p?(k=n.jsxs(n.Fragment,{children:[g,p]}),e[22]=g,e[23]=p,e[24]=k):k=e[24],k}function wr(){const t=V(),e=Me(),s=mn(),{create:r}=Mt(),{org:i}=ae(),l=je({strict:!1}).org??"",c=Ae({strict:!1}),u=et(),o=Ot(),d=Rt(),[m]=z.useState(()=>crypto.randomUUID()),{data:f}=pe.useSession(),[h]=z.useState(()=>Pt(f?.user?.name||f?.user?.email?.split("@")[0])),b=Xe(),g=z.useSyncExternalStore(b.threads.subscribe,b.threads.get),v=z.useSyncExternalStore(b.threadsStatus.subscribe,b.threadsStatus.get),x=Ee(o),y=!!(x&&wt(x)),j=At(x,null),[S,p]=z.useState(null);u!==null&&S!==null&&p(null);const k=u===null&&!!d&&!!x&&S!==o,T=B=>Xs(B,o,f?.user?.id,It(x?.metadata),y,{baseBranch:j,releases:x?.metadata?.releases??void 0}),N=k&&v.kind!=="loading"?T(g):void 0,w=hr(o,k&&v.kind!=="loading"&&!N),_=fr(u,o,h);ma(_.status==="ready"?_.task:null);const P=x?.metadata?.ui?.layout??null,C=P?{defaultMainView:P.defaultMainView??null,chatDefaultOpen:P.chatDefaultOpen??null}:null,A=an(C),{threadId:M,providerKey:$}=Qa({routeThreadId:u,fallbackKey:m}),E=async()=>{const B=crypto.randomUUID(),O=g.find(H=>H.id===M)?.branch??null;try{await r({id:B,virtual_mcp_id:o,...O?{branch:O}:{}})}catch{}s(B,()=>({}))},F=z.useRef(null);z.useEffect(()=>{const B=O=>{us(O)&&O.shiftKey&&O.code==="KeyS"&&!O.repeat&&(O.preventDefault(),F.current?.())};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[]);const R=_.status==="ready"?_.task:null,I=R?.virtual_mcp_id;if(R&&I&&!hn({routeAgentId:o,threadAgentId:I})){const B=os({org:l,agentId:I,superAgentId:ye(i.id).id});return n.jsx(tt,{target:{route:B,search:{thread:R.id,sidepanel:c.sidepanel,mainpanel:c.mainpanel,autosend:c.autosend}}})}if(k){if(v.kind==="loading"||w.status==="loading")return n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex h-full bg-background shadow-edge rounded-[0.75rem]",children:n.jsx(cs,{})})});const O=(N??(w.status==="ready"?T(w.threads):void 0))?.id??(y?m:null);if(O)return n.jsx(ds,{to:".",replace:!0,search:H=>({...H,thread:O})});p(o)}return _.status==="creating"||_.status==="loading"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background shadow-edge rounded-[0.75rem] text-sm text-muted-foreground",children:[n.jsx(Pe,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):_.status==="error"?n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background shadow-edge rounded-[0.75rem] p-8 text-sm",children:[n.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),n.jsx("div",{className:"text-muted-foreground",children:_.error.message})]})}):x?n.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:n.jsx(q.Provider,{virtualMcpId:o,task:_.status==="ready"?_.task:null,children:n.jsx(zs,{layout:A,children:n.jsx(Tr,{virtualMcpId:o,hasActiveRepository:y,sandboxMap:x.metadata?.sandboxMap,children:n.jsx(Sr,{threadId:M,providerKey:$,children:n.jsx(Ie,{children:n.jsx(_r,{layout:A,onNewTaskRef:F,createNewTask:E})})})})})},o)}):n.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:n.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden shadow-edge rounded-[0.75rem]",children:n.jsx(Lt,{image:n.jsx(We,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:n.jsx(qe,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function ko(){const t=L.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const s=je(e);if(s.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(br,{}),t[1]=i):i=t[1],i}if(s._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(vt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ie,{children:n.jsx(pr,{children:n.jsx(In,{children:n.jsxs(Ln,{children:[n.jsx(wr,{}),n.jsx(vr,{})]})})})}),t[3]=r):r=t[3],r}export{ko as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,j as a,cp as j,h as I,cq as S,cr as g}from"./index-B0M6fld0.js";import{i as v}from"./SearchMd-D2GFNI7a.js";function y(x){const e=f.c(14),{value:o,onChange:l,placeholder:h,onKeyDown:c,className:i,isSearching:p,disabled:u}=x,m=h===void 0?"Search...":h;let s;e[0]!==p?(s=a.jsx(j,{className:"pr-0",children:p?a.jsx(I,{className:"size-4"}):a.jsx(v,{})}),e[0]=p,e[1]=s):s=e[1];let t;e[2]!==l?(t=d=>l(d.target.value),e[2]=l,e[3]=t):t=e[3];let n;e[4]!==u||e[5]!==c||e[6]!==m||e[7]!==t||e[8]!==o?(n=a.jsx(S,{type:"text",value:o,onChange:t,onKeyDown:c,placeholder:m,disabled:u}),e[4]=u,e[5]=c,e[6]=m,e[7]=t,e[8]=o,e[9]=n):n=e[9];let r;return e[10]!==i||e[11]!==s||e[12]!==n?(r=a.jsxs(g,{size:"sm",className:i,children:[s,n]}),e[10]=i,e[11]=s,e[12]=n,e[13]=r):r=e[13],r}export{y as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i3 as Xo,bf as ei,c as wn,b as Rn,r as b,m as ie,j as r,bQ as ti,b8 as As,i4 as Ba,B as It,Y as an,au as ni,_ as si,be as ri,Z as ai,q as oi,hB as ii,i5 as li,i6 as ci,h as ui,bg as wt,i7 as Jr,i8 as ys,i9 as di,ia as pt,ib as Yr,ic as fi,bt as mi,id as pi,ie as Qr,ig as hi,t as W,bZ as Zr,ih as gi,ii as Bt,ij as vi,ik as yi,il as Si,bY as Xr,im as Ss,io as bi,ip as xi,iq as _i,bW as ki,bu as wi,ir as Ri,is as ji,bT as Ei,K as Vi,it as ea,fe as Ti,bm as $n,br as ta,iu as na,iv as Ai,iw as Ni,ix as Ci,iy as bs,iz as Pi,iA as Bi,iB as Ki,iC as sa,iD as Di,iE as Mi,bR as ra,iF as Fi,iG as Ii,iH as Li,bV as Oi}from"./index-B0M6fld0.js";import{u as zi}from"./chat-context-DyGpAf46.js";import{a5 as $i,O as Qn,a6 as Hi,a7 as Wi,a8 as qi,a9 as Gi,aa as Ui,ab as Ji,ac as aa,ad as Yi,ae as Qi,A as Gn,y as Un,d as Zi,u as Xi,af as oa,i as el,ag as tl,k as nl,h as sl,ah as Ka,p as kn,ai as rl,aj as al,w as ia,ak as ol,al as il,am as Hn,an as la,ao as ca,ap as ua,aq as xs,ar as ll,F as cl,as as ul,z as dl,at as da,au as fl,av as fa,aw as ma,ax as pa,M as ml,ay as ha,a as pl,az as on,aA as hl,aB as gl,v as Wn,a4 as xn}from"./parse-sections-D19DrjFN.js";import{b as vl}from"./repository-binding-D5Bfxppj.js";import{n as yl,t as Sl}from"./ChevronUp-D0xD4CWi.js";import{a7 as Da,b as Yn,am as bl,e as xl,F as _l,a1 as ga,Y as va}from"./agent-icon-2MzErGc_.js";import{S as ln}from"./scroll-area-CYr4aRZr.js";import{c as Rt,T as jt,a as Et}from"./tooltip-DUgZeaAs.js";import{l as kl,u as wl,m as Rl,U as jl,ai as El,S as Vl,F as ya,aX as Sa,as as Kt,at as Dt,a4 as Tl,aY as Al,aZ as Nl,aT as ba,a7 as Cl,ae as Pl}from"./site-editor-toast-BkfBkyel.js";import{u as Bl,ao as xa,e as _a,j as Kl,D as Dl,A as qn,a3 as Ml,ae as Fl,ag as Il}from"./blocks-tab-states-WlRP2osS.js";import{m as Ll,u as Ol,P as zl}from"./mustache-CfZeeK0-.js";import{a as Rs,e as Ma}from"./UserSquare-CPjVW48L.js";import{i as ka,s as wa}from"./Tool01-CMaWHp8E.js";import{s as $l}from"./Plus-DD-WVS1P.js";import{s as Hl}from"./Trash01-CrG-kC_D.js";import{i as js}from"./Zap-B1DyovfK.js";import{u as Wl,a as Ra,K as ql,P as Gl,b as Ul,C as Jl,D as Yl,c as Ql}from"./core.esm-rLLWAwJX.js";import{u as Zl,s as Xl,a as Jn,S as ec,v as tc}from"./sortable.esm-BmFrP3rv.js";import{s as nc,g as sc,u as rc,A as ac}from"./use-section-preview-base-CVV-8YE0.js";import{u as oc,a as ic,P as ja,w as lc,b as cc}from"./seo-editor-D7qUpqtC.js";import{R as uc,y as _s,T as Ea,x as dc,U as fc}from"./hosted-reconcile-DlXpLWPa.js";import{u as mc}from"./use-apply-named-rule-CoAQZSng.js";import{m as Jt,d as Es,y as Vs,n as Ft,e as cn,q as pc,k as Ut,r as ks,j as Mt,h as _n,b as hc,s as Va,z as gc,A as vc,B as yc}from"./section-array-field-DZEuNEZT.js";import{b as Ta,a as Sc}from"./variant-matcher-override-CzeUMJ70.js";import"./autosend-C5Y0g7p2.js";import"./thread-route-CidpLna8.js";import"./use-project-scope-BLJIcw6l.js";import"./thread-intent-B-lUepd6.js";import"./use-mcp-client-C8sFqQYs.js";import"./auth-Zsy5lyIS.js";import"./delay-CnY5UFtP.js";import"./watch-sse-pool-CwQVaju9.js";import"./task-board-r7mBQBfA.js";import"./schema-DDAhL9Cr.js";import"./use-entitlements-n2MsZM9p.js";import"./use-ai-providers-CegsSqNf.js";import"./use-decopilot-events-CVaB2Rhy.js";import"./use-organization-settings-DgPYo7py.js";import"./utils-DwY9C3Mj.js";import"./Play-mj0Zbxy1.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./pair-CYQ33Koe.js";import"./LinkBroken01-BkclpWPr.js";import"./collapsible-f_iRDMCl.js";import"./use-copy-jRaPRTwC.js";import"./usage-stats-Db2409wH.js";import"./tool-namespace-BMJphfly.js";import"./form-DlOI0nvB.js";import"./label-C2-_lSSQ.js";import"./utils-CVEq3hMx.js";import"./markdown-CBPGMAeL.js";import"./use-mobile-JxzmRS3O.js";import"./shell-layout-B_Je98M9.js";import"./Globe04-DFwi3CoQ.js";import"./use-deployment-admin-CoSxtFqU.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-BBI2UlVL.js";import"./CheckCircle-l0BgBdex.js";import"./Monitor01-pdAw5Hpb.js";import"./command-BNUAVYAm.js";import"./index-woHs2Bei.js";import"./SearchMd-D2GFNI7a.js";import"./integration-icon-CbGo7Hoi.js";import"./project-icon-BFEgPANo.js";import"./use-navigate-to-agent-BPUG-DwT.js";import"./use-debounced-value-Df5Y0bKp.js";import"./new-project-dialog-xaa497EH.js";import"./ArrowLeft-Clex4DU3.js";import"./repository-picker-BG4RNPTd.js";import"./github-icon-Fl1CK57w.js";import"./useInfiniteQuery-CrPhADUx.js";import"./infiniteQueryObserver-CQdhIsL1.js";import"./collection-search-EpeR-DRK.js";import"./ShoppingBag01-BQMf6OTu.js";import"./required-auth-layout-BDLyo6_T.js";import"./use-org-sso-CxdxMmbI.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Ct_65kSq.js";import"./types-D5f5_4KC.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./AlertCircle-Cn7aLqGD.js";import"./sheet-C5Vpqn4B.js";import"./use-connection-BLq1Zghk.js";import"./use-mcp-prompts-KGxEzqRw.js";import"./use-thread-outputs-BOXdgR_A.js";import"./file-type-icon-DKzfESDS.js";import"./switch-NBzUnGw4.js";import"./textarea-8xMov02r.js";import"./ChevronSelectorVertical-BbXlLdNT.js";import"./popover-CQC-Pea_.js";import"./monaco-editor-CpFV1RfN.js";import"./editor-D2cdCxzq.js";import"./calendar-BK-qPKHr.js";import"./SwitchHorizontal01-amrllZXH.js";import"./Minus-D2H1757g.js";import"./select-taudESnf.js";import"./index-BdQq_4o_.js";import"./index-BjDHxKQ1.js";import"./editor-classes-fUC3onT7.js";import"./toggle-group-GmYScomU.js";import"./active-indicator-CCMhAsc_.js";import"./combobox-B18VgXI1.js";import"./Upload01-CyQARd6T.js";import"./search-input-CEHMJvIu.js";import"./tabs-B9Fkm8UP.js";import"./use-file-configs-BvpMQAvp.js";import"./asset-utils-CksrawxC.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-voice-input-CQSYzFMw.js";import"./drawer-Cn25WPda.js";import"./index-CZHAvvQX.js";import"./checkbox-HvlgUNAP.js";import"./Key01-q3498IuC.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./sandbox-git-api-DcqI6XE4.js";import"./sandbox-url-D3mC8qhT.js";import"./ArrowUp-DPT2wlR7.js";import"./CreditCard01-CAgfpVLC.js";import"./Sun-BWeGTNdA.js";import"./Users01-BPY3vewQ.js";import"./use-blocks-v8-project-390kM-ss.js";import"./use-sandbox-events-CPma0JnN.js";import"./empty-state-BBHWcru0.js";import"./slider-Va2dwWaV.js";import"./index-B9BVHbVj.js";import"./tooltipContext-DhhamGUz.js";import"./CategoricalChart-Djc5Q1Zp.js";import"./index-D13d0Rz8.js";import"./use-move-blocks-B66Z69SN.js";const bc={escape:$i};function xc(v,e){for(const p of nc(v,e)){const S=typeof p.title=="string"?p.title:void 0;if(S?.includes("{{"))return S}}function _c(v,e){if(!e)return;const p=Xo(v,ei(e));if(p)try{const S=xc(p.resolveType,e);return S&&Ll.render(S,p.data,{},bc).trim()||void 0}catch{return}}function kc(v){const e=wn.c(13),{icon:p,label:S,className:x}=v;let V;e[0]!==x?(V=ie("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 wc="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 Aa(v){return Array.from({length:v},(e,p)=>({id:crypto.randomUUID(),index:p}))}function Fa(v){return v.map((e,p)=>({...e,index:p}))}function Rc(v,e){if(e===v.length)return v;if(e<v.length)return Fa(v.slice(0,e));const p=Array.from({length:e-v.length},(S,x)=>({id:crypto.randomUUID(),index:v.length+x}));return[...v,...p]}function Ia(v){const e=wn.c(44),{section:p,raw:S,meta:x,decofile:V}=v,C=Rn(),_=Qn(),P=p.isSavedBlock===!0,k=p.isMultivariate===!0;let Z;e[0]!==x||e[1]!==S?(Z=S&&x?sc(S,x):void 0,e[0]=x,e[1]=S,e[2]=Z):Z=e[2];const ge=Z;let Ue;e[3]!==x||e[4]!==k||e[5]!==S||e[6]!==P?(Ue=S&&x&&!P&&!k?_c(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=Ji(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&&As(S?.__resolveType??""),e[13]=k,e[14]=S?.__resolveType,e[15]=w):w=e[15];const c=w,xe=P?Yn:k?Da:Ma;let G;e[16]!==k||e[17]!==P?(G=P?{color:ri}: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 I;e[19]!==xe||e[20]!==_?(I=_?r.jsxs("span",{className:"relative size-4 shrink-0",children:[r.jsx(xe,{className:"absolute inset-0 size-4 text-muted-foreground transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"}),r.jsx(Qi,{"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(bl,{className:"h-4 w-4 shrink-0 text-muted-foreground/40"}),e[19]=xe,e[20]=_,e[21]=I):I=e[21];let ke;e[22]!==ge?(ke=ge&&r.jsx("img",{src:ge,alt:"",referrerPolicy:"no-referrer",className:"h-12 max-w-[100px] shrink-0 rounded-[var(--studio-control-radius,var(--radius))] object-cover"}),e[22]=ge,e[23]=ke):ke=e[23];let d;e[24]!==_||e[25]!==_e?(d=!_&&r.jsx(Rs,{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=ie("min-w-0 truncate text-sm font-medium",Oe,u),e[27]=u,e[28]=Oe,e[29]=Ee):Ee=e[29];const X=Le??p.label;let ze;e[30]!==Ee||e[31]!==X?(ze=r.jsx("span",{className:Ee,children:X}),e[30]=Ee,e[31]=X,e[32]=ze):ze=e[32];let nt;e[33]!==c||e[34]!==_||e[35]!==Je||e[36]!==C?(nt=_?r.jsxs(r.Fragment,{children:[c&&r.jsx(kc,{icon:js,label:C("sectionsEditor.sectionList.asyncBadge"),className:"text-muted-foreground"}),Je&&r.jsx(aa,{}),r.jsx("span",{className:"min-w-0 flex-1"})]}):Je&&r.jsx(aa,{className:"absolute -right-0.5 -top-0.5"}),e[33]=c,e[34]=_,e[35]=Je,e[36]=C,e[37]=nt):nt=e[37];let Pe;return e[38]!==ze||e[39]!==nt||e[40]!==I||e[41]!==ke||e[42]!==d?(Pe=r.jsxs(r.Fragment,{children:[I,ke,d,ze,nt]}),e[38]=ze,e[39]=nt,e[40]=I,e[41]=ke,e[42]=d,e[43]=Pe):Pe=e[43],Pe}const jc="text-global-section-fg hover:bg-global-section/12 dark:text-global-section-fg-dark dark:hover:bg-global-section/15",Ec="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 La(v,e,p){if(p)return Yi({selected:e});const S=v.isSavedBlock===!0,x=v.isMultivariate===!0;return ie("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?jc:x?Ec:"text-foreground/80 hover:bg-accent hover:text-accent-foreground")}function ws(v,e){return ie("h-7 shrink-0 overflow-hidden",e?"w-7 ml-0 opacity-100 [transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]":v?"w-7 ml-0 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:opacity-100 group-has-[:focus-visible]:opacity-100":"w-0 -ml-2 opacity-0 [transition:opacity_150ms_ease-out,width_0ms_150ms,margin-left_0ms_150ms] group-hover:ml-0 group-hover:w-7 group-hover:opacity-100 group-hover:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms] group-has-[:focus-visible]:ml-0 group-has-[:focus-visible]:w-7 group-has-[:focus-visible]:opacity-100 group-has-[:focus-visible]:[transition:opacity_150ms_ease-out,width_0ms,margin-left_0ms]")}function Vc(v){const e=wn.c(90),{section:p,raw:S,meta:x,decofile:V,sortableId:C,selected:_,onSelect:P,onDelete:k,onDuplicate:Z,onMakeReusable:ge,onToggleHidden:Ue,onToggleLazy:Le,onAddVariant:Ce,onDetach:Je}=v,w=Rn(),c=Qn(),xe=S?As(S.__resolveType??""):!1,G=p.isHidden===!0,_e=xe||G;let I;e[0]!==p?(I=Ba(p),e[0]=p,e[1]=I):I=e[1];const ke=I,d=!!Le&&!p.isMultivariate;let Oe;e[2]!==C?(Oe={id:C,animateLayoutChanges:Nc},e[2]=C,e[3]=Oe):Oe=e[3];const{attributes:u,listeners:Ee,setNodeRef:X,transform:ze,isDragging:nt}=Zl(Oe);let Pe;e[4]!==ze?(Pe=Jl.Transform.toString(ze?{...ze,x:0}:null),e[4]=ze,e[5]=Pe):Pe=e[5];const st=nt?0:void 0;let ue;e[6]!==Pe||e[7]!==st?(ue={transform:Pe,opacity:st},e[6]=Pe,e[7]=st,e[8]=ue):ue=e[8];const g=ue;let we;e[9]!==p?(we=Wi(p),e[9]=p,e[10]=we):we=e[10];const rt=we,at="button",m=0;let L;e[11]!==P?(L=F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),P())},e[11]=P,e[12]=L):L=e[12];const Xe=nt?"cursor-grabbing":"cursor-pointer";let A;e[13]!==c||e[14]!==p||e[15]!==_||e[16]!==Xe?(A=ie("touch-none transition-colors",Xe,La(p,_,c)),e[13]=c,e[14]=p,e[15]=_,e[16]=Xe,e[17]=A):A=e[17];let Ye;e[18]!==V||e[19]!==x||e[20]!==S||e[21]!==p?(Ye=r.jsx(Ia,{section:p,raw:S,meta:x,decofile:V}),e[18]=V,e[19]=x,e[20]=S,e[21]=p,e[22]=Ye):Ye=e[22];const H=!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:ie(ws(_e,xe)),onClick:F=>{F.stopPropagation(),Le?.()},onPointerDown:Ac,children:r.jsx(js,{className:ie("h-3.5 w-3.5",xe&&"text-warning")})})}),r.jsx(Et,{side:"bottom",children:w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")})]}),ot=c?r.jsx(qi,{label:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection"),active:G,onToggle:Ue,children:G?r.jsx(ka,{className:"h-3.5 w-3.5"}):r.jsx(wa,{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:ie(ws(_e,G)),onClick:F=>{F.stopPropagation(),Ue()},onPointerDown:Tc,children:G?r.jsx(ka,{className:"h-3.5 w-3.5"}):r.jsx(wa,{className:"h-3.5 w-3.5"})})}),r.jsx(Et,{side:"bottom",children:w(G?"sectionsEditor.sectionList.showSection":"sectionsEditor.sectionList.hideSection")})]}),de=si,Qe=Gi;let ve;e[23]!==w?(ve=w("sectionsEditor.sectionList.sectionActionsMenu"),e[23]=w,e[24]=ve):ve=e[24];const it=ie(ws(_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]!==Qe||e[26]!==ve||e[27]!==it?($e=r.jsx(Qe,{label:ve,classicClassName:it}),e[25]=Qe,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(an,{onClick:F=>{F.stopPropagation(),Le?.()},children:[r.jsx(js,{className:"h-4 w-4"}),w(xe?"sectionsEditor.sectionList.disableAsyncRender":"sectionsEditor.sectionList.enableAsyncRender")]}),r.jsx(ni,{})]}),e[29]=c,e[30]=d,e[31]=xe,e[32]=Le,e[33]=w,e[34]=Be):Be=e[34];let Ke;e[35]!==Z?(Ke=F=>{F.stopPropagation(),Z()},e[35]=Z,e[36]=Ke):Ke=e[36];let se;e[37]===Symbol.for("react.memo_cache_sentinel")?(se=r.jsx(xl,{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(an,{onClick:Ke,children:[se,Y]}),e[40]=Ke,e[41]=Y,e[42]=ee):ee=e[42];let K;e[43]!==c||e[44]!==ke||e[45]!==Ce||e[46]!==w?(K=ke&&r.jsxs(an,{className:ie(!c&&Ui),onClick:F=>{F.stopPropagation(),Ce()},children:[r.jsx(Da,{className:"h-4 w-4"}),w("sectionsEditor.sectionList.addVariantMenuItem")]}),e[43]=c,e[44]=ke,e[45]=Ce,e[46]=w,e[47]=K):K=e[47];let T;e[48]!==c||e[49]!==rt||e[50]!==ge||e[51]!==w?(T=rt&&r.jsxs(an,{className:ie(!c&&wc),onClick:F=>{F.stopPropagation(),ge()},children:[c?r.jsx(Yn,{className:"h-4 w-4"}):r.jsx(Rs,{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 fe;e[53]!==c||e[54]!==Je||e[55]!==p.isMultivariate||e[56]!==p.isSavedBlock||e[57]!==w?(fe=p.isSavedBlock===!0&&!p.isMultivariate&&r.jsxs(an,{onClick:F=>{F.stopPropagation(),Je()},children:[c?r.jsx(Ma,{className:"h-4 w-4"}):r.jsx(Rs,{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]=fe):fe=e[58];let He;e[59]!==k?(He=F=>{F.stopPropagation(),k()},e[59]=k,e[60]=He):He=e[60];let et;e[61]===Symbol.for("react.memo_cache_sentinel")?(et=r.jsx(Hl,{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]!==He||e[65]!==De?($=r.jsxs(an,{variant:"destructive",onClick:He,children:[et,De]}),e[64]=He,e[65]=De,e[66]=$):$=e[66];let oe;e[67]!==Be||e[68]!==ee||e[69]!==K||e[70]!==T||e[71]!==fe||e[72]!==$?(oe=r.jsxs(ai,{align:"end",className:"w-44",children:[Be,ee,K,T,fe,$]}),e[67]=Be,e[68]=ee,e[69]=K,e[70]=T,e[71]=fe,e[72]=$,e[73]=oe):oe=e[73];let Ve;e[74]!==de||e[75]!==$e||e[76]!==oe?(Ve=r.jsxs(de,{children:[$e,oe]}),e[74]=de,e[75]=$e,e[76]=oe,e[77]=Ve):Ve=e[77];let Te;return e[78]!==u||e[79]!==Ee||e[80]!==P||e[81]!==X||e[82]!==g||e[83]!==A||e[84]!==Ye||e[85]!==H||e[86]!==ot||e[87]!==Ve||e[88]!==L?(Te=r.jsxs("div",{ref:X,style:g,...u,...Ee,role:at,tabIndex:m,onClick:P,onKeyDown:L,className:A,children:[Ye,H,ot,Ve]}),e[78]=u,e[79]=Ee,e[80]=P,e[81]=X,e[82]=g,e[83]=A,e[84]=Ye,e[85]=H,e[86]=ot,e[87]=Ve,e[88]=L,e[89]=Te):Te=e[89],Te}function Tc(v){return v.stopPropagation()}function Ac(v){return v.stopPropagation()}function Nc(){return!1}function Ts(v){const e=wn.c(11),{canAddSection:p,onAddSection:S,className:x,size:V}=v,C=Rn();let _;e[0]!==x?(_=ie("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($l,{size:14}),e[2]=k):k=e[2];let Z;e[3]!==C?(Z=C("sectionsEditor.sectionList.addSectionButton"),e[3]=C,e[4]=Z):Z=e[4];let ge;return e[5]!==S||e[6]!==V||e[7]!==_||e[8]!==P||e[9]!==Z?(ge=r.jsxs(It,{type:"button",variant:"outline",size:V,className:_,disabled:P,onClick:S,children:[k,Z]}),e[5]=S,e[6]=V,e[7]=_,e[8]=P,e[9]=Z,e[10]=ge):ge=e[10],ge}function Cc(v){const e=wn.c(101),{listKey:p,rawSections:S,sections:x,meta:V,decofile:C,selectedIndex:_,onSelect:P,onReorder:k,onDelete:Z,onDuplicate:ge,onMakeReusable:Ue,onToggleHidden:Le,onToggleLazy:Ce,onAddVariant:Je,onDetach:w,onAddSection:c,canAddSection:xe}=v,G=xe===void 0?!0:xe,_e=Rn(),I=Qn();let ke;e[0]!==x.length?(ke=()=>Aa(x.length),e[0]=x.length,e[1]=ke):ke=e[1];const[d,Oe]=b.useState(ke),[u,Ee]=b.useState(null),[X,ze]=b.useState(p),[nt,Pe]=b.useState(x.length),st=b.useRef(!1);X!==p?(ze(p),Pe(x.length),Oe(Aa(x.length))):nt!==x.length&&(Pe(x.length),Oe(tt=>Rc(tt,x.length)));let ue;e[2]===Symbol.for("react.memo_cache_sentinel")?(ue={activationConstraint:{distance:8}},e[2]=ue):ue=e[2];let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g={coordinateGetter:Xl},e[3]=g):g=e[3];const we=Wl(Ra(Gl,ue),Ra(ql,g));let rt;e[4]!==d?(rt=d.map(Pc),e[4]=d,e[5]=rt):rt=e[5];const at=rt;let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=tt=>{Ee(String(tt.active.id))},e[6]=m):m=e[6];const L=m;let Xe;e[7]!==at||e[8]!==k?(Xe=tt=>{Ee(null);const{active:O,over:Ae}=tt;if(!Ae||O.id===Ae.id)return;const We=at.indexOf(String(O.id)),ht=at.indexOf(String(Ae.id));We===-1||ht===-1||(Oe(bt=>Fa(Jn([...bt],We,ht))),st.current=!0,requestAnimationFrame(()=>{st.current=!1}),k?.(We,ht))},e[7]=at,e[8]=k,e[9]=Xe):Xe=e[9];const A=Xe;let Ye;e[10]===Symbol.for("react.memo_cache_sentinel")?(Ye=()=>{Ee(null)},e[10]=Ye):Ye=e[10];const H=Ye;let ot,de,Qe,ve,it,$e,Be,Ke,se,Y,ee,K,T,fe,He;if(e[11]!==u||e[12]!==G||e[13]!==I||e[14]!==C||e[15]!==d||e[16]!==at||e[17]!==A||e[18]!==V||e[19]!==c||e[20]!==Je||e[21]!==Z||e[22]!==w||e[23]!==ge||e[24]!==Ue||e[25]!==P||e[26]!==Le||e[27]!==Ce||e[28]!==S||e[29]!==x||e[30]!==_||e[31]!==we||e[32]!==_e){fe=Symbol.for("react.early_return_sentinel");e:{const tt=O=>{st.current||P(O)};if(e[48]!==u||e[49]!==G||e[50]!==I||e[51]!==d||e[52]!==c||e[53]!==S||e[54]!==x||e[55]!==_e){const O=u?d.find(Ae=>Ae.id===u):null;if(ve=O!=null?x[O.index]:null,Qe=O!=null?S[O.index]:void 0,d.length===0){let Ae;e[59]!==_e?(Ae=_e("sectionsEditor.sectionList.noSections"),e[59]=_e,e[60]=Ae):Ae=e[60];let We;e[61]!==Ae?(We=r.jsx("p",{className:"px-2 py-3 text-xs text-muted-foreground",children:Ae}),e[61]=Ae,e[62]=We):We=e[62];const ht=We;let bt;e[63]!==G||e[64]!==I||e[65]!==ht||e[66]!==c?(bt=I?ht:r.jsxs("div",{className:"space-y-2",children:[ht,r.jsx(Ts,{canAddSection:G,onAddSection:c,size:"sm"})]}),e[63]=G,e[64]=I,e[65]=ht,e[66]=c,e[67]=bt):bt=e[67],fe=bt;break e}T=ie(O&&"cursor-grabbing"),e[48]=u,e[49]=G,e[50]=I,e[51]=d,e[52]=c,e[53]=S,e[54]=x,e[55]=_e,e[56]=Qe,e[57]=ve,e[58]=T}else Qe=e[56],ve=e[57],T=e[58];de=Yl,Ke=we,se=Ql,Y=L,ee=A,K=H,ot=ec,$e=at,Be=tc,He="space-y-1",it=d.map(O=>{const Ae=x[O.index];return Ae?r.jsx(Vc,{sortableId:O.id,section:Ae,raw:S[O.index],meta:V,decofile:C,selected:_===O.index,onSelect:()=>tt(O.index),onDelete:()=>Z(O.index),onDuplicate:()=>ge(O.index),onMakeReusable:()=>Ue(O.index),onToggleHidden:()=>Le(O.index),onToggleLazy:Ce?()=>Ce(O.index):void 0,onAddVariant:()=>Je(O.index),onDetach:()=>w(O.index)},O.id):null})}e[11]=u,e[12]=G,e[13]=I,e[14]=C,e[15]=d,e[16]=at,e[17]=A,e[18]=V,e[19]=c,e[20]=Je,e[21]=Z,e[22]=w,e[23]=ge,e[24]=Ue,e[25]=P,e[26]=Le,e[27]=Ce,e[28]=S,e[29]=x,e[30]=_,e[31]=we,e[32]=_e,e[33]=ot,e[34]=de,e[35]=Qe,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]=K,e[45]=T,e[46]=fe,e[47]=He}else ot=e[33],de=e[34],Qe=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],K=e[44],T=e[45],fe=e[46],He=e[47];if(fe!==Symbol.for("react.early_return_sentinel"))return fe;let et;e[68]!==it||e[69]!==He?(et=r.jsx("div",{className:He,children:it}),e[68]=it,e[69]=He,e[70]=et):et=e[70];let De;e[71]!==ot||e[72]!==$e||e[73]!==Be||e[74]!==et?(De=r.jsx(ot,{items:$e,strategy:Be,children:et}),e[71]=ot,e[72]=$e,e[73]=Be,e[74]=et,e[75]=De):De=e[75];let $;e[76]!==Qe||e[77]!==ve||e[78]!==I||e[79]!==C||e[80]!==V?($=ve?r.jsx("div",{className:ie("cursor-grabbing shadow-lift",La(ve,!1,I)),children:r.jsx(Ia,{section:ve,raw:Qe,meta:V,decofile:C})}):null,e[76]=Qe,e[77]=ve,e[78]=I,e[79]=C,e[80]=V,e[81]=$):$=e[81];let oe;e[82]!==$?(oe=ti.createPortal(r.jsx(Ul,{dropAnimation:Hi,children:$}),document.body),e[82]=$,e[83]=oe):oe=e[83];let Ve;e[84]!==de||e[85]!==Ke||e[86]!==se||e[87]!==Y||e[88]!==ee||e[89]!==K||e[90]!==De||e[91]!==oe?(Ve=r.jsxs(de,{sensors:Ke,collisionDetection:se,onDragStart:Y,onDragEnd:ee,onDragCancel:K,children:[De,oe]}),e[84]=de,e[85]=Ke,e[86]=se,e[87]=Y,e[88]=ee,e[89]=K,e[90]=De,e[91]=oe,e[92]=Ve):Ve=e[92];let Te;e[93]!==G||e[94]!==I||e[95]!==c?(Te=!I&&r.jsx(Ts,{canAddSection:G,onAddSection:c,size:"sm",className:"mt-2"}),e[93]=G,e[94]=I,e[95]=c,e[96]=Te):Te=e[96];let F;return e[97]!==T||e[98]!==Ve||e[99]!==Te?(F=r.jsxs("div",{className:T,children:[Ve,Te]}),e[97]=T,e[98]=Ve,e[99]=Te,e[100]=F):F=e[100],F}function Pc(v){return v.id}function Bc(v,e,p,S){if(!v||typeof v!="object")return{kind:"error",reason:"no-matcher-rule"};const x=e.trim();if(!x)return Jt(v,p,S)?{kind:"inline",blockKey:v.__resolveType??"",inlinedRule:Es(v,p,S)}:{kind:"noop"};const V=Vs(v,p,S);if(!V)return{kind:"error",reason:"unreadable-rule"};if(V.blockKey)return{kind:"updateBlock",blockKey:V.blockKey,blockData:Ft(V.resolveType,V.data,x)};const C=Gn(x),_=Un(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 Na="section-form-stale-save",Kc=3;function Ca(v,e,p){const S=e.global&&e.pageKey?[{label:"Default",sections:[{__resolveType:e.pageKey}]}]:Ka(e.pageKey?v[e.pageKey]?.sections:void 0,v,p),x=Math.max(0,Math.min(e.pageVariantIndex,S.length-1)),V=S[x]?.sections??[];return{pageVariants:S,variantIndex:x,rawSections:V,parsedSections:kn(V,v,p)}}const Pa=new WeakMap;let Dc=0;function Mc(v){let e=Pa.get(v);return e===void 0&&(e=++Dc,Pa.set(v,e)),e}function uf({orgSlug:v,virtualMcpId:e,branch:p,previewReady:S=!0,previewUrl:x,currentPath:V,activePageBlockKey:C=null,activeGlobalBlockKey:_=null,externalSelection:P,onSaved:k,initialEditSeo:Z=!1,onExitSeo:ge,onSelectRoot:Ue,onViewJsonFile:Le,onFocusedBlockChange:Ce,onSectionPicked:Je,onVariantPreviewOverride:w}){const c=Rn(),xe=zi(),G=xe?.taskId??null,_e=S?{orgSlug:v,virtualMcpId:e,branch:p,threadId:G,previewUrl:x}:null,[I,ke]=b.useState([]),{data:d,isLoading:Oe}=kl(_e,{pollWhile:I.length>0}),{data:u,isLoading:Ee}=Bl(_e),X=Qn(),ze=xe?.virtualMcpId,Pe=vl(ze===e?e:null)?.metadata?.siteSlug??null,st=rc({virtualMcpId:e,branch:p,sandboxUrl:x}),ue=wl(e,p),g=Rl(ue),we=Ei(g),rt=!g,at=!!st||g,[m,L]=b.useState(null),[Xe,A]=b.useState(null),[Ye,H]=b.useState(null),[ot,de]=b.useState(0),[Qe,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),[K,T]=b.useState([]),fe=b.useRef(null),[He,et]=b.useState(K.length);He!==K.length&&(et(K.length),requestAnimationFrame(()=>{fe.current&&(fe.current.scrollTop=0)}));const[De,$]=b.useState(0),[oe,Ve]=b.useState(null),[Te,F]=b.useState(null),[tt,O]=b.useState(null),[Ae,We]=b.useState(!1),[ht,bt]=b.useState(!1),jn=b.useRef(null),[En,Oa]=b.useState(!0),[Yt,Vn]=b.useState(!1),[Lt,Tn]=b.useState(!1),[Re,un]=b.useState(Z),[Ns,Cs]=b.useState(Z);Z&&!Ns&&(Cs(!0),un(!0),L(null),A(null),H(null),T([])),!Z&&Ns&&Cs(!1);const[za,dn]=b.useState(null),[Ps,An]=b.useState(void 0),[Bs,Ot]=b.useState([]),[Ks,Qt]=b.useState(0),[Me,lt]=b.useState(0),[$a,Fe]=b.useState(null),[Zt,qe]=b.useState(null),[Ds,Ms]=b.useState(null),Fs=oi(),Is=jl({orgSlug:v,virtualMcpId:e,branch:p},{tunnel:!1}),fn=Zi({orgSlug:v,virtualMcpId:e,branch:p}),[Ha,Wa]=b.useState(V),[qa,Ga]=b.useState(C),[Ua,Ja]=b.useState(_);(Ha!==V||qa!==C||Ua!==_)&&(queueMicrotask(()=>fn.flush()),Wa(V),Ga(C),Ja(_),L(null),A(null),H(null),de(0),se(null),ee(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1),un(!1),dn(null),An(void 0),Ot([]),Qt(t=>t+1));const D=Xi({orgSlug:v,virtualMcpId:e,branch:p}),mn=pl((t,n)=>{D.mutate({blockKey:t,data:n},{onSuccess:()=>k?.(),onError:D.reportError})}),Nn=Ol({orgSlug:v,virtualMcpId:e,branch:p}),Ls=mc({orgSlug:v,virtualMcpId:e,branch:p}),[Xt,en]=b.useState(!1),N=b.useRef(null),_t=b.useRef(null),gt=b.useRef(null),vt=b.useRef(null),Cn=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([]),Zn=b.useRef(new WeakSet);El(v,e,t=>{const{activePageKey:n,rawSections:s,parsedSections:a,selectedSectionIndex:o}=re.current,i=new Set;n&&i.add(n);for(const l of[_t.current?.sectionIndex,o]){const f=l==null?void 0:s[l],j=l==null?void 0:a[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)&&(Cn.current={})}});const re=b.useRef({rawSections:[],parsedSections:[],decofile:{},activePageKey:null,pageVariants:[],variantIndex:0,sectionVariantIndex:0,selectedSectionIndex:null}),[Os,zs]=b.useState(0),[Ya,Qa]=b.useState(0),$s=ii(ue,{orgSlug:v,virtualMcpId:e,branch:p}),Hs=li($s,I[0]?.blockKey??null,ci(d,I[0]?.blockKey??null)),[Za,Xa]=b.useState(null),Xn=Vl(v,e).epoch,[eo,to]=b.useState(Xn);oc(Re?{orgSlug:v,virtualMcpId:e,branch:p}:null,d??void 0,u??void 0);const Ws=_??(d&&u?xa(_a(d,u),V,C)?.key??null:null),es=ya({orgSlug:v,virtualMcpId:e,branch:p},Ws?[Ws]:[],{withRefs:!0}),[qs,no]=b.useState(!1),ts=ya({orgSlug:v,virtualMcpId:e,branch:p},qs?Kl:[]),Gs={ready:!(ue.kind==="protocol"&&ue.hosted)||qs&&ts.ready,failed:ts.failed,retry:ts.retry,request:()=>no(!0)};if(es.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:es.retry,children:c("sectionsEditor.namedRules.tryAgain")})]});if(!S||Oe||Ee||!es.ready)return r.jsx("div",{className:"h-full w-full flex items-center justify-center",children:r.jsx(ui,{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 so=_a(d,u),q=!!_,ae=q?null:xa(so,V,C),y=q?_:ae?.key??null,ns=q&&_?d[_]:void 0,Us=q&&_&&ns?Dl(_,ns):q&&_?_:"",nn=!q&&y&&d[y]?d[y]:null,ss=Re&&d&&u&&y&&ae?oa(d,{kind:"page",pageKey:y,pageName:String(ae.name??""),path:String(ae.path??"")},u):null,ro=Re?nn?.seo:void 0,Pn=Ps!==void 0?Ps:ro,ao=Re?el(Pn):void 0,Js=ss?.seoTypeOptions??[],Ys=Re&&u?tl(u):"",rs=za??ao??{},Bn=Re&&ss?ic(rs,ss):null,Qs=Re&&Bn&&nl(Pn)?qn(Bn,u):null,Zs=Re?sl(d,u)?.seoData:void 0,me=q?[{label:"Default",sections:[{__resolveType:_}]}]:Ka(nn?.sections,d??{},g),yt=me.length>1,te=Math.min(ot,me.length-1),Se=me[te],M=Se?.sections??[],pe=kn(M,d,g),Kn=!q&&pc(nn?.sections,g);if(q&&_&&Ds!==_){Ms(_);const t=M[0],n=pe[0];if(t&&n){L(0),lt(0),T([]);const s=wt(t,n,d,g);s&&(A(s.data),H(s.resolveType),qe(null),Fe(null))}}!q&&Ds!==null&&Ms(null),re.current={rawSections:M,parsedSections:pe,decofile:d??{},activePageKey:y,pageVariants:me,variantIndex:te,sectionVariantIndex:Me,selectedSectionIndex:m};const oo=()=>({multivariate:Kn,index:te,variants:me.map(t=>({rule:t.rule})),lazyValues:g&&Kn&&Ti(nn?.sections?.variants?.[te]?.value)}),as=(t,n)=>{if(!w)return;if(!y||!Kn||t.length<=1){w(null);return}const s={multivariate:!0,index:n,variants:t},a=g?Sa(y,s):Ta(y,s,d,u);w(a.length>0?a:null)},os=w&&y&&Kn&&yt&&!Oe&&!Ee?y:null;if(os!==Za&&(Xa(os),os)){const t=me.map(s=>({rule:s.rule})),n=te;queueMicrotask(()=>as(t,n))}const $t=(t,n,s)=>{if(!w)return;if(!y){w(null);return}const a=oo(),o=g?Sa(y,a):Ta(y,a,d,u);if(!t||n<0){w(o.length>0?o:null);return}const i={pageKey:y,page:a,sectionIndex:n,sectionLazy:pe[n]?.isLazy??!1,mvObj:t,selectedVariantIndex:s},l=g?Al(i):Sc({...i,decofile:d,meta:u}),f=g?Nl(o,l):[...o,...l];w(f.length>0?f:null)},xt=(t,n,s,a=m??-1,o=!1)=>{const i=pt(t,n);if(!i){A(null),H(null),qe(null),Fe(null),o&&$t(null,a,s);return}const f=Yr(i,we)[s];if(!f){A(null),H(null),qe(null),Fe(null),o&&$t(null,a,s);return}const j=pi(f.value,d);A(j?.data??null),H(j?.resolveType??null);const{resolveType:h,formValue:R}=Ut(f.rule,d,u??void 0);qe(h),Fe(R),o&&$t(i,a,s)},is=t=>{F(null),de(t),L(null),A(null),H(null),T([]);const n=me[t]?.rule,{resolveType:s,formValue:a}=Ut(n,d??{},u??void 0);ee(s),se(a),as(me.map(o=>({rule:o.rule})),t)},io=(t,n)=>{const s=M[t],a=pe[t];if(!s||!a)return!1;const o=a.isMultivariate?pt(s,a)?.variants?.length??0:0,i=n<o?n:0;if(L(t),lt(i),T([]),$(l=>l+1),a.isMultivariate)xt(s,a,i,t);else{const l=wt(s,a,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),qe(null),Fe(null)}return!0},Xs=P?.index;if(P!==void 0&&(P?.seq??null)!==Qe&&(ve(P?.seq??null),typeof Xs=="number"&&io(Xs,0)),Xn!==eo){to(Xn);const t=N.current!==null||ye.current.size>0||vt.current!==null||gt.current!==null||D.isPending||fn.isPending||I.length>0,n=m!==null&&Jr(fe.current,document.activeElement);if(!t&&n&&(tn.current=!0),!t&&!n&&m!==null){const s=M[m],a=pe[m];if(T([]),$(o=>o+1),!s||!a)L(null),A(null),H(null);else if(a.isMultivariate)xt(s,a,Me,m);else{const o=wt(s,a,d,g);A(o?.data??null),H(o?.resolveType??null)}}!t&&Re&&(dn(null),An(void 0),Qt(s=>s+1))}if(Os!==Ya){Qa(Os);const t=m!==null?M[m]:null,n=m!==null?pe[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,g);A(s?.data??null),H(s?.resolveType??null)}}const ut=I[0];if(ut){const{formBase:t,target:n}=ut,s=Ca(d,n,g),a=t.sectionIndex,o=s.rawSections.length===t.sectionCount?ys(s.rawSections[a],s.parsedSections[a],n.sectionVariantIndex,d,g):null,i=di(ut,o,l=>Qr(t,l));if(i){const f=[{...ut,...i,changedAgain:!0},...I.slice(1)];ct.current=f,ke(f)}}const gn={orgSlug:v,virtualMcpId:e,branch:p,threadId:G,previewUrl:g?void 0:x??void 0,siteSlug:Pe},Dn=Ye&&u?qn(Ye,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=on(d,y,t,te,me);D.mutate({blockKey:y,data:s},{onSuccess:()=>n?.onSuccess?.()??k?.(),onError:a=>{n?.onError?.(),D.reportError(a)}})},Ht=()=>{Ce?.(null),L(null),Tn(!1),A(null),H(null),lt(0),Fe(null),qe(null),T([]),$(t=>t+1)},er=()=>Jr(fe.current,document.activeElement),ls=(t=c("sectionsEditor.sectionsEditor.blockChangedElsewhere"))=>{if(N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear(),_t.current=null,W.error(t,{id:Na}),er()){tn.current=!0;return}zs(n=>n+1)},tr=()=>{!tn.current||er()||ct.current.length>0||N.current!==null||pn.current||hn.current||ye.current.size>0||(tn.current=!1,zs(t=>t+1))},nr=()=>{tn.current&&setTimeout(tr,0)},sr=ue.kind==="protocol"&&ue.source==="github",rr=t=>Pl(Fs,Is,t,ue.kind==="protocol"?ue: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)},lo=t=>{const{activePageKey:n,variantIndex:s,sectionVariantIndex:a}=re.current,o=zt.current;return{formBase:o?.sectionIndex===t&&o.variantIndex===a?o:null,pageKey:n,global:q,pageVariantIndex:s,sectionVariantIndex:a,schema:Dn}},vn=t=>{ct.current=t,ke(t)},co=t=>{const n=ct.current,s=n.findIndex(i=>i.formBase===t.formBase),a=s>=0?n[s]:void 0,o=a?n.with(s,{...t,choices:na(a.plan,a.choices,t.plan),fresh:Fi(a.plan,t.plan,a.fresh),changedAgain:a.changedAgain||$n(a.plan.theirs)!==$n(t.plan.theirs)}):[...n,{...t,changedAgain:Zn.current.has(t.formBase)}];vn(o)},or=(t,n)=>{const s=ct.current,a=s.findIndex(l=>l.formBase===t),o=s[a];if(!o)return!1;if($n(o.plan.mine)===$n(n))return!0;const i=ta({...o.plan,mine:n});if(i.pointers.length===0){const l=s.filter(f=>f!==o);return vn(l),!1}return vn(s.with(a,{...o,plan:i,choices:na(o.plan,o.choices,i)})),!0},uo=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},fo=()=>{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 a=n.emitted;return a&&typeof a=="object"&&!or(n,a)&&yn(a,n.sectionIndex,0,s),ct.current[0]??null},mo=()=>{const t=ct.current[0],n=fo();if(!n||!t||n.formBase!==t.formBase||n.plan.pointers.some(i=>!t.plan.pointers.includes(i)))return;const s=wi(n.plan,n.choices);ue.kind==="protocol"&&ue.source==="github"&&Ri(n.plan,n.choices)&&Tl(c,!1),vn(ct.current.slice(1));const{formBase:a,target:o}=n;a.base=n.plan.theirs,a.version=void 0,a.emitted=s,Zn.current.add(a),(zt.current===a||uo(n))&&(zt.current=a,A(s),$(i=>i+1)),yn(s,a.sectionIndex,0,o)},po=t=>{const[n,...s]=ct.current;n&&vn([{...n,choices:t},...s])},yn=(t,n,s=0,a,o=!1)=>{const i=a??lo(n),l=i.sectionVariantIndex,f=i.formBase,j=o||ea(ct.current,f,i,n,g).runNow,h=_t.current;N.current&&(clearTimeout(N.current),N.current=null,h&&(h.sectionIndex!==n||h.sectionVariantIndex!==l)&&h.write());const R=`${i.pageKey}:${n}:${l}`,E=()=>{if(pn.current||hn.current){ye.current.set(R,E);return}const B=typeof t=="function"?t():t,z=ea(ct.current,f,i,n,g).base;if(z&&or(z,B))return;const ne=re.current.decofile,{rawSections:U,parsedSections:Ne,pageVariants:J,variantIndex:be}=Ca(ne,i,g),Ie=i.pageKey,he=U[n];if(!he)return;const le=Ne[n];if(!le)return;const Ge=f?.base,Ze=ys(he,le,l,ne,g),Nt=!!Ge&&!!Ze&&Ai(Ge,Ze)&&!(f&&Qr(f,Ze));if(Nt&&Ge&&Ze){if(Ni(Ge,Ze)){ls(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}const Q=le.isSavedBlock?"here":Ci(Ge,U.map((ce,mt)=>ys(ce,Ne[mt],l,ne,g)),n,f?.sectionCount??U.length);if(Q==="unknown"){ls(c("sectionsEditor.sectionsEditor.sectionReplacedElsewhere"));return}if(typeof Q=="number"&&f){f.sectionCount=U.length,f.sectionIndex=Q,zt.current===f&&L(Q),yn(B,Q,s,i);return}}const Ct=Nt&&Ge&&Ze?ta({ancestor:Ge,mine:B,theirs:Ze}):null;if(Ct&&Ct.pointers.length>0&&f){f.sectionCount=U.length,co({plan:Ct,formBase:f,target:i,sectionIndex:n,choices:Pi(Ct),changedAgain:!1,blockKey:le.isSavedBlock?bs(he,le):Ie,fresh:{}});return}const Pt=Ct?Ct.merged:null,rn=Pt??B,qr=Bi({merged:!!Pt,tracked:f,current:zt.current,saved:B});Pt&&W.info(c("sectionsEditor.sectionsEditor.blockMergedWithOthers"),{id:Na}),qr&&f&&(f.emitted=Pt,A(Pt));const vs=qr||!Pt?rn:B;f&&(f.base=vs,f.sectionCount=U.length,Ki(f,vs));const Gr={onSuccess:()=>{f&&Zn.current.delete(f),k?.()},onError:Q=>{if(f?.base===vs&&Ge&&(f.base=Ge),Q instanceof Cl){if(f&&(f.version=void 0),s<Kc){ye.current.delete(R),hn.current=!0;const ce=Ii(s,Q.carriedStored);setTimeout(()=>{hn.current=!1,yn(()=>{const mt=f?.emitted;return mt&&typeof mt=="object"?mt:B},n,s+1,i,ce.immediate),ye.current.delete(R),ar(xn(g))},ce.delay)}else ls();return}D.reportError(Q)}},Ur=Q=>{pn.current=!0;let ce=!1;D.mutateAsync(Q).then(()=>Gr.onSuccess(),mt=>{ce=!0,Gr.onError(mt)}).finally(()=>{pn.current=!1,ar(ce?xn(g):0),tr()})};if(le.isSavedBlock){const Q=bs(he,le);if(!Q)return;Ur({blockKey:Q,data:rn,...Ge?{base:{value:Di({startedFrom:Ge,stored:Ze,rebased:!!Pt,refused:s>0})}}:{},rebaseOnConflict:!1,guard:sa({formBase:f,rebased:!!Pt,versionOf:rr,...sr?{copy:{value:ne[Q]}}:{}})});return}if(!Ie)return;const zn={...ne[Ie]},Gt=[...U];if(le.isMultivariate){const Q=pt(he,le);if(!Q||!Ie)return;const ce=Mi(Q,l,rn);Gt[n]=Bt(he,le,ce)}else if(le.isHidden){const Q=As(he.__resolveType),ce=Q?{...he.section}:{...he},mt=Array.isArray(ce.variants)?[...ce.variants]:[];mt[0]&&(mt[0]=ra(ce.__resolveType,mt[0],rn)),ce.variants=mt,Q?Gt[n]={...he,section:ce}:Gt[n]=ce}else le.isLazy?Gt[n]={...he,section:rn}:Gt[n]=rn;if(J.length>1){const Q=zn.sections,ce=[...Q?.variants??[]];ce[be]&&(ce[be]=ra(Q?.__resolveType,ce[be],Gt)),zn.sections={...Q,variants:ce}}else zn.sections=Gt;Ur({blockKey:Ie,data:zn,rebaseOnConflict:!1,guard:sa({formBase:null,rebased:!1,versionOf:rr,...sr?{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(g))},ho=t=>{tn.current=!1,L(t),lt(0),T([]),$(o=>o+1);const n=M[t],s=pe[t];if(Ce?.(s?.isSavedBlock?s.resolveType??null:null),!n||!s)return;if(s.isMultivariate){xt(n,s,0,t);return}const a=wt(n,s,d,g);if(!a){A(null),H(null),qe(null),Fe(null),$t(null,t,0);return}A(a.data),H(a.resolveType),qe(null),Fe(null),$t(null,t,0)},ir=t=>{const n=t;m!==null&&(zt.current=ji(zt.current,{sectionIndex:m,variantIndex:re.current.sectionVariantIndex,shown:Xe,next:n,sectionCount:re.current.rawSections.length})),A(n),m!==null&&yn(n,m)},cs=t=>{if(!y||!d||!u||!ae)return;const n={kind:"page",pageKey:y,pageName:String(ae.name??""),path:String(ae.path??"")},s=oa(d,n,u);s&&fn.save(y,()=>{const a=Fs.getQueryData(Vi.decofile(Is))?.[y];if(!a||typeof a!="object"||a===null||Array.isArray(a))return null;const o={...a,...Cn.current};return Cn.current={},t?.raw!==void 0?lc(o,t.raw,u):t?.inner!==void 0?cc(n,s,o,t.inner):o})},lr=(t,n)=>{y&&(Cn.current[t]=n,cs())},go=(t,n)=>{if(!y)return;const s=Jn([...M],t,n);m!==null&&(m===t?L(n):t<m&&n>=m?L(m-1):t>m&&n<=m&&L(m+1)),dt(s)},vo=t=>{if(!y)return;const n=M.filter((s,a)=>a!==t);m===t?Ht():m!==null&&m>t&&L(m-1),dt(n)},yo=t=>{if(!y)return;const n=M[t];if(!n)return;const s=[...M];s.splice(t+1,0,hl(n)),m!==null&&m>t&&L(m+1),dt(s)},So=t=>{if(!y)return;const n=M[t],s=pe[t];if(!n||!s)return;const a=s.isHidden?xi(n,g):_i(n,u);if(!a)return;const o=[...M];o[t]=a,m===t&&Ht(),dt(o)},bo=t=>{if(!y)return;const n=M[t],s=pe[t];if(!n||!s||s.isMultivariate)return;const a=bi(n);if(!a)return;const o=[...M];o[t]=a,m===t&&Ht(),dt(o)},xo=t=>{if(!y)return;const n=M[t],s=pe[t];if(!n||!s?.isSavedBlock)return;const a=wt(n,s,d,g);if(!a?.data)return;const{name:o,...i}=a.data,l=[...M];s.isLazy?l[t]={...n,section:i}:l[t]=i,m===t&&Ht(),dt(l)},_o=t=>{if(!y)return;const n=[...M,{__resolveType:t.resolveType}],s=n.length-1;dt(n,{onError:()=>{re.current.selectedSectionIndex===s&&Ht()}}),We(!1),L(s),lt(0),T([]),$(l=>l+1);const a=n[s],o=kn(n,d,g)[s];if(!a||!o)return;if(o.isMultivariate){xt(a,o,0);return}const i=wt(a,o,d,g);if(!i){A(null),H(null),qe(null),Fe(null);return}A(i.data),H(i.resolveType),qe(null),Fe(null)},cr=t=>{jn.current=t.append,We(!0)},ko=t=>{const n=jn.current;if(!n){_o(t);return}n({__resolveType:t.resolveType}),We(!1),jn.current=null},ur=t=>{if(m===null)return;const n=M[m],s=pe[m];!n||!s?.isMultivariate||(lt(t),T([]),$(a=>a+1),xt(n,s,t,m,!0))},wo=t=>{if(m===null||!y)return;const n=M[m],s=pe[m];if(!n||!s?.isMultivariate)return;const a=pt(n,s);if(!a)return;const o=yi(a,t);if(!o){W.error(c("sectionsEditor.sectionsEditor.cannotDeleteOnlyVariant"));return}const i=[...M];i[m]=Bt(n,s,o);const l=o.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)},Ro=t=>{if(m===null||!y)return;const n=M[m],s=pe[m];if(!n||!s?.isMultivariate)return;const a=pt(n,s);if(!a)return;const o=Si(a,t,g),i=[...M];i[m]=Bt(n,s,o);const l=Xr(a.variants??[],t,g);lt(l),T([]),$(f=>f+1),xt(i[m],s,l,m,g),dt(i)},jo=(t,n)=>{if(m===null||!y||t===n)return;const s=M[m],a=pe[m];if(!s||!a?.isMultivariate)return;const o=pt(s,a);if(!o)return;const i=gi(o,t,n),l=[...M];l[m]=Bt(s,a,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],a,f,m,g),dt(l)},Sn=t=>{const n=t??m;if(n===null||!y)return;const s=M[n],a=pe[n];if(!s||!a)return;const o=hi(s,a,void 0,u,g);if(!o){W.error(c("sectionsEditor.sectionsEditor.sectionCannotHaveVariants"));return}const i=[...M];i[n]=o.section;const l=kn(i,d,g)[n];if(!l?.isMultivariate){W.error(c("sectionsEditor.sectionsEditor.couldNotAddVariant"));return}L(n),lt(o.newVariantIndex),T([]),$(f=>f+1),xt(o.section,l,o.newVariantIndex,n,g),dt(i)},dr=()=>{if(m===null||!y)return;const t=M[m],n=pe[m];if(!t||!n?.isMultivariate)return;const s=pt(t,n);if(!s)return;const a=vi(t,n,s);if(!a){W.error(c("sectionsEditor.sectionsEditor.couldNotRemoveVariants"));return}const o=[...M];o[m]=a;const i=kn(o,d,g)[m];if(!i)return;lt(0),qe(null),Fe(null),T([]),$(f=>f+1);const l=wt(a,i,d,g);l?(A(l.data),H(l.resolveType)):(A(null),H(null)),$t(null,m,0),dt(o)},Eo=async t=>{if(oe===null||!y)return;const n=Un(t,d,u);if(n){W.error(n);return}const s=M[oe],a=pe[oe];if(!s||!a)return;const o=wt(s,a,d,g);if(!o){W.error(c("sectionsEditor.sectionsEditor.sectionCannotBeSavedAsGlobal"));return}const i={...o.data,name:t};try{const l=await D.mutateAsync({blockKey:t,data:i,create:!0}),f=[...M];f[oe]={__resolveType:t},await D.mutateAsync({blockKey:y,data:on(d,y,f,te,me)}),m===oe&&Ht(),Ve(null),Wn(l)||W.success(c("sectionsEditor.sectionsEditor.savedGlobalBlock",{blockId:t})),k?.()}catch(l){W.error(c("sectionsEditor.sectionsEditor.failedToSaveGlobalBlock"),{description:Kt(c,Dt(l))})}},fr=Se?.rule;if(yt&&m===null&&Y===null&&fr){const{resolveType:t,formValue:n}=Ut(fr,d??{},u??void 0);ee(t),se(n)}const sn=u?rl(u):[],us=u&&d?al(u,d):[],Wt=g&&u&&d?uc(u,d):[],ds=(t,n)=>{if(Wt.length===0)return;const s=Ml(t);return{kinds:Wt,selected:s,campaignPrefill:dc(t),onPick:n,load:Gs}},mr=!q&&!!(at&&u&&d),pr=Y&&u?qn(Y,u):null,St=()=>{gt.current&&(clearTimeout(gt.current),gt.current=null),vt.current&&(clearTimeout(vt.current),vt.current=null)},qt=async(t,n)=>{if(vc(n,t,u,g))try{await Nn.mutateAsync({blockKey:t})}catch(s){W.error(c("sectionsEditor.sectionsEditor.couldNotDeleteMatcherBlock"),{description:Kt(c,Dt(s))})}},hr=t=>{gt.current&&clearTimeout(gt.current),gt.current=setTimeout(()=>{const{activePageKey:n,decofile:s,variantIndex:a}=re.current;if(!n)return;const o={...s[n]},i={...o.sections},l=[...i.variants??[]],f=l[a],j=f?.rule;if(Jt(j,s,u)){const h=j?.__resolveType??"",R=s[h],E=typeof R?.name=="string"?R.name:h,{__resolveType:B,...z}=t;D.mutate({blockKey:h,data:Ft(B??"",z,E)},{onSuccess:()=>k?.(),onError:D.reportError});return}f&&(l[a]={...f,rule:t}),o.sections={...i,variants:l},D.mutate({blockKey:n,data:o},{onSuccess:()=>k?.(),onError:D.reportError})},xn(g))},gr=t=>{ee(t);const n=t?Va(t,u):{__resolveType:Zr(u)};se(t?n:{}),hr(n)},vr=t=>{const n=t;se(n);const s=Y?{__resolveType:Y,...n}:{...n};hr(s)},Mn=async(t,n,s)=>{const a=fc(n,t);if(!a.ok)return a.reason==="conflict"&&W.info(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.conflictTests"):c("sectionsEditor.namedRulePicker.conflictCampaigns"),ba),null;const o={};if(s){const i=s(a.rule);if(!i)return null;o[i.blockKey]=i.data}return a.blockWrite&&(o[a.blockWrite.blockKey]=a.blockWrite.block),Object.keys(o).length>0&&!(await Ls.apply({writes:o})).ok?null:(a.blockWrite&&W.success(t.kind==="experiments"?c("sectionsEditor.namedRulePicker.createdTest",{name:t.name.trim()}):c("sectionsEditor.namedRulePicker.createdCampaign",{name:t.name.trim()}),{...ba,description:c("sectionsEditor.namedRulePicker.createdHint")}),{rule:a.rule,projected:{...n,...o}})},yr=Wt.length>0?{kinds:Wt,load:Gs,prepare:async t=>(await Mn(t,re.current.decofile,void 0))?.rule??null,ensureBlock:async t=>{const n=Fl(re.current.decofile,t);return n.kind==="saved"?!0:n.kind==="conflict"?!1:(await Ls.apply({writes:{[Il(t).blockKey]:n.block}})).ok}}:null,Sr=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:a}=re.current;if(!n)return;const o=await Mn(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],B=E[a];return B?(E[a]={...B,rule:f},{blockKey:n,data:{...j,sections:{...R,variants:E}}}):null});if(!o)return;const{resolveType:i,formValue:l}=Ut(o.rule,o.projected,u??void 0);ee(i),se(l),k?.()},br=async t=>{St();const{activePageKey:n,decofile:s,variantIndex:a}=re.current;if(!n)return;const o=s[n],i=o?.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[a];if(!j)return;const h=Mt(j.rule,s,u),R=cn(t);f[a]={...j,rule:R};const E={...s,[n]:{...o,sections:{...l,variants:f}}},{resolveType:B,formValue:z}=Ut(R,E,u??void 0);ee(B),se(z);try{await D.mutateAsync({blockKey:n,data:E[n]}),h&&h!==t&&await qt(h,E),k?.()}catch(ne){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(ne))})}},xr=t=>{vt.current&&clearTimeout(vt.current);const{selectedSectionIndex:n,sectionVariantIndex:s}=re.current;n!==null&&(vt.current=setTimeout(()=>{const{rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(!l)return;const h=a[n],R=o[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 J=z?.__resolveType??"",be=i[J],Ie=typeof be?.name=="string"?be.name:J,{__resolveType:he,...le}=t;D.mutate({blockKey:J,data:Ft(he??"",le,Ie)},{onSuccess:()=>k?.(),onError:D.reportError});return}const ne=Ss(E,s,t),U=[...a];U[n]=Bt(h,R,ne);const Ne=on(i,l,U,j,f);D.mutate({blockKey:l,data:Ne},{onSuccess:()=>k?.(),onError:D.reportError})},xn(g)))},Vo=t=>{qe(t);const n=t?Va(t,u):{__resolveType:Zr(u)};Fe(t?n:{}),xr(n)},To=t=>{const n=t;Fe(n);const s=Zt?{__resolveType:Zt,...n}:{...n};xr(s)},Ao=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(n===null||!l)return;const h=await Mn(t,i,B=>{const z=a[n],ne=o[n];if(!z||!ne?.isMultivariate)return null;const U=pt(z,ne);if(!U)return null;const Ne=[...a];return Ne[n]=Bt(z,ne,Ss(U,s,B)),{blockKey:l,data:on(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?.()},No=async t=>{St();const{selectedSectionIndex:n,sectionVariantIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(n===null||!l)return;const h=a[n],R=o[n];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const B=E.variants??[],z=Mt(B[s]?.rule,i,u),ne=cn(t),U=Ss(E,s,ne),Ne=[...a];Ne[n]=Bt(h,R,U);const J=on(i,l,Ne,j,f),be={...i,[l]:J},{resolveType:Ie,formValue:he}=Ut(ne,be,u??void 0);qe(Ie),Fe(he);try{await D.mutateAsync({blockKey:l,data:J}),z&&z!==t&&await qt(z,be),k?.()}catch(le){W.error(c("sectionsEditor.sectionsEditor.couldNotApplySavedRule"),{description:Kt(c,Dt(le))})}};if(!q&&!ae)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&&!ns)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?pe[m]??null:null,_r=m!==null?M[m]:null,kr=_r&&je?.isMultivariate?pt(_r,je):null,Vt=kr?Yr(kr,we,g):[],Fn=Math.min(Me,Math.max(Vt.length-1,0)),kt=Vt[Fn]??null,Tt=je?.isMultivariate===!0,fs=m!==null&&je!==null,At=fs&&(Tt||!!(Dn&&Xe)),Co=At&&!q&&je?.isSavedBlock===!0,ft=q||Co,wr=q?Us:je?.label??"",Po=Zt&&u?qn(Zt,u):null,Rr=(t,n)=>n&&X?`${t} · ${n}`:t,jr=je?je.variantOf??je.label:"",Bo=(()=>{const t=Tt&&kt?kt.label:null;return t?X?[Rr(jr,t)]:[je.label,t]:[je?.label??""]})(),ms=Rr(ae?.name??"",yt?Se?.label:null),In=At&&(!q||K.length>0)?q?[Us,...K]:[ms,...Bo,...K]:[],Er=Re&&ae?[ae.name,"SEO",...Bs]:[],Vr=c("sectionsEditor.pageVariantTabs.variantsLabel"),Tr=Yt&&ae?[ae.name,Vr]:Lt&&ae&&je?[ms,jr,Vr]:[],Ln=Tr.length>0?Tr:Er.length>0?Er:ft?In.length>0?In:[wr]:In.length>0?In:[ms],Ar=fs&&!Tt&&!je?.isHidden&&!!y,Ko=ft||!q&&yt&&!!Se||Ar,Do=fs&&!Tt&&!q&&K.length===0&&!!je&&Ba(je)&&!!y,Mo=X&&At&&!Lt&&Tt&&K.length===0&&!!kt,Nr=X&&K.length>0?ia(K[K.length-1]):null,Fo=K.length>1?ia(K[K.length-2]):null,Cr=ft?wr:At?je?.label??"":ae?.name??"",Io=Yt||Lt?c("sectionsEditor.pageVariantTabs.variantsLabel"):Re?c("sectionsEditor.panelSections.seo"):Nr??Cr,Pr=Lt?je?.variantOf??je?.label??"":Yt||Re?ae?.name??"":Nr?Fo??Cr:ft?c("sectionsEditor.sectionsEditor.globalSectionSubtitle"):At?ae?.name??"":ae?.path??"",ps=!Yt&&!Lt&&!Re&&!At&&!ft,Lo=!X&&!Re&&!q&&Tt&&K.length===0,bn=()=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const t=d[y],n=hc(t.sections,M,u,g);if(!n)return;const{sections:s,newVariantIndex:a}=n;D.mutate({blockKey:y,data:{...t,sections:s}},{onSuccess:()=>{de(a),L(null),A(null),H(null),T([]),se(null),ee(null)},onError:D.reportError})},On=(t,n,s)=>{if(!y)return;St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const a=d[y],o=a.sections;if(!o||typeof o!="object"||Array.isArray(o))return;const i=o;if(!Array.isArray(i.variants))return;const l=t([...i.variants]);if(!l)return;const f=gc(i,l),j={...d,[y]:{...a,sections:f}};D.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:D.reportError})},Br=(t,n)=>{if(t===n)return;let s=te;te===t?s=n:t<te&&n>=te?s=te-1:t>te&&n<=te&&(s=te+1),de(s);const a=Jn(me.map(o=>({rule:o.rule})),t,n);as(a,s),On(o=>Jn(o,t,n))},Kr=t=>{const n=me[t]?.rule,s=Mt(n,d??{},u??void 0);On(a=>a.length<=1?null:(a.splice(t,1),a),()=>{me.length-1===1?de(0):t<te?de(te-1):t===te&&de(Math.max(0,t-1)),L(null),A(null),H(null),T([]),se(null),ee(null)},s)},Oo=()=>{const t=me.map((n,s)=>({variant:n,index:s})).filter(({variant:n})=>!ki(n.rule)).map(({variant:n})=>Mt(n.rule,d??{},u??void 0)).filter(n=>!!n);On(n=>{const s=Li({variants:n}),a=n[s];return a?[{...a,rule:Oi(u)}]:null},()=>{de(0),L(null),A(null),H(null),T([]),se(null),ee(null),Vn(!1)},t)},Dr=t=>{let n=t+1;On(s=>(n=Xr(s,t,g),yc(s,t,g)),()=>{de(n),L(null),A(null),H(null),T([]),se(null),ee(null)})},zo=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const s=re.current.activePageKey,a=re.current.decofile;if(!s)return;const o=a[s],i=o.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"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const h=j.rule,R=n.trim();en(!0);try{if(!R){if(!Jt(h,a,u)){F(null);return}const J=h.__resolveType??"";f[t]={...j,rule:Es(h,a,u)};const be={...a,[s]:{...o,sections:{...l,variants:f}}};await D.mutateAsync({blockKey:s,data:be[s]}),await qt(J,be),F(null),k?.();return}const E=Vs(h,a,u);if(!E){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(E.blockKey){await D.mutateAsync({blockKey:E.blockKey,data:Ft(E.resolveType,E.data,R)}),F(null),k?.();return}const B=Gn(R),z=Un(B,a,u);if(z){W.error(z);return}const ne=Ft(E.resolveType,E.data,R);let U=null,Ne=!1;try{const J=await D.mutateAsync({blockKey:B,data:ne,create:!0});Ne=Wn(J),U=Ne?null:B,f[t]={...j,rule:cn(B)},await D.mutateAsync({blockKey:s,data:{...o,sections:{...l,variants:f}}}),U=null}catch(J){throw U&&await Nn.mutateAsync({blockKey:U}).catch(()=>{}),J}F(null),Ne||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:R})),k?.()}catch(E){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(E))})}finally{en(!1)}},$o=async(t,n)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{selectedSectionIndex:s,rawSections:a,parsedSections:o,decofile:i,activePageKey:l,pageVariants:f,variantIndex:j}=re.current;if(s===null||!l)return;const h=a[s],R=o[s];if(!h||!R?.isMultivariate)return;const E=pt(h,R);if(!E)return;const B=E.variants??[],z=B[t];if(!z?.rule||typeof z.rule!="object"){W.error(c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"));return}const ne=z.rule,U=n.trim();en(!0);const Ne=async J=>{const be={...E,variants:J},Ie=[...a];Ie[s]=Bt(h,R,be);const he=on(i,l,Ie,j,f);return await D.mutateAsync({blockKey:l,data:he}),{...i,[l]:he}};try{if(!U){if(!Jt(ne,i,u)){O(null);return}const Ze=ne.__resolveType??"",Nt=[...B];Nt[t]={...z,rule:Es(ne,i,u)};const Ct=await Ne(Nt);await qt(Ze,Ct),O(null),k?.();return}const J=Vs(ne,i,u);if(!J){W.error(c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"));return}if(J.blockKey){await D.mutateAsync({blockKey:J.blockKey,data:Ft(J.resolveType,J.data,U)}),O(null),k?.();return}const be=Gn(U),Ie=Un(be,i,u);if(Ie){W.error(Ie);return}const he=Ft(J.resolveType,J.data,U);let le=null,Ge=!1;try{const Ze=await D.mutateAsync({blockKey:be,data:he,create:!0});Ge=Wn(Ze),le=Ge?null:be;const Nt=[...B];Nt[t]={...z,rule:cn(be)},await Ne(Nt),le=null}catch(Ze){throw le&&await Nn.mutateAsync({blockKey:le}).catch(()=>{}),Ze}O(null),Ge||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:U})),k?.()}catch(J){W.error(c("sectionsEditor.sectionsEditor.failedToRenameVariant"),{description:Kt(c,Dt(J))})}finally{en(!1)}},Mr=async(t,n,s)=>{A(s);try{await D.mutateAsync({blockKey:t,data:s})}catch(a){throw A(o=>o===s?n:o),a}},Ho={rename:async(t,n,s)=>{St(),N.current&&(clearTimeout(N.current),N.current=null),ye.current.clear();const{activePageKey:a,decofile:o}=re.current;if(!a)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 Mr(a,t,E),{...o,[a]:E}},h=Bc(f,s,o,u);if(h.kind!=="noop"){if(h.kind==="error"){W.error(h.reason==="no-matcher-rule"?c("sectionsEditor.sectionsEditor.variantHasNoMatcherRule"):h.reason==="unreadable-rule"?c("sectionsEditor.sectionsEditor.couldNotReadVariantMatcherRule"):h.message??c("sectionsEditor.sectionsEditor.failedToRenameVariant"));return}en(!0);try{if(h.kind==="inline"){const B=[...i];B[n]={...l,rule:h.inlinedRule};const z=await j(B);await qt(h.blockKey,z),k?.();return}if(h.kind==="updateBlock"){await D.mutateAsync({blockKey:h.blockKey,data:h.blockData}),k?.();return}let R=null,E=!1;try{const B=await D.mutateAsync({blockKey:h.blockId,data:h.blockData,create:!0});E=Wn(B),R=E?null:h.blockId;const z=[...i];z[n]={...l,rule:h.reference},await j(z),R=null}catch(B){throw R&&await Nn.mutateAsync({blockKey:R}).catch(()=>{}),B}E||W.success(c("sectionsEditor.sectionsEditor.savedMatcherAsGlobalBlock",{trimmed:s.trim()})),k?.()}catch(R){W.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:a,decofile:o}=re.current;if(!a)return;const i=Array.isArray(t.variants)?[...t.variants]:[],l=i[n];if(!l)return;const f=Mt(l.rule,o,u);i[n]={...l,rule:cn(s)};const j={...t,variants:i},h={...o,[a]:j};try{await Mr(a,t,j),f&&f!==s&&await qt(f,h),k?.()}catch(R){W.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:a,decofile:o}=re.current;if(!a)return;let i=null;!await Mn(s,o,f=>{const j=Array.isArray(t.variants)?[...t.variants]:[],h=j[n];return h?(j[n]={...h,rule:f},i={...t,variants:j},{blockKey:a,data:i}):null})||!i||(A(i),k?.())}},Fr=()=>{Ht(),g&&$t(null,-1,0)},Ir=t=>{dn(t),cs({inner:t})},Lr=t=>{An(t),cs({raw:t})},Or=()=>{dn(null),Ot([])},zr=()=>Qt(t=>t+1),$r=()=>{fn.flush(),un(!1),dn(null),An(void 0),Ot([]),Qt(t=>t+1),ge?.()},Wo=()=>{Vn(!1),Tn(!1),L(null),un(!0)},qo=()=>{Re&&$r(),L(null),Vn(!0)},Go=()=>Tn(!0),hs=t=>{if(Yt&&t===0){Vn(!1);return}if(Lt&&t<2){Tn(!1),t===0&&L(null);return}if(Re){if(t===0){$r();return}if(t===1){Ot([]),Qt(s=>s+1);return}Ot(Bs.slice(0,t-1)),Qt(s=>s+1);return}if(q){T(K.slice(0,t)),$(s=>s+1);return}if(t===0){Fr();return}if(t===1){T([]),$(s=>s+1);return}const n=!X&&Tt&&kt?1:0;if(n===1&&t===2){T([]),$(s=>s+1);return}T(K.slice(0,t-1-n))},gs=Ln.length>1?r.jsx("button",{type:"button",onClick:()=>hs(gl(Ln.length,{isMultivariateSectionTop:Lo})),title:c("sectionsEditor.sectionsEditor.back"),"aria-label":c("sectionsEditor.sectionsEditor.back"),className:ie("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(_l,{className:"size-4"})}):null,Uo=ft||At||Re?Ko&&r.jsxs("div",{className:ie("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:Fr,title:c("sectionsEditor.sectionsEditor.editingInVariant",{variant:Se.label}),className:ie("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",il),children:[r.jsx(ol,{rule:ks(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(Yn,{className:"size-4 text-global-section-fg dark:text-global-section-fg-dark"})})}),r.jsx(Et,{side:"bottom",className:"max-w-[260px]",children:c("sectionsEditor.sectionsEditor.globalSectionTooltip")})]}),Ar&&r.jsx(Hn,{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(la,{pageKey:y,initialName:ae.name,initialPath:ae.path,onFieldChange:lr,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(ga,{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(va,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]}),r.jsx(Hn,{onClick:bn})]}),Jo=r.jsxs(r.Fragment,{children:[yt&&y&&r.jsx(ca,{listKey:y,variants:me,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:is,onReorder:Br,onRename:F,onDuplicate:Dr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsx(ua,{className:"mt-3",children:r.jsx("div",{className:ie("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(xs,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:us,onSelect:gr,onSelectGlobal:br,named:ds(Se?.rule,Sr),namedRow:_s(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})})]}),Hr=r.jsxs(r.Fragment,{children:[r.jsx(ll,{listKey:`${y??""}:${m??""}`,variants:Vt.map((t,n)=>({index:n,label:t.label})),selectedIndex:Fn,onSelect:ur,onRename:O,onDuplicate:Ro,onDelete:wo,onRemoveAll:dr,onReorder:jo,onAdd:()=>Sn()}),r.jsx(ua,{children:r.jsx(xs,{currentRt:Zt??"",currentLabel:_n(kt?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(kt?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:us,onSelect:Vo,onSelectGlobal:No,named:ds(kt?.rule,Ao),namedRow:_s(kt?.rule,Wt),rule:kt?.rule,schema:Po,formValue:$a,onChange:To,formKey:`${m??"none"}:${Fn}:${Zt??""}`,formWrapperClassName:"pt-1",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr=r.jsx("div",{className:ie(X?"px-2":"p-2 pt-3"),children:r.jsx(Cc,{listKey:`${y??""}-${te}`,rawSections:M,sections:pe,meta:u,decofile:d,selectedIndex:m,onSelect:t=>{ho(t),Je?.(t)},onReorder:go,onDelete:vo,onDuplicate:yo,onMakeReusable:Ve,onToggleHidden:So,onToggleLazy:rt?bo:void 0,onAddVariant:Sn,onDetach:xo,onAddSection:()=>We(!0),canAddSection:mr})}),Yo=r.jsxs("div",{className:"min-w-0 max-w-full space-y-4 overflow-x-hidden px-3",children:[y&&ae&&r.jsx(la,{pageKey:y,initialName:ae.name,initialPath:ae.path,onFieldChange:lr}),nn&&y?r.jsx(ja,{rawSeo:Pn,innerSeo:rs,defaultResolveType:Ys,seoTypesLoading:g&&!u,seoSchema:Qs,activeResolveType:Bn,seoTypeOptions:Js,formResetKey:Ks,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})]}),Qo=r.jsx(ln,{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(ja,{rawSeo:Pn,innerSeo:rs,defaultResolveType:Ys,seoTypesLoading:g&&!u,seoSchema:Qs,activeResolveType:Bn,seoTypeOptions:Js,formResetKey:Ks,siteDefaultSeo:Zs,onBreadcrumbChange:Ot,onPersistRaw:Lr,onInnerChange:Ir,onClearForm:Or,onBumpFormKey:zr,asyncRenderAvailable:rt}):r.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:c("sectionsEditor.sectionsEditor.seoSchemaNotFound")})})})},"editor-seo"),Zo=r.jsxs(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[yt&&y&&r.jsx(ca,{listKey:y,variants:me,activeIndex:te,decofile:d??{},meta:u,matchers:sn,onSelect:is,onReorder:Br,onRename:F,onDuplicate:Dr,onDelete:Kr,onAdd:bn}),yt&&Y!==null&&r.jsxs("div",{className:ie("px-3 border-b",En?"pt-3 pb-5 space-y-3":"py-2"),children:[r.jsxs("button",{type:"button",onClick:()=>Oa(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(yl,{className:"size-3.5 shrink-0 text-muted-foreground"}):r.jsx(Sl,{className:"size-3.5 shrink-0 text-muted-foreground"})]}),En&&r.jsx("div",{className:ie("space-y-3",Xt&&"pointer-events-none opacity-50"),children:r.jsx(xs,{currentRt:Y,currentLabel:_n(Se?.rule,d??{},we,u??void 0),currentGlobalKey:Mt(Se?.rule,d??{},u??void 0)??void 0,matchers:sn,globals:us,onSelect:gr,onSelectGlobal:br,named:ds(Se?.rule,Sr),namedRow:_s(Se?.rule,Wt),rule:Se?.rule,schema:pr,formValue:Ke,onChange:vr,formKey:`${te}:${Y??""}`,formWrapperClassName:"space-y-3",meta:u??void 0,decofile:d,onSaveReferencedBlock:mn,sandbox:gn})})]}),Wr]},"editor-section-list");return r.jsx(cl,{value:g,children:r.jsx(ul,{children:r.jsxs("div",{className:"flex h-full min-w-0 w-full flex-col",children:[!X&&gs&&r.jsx("div",{className:"flex min-w-0 shrink-0 items-center gap-2 px-3 py-2",children:gs}),(X||Ln.length>1)&&r.jsx(dl,{crumbs:Ln,onSelect:hs,onSelectRoot:()=>{fn.flush(),Ue?Ue():hs(0)}}),r.jsx("div",{className:"shrink-0",children:X?r.jsxs("div",{className:ie("flex items-center gap-2 border-b px-3 py-2.5",ft&&"border-global-section/22 bg-global-section/12 dark:bg-global-section/16"),children:[X&&gs,ft&&r.jsxs(Rt,{children:[r.jsx(jt,{asChild:!0,children:r.jsx("span",{className:"shrink-0 cursor-help",children:r.jsx(Yn,{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:Io}),Pr&&r.jsx("span",{className:"truncate text-xs text-muted-foreground",children:Pr})]}),ps&&yt&&Se&&r.jsx(da,{variants:me,activeIndex:te,onSelect:is,onManage:qo,onRemoveAll:Oo}),Mo&&r.jsx(da,{variants:Vt,activeIndex:Fn,onSelect:ur,onManage:Go,onRemoveAll:dr}),ps&&!yt&&r.jsx(Hn,{onClick:bn}),Do&&r.jsx(Hn,{onClick:()=>Sn()}),r.jsx(fl,{}),ps&&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:Wo,children:r.jsx(ga,{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(va,{size:14})})}),r.jsx(Et,{side:"bottom",children:c("sectionsEditor.sectionsEditor.viewJson")})]})]})]}):Uo}),ut&&r.jsx(fi,{open:!0,fields:mi(ut.plan,ut.target.schema),choices:ut.choices,changedAgain:ut.changedAgain,author:Hs??null,authorPending:Hs===void 0,fieldsAsLabeled:$s!==null,fresh:ut.fresh,keepTyping:g,onChoose:(t,n)=>po({...ut.choices,[t]:n}),onApply:mo},Mc(ut.formBase)),Lt?r.jsx(fa,{onAdd:()=>Sn(),children:Hr},"editor-section-variants"):At?r.jsxs(ln,{viewportRef:fe,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:[!X&&Tt&&Vt.length>0&&K.length===0&&Hr,r.jsx(Ea,{value:yr,children:r.jsx(ma,{value:q&&g?Be:null,children:r.jsx(pa,{activeSchema:Dn,formValue:Xe,formResetKey:De,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:K,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForVariant"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr,onVariantMatcherOp:q?Ho:void 0})})})]},"editor-section-form"):q?r.jsx(ln,{viewportRef:fe,onBlur:nr,className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx(Ea,{value:yr,children:r.jsx(ma,{value:q&&g?Be:null,children:r.jsx(pa,{activeSchema:Dn,formValue:Xe,formResetKey:De,onFormChange:ir,onBreadcrumbChange:T,breadcrumbPath:K,emptyMessage:c("sectionsEditor.sectionsEditor.noEditableFieldsForGlobalBlock"),meta:u,decofile:d,onSaveReferencedBlock:mn,sandbox:gn,previewBaseUrl:st,onRequestAddSection:cr})})})},"editor-global-block"):Re?X?r.jsx(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"p-3",children:Yo})},"editor-seo"):Qo:Yt?r.jsx(fa,{onAdd:bn,children:Jo},"editor-variants"):X?r.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[r.jsx(ln,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:r.jsx("div",{className:"py-2",children:Wr})}),r.jsx("div",{className:"shrink-0 border-t p-2",children:r.jsx(Ts,{canAddSection:mr,onAddSection:()=>We(!0)})})]},"editor-section-list"):Zo,r.jsx(ml,{open:oe!==null,onOpenChange:t=>{t||Ve(null)},defaultBlockId:oe!==null?Gn(pe[oe]?.label??""):"",isPending:D.isPending,onSubmit:Eo}),at&&r.jsx(ac,{open:Ae,onOpenChange:t=>{We(t),t||(jn.current=null)},meta:u,decofile:d,previewBaseUrl:st,onSelect:ko}),ht&&y&&d&&r.jsx(zl,{open:ht,onOpenChange:bt,pageKey:y,decofile:d}),Te!==null&&r.jsx(ha,{open:!0,initialName:Jt(me[Te]?.rule,d??{},u??void 0)?_n(me[Te]?.rule,d??{},we,u??void 0):"",autoLabel:we(ks(me[Te]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await zo(Te,t)},onOpenChange:t=>{!t&&!Xt&&F(null)}}),tt!==null&&r.jsx(ha,{open:!0,initialName:Jt(Vt[tt]?.rule,d??{},u??void 0)?_n(Vt[tt]?.rule,d??{},we,u??void 0):"",autoLabel:we(ks(Vt[tt]?.rule,d??{},u??void 0)),isPending:Xt,onSubmit:async t=>{await $o(tt,t)},onOpenChange:t=>{!t&&!Xt&&O(null)}})]})})})}export{uf as SectionsEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,j as o}from"./index-B0M6fld0.js";import{V as a}from"./index-bp35vkxQ.js";function p(s){const t=e.c(2),{virtualMcpId:r}=s;let i;return t[0]!==r?(i=o.jsx(a,{virtualMcpId:r}),t[0]=r,t[1]=i):i=t[1],i}export{p as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as C,b as J,e as nt,j as o,B as D,t as X,o as ot,cV as xe,ag as qt,a as ne,M as Bt,V as Kt,K as Xe,cW as Ht,cX as Ut,at as ge,m as wt,b9 as bn,C as Pt,r as G,ae as wn,af as ae,cY as Sn,w as Gt,x as Jt,v as Vt,D as Yt,i as he,cZ as vn,ar as Wt,d as kt,a5 as Tt,H as jn,T as Qt,E as St,aS as Xt,c_ as kn,aY as Tn,b3 as _t,J as Nn,c$ as Pn,aT as _n,y as On,d0 as In,d1 as An,d2 as En,d3 as Cn,d4 as $n,a6 as Rn,u as Ln,a7 as zn,d5 as Dn,d6 as Mn,l as Zt,d7 as Ot,d8 as Fn,O as qn,a_ as It,d9 as Bn,a0 as Kn}from"./index-B0M6fld0.js";import{t as en}from"./Globe04-DFwi3CoQ.js";import{i as Hn,s as oe}from"./UserSquare-CPjVW48L.js";import{u as Un}from"./use-deployment-admin-CoSxtFqU.js";import{a as Gn}from"./admin-fetch-BhTJlAsX.js";import{aw as Jn,S as Vn,G as bt,a7 as Yn,I as Wn,ax as Qn,ay as Xn,n as At,h as Zn,az as es,m as ts,aA as ns}from"./agent-icon-2MzErGc_.js";import{s as tn}from"./XClose-BBI2UlVL.js";import{u as ss,a as os}from"./use-project-scope-BLJIcw6l.js";import{u as nn,a as is,A as as}from"./autosend-C5Y0g7p2.js";import{i as fe}from"./CheckCircle-l0BgBdex.js";import{i as Et}from"./Monitor01-pdAw5Hpb.js";import{i as We}from"./Zap-B1DyovfK.js";import{s as Ct}from"./Plus-DD-WVS1P.js";import{a as rs}from"./Tool01-CMaWHp8E.js";import{e as Qe,b as ie,d as ls,a as cs,c as ds,C as us}from"./command-BNUAVYAm.js";import{I as ms}from"./integration-icon-CbGo7Hoi.js";import{P as fs}from"./project-icon-BFEgPANo.js";import{a as gs}from"./use-navigate-to-agent-BPUG-DwT.js";import{u as hs}from"./use-debounced-value-Df5Y0bKp.js";import{a as ps,m as ys}from"./use-mcp-client-C8sFqQYs.js";import{u as xs,a as bs,n as ws}from"./new-project-dialog-xaa497EH.js";import{S as Ss,u as vs}from"./thread-intent-B-lUepd6.js";import{R as js}from"./required-auth-layout-BDLyo6_T.js";import{u as ks,a as Ts,b as Ns,c as Ps}from"./thread-route-CidpLna8.js";import{u as _s}from"./use-org-sso-CxdxMmbI.js";function Os(t){const e=C.c(49),{orgName:s,orgSlug:a,orgLogo:n,domain:r}=t,i=J();let l;e[0]!==a||e[1]!==i?(l=async()=>{const O=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),A=await O.json();if(!O.ok||!A.success)throw new Error(A.error??i("common.autoDomainJoinScreen.joinError"));return A},e[0]=a,e[1]=i,e[2]=l):l=e[2];let d;e[3]!==a?(d=O=>{window.location.href=`/${O.slug??a}`},e[3]=a,e[4]=d):d=e[4];let g;e[5]!==i?(g=O=>{X.error(O instanceof Error?O.message:i("common.autoDomainJoinScreen.joinError"))},e[5]=i,e[6]=g):g=e[6];let h;e[7]!==l||e[8]!==d||e[9]!==g?(h={mutationFn:l,onSuccess:d,onError:g},e[7]=l,e[8]=d,e[9]=g,e[10]=h):h=e[10];const f=nt(h),m=Is;let c;e[11]!==n||e[12]!==s?(c=n?o.jsx(ot,{url:n,fallback:s,shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(en,{className:"h-6 w-6 text-primary"})}),e[11]=n,e[12]=s,e[13]=c):c=e[13];let y;e[14]!==s||e[15]!==i?(y=i("common.autoDomainJoinScreen.joinPrompt",{orgName:s}),e[14]=s,e[15]=i,e[16]=y):y=e[16];let u;e[17]!==y?(u=o.jsx("h3",{className:"text-lg font-medium",children:y}),e[17]=y,e[18]=u):u=e[18];let p;e[19]!==r||e[20]!==i?(p=i("common.autoDomainJoinScreen.joinDescription",{domain:r}),e[19]=r,e[20]=i,e[21]=p):p=e[21];let S;e[22]!==p?(S=o.jsx("p",{className:"text-sm text-muted-foreground",children:p}),e[22]=p,e[23]=S):S=e[23];let x;e[24]!==u||e[25]!==S?(x=o.jsxs("div",{className:"space-y-2",children:[u,S]}),e[24]=u,e[25]=S,e[26]=x):x=e[26];let b;e[27]!==f?(b=()=>f.mutate(),e[27]=f,e[28]=b):b=e[28];let v;e[29]!==f.isPending||e[30]!==s||e[31]!==i?(v=f.isPending?i("common.autoDomainJoinScreen.joining"):i("common.autoDomainJoinScreen.enterOrg",{orgName:s}),e[29]=f.isPending,e[30]=s,e[31]=i,e[32]=v):v=e[32];let w;e[33]!==f.isPending||e[34]!==b||e[35]!==v?(w=o.jsx(D,{onClick:b,disabled:f.isPending,children:v}),e[33]=f.isPending,e[34]=b,e[35]=v,e[36]=w):w=e[36];const N=f.isPending;let T;e[37]!==i?(T=i("common.goHome"),e[37]=i,e[38]=T):T=e[38];let j;e[39]!==f.isPending||e[40]!==T?(j=o.jsx(D,{variant:"ghost",onClick:m,disabled:N,children:T}),e[39]=f.isPending,e[40]=T,e[41]=j):j=e[41];let P;e[42]!==w||e[43]!==j?(P=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[w,j]}),e[42]=w,e[43]=j,e[44]=P):P=e[44];let _;return e[45]!==x||e[46]!==P||e[47]!==c?(_=o.jsxs(xe,{children:[c,x,P]}),e[45]=x,e[46]=P,e[47]=c,e[48]=_):_=e[48],_}function Is(){window.location.href="/"}function $t(t){const e=C.c(26),{orgSlug:s,orgId:a,orgName:n,reason:r}=t,i=J(),{isAdmin:l}=Un(),d=As,g=r==="not-found",h=g?Hn:qt;let f;e[0]!==g||e[1]!==i?(f=i(g?"common.noAccessScreen.organizationNotFound":"common.noAccessScreen.noAccess"),e[0]=g,e[1]=i,e[2]=f):f=e[2];const m=f;let c;e[3]!==g||e[4]!==n||e[5]!==s||e[6]!==i?(c=g?o.jsxs(o.Fragment,{children:[i("common.noAccessScreen.couldNotFind")," ",o.jsx("strong",{children:s}),"."]}):o.jsxs(o.Fragment,{children:[i("common.noAccessScreen.noAccessTo")," ",o.jsx("strong",{children:n??s}),".",o.jsx("br",{}),i("common.noAccessScreen.askAdminToInvite")]}),e[3]=g,e[4]=n,e[5]=s,e[6]=i,e[7]=c):c=e[7];const y=c;let u;e[8]!==h?(u=o.jsx("div",{className:"bg-muted p-3 rounded-full",children:o.jsx(h,{className:"h-6 w-6 text-muted-foreground"})}),e[8]=h,e[9]=u):u=e[9];let p;e[10]!==m?(p=o.jsx("h3",{className:"text-lg font-medium",children:m}),e[10]=m,e[11]=p):p=e[11];let S;e[12]!==y?(S=o.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[12]=y,e[13]=S):S=e[13];let x;e[14]!==p||e[15]!==S?(x=o.jsxs("div",{className:"space-y-2",children:[p,S]}),e[14]=p,e[15]=S,e[16]=x):x=e[16];let b;e[17]!==l||e[18]!==a||e[19]!==s||e[20]!==i?(b=l&&a?o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[o.jsx(Es,{orgId:a,orgSlug:s}),o.jsx(D,{variant:"ghost",onClick:d,children:i("common.goHome")})]}):o.jsx(D,{onClick:d,children:i("common.goHome")}),e[17]=l,e[18]=a,e[19]=s,e[20]=i,e[21]=b):b=e[21];let v;return e[22]!==u||e[23]!==x||e[24]!==b?(v=o.jsxs(xe,{children:[u,x,b]}),e[22]=u,e[23]=x,e[24]=b,e[25]=v):v=e[25],v}function As(){window.location.href="/"}function Es(t){const e=C.c(20),{orgId:s,orgSlug:a}=t,n=J(),{data:r}=ne.useSession(),i=r?.user.email;let l;e[0]!==i||e[1]!==s?(l=()=>Gn(`/api/_admin/orgs/${s}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,role:"admin"})}),e[0]=i,e[1]=s,e[2]=l):l=e[2];let d;e[3]!==a?(d=()=>{window.location.href=`/${a}`},e[3]=a,e[4]=d):d=e[4];let g;e[5]!==n?(g=p=>{X.error(p instanceof Error?p.message:n("common.noAccessScreen.adminJoinFailed"))},e[5]=n,e[6]=g):g=e[6];let h;e[7]!==l||e[8]!==d||e[9]!==g?(h={mutationFn:l,onSuccess:d,onError:g},e[7]=l,e[8]=d,e[9]=g,e[10]=h):h=e[10];const f=nt(h);let m;e[11]!==f?(m=()=>f.mutate(),e[11]=f,e[12]=m):m=e[12];const c=!i||f.isPending;let y;e[13]!==f.isPending||e[14]!==n?(y=f.isPending?n("common.noAccessScreen.adminJoining"):n("common.noAccessScreen.adminJoin"),e[13]=f.isPending,e[14]=n,e[15]=y):y=e[15];let u;return e[16]!==m||e[17]!==c||e[18]!==y?(u=o.jsx(D,{onClick:m,disabled:c,children:y}),e[16]=m,e[17]=c,e[18]=y,e[19]=u):u=e[19],u}function Cs(t){const e=C.c(59),{invitationId:s,orgName:a,orgSlug:n,orgLogo:r}=t,i=J();let l;e[0]!==s?(l=async()=>{const I=await ne.organization.acceptInvitation({invitationId:s});if(I.error)throw new Error(I.error.message);return I.data},e[0]=s,e[1]=l):l=e[1];let d;e[2]!==n?(d=()=>{Bt(),window.location.href=`/${n}`},e[2]=n,e[3]=d):d=e[3];let g;e[4]!==i?(g=I=>{X.error(I instanceof Error?I.message:i("common.pendingInviteScreen.failedToAccept"))},e[4]=i,e[5]=g):g=e[5];let h;e[6]!==l||e[7]!==d||e[8]!==g?(h={mutationFn:l,onSuccess:d,onError:g},e[6]=l,e[7]=d,e[8]=g,e[9]=h):h=e[9];const f=nt(h);let m;e[10]!==s?(m=async()=>{const I=await ne.organization.rejectInvitation({invitationId:s});if(I.error)throw new Error(I.error.message);return I.data},e[10]=s,e[11]=m):m=e[11];let c,y;e[12]!==i?(c=()=>{X.success(i("common.pendingInviteScreen.invitationDeclined")),window.location.href="/"},y=I=>{X.error(I instanceof Error?I.message:i("common.pendingInviteScreen.failedToDecline"))},e[12]=i,e[13]=c,e[14]=y):(c=e[13],y=e[14]);let u;e[15]!==m||e[16]!==c||e[17]!==y?(u={mutationFn:m,onSuccess:c,onError:y},e[15]=m,e[16]=c,e[17]=y,e[18]=u):u=e[18];const p=nt(u),S=f.isPending||p.isPending;let x;e[19]!==r||e[20]!==a?(x=r?o.jsx(ot,{url:r,fallback:a,shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(Jn,{className:"h-6 w-6 text-primary"})}),e[19]=r,e[20]=a,e[21]=x):x=e[21];let b;e[22]!==a||e[23]!==i?(b=i("common.pendingInviteScreen.invitedTo",{orgName:a}),e[22]=a,e[23]=i,e[24]=b):b=e[24];let v;e[25]!==b?(v=o.jsx("h3",{className:"text-lg font-medium",children:b}),e[25]=b,e[26]=v):v=e[26];let w;e[27]!==i?(w=i("common.pendingInviteScreen.acceptDescription"),e[27]=i,e[28]=w):w=e[28];let N;e[29]!==w?(N=o.jsx("p",{className:"text-sm text-muted-foreground",children:w}),e[29]=w,e[30]=N):N=e[30];let T;e[31]!==v||e[32]!==N?(T=o.jsxs("div",{className:"space-y-2",children:[v,N]}),e[31]=v,e[32]=N,e[33]=T):T=e[33];let j;e[34]!==f?(j=()=>f.mutate(),e[34]=f,e[35]=j):j=e[35];let P;e[36]!==f.isPending||e[37]!==i?(P=f.isPending?i("common.pendingInviteScreen.acceptingButton"):i("common.pendingInviteScreen.acceptButton"),e[36]=f.isPending,e[37]=i,e[38]=P):P=e[38];let _;e[39]!==S||e[40]!==j||e[41]!==P?(_=o.jsx(D,{onClick:j,disabled:S,children:P}),e[39]=S,e[40]=j,e[41]=P,e[42]=_):_=e[42];let O;e[43]!==p?(O=()=>p.mutate(),e[43]=p,e[44]=O):O=e[44];let A;e[45]!==p.isPending||e[46]!==i?(A=p.isPending?i("common.pendingInviteScreen.decliningButton"):i("common.pendingInviteScreen.declineButton"),e[45]=p.isPending,e[46]=i,e[47]=A):A=e[47];let $;e[48]!==S||e[49]!==O||e[50]!==A?($=o.jsx(D,{variant:"ghost",onClick:O,disabled:S,children:A}),e[48]=S,e[49]=O,e[50]=A,e[51]=$):$=e[51];let R;e[52]!==_||e[53]!==$?(R=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[_,$]}),e[52]=_,e[53]=$,e[54]=R):R=e[54];let L;return e[55]!==T||e[56]!==R||e[57]!==x?(L=o.jsxs(xe,{children:[x,T,R]}),e[55]=T,e[56]=R,e[57]=x,e[58]=L):L=e[58],L}function $s(t){const e=C.c(23),{orgName:s,orgLogo:a}=t,n=J();let r;e[0]!==a||e[1]!==s?(r=a?o.jsx(ot,{url:a,fallback:s,shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:o.jsx(Vn,{className:"h-6 w-6 text-primary"})}),e[0]=a,e[1]=s,e[2]=r):r=e[2];let i;e[3]!==n?(i=n("common.requestPendingScreen.title"),e[3]=n,e[4]=i):i=e[4];let l;e[5]!==i?(l=o.jsx("h3",{className:"text-lg font-medium",children:i}),e[5]=i,e[6]=l):l=e[6];let d;e[7]!==s||e[8]!==n?(d=n("common.requestPendingScreen.description",{orgName:s}),e[7]=s,e[8]=n,e[9]=d):d=e[9];let g;e[10]!==d?(g=o.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[10]=d,e[11]=g):g=e[11];let h;e[12]!==l||e[13]!==g?(h=o.jsxs("div",{className:"space-y-2",children:[l,g]}),e[12]=l,e[13]=g,e[14]=h):h=e[14];let f;e[15]!==n?(f=n("common.goHome"),e[15]=n,e[16]=f):f=e[16];let m;e[17]!==f?(m=o.jsx(D,{variant:"ghost",onClick:Rs,children:f}),e[17]=f,e[18]=m):m=e[18];let c;return e[19]!==r||e[20]!==h||e[21]!==m?(c=o.jsxs(xe,{children:[r,h,m]}),e[19]=r,e[20]=h,e[21]=m,e[22]=c):c=e[22],c}function Rs(){window.location.href="/"}function Ls(t){const e=C.c(45),{orgName:s,orgSlug:a,orgLogo:n,domain:r}=t,i=J();let l;e[0]!==a?(l=async()=>{const _=await fetch("/api/auth/custom/domain-request-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:a})}),O=await _.json();if(!_.ok||!O.success)throw new Error(O.error??"Failed to request access");return O},e[0]=a,e[1]=l):l=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=Ds,e[2]=d):d=e[2];let g;e[3]!==i?(g=_=>{X.error(_ instanceof Error?_.message:i("common.requestToJoinScreen.failedToRequest"))},e[3]=i,e[4]=g):g=e[4];let h;e[5]!==l||e[6]!==g?(h={mutationFn:l,onSuccess:d,onError:g},e[5]=l,e[6]=g,e[7]=h):h=e[7];const f=nt(h);let m;e[8]!==n||e[9]!==s?(m=n?o.jsx(ot,{url:n,fallback:s,shape:"square",size:"base",className:"h-12 w-12"}):o.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:o.jsx(en,{className:"h-6 w-6 text-primary"})}),e[8]=n,e[9]=s,e[10]=m):m=e[10];let c;e[11]!==s||e[12]!==i?(c=i("common.requestToJoinScreen.title",{orgName:s}),e[11]=s,e[12]=i,e[13]=c):c=e[13];let y;e[14]!==c?(y=o.jsx("h3",{className:"text-lg font-medium",children:c}),e[14]=c,e[15]=y):y=e[15];let u;e[16]!==r||e[17]!==i?(u=i("common.requestToJoinScreen.description",{domain:r}),e[16]=r,e[17]=i,e[18]=u):u=e[18];let p;e[19]!==u?(p=o.jsx("p",{className:"text-sm text-muted-foreground",children:u}),e[19]=u,e[20]=p):p=e[20];let S;e[21]!==y||e[22]!==p?(S=o.jsxs("div",{className:"space-y-2",children:[y,p]}),e[21]=y,e[22]=p,e[23]=S):S=e[23];let x;e[24]!==f?(x=()=>f.mutate(),e[24]=f,e[25]=x):x=e[25];let b;e[26]!==f.isPending||e[27]!==i?(b=f.isPending?i("common.requestToJoinScreen.requesting"):i("common.requestToJoinScreen.requestButton"),e[26]=f.isPending,e[27]=i,e[28]=b):b=e[28];let v;e[29]!==f.isPending||e[30]!==x||e[31]!==b?(v=o.jsx(D,{onClick:x,disabled:f.isPending,children:b}),e[29]=f.isPending,e[30]=x,e[31]=b,e[32]=v):v=e[32];const w=f.isPending;let N;e[33]!==i?(N=i("common.goHome"),e[33]=i,e[34]=N):N=e[34];let T;e[35]!==f.isPending||e[36]!==N?(T=o.jsx(D,{variant:"ghost",onClick:zs,disabled:w,children:N}),e[35]=f.isPending,e[36]=N,e[37]=T):T=e[37];let j;e[38]!==v||e[39]!==T?(j=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[v,T]}),e[38]=v,e[39]=T,e[40]=j):j=e[40];let P;return e[41]!==S||e[42]!==j||e[43]!==m?(P=o.jsxs(xe,{children:[m,S,j]}),e[41]=S,e[42]=j,e[43]=m,e[44]=P):P=e[44],P}function zs(){window.location.href="/"}function Ds(t){if(t.alreadyMember&&t.slug){window.location.href=`/${t.slug}`;return}window.location.reload()}function Ms(t){const e=C.c(7);let s;e[0]!==t?(s=Xe.orgAccessStatus(t),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const r=await fetch(`/api/auth/custom/org-access-status/${encodeURIComponent(t)}`,{credentials:"include"});if(!r.ok)throw new Error(`org-access-status failed (${r.status})`);return await r.json()},e[2]=t,e[3]=a):a=e[3];let n;return e[4]!==s||e[5]!==a?(n={queryKey:s,queryFn:a,refetchOnWindowFocus:!1},e[4]=s,e[5]=a,e[6]=n):n=e[6],Kt(n)}function Fs({orgSlug:t}){const{data:e}=Ms(t);if(e.status!=="member"){const s=Ht()?.org===t;s&&Ut();const a=localStorage.getItem(ge.lastOrgSlug())===t;if(a&&localStorage.removeItem(ge.lastOrgSlug()),(s||a)&&(e.status==="not-found"||e.status==="no-access"))return window.location.href="/",null}return e.status==="not-found"?o.jsx($t,{orgSlug:t,reason:"not-found"}):e.status==="pending-invite"?o.jsx(Cs,{invitationId:e.invitation.id,orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo}):e.status==="auto-domain-join"?o.jsx(Os,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="can-request"?o.jsx(Ls,{orgName:e.organization.name,orgSlug:e.organization.slug,orgLogo:e.organization.logo,domain:e.organization.domain??""}):e.status==="request-pending"?o.jsx($s,{orgName:e.organization.name,orgLogo:e.organization.logo}):e.status==="member"?(window.location.reload(),null):o.jsx($t,{orgSlug:t,orgId:e.organization.id,orgName:e.organization.name,reason:"no-access"})}function sn(t){const e=C.c(42),{ariaLabel:s,dismissLabel:a,eyebrow:n,title:r,description:i,icon:l,children:d,footerLeading:g,actions:h,onDismiss:f,tone:m}=t,c=m===void 0?"neutral":m,y=g||h;let u;e[0]!==c?(u=c==="system"&&o.jsx("div",{className:"h-0.5 bg-special"}),e[0]=c,e[1]=u):u=e[1];let p;e[2]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(tn,{size:14}),e[2]=p):p=e[2];let S;e[3]!==a||e[4]!==f?(S=o.jsx(D,{size:"icon-sm",variant:"ghost","aria-label":a,className:"absolute right-2 top-2 z-10 text-muted-foreground",onClick:f,children:p}),e[3]=a,e[4]=f,e[5]=S):S=e[5];const x=l&&"flex items-start gap-3",b=d&&"pb-3";let v;e[6]!==x||e[7]!==b?(v=wt("p-4 pr-11",x,b),e[6]=x,e[7]=b,e[8]=v):v=e[8];let w;e[9]!==l?(w=l&&o.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-special/10 text-special",children:l}),e[9]=l,e[10]=w):w=e[10];let N;e[11]!==n?(N=n&&o.jsx("p",{className:"text-xs text-muted-foreground",children:n}),e[11]=n,e[12]=N):N=e[12];let T;e[13]!==r?(T=o.jsx("h3",{className:"text-base font-semibold text-foreground",children:r}),e[13]=r,e[14]=T):T=e[14];let j;e[15]!==i?(j=i&&o.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}),e[15]=i,e[16]=j):j=e[16];let P;e[17]!==T||e[18]!==j||e[19]!==N?(P=o.jsxs("div",{children:[N,T,j]}),e[17]=T,e[18]=j,e[19]=N,e[20]=P):P=e[20];let _;e[21]!==d?(_=d&&o.jsx("div",{className:"mt-3",children:d}),e[21]=d,e[22]=_):_=e[22];let O;e[23]!==P||e[24]!==_?(O=o.jsxs("div",{className:"min-w-0 flex-1",children:[P,_]}),e[23]=P,e[24]=_,e[25]=O):O=e[25];let A;e[26]!==O||e[27]!==v||e[28]!==w?(A=o.jsxs("div",{className:v,children:[w,O]}),e[26]=O,e[27]=v,e[28]=w,e[29]=A):A=e[29];let $;e[30]!==h||e[31]!==g||e[32]!==y||e[33]!==c?($=y&&o.jsxs("div",{className:wt("flex items-center justify-between gap-3 px-4 py-2.5",c==="system"?"border-t border-border bg-muted/50":"pt-0"),children:[o.jsx("div",{className:"min-w-0 text-xs text-muted-foreground",children:g}),o.jsx("div",{className:"flex shrink-0 items-center gap-2",children:h})]}),e[30]=h,e[31]=g,e[32]=y,e[33]=c,e[34]=$):$=e[34];let R;return e[35]!==s||e[36]!==A||e[37]!==$||e[38]!==u||e[39]!==S||e[40]!==c?(R=o.jsxs("div",{role:"dialog","aria-label":s,"data-slot":"announcement-card","data-tone":c,className:"relative w-full overflow-hidden rounded-lg bg-popover shadow-soft animate-in fade-in slide-in-from-bottom-2 duration-300",children:[u,S,A,$]}),e[35]=s,e[36]=A,e[37]=$,e[38]=u,e[39]=S,e[40]=c,e[41]=R):R=e[41],R}const qs={switcher:"tour-layout-switcher",nav:"tour-layout-nav",tasks:"tour-layout-tasks",projects:"tour-layout-projects",account:"tour-layout-account",recentActivity:"tour-layout-recent-activity",siteEditor:"tour-layout-site-editor",surfaceTabs:"tour-layout-surface-tabs",branchPicker:"tour-layout-branch-picker",automations:"tour-layout-automations",settings:"tour-layout-settings"};function on(t){return`[data-tour="${qs[t]}"]`}const Bs=[{scope:"shell",anchor:"switcher",titleKey:"layoutTour.switcher.title",descKey:"layoutTour.switcher.description",side:"right"},{scope:"shell",anchor:"nav",titleKey:"layoutTour.nav.title",descKey:"layoutTour.nav.description",side:"right"},{scope:"shell",anchor:"tasks",titleKey:"layoutTour.tasks.title",descKey:"layoutTour.tasks.description",side:"right"},{scope:"project",anchor:"siteEditor",titleKey:"layoutTour.siteEditor.title",descKey:"layoutTour.siteEditor.description",side:"right"},{scope:"project",anchor:"automations",titleKey:"layoutTour.automations.title",descKey:"layoutTour.automations.description",side:"right"},{scope:"shell",anchor:"settings",titleKey:"layoutTour.settings.title",descKey:"layoutTour.settings.description",side:"right"},{scope:"shell",anchor:"projects",titleKey:"layoutTour.projects.title",descKey:"layoutTour.projects.description",side:"right"},{scope:"shell",anchor:"account",titleKey:"layoutTour.account.title",descKey:"layoutTour.account.description",side:"right"},{scope:"siteEditor",anchor:"surfaceTabs",titleKey:"layoutTour.surfaceTabs.title",descKey:"layoutTour.surfaceTabs.description",side:"bottom"},{scope:"siteEditor",anchor:"branchPicker",titleKey:"layoutTour.branchPicker.title",descKey:"layoutTour.branchPicker.description",side:"bottom"},{scope:"orgHome",anchor:"recentActivity",titleKey:"layoutTour.recentActivity.title",descKey:"layoutTour.recentActivity.description",side:"top"}];function Ks(t){return Bs.filter(e=>e.scope==="shell"||e.scope==="orgHome"&&t.onOrgHome||e.scope==="project"&&t.inProject||e.scope==="siteEditor"&&t.onSiteEditor)}function Hs(t,e){return Ks(e).map(s=>({element:on(s.anchor),popover:{title:t(s.titleKey),description:t(s.descKey),side:s.side,align:"center"}}))}const Us=on("switcher"),Gs=30;function an(t){const e=document.querySelector(t);return e instanceof HTMLElement&&e.offsetParent!==null}function Js(t,e){return Hs(t,e).filter(s=>typeof s.element=="string"&&an(s.element))}function Vs(t,e){return{showProgress:!0,progressText:t("layoutTour.progress"),nextBtnText:t("layoutTour.next"),prevBtnText:t("layoutTour.prev"),doneBtnText:t("layoutTour.done"),showButtons:["next","previous"],smoothScroll:!0,allowClose:!0,disableActiveInteraction:!0,stagePadding:6,stageRadius:8,waitForElement:0,skipMissingElement:!0,popoverClass:"layout-tour-popover",onPopoverRender:(s,{driver:a})=>{if(s.footerButtons.querySelector(".layout-tour-skip"))return;const n=document.createElement("button");n.type="button",n.className="driver-popover-footer-btn layout-tour-skip",n.textContent=t("layoutTour.skip"),n.addEventListener("click",()=>a.destroy()),s.footerButtons.insertBefore(n,s.footerButtons.firstChild)},onDestroyed:()=>{et=!1},steps:e}}let et=!1;async function Ys(){return(await bn(()=>import("./driver.js-Dj4CfABu.js"),[])).driver}function Ws(t,e){if(et)return;et=!0;let s=0;const a=()=>{if(!an(Us)&&s++<Gs){requestAnimationFrame(a);return}const n=Js(t,e);if(n.length===0){et=!1;return}Ys().then(r=>{r(Vs(t,n)).drive()}).catch(()=>{et=!1})};a()}function Qs(t){return t!=="off"}function Gi(t){if(!t.hasSource)return[];const e=["site-editor"];return Qs(t.cmsMode)&&e.push("content"),t.runtime==="sandbox"&&e.push("code"),e}function rn(t){return t==="site-editor"||t==="content"||t==="code"||t.startsWith("code:")}function Ji(t){return t.reportsOnly&&!t.onReportAgent&&rn(t.tabId)}const ln=[{id:"new-layout",date:"2026-09-22",eyebrow:"Now Available",title:"New Layout",bullets:[{icon:Et,title:"Unified page headers",body:"Every page now has a clear header with navigation breadcrumbs and actions, making it easy to orient yourself and move around."},{icon:bt,title:"Consistent navigation and controls",body:"Settings and project pages use a predictable sidebar instead of scattered tabs. Buttons, inputs and toolbars share one shape and one height, and the layout adapts to smaller screens."},{icon:Yn,title:"Site editor redesigned",body:"Try the redesigned blocks editor from Profile & Preferences. Blocks share consistent actions, variants appear beside their block in the header, and section selection is searchable."}],cta:{label:"Take a tour",action:"start-tour"}},{id:"unified-workspace-layout",date:"2026-09-01",eyebrow:"Now Available",title:"A new way around Studio",bullets:[{icon:Pt,title:"Unified org switcher",body:"Organizations and agents now share one control at the top of the sidebar. Search it to jump straight to any agent, including ones in your other organizations."},{icon:oe,title:"Your org at a glance",body:"The organization home now opens on the agents your team built and the tasks they are running — no empty board to fill in first."},{icon:Et,title:"Simplified CMS",body:"The CMS opens over the page you are previewing rather than somewhere else, so changing a section never costs you your place."}],cta:{label:"Take the tour",action:"start-tour"}},{id:"codex-gpt-5-6-defaults",date:"2026-07-13",eyebrow:"Now Available",title:"Codex defaults move to GPT-5.6",bullets:[{icon:oe,title:"Sol leads Thinking",body:"Codex Thinking now defaults to `gpt-5.6-sol` for deeper coding and reasoning work."},{icon:fe,title:"Terra balances Smart",body:"The Smart tier now uses `gpt-5.6-terra`, replacing GPT-5.4 as the default balanced Codex model."},{icon:We,title:"Luna speeds up Fast",body:"The Fast tier and lightweight Codex title generation now use `gpt-5.6-luna`. Existing threads that reference older GPT-5.4 or GPT-5.5 model IDs remain supported."}]},{id:"claude-sonnet-5",date:"2026-06-30",eyebrow:"Now Available",title:"Claude Sonnet 5 powers the Smart tier",bullets:[{icon:oe,title:"More agentic coding",body:"Sonnet 5 is Anthropic's strongest Sonnet model yet, with improved reasoning, tool use, coding, and knowledge work compared with Sonnet 4.6."},{icon:fe,title:"Available in Claude Code",body:"The Claude Code harness now pins the Smart tier to the new `claude-sonnet-5` model id so new sessions use Sonnet 5 by default."},{icon:We,title:"Nothing to change",body:"Existing Smart-tier chats and agents pick up Sonnet 5 automatically. Thinking remains on Opus 4.8 1M."}],learnMoreHref:"https://www.anthropic.com/news/claude-sonnet-5"},{id:"fable-5-suspension",date:"2026-06-13",eyebrow:"Important Update",title:"Fable 5 & Mythos 5 suspended — Opus 4.8 takes over",bullets:[{icon:fe,title:"US government directive",body:"Anthropic received an export control directive requiring the suspension of Fable 5 and Mythos 5 access for all users, citing national security concerns. Anthropic is complying while it works to resolve the matter."},{icon:oe,title:"Opus 4.8 steps in as the Thinking tier",body:"The Thinking tier now runs on Claude Opus 4.8, which remains fully operational. Performance on most tasks is comparable, and Anthropic reports more than 95% of sessions were unaffected by the Fable 5 classifiers anyway."},{icon:We,title:"Nothing to change",body:"The switch is automatic — any chat or agent already using the Thinking tier is now served by Opus 4.8. Anthropic will share further details within 24 hours."}],learnMoreHref:"https://www.anthropic.com/news/fable-mythos-access"},{id:"claude-fable-5",date:"2026-06-09",eyebrow:"Now Available",title:"Claude Fable 5 leads the Thinking tier",bullets:[{icon:oe,title:"State-of-the-art reasoning",body:"Fable 5 takes the Thinking tier, posting top scores across software engineering, knowledge work, and vision — and outperforming Opus 4.8 on nearly every benchmark Anthropic tested."},{icon:fe,title:"Safety without the slowdown",body:"New classifiers route the small slice of high-risk requests (cybersecurity, bio/chem) back to Opus 4.8. Anthropic reports more than 95% of sessions never trigger a fallback."},{icon:We,title:"Nothing to change",body:"Chats and agents pick up Fable 5 automatically wherever the Thinking tier is selected. Opus 4.8 stays available as the safety fallback."}],learnMoreHref:"https://www.anthropic.com/news/claude-fable-5-mythos-5"},{id:"claude-opus-4-8",date:"2026-05-28",eyebrow:"Now Available",title:"Claude Opus 4.8 is the new default",bullets:[{icon:oe,title:"Smarter thinking, same price",body:"Opus 4.8 now leads the Thinking and Smarter tiers, outperforming Opus 4.7 on coding, reasoning, and agent tasks at the same cost."},{icon:fe,title:"More honest answers",body:"It's about 4× less likely to let a code flaw slip through unflagged, and surfaces uncertainty instead of making unsupported claims."},{icon:We,title:"Nothing to change",body:"Chats and agents pick up Opus 4.8 automatically wherever the Thinking or Smarter tier is selected."}],learnMoreHref:"https://www.anthropic.com/news/claude-opus-4-8"},{id:"enhanced-sidebar",date:"2026-05-28",eyebrow:"Now Available",title:"Enhanced sidebar",bullets:[{icon:oe,title:"A clearer view of what's running",body:"See every task in your organization at a glance, with each agent and status group laid out so you can spot active work without hunting for it."},{icon:bt,title:"Browse one group at a time",body:"Expand the groups you care about and pull in more results on demand — no more endless scrolling to find an older conversation."},{icon:fe,title:"Polished and steadier",body:"Several sidebar bugs are fixed, including empty agent groups showing the right action and status filters returning the right tasks."}]},{id:"smarter-task-delegation",date:"2026-05-27",eyebrow:"Now Available",title:"Smarter task delegation",bullets:[{icon:Pt,title:"Real results from delegated agents",body:"When one agent hands work to another, you'll see the full report inline — no more empty replies hiding the work that was done."},{icon:We,title:"Same powers, top to bottom",body:"Delegated agents now work with the same tools, context, and memory as the agent that called them, so complex multi-agent investigations finish on the first try."},{icon:fe,title:"Clearer progress signals",body:"When a delegated task hits its limit or runs into a problem, you get a plain-language message instead of a silent stall."}]},{id:"sidebar-task-groups",date:"2026-05-27",eyebrow:"Now Available",title:"Redesigned sidebar",bullets:[{icon:oe,title:"Group by agent or status",body:"Switch the task list between grouping by agent or by status — pick whichever matches how you're working right now."},{icon:bt,title:"Sharper filters",body:"Narrow the list to your tasks, manual chats, or automations from a compact filter row above the groups."}]},{id:"release-channel",date:"2026-05-26",eyebrow:"Now Available",title:"Release announcements",bullets:[{icon:oe,title:"Heads-up when features ship",body:"New releases surface in a corner card the first time you see them, then stick around in your inbox."},{icon:Wn,title:"Unified inbox",body:"Org invitations and product updates now share one chronological feed in the sidebar."}]}],yt="studio.release-feed.v1",vt=new Set;let pe="",ye={},jt=!1;function Xs(){if(jt)return pe||"{}";try{return localStorage.getItem(yt)??"{}"}catch{return pe||"{}"}}function cn(t){try{const e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function Rt(){const t=Xs();return t!==pe&&(pe=t,ye=cn(t)),ye}function Zs(t){vt.add(t);const e=s=>{if(!(s.key!==yt&&s.key!==null)){try{const a=localStorage.getItem(yt)??"{}",r={...cn(a),...ye};ye=r,pe=JSON.stringify(r)}catch{}t()}};return window.addEventListener("storage",e),()=>{vt.delete(t),window.removeEventListener("storage",e)}}function eo(t){ye=t,pe=JSON.stringify(t);try{localStorage.setItem(yt,pe),jt=!1}catch{jt=!0}vt.forEach(e=>e())}function to(){const t=C.c(7),e=G.useSyncExternalStore(Zs,Rt,Rt);let s;t[0]!==e?(s=d=>!!e[d],t[0]=e,t[1]=s):s=t[1];const a=s,n=no;let r;t[2]!==e?(r=ln.reduce((d,g)=>e[g.id]?d:d+1,0),t[2]=e,t[3]=r):r=t[3];const i=r;let l;return t[4]!==a||t[5]!==i?(l={isSeen:a,markSeen:n,unseenCount:i},t[4]=a,t[5]=i,t[6]=l):l=t[6],l}function no(t){ye[t]||eo({...ye,[t]:{seenAt:new Date().toISOString()}})}const Lt=new Map;function dn(t){let e=Lt.get(t);return e||(e={now:Date.now(),subscribers:new Set,intervalId:null},Lt.set(t,e)),e}function so(t,e){const s=dn(t);return s.subscribers.add(e),s.intervalId===null&&(s.intervalId=setInterval(()=>{s.now=Date.now();for(const a of s.subscribers)a()},t)),()=>{s.subscribers.delete(e),s.subscribers.size===0&&s.intervalId!==null&&(clearInterval(s.intervalId),s.intervalId=null)}}function oo(t){const e=C.c(4),s=t===void 0?6e4:t;let a;e[0]!==s?(a=()=>dn(s).now,e[0]=s,e[1]=a):a=e[1];const n=a;let r;return e[2]!==s?(r=i=>so(s,i),e[2]=s,e[3]=r):r=e[3],G.useSyncExternalStore(r,n,n)}const io=720*60*60*1e3,ao=10080*60*1e3;function ro(t){const[e,s,a]=t.split("-").map(Number);return!e||!s||!a?new Date(t).getTime():new Date(e,s-1,a).getTime()}function lo(t){const e=ln[0];if(!e)return null;const s=ro(e.date),a=t-s;return a<0||a>io?null:e}function co(t){if(t instanceof Date)return t.getTime();if(typeof t=="string"||typeof t=="number"){const e=new Date(t).getTime();return Number.isFinite(e)?e:null}return null}function uo(t,e){const s=co(t);return s===null?!1:e-s>=ao}function mo(){const t=C.c(46),e=J(),s=ss(),a=wn(),n=nn(),r=!!s,i=a===ae.home&&!s;let l;t[0]!==n||t[1]!==r?(l=r&&!!n&&rn(n),t[0]=n,t[1]=r,t[2]=l):l=t[2];const d=l,{data:g}=ne.useSession(),{isSeen:h,markSeen:f}=to(),m=oo(6e4);let c,y,u;if(t[3]!==h||t[4]!==m||t[5]!==g?.user?.createdAt){u=Symbol.for("react.early_return_sentinel");e:{if(c=lo(m),!c){u=null;break e}if(!uo(g?.user?.createdAt,m)){u=null;break e}y=h(c.id)}t[3]=h,t[4]=m,t[5]=g?.user?.createdAt,t[6]=c,t[7]=y,t[8]=u}else c=t[6],y=t[7],u=t[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;if(y)return null;let p;t[9]!==c.id||t[10]!==r||t[11]!==f||t[12]!==i||t[13]!==d||t[14]!==e?(p=()=>{f(c.id),Ws(e,{onOrgHome:i,inProject:r,onSiteEditor:d})},t[9]=c.id,t[10]=r,t[11]=f,t[12]=i,t[13]=d,t[14]=e,t[15]=p):p=t[15];const S=p;let x;t[16]!==e?(x=e("announcements.release.ariaLabel"),t[16]=e,t[17]=x):x=t[17];let b;t[18]!==e?(b=e("announcements.release.dismiss"),t[18]=e,t[19]=b):b=t[19];const v=c.eyebrow,w=c.title;let N;t[20]!==c.id||t[21]!==f?(N=()=>f(c.id),t[20]=c.id,t[21]=f,t[22]=N):N=t[22];let T;t[23]!==c.id||t[24]!==c.learnMoreHref||t[25]!==f||t[26]!==e?(T=c.learnMoreHref?o.jsx("a",{href:c.learnMoreHref,target:"_blank",rel:"noreferrer",onClick:()=>f(c.id),className:"underline-offset-2 hover:text-foreground hover:underline",children:e("announcements.release.learnMore")}):null,t[23]=c.id,t[24]=c.learnMoreHref,t[25]=f,t[26]=e,t[27]=T):T=t[27];let j;t[28]!==c.cta||t[29]!==c.id||t[30]!==f||t[31]!==S?(j=c.cta?"href"in c.cta?o.jsx(D,{asChild:!0,size:"sm",onClick:()=>f(c.id),children:o.jsx("a",{href:c.cta.href,children:c.cta.label})}):o.jsx(D,{size:"sm",onClick:S,children:c.cta.label}):null,t[28]=c.cta,t[29]=c.id,t[30]=f,t[31]=S,t[32]=j):j=t[32];let P;t[33]!==c.bullets?(P=c.bullets.map(fo),t[33]=c.bullets,t[34]=P):P=t[34];let _;t[35]!==P?(_=o.jsx("ul",{className:"flex flex-col gap-3",children:P}),t[35]=P,t[36]=_):_=t[36];let O;return t[37]!==c.eyebrow||t[38]!==c.title||t[39]!==j||t[40]!==_||t[41]!==x||t[42]!==b||t[43]!==N||t[44]!==T?(O=o.jsx(sn,{ariaLabel:x,dismissLabel:b,eyebrow:v,title:w,onDismiss:N,footerLeading:T,actions:j,children:_}),t[37]=c.eyebrow,t[38]=c.title,t[39]=j,t[40]=_,t[41]=x,t[42]=b,t[43]=N,t[44]=T,t[45]=O):O=t[45],O}function fo(t,e){return o.jsxs("li",{className:"flex items-start gap-3",children:[o.jsx(t.icon,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm font-medium text-foreground",children:t.title}),o.jsx("p",{className:"text-xs text-muted-foreground",children:t.body})]})]},e)}function go(t){const e=C.c(11),{open:s,onOpenChange:a}=t,n=J();let r;e[0]!==n?(r=n("common.keyboardShortcutsDialog.title"),e[0]=n,e[1]=r):r=e[1];let i;e[2]!==r?(i=o.jsx(Gt,{children:o.jsx(Jt,{children:r})}),e[2]=r,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex flex-col gap-4",children:Sn.map(ho)}),e[4]=l):l=e[4];let d;e[5]!==i?(d=o.jsxs(Vt,{className:"sm:max-w-md",children:[i,l]}),e[5]=i,e[6]=d):d=e[6];let g;return e[7]!==a||e[8]!==s||e[9]!==d?(g=o.jsx(Yt,{open:s,onOpenChange:a,children:d}),e[7]=a,e[8]=s,e[9]=d,e[10]=g):g=e[10],g}function ho(t){return o.jsxs("div",{children:[o.jsx("h3",{className:"text-xs font-medium text-muted-foreground mb-2",children:t.label}),o.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(po)})]},t.label)}function po(t){return o.jsxs("div",{className:"flex items-center justify-between py-1",children:[o.jsx("span",{className:"text-sm",children:t.description}),o.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(yo)})]},t.description)}function yo(t){return o.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}const xo={xs:"xs",sm:"xs",lg:"md"};function un(t){const e=C.c(4),{org:s,size:a}=t,n=a===void 0?"sm":a,r=s.logo??void 0,i=xo[n];let l;return e[0]!==s.name||e[1]!==r||e[2]!==i?(l=o.jsx(ot,{url:r,fallback:s.name,size:i,tone:"solid"}),e[0]=s.name,e[1]=r,e[2]=i,e[3]=l):l=e[3],l}function Vi({invitation:t,onChanged:e}){const s=J(),[a,n]=G.useState(!1),r=t.organizationName??s("header.orgSwitcher.unknownOrganization"),i=async()=>{n(!0);try{const g=await ne.organization.acceptInvitation({invitationId:t.id});if(g.error){X.error(g.error.message),n(!1);return}}catch{X.error(s("header.orgSwitcher.failedToAcceptInvitation")),n(!1);return}X.success(s("header.orgSwitcher.joined",{name:r})),Bt();let d;try{d=(await ne.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=d?`/${d}`:"/"},l=async()=>{n(!0);try{const d=await ne.organization.rejectInvitation({invitationId:t.id});if(d.error){X.error(d.error.message),n(!1);return}X.success(s("header.orgSwitcher.invitationDeclined")),n(!1),e()}catch{X.error(s("header.orgSwitcher.failedToDeclineInvitation")),n(!1)}};return o.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[o.jsx(un,{org:{name:r},size:"sm"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-sm font-medium",children:r}),o.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),o.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[o.jsx(D,{size:"sm",variant:"default",onClick:i,disabled:a,children:s("header.orgSwitcher.accept")}),o.jsx(D,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:l,disabled:a,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:r}),children:o.jsx(tn,{size:14})})]})]})}function bo(t){return typeof t=="object"&&t!==null&&Array.isArray(t.items)}function wo(t){const e=C.c(13),s=t.trim(),{data:a}=ne.useSession(),n=a?.user?.id??"",r=s.length>0&&!!n,i=Xe.organizationSearch(n,s);let l;e[0]!==s?(l=async S=>{const{signal:x}=S,b=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(s)}`,{signal:x});if(!b.ok)throw new Error(`Organization search failed: ${b.status}`);const v=await b.json();if(!bo(v))throw new Error("Invalid organization search response");return v},e[0]=s,e[1]=l):l=e[1];let d;e[2]!==r||e[3]!==i||e[4]!==l?(d={queryKey:i,queryFn:l,enabled:r,placeholderData:vn,staleTime:3e4,retry:!1},e[2]=r,e[3]=i,e[4]=l,e[5]=d):d=e[5];const{data:g,isFetching:h,isPlaceholderData:f,isError:m}=he(d);let c;e[6]!==g?.items?(c=g?.items??[],e[6]=g?.items,e[7]=c):c=e[7];const y=r&&h,u=r&&f;let p;return e[8]!==m||e[9]!==c||e[10]!==y||e[11]!==u?(p={hits:c,isSearching:y,isStale:u,isError:m},e[8]=m,e[9]=c,e[10]=y,e[11]=u,e[12]=p):p=e[12],p}const So=3,mn=10,vo=440,jo=55;function Yi(t){const e=Math.floor((t-vo)/jo);return Math.min(mn,Math.max(So,e))}function ko(t,e,s=mn*3,a=[]){return[...new Set([e,...a,...t])].slice(0,s)}function To(t,e){return!e.id||t.some(s=>s.slug===e.slug)?[...t]:[...t,e]}function Wi(t,e,s,a,n=[]){if(t.length<=a)return{shown:[...t],hidden:[]};const r=new Map(t.map(l=>[l.slug,l])),i=new Set;s&&r.has(s)&&i.add(s);for(const l of n)r.has(l)&&i.add(l);for(const l of e){if(i.size>=a)break;r.has(l)&&i.add(l)}for(const l of t){if(i.size>=a)break;i.add(l.slug)}return{shown:t.filter(l=>i.has(l.slug)),hidden:t.filter(l=>!i.has(l.slug))}}const zt=[];function fn(){const t=C.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=ge.recentOrgs(),t[0]=e):e=t[0];const[s,a]=Wt(e,zt),n=Array.isArray(s)?s:zt;let r;t[1]!==a?(r=(l,d)=>a(g=>ko(Array.isArray(g)?g:[],l,void 0,d)),t[1]=a,t[2]=r):r=t[2];let i;return t[3]!==n||t[4]!==r?(i={recent:n,remember:r},t[3]=n,t[4]=r,t[5]=i):i=t[5],i}const gn={hidden:[],pinned:[],order:[]},st=(t,e)=>t.filter(s=>s!==e);function No(t){if(typeof t!="object"||t===null)return gn;const e=a=>Array.isArray(a)?a.filter(n=>typeof n=="string"):[],s=t;return{hidden:e(s.hidden),pinned:e(s.pinned),order:e(s.order)}}function Qi(t,e){return{...t,hidden:[...st(t.hidden,e),e],pinned:st(t.pinned,e)}}function Po(t,e){return{...t,hidden:st(t.hidden,e)}}function Xi(t,e){return t.pinned.includes(e)?{...t,pinned:st(t.pinned,e)}:{...t,hidden:st(t.hidden,e),pinned:[...t.pinned,e]}}function Zi(t,e,s){const a=n=>{const r=e.order.indexOf(n);return r===-1?Number.MAX_SAFE_INTEGER:r};return t.filter(n=>n.slug===s||!e.hidden.includes(n.slug)).map((n,r)=>({org:n,index:r})).sort((n,r)=>Number(e.pinned.includes(r.org.slug))-Number(e.pinned.includes(n.org.slug))||a(n.org.slug)-a(r.org.slug)||n.index-r.index).map(({org:n})=>n)}function ea(t,e,s,a){const n=e.indexOf(s),r=e.indexOf(a);if(n===-1||r===-1||n===r||t.pinned.includes(s)!==t.pinned.includes(a))return t;const i=[...e];return i.splice(n,1),i.splice(r,0,s),{...t,order:[...i,...t.order.filter(l=>!i.includes(l))]}}function _o(){const t=C.c(5),e=kt(),{remember:s}=fn();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=ge.railOrgPrefs(),t[0]=a):a=t[0];const[,n]=Wt(a,gn);let r;return t[1]!==e||t[2]!==s||t[3]!==n?(r=(i,l)=>{const d=l?.includes(i)??!1;n(g=>Po(No(g),i)),s(i,d?l:void 0),e({to:"/$org/home",params:{org:i},viewTransition:!0})},t[1]=e,t[2]=s,t[3]=n,t[4]=r):r=t[4],r}const Dt=8,Ze=["all","organizations","projects","chats","connections","actions"],Oo=5;function Mt(t){switch(t){case"all":return"commandPalette.scope.all";case"organizations":return"commandPalette.organizations";case"projects":return"commandPalette.projects";case"chats":return"commandPalette.scope.chats";case"connections":return"commandPalette.connections";case"actions":return"commandPalette.actions";default:return t}}function Io(t,e){const s=a=>{const n=e.indexOf(a);return n===-1?Number.POSITIVE_INFINITY:n};return[...t].sort((a,n)=>s(a.slug)-s(n.slug)||a.name.localeCompare(n.name))}function Ao(t,e){const{org:s}=Tt(),a=ps({connectionId:Qt,orgId:s.id,orgSlug:s.slug}),{data:n}=he({queryKey:Xe.globalSearch(s.id,t,Dt),enabled:e&&!!a&&t.trim().length>=2,staleTime:15e3,retry:!1,queryFn:async()=>{if(!a)return[];try{return(await a.callTool({name:"GLOBAL_SEARCH",arguments:{query:t,limit:Dt}})).structuredContent?.items??[]}catch{return[]}}});return n??[]}function Eo(t){const e=C.c(213),{open:s,onOpenChange:a}=t,n=J(),r=kt(),{org:i}=Tt(),{projects:l,hasProjects:d}=os(),{remember:g}=gs(i.slug),[h,f]=G.useState(""),[m,c]=G.useState("all");let y;e[0]!==m?(y=M=>m==="all"||m===M,e[0]=m,e[1]=y):y=e[1];const u=y,p=G.useDeferredValue(h),S=Ao(p,u("chats")||u("connections")),x=_o(),{data:b}=jn(),{recent:v}=fn();let w;e[2]!==h?(w=h.trim(),e[2]=h,e[3]=w):w=e[3];const N=w,T=hs(N,150),{hits:j}=wo(u("organizations")?T:"");let P,_;if(e[4]!==i||e[5]!==j||e[6]!==b||e[7]!==v){const M=Io(To(b??[],i),v);let U;e[10]!==j?(U=new Set(j.map(Lo)),e[10]=j,e[11]=U):U=e[11],P=U,_=[...M,...j.filter(Ee=>!M.some(F=>F.id===Ee.id))],e[4]=i,e[5]=j,e[6]=b,e[7]=v,e[8]=P,e[9]=_}else P=e[8],_=e[9];const O=_;let A;e[12]!==O||e[13]!==i.slug||e[14]!==m||e[15]!==N?(A=m==="all"&&!N?O.filter(M=>M.slug!==i.slug).slice(0,Oo):O,e[12]=O,e[13]=i.slug,e[14]=m,e[15]=N,e[16]=A):A=e[16];const $=A;let R;e[17]!==a?(R=()=>{a(!1),f(""),c("all")},e[17]=a,e[18]=R):R=e[18];const L=R;let I;e[19]!==m?(I=M=>{const U=Ze.indexOf(m);c(Ze[(U+M+Ze.length)%Ze.length]??"all")},e[19]=m,e[20]=I):I=e[20];const B=I;let H;e[21]!==L?(H=(M,U)=>{St("command_palette_used",{kind:U}),M(),L()},e[21]=L,e[22]=H):H=e[22];const z=H;let re;e[23]!==r||e[24]!==i.id||e[25]!==i.slug?(re=M=>{if(M.type==="connection"){if(!M.slug){r({to:"/$org/settings/connections",params:{org:i.slug},search:{tab:"all"}});return}r({to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:M.slug}});return}if(M.type==="task"){r({to:ae.tasks,params:{org:i.slug,taskKey:M.key??void 0}});return}const U=Xt(i.id).id;kn(r,Tn({org:i.slug,agentId:M.virtual_mcp_id??U,superAgentId:U}),{search:()=>({thread:M.id}),replace:!1})},e[23]=r,e[24]=i.id,e[25]=i.slug,e[26]=re):re=e[26];const Z=re;let ee;e[27]!==h?(ee=[h],e[27]=h,e[28]=ee):ee=e[28];const se=ee;let te,V,Y,K,W,Q,E,q,be,we,Se,le,ce,de,ue,me;if(e[29]!==L||e[30]!==B||e[31]!==z||e[32]!==d||e[33]!==S||e[34]!==r||e[35]!==a||e[36]!==s||e[37]!==Z||e[38]!==i.slug||e[39]!==$||e[40]!==l||e[41]!==g||e[42]!==se||e[43]!==m||e[44]!==P||e[45]!==u||e[46]!==n||e[47]!==h||e[48]!==x){const M=S.filter(Ro),U=S.filter($o);let Ee;e[65]!==i.slug?(Ee={org:i.slug},e[65]=i.slug,e[66]=Ee):Ee=e[66];const F=Ee;let Ce;e[67]!==n?(Ce=n("sidebar.navDestinations.home"),e[67]=n,e[68]=Ce):Ce=e[68];let dt;e[69]===Symbol.for("react.memo_cache_sentinel")?(dt=o.jsx(Zn,{"aria-hidden":"true"}),e[69]=dt):dt=e[69];let $e;e[70]!==F||e[71]!==Ce?($e={key:"home",label:Ce,icon:dt,to:ae.home,params:F},e[70]=F,e[71]=Ce,e[72]=$e):$e=e[72];let Re;e[73]!==n?(Re=n("sidebar.navDestinations.reports"),e[73]=n,e[74]=Re):Re=e[74];let ut;e[75]===Symbol.for("react.memo_cache_sentinel")?(ut=o.jsx(es,{"aria-hidden":"true"}),e[75]=ut):ut=e[75];let Le;e[76]!==F||e[77]!==Re?(Le={key:"reports",label:Re,icon:ut,to:ae.reports,params:F},e[76]=F,e[77]=Re,e[78]=Le):Le=e[78];let ze;e[79]!==n?(ze=n("sidebar.navDestinations.tasks"),e[79]=n,e[80]=ze):ze=e[80];let mt;e[81]===Symbol.for("react.memo_cache_sentinel")?(mt=o.jsx(At,{"aria-hidden":"true"}),e[81]=mt):mt=e[81];let De;e[82]!==i.slug?(De={org:i.slug,taskKey:void 0},e[82]=i.slug,e[83]=De):De=e[83];let Me;e[84]!==ze||e[85]!==De?(Me={key:"tasks",label:ze,icon:mt,to:ae.tasks,params:De},e[84]=ze,e[85]=De,e[86]=Me):Me=e[86];let Fe;e[87]!==n?(Fe=n("sidebar.navDestinations.library"),e[87]=n,e[88]=Fe):Fe=e[88];let ft;e[89]===Symbol.for("react.memo_cache_sentinel")?(ft=o.jsx(ts,{"aria-hidden":"true"}),e[89]=ft):ft=e[89];let qe;e[90]!==F||e[91]!==Fe?(qe={key:"library",label:Fe,icon:ft,to:ae.library,params:F},e[90]=F,e[91]=Fe,e[92]=qe):qe=e[92];let Be;e[93]!==n?(Be=n("sidebar.navDestinations.discover"),e[93]=n,e[94]=Be):Be=e[94];let gt;e[95]===Symbol.for("react.memo_cache_sentinel")?(gt=o.jsx(ns,{"aria-hidden":"true"}),e[95]=gt):gt=e[95];let Ke;e[96]!==F||e[97]!==Be?(Ke={key:"discover",label:Be,icon:gt,to:ae.discover,params:F},e[96]=F,e[97]=Be,e[98]=Ke):Ke=e[98];let ht;e[99]!==$e||e[100]!==Le||e[101]!==Me||e[102]!==qe||e[103]!==Ke?(ht=[$e,Le,Me,qe,Ke],e[99]=$e,e[100]=Le,e[101]=Me,e[102]=qe,e[103]=Ke,e[104]=ht):ht=e[104];const xt=ht;V=ls,Se=s,e[105]!==L||e[106]!==a?(le=k=>k?a(!0):L(),e[105]=L,e[106]=a,e[107]=le):le=e[107],e[108]!==n?(ce=n("commandPalette.title"),e[108]=n,e[109]=ce):ce=e[109],e[110]!==n?(de=n("commandPalette.description"),e[110]=n,e[111]=de):de=e[111];let He;e[112]!==m||e[113]!==n?(He=m==="all"?n("commandPalette.placeholder"):n("commandPalette.placeholderScoped",{scope:n(Mt(m)).toLowerCase()}),e[112]=m,e[113]=n,e[114]=He):He=e[114];let Ue;e[115]!==n?(Ue=n("commandPalette.placeholder"),e[115]=n,e[116]=Ue):Ue=e[116];let Ge;e[117]!==B||e[118]!==m||e[119]!==h?(Ge=k=>{if(k.key==="Tab"){k.preventDefault(),B(k.shiftKey?-1:1);return}k.key==="Backspace"&&!h&&m!=="all"&&(k.preventDefault(),c("all"))},e[117]=B,e[118]=m,e[119]=h,e[120]=Ge):Ge=e[120],e[121]!==He||e[122]!==Ue||e[123]!==Ge||e[124]!==h?(ue=o.jsx(cs,{placeholder:He,"aria-label":Ue,value:h,onValueChange:f,onKeyDown:Ge}),e[121]=He,e[122]=Ue,e[123]=Ge,e[124]=h,e[125]=ue):ue=e[125];let Je;e[126]!==n?(Je=n("commandPalette.scope.label"),e[126]=n,e[127]=Je):Je=e[127];let Ve;e[128]!==m||e[129]!==n?(Ve=Ze.map(k=>o.jsx("button",{type:"button",role:"radio","aria-checked":m===k,tabIndex:-1,onMouseDown:Co,onClick:()=>c(k),className:wt("h-7 shrink-0 cursor-pointer rounded-full px-3 text-xs font-medium transition-colors focus-ring",m===k?"bg-foreground text-background":"text-muted-foreground hover:bg-accent hover:text-foreground"),children:n(Mt(k))},k)),e[128]=m,e[129]=n,e[130]=Ve):Ve=e[130],e[131]!==Je||e[132]!==Ve?(me=o.jsx("div",{role:"radiogroup","aria-label":Je,className:"flex gap-1 overflow-x-auto border-b px-3 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:Ve}),e[131]=Je,e[132]=Ve,e[133]=me):me=e[133],te=ds,Y="h-[min(420px,60vh)] max-h-none";let Ye;e[134]!==n?(Ye=n("commandPalette.empty"),e[134]=n,e[135]=Ye):Ye=e[135],e[136]!==Ye?(K=o.jsx(us,{children:Ye}),e[136]=Ye,e[137]=K):K=e[137],e[138]!==z||e[139]!==i.slug||e[140]!==$||e[141]!==P||e[142]!==u||e[143]!==n||e[144]!==h||e[145]!==x?(W=u("organizations")&&$.length>0&&o.jsx(Qe,{heading:n("commandPalette.organizations"),children:$.map(k=>o.jsxs(ie,{value:`org ${k.name} ${k.slug}`,keywords:P.has(k.id)?[h]:void 0,onSelect:()=>z(()=>x(k.slug),"organization"),children:[o.jsx(un,{org:k,size:"xs"}),o.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.name}),k.slug===i.slug&&o.jsx("span",{className:"text-meta shrink-0",children:n("sidebar.rail.currentOrganization")})]},`org:${k.id}`))}),e[138]=z,e[139]=i.slug,e[140]=$,e[141]=P,e[142]=u,e[143]=n,e[144]=h,e[145]=x,e[146]=W):W=e[146],e[147]!==xt||e[148]!==z||e[149]!==r||e[150]!==u||e[151]!==n?(Q=u("actions")&&o.jsx(Qe,{heading:n("commandPalette.goTo"),children:xt.map(k=>o.jsxs(ie,{onSelect:()=>z(()=>r({to:k.to,params:k.params}),"destination"),children:[k.icon,o.jsx("span",{children:k.label})]},k.key))}),e[147]=xt,e[148]=z,e[149]=r,e[150]=u,e[151]=n,e[152]=Q):Q=e[152],e[153]!==z||e[154]!==d||e[155]!==r||e[156]!==i.slug||e[157]!==l||e[158]!==g||e[159]!==u||e[160]!==n?(E=u("projects")&&d&&o.jsx(Qe,{heading:n("commandPalette.projects"),children:l.map(k=>o.jsxs(ie,{value:`project ${k.title}`,onSelect:()=>z(()=>{g(k.id),r({to:ae.projects,params:{org:i.slug,agentId:k.id}})},"project"),children:[o.jsx(fs,{icon:k.icon,name:k.title,"aria-hidden":"true"}),o.jsx("span",{children:k.title})]},k.id))}),e[153]=z,e[154]=d,e[155]=r,e[156]=i.slug,e[157]=l,e[158]=g,e[159]=u,e[160]=n,e[161]=E):E=e[161],e[162]!==z||e[163]!==r||e[164]!==F||e[165]!==u||e[166]!==n?(q=u("actions")&&o.jsxs(Qe,{heading:n("commandPalette.actions"),children:[o.jsxs(ie,{value:n("commandPalette.newProject"),onSelect:()=>z(()=>r({to:ae.home,params:F}),"new_project"),children:[o.jsx(Ct,{"aria-hidden":"true"}),o.jsx("span",{children:n("commandPalette.newProject")})]}),o.jsxs(ie,{value:n("commandPalette.inviteTeammate"),onSelect:()=>z(()=>r({to:"/$org/settings/members",params:F}),"invite"),children:[o.jsx(Qn,{"aria-hidden":"true"}),o.jsx("span",{children:n("commandPalette.inviteTeammate")})]}),o.jsxs(ie,{value:n("commandPalette.addConnection"),onSelect:()=>z(()=>r({to:"/$org/settings/connections",params:F,search:{tab:"all"}}),"add_connection"),children:[o.jsx(Ct,{"aria-hidden":"true"}),o.jsx("span",{children:n("commandPalette.addConnection")})]}),o.jsxs(ie,{value:n("commandPalette.settings"),onSelect:()=>z(()=>r({to:"/$org/settings/general",params:F}),"settings"),children:[o.jsx(rs,{"aria-hidden":"true"}),o.jsx("span",{children:n("commandPalette.settings")})]})]}),e[162]=z,e[163]=r,e[164]=F,e[165]=u,e[166]=n,e[167]=q):q=e[167],be=u("connections")&&M.length>0&&o.jsx(Qe,{heading:n("commandPalette.connections"),children:M.map(k=>o.jsxs(ie,{value:`${k.title} ${k.id}`,keywords:se,onSelect:()=>z(()=>Z(k),"connection"),children:[o.jsx(ms,{icon:k.icon,name:k.title,size:"2xs","aria-hidden":"true"}),o.jsx("span",{className:"truncate",children:k.title})]},`connection:${k.id}`))}),we=u("chats")&&U.length>0&&o.jsx(Qe,{heading:n("commandPalette.results"),children:U.map(k=>o.jsxs(ie,{value:`${k.title} ${k.id}`,keywords:se,onSelect:()=>z(()=>Z(k),k.type),children:[k.type==="thread"?o.jsx(Xn,{"aria-hidden":"true"}):o.jsx(At,{"aria-hidden":"true"}),o.jsx("span",{className:"truncate",children:k.title}),k.type==="task"&&k.key&&o.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:k.key})]},`${k.type}:${k.id}`))}),e[29]=L,e[30]=B,e[31]=z,e[32]=d,e[33]=S,e[34]=r,e[35]=a,e[36]=s,e[37]=Z,e[38]=i.slug,e[39]=$,e[40]=l,e[41]=g,e[42]=se,e[43]=m,e[44]=P,e[45]=u,e[46]=n,e[47]=h,e[48]=x,e[49]=te,e[50]=V,e[51]=Y,e[52]=K,e[53]=W,e[54]=Q,e[55]=E,e[56]=q,e[57]=be,e[58]=we,e[59]=Se,e[60]=le,e[61]=ce,e[62]=de,e[63]=ue,e[64]=me}else te=e[49],V=e[50],Y=e[51],K=e[52],W=e[53],Q=e[54],E=e[55],q=e[56],be=e[57],we=e[58],Se=e[59],le=e[60],ce=e[61],de=e[62],ue=e[63],me=e[64];let ve;e[168]!==te||e[169]!==Y||e[170]!==K||e[171]!==W||e[172]!==Q||e[173]!==E||e[174]!==q||e[175]!==be||e[176]!==we?(ve=o.jsxs(te,{className:Y,children:[K,W,Q,E,q,be,we]}),e[168]=te,e[169]=Y,e[170]=K,e[171]=W,e[172]=Q,e[173]=E,e[174]=q,e[175]=be,e[176]=we,e[177]=ve):ve=e[177];let it;e[178]===Symbol.for("react.memo_cache_sentinel")?(it=["↑","↓"],e[178]=it):it=e[178];let je;e[179]!==n?(je=n("commandPalette.hint.navigate"),e[179]=n,e[180]=je):je=e[180];let ke;e[181]!==je?(ke=o.jsx(pt,{keys:it,label:je}),e[181]=je,e[182]=ke):ke=e[182];let at;e[183]===Symbol.for("react.memo_cache_sentinel")?(at=["↵"],e[183]=at):at=e[183];let Te;e[184]!==n?(Te=n("commandPalette.hint.open"),e[184]=n,e[185]=Te):Te=e[185];let Ne;e[186]!==Te?(Ne=o.jsx(pt,{keys:at,label:Te}),e[186]=Te,e[187]=Ne):Ne=e[187];let rt;e[188]===Symbol.for("react.memo_cache_sentinel")?(rt=["Tab"],e[188]=rt):rt=e[188];let Pe;e[189]!==n?(Pe=n("commandPalette.hint.filter"),e[189]=n,e[190]=Pe):Pe=e[190];let _e;e[191]!==Pe?(_e=o.jsx(pt,{keys:rt,label:Pe}),e[191]=Pe,e[192]=_e):_e=e[192];let lt;e[193]===Symbol.for("react.memo_cache_sentinel")?(lt=["Esc"],e[193]=lt):lt=e[193];let Oe;e[194]!==n?(Oe=n("commandPalette.hint.close"),e[194]=n,e[195]=Oe):Oe=e[195];let Ie;e[196]!==Oe?(Ie=o.jsx(pt,{keys:lt,label:Oe}),e[196]=Oe,e[197]=Ie):Ie=e[197];let Ae;e[198]!==ke||e[199]!==Ne||e[200]!==_e||e[201]!==Ie?(Ae=o.jsxs("div",{className:"flex items-center gap-4 border-t px-3 py-2 text-xs text-muted-foreground",children:[ke,Ne,_e,Ie]}),e[198]=ke,e[199]=Ne,e[200]=_e,e[201]=Ie,e[202]=Ae):Ae=e[202];let ct;return e[203]!==V||e[204]!==Se||e[205]!==le||e[206]!==ce||e[207]!==de||e[208]!==ue||e[209]!==me||e[210]!==ve||e[211]!==Ae?(ct=o.jsxs(V,{open:Se,onOpenChange:le,title:ce,description:de,children:[ue,me,ve,Ae]}),e[203]=V,e[204]=Se,e[205]=le,e[206]=ce,e[207]=de,e[208]=ue,e[209]=me,e[210]=ve,e[211]=Ae,e[212]=ct):ct=e[212],ct}function Co(t){return t.preventDefault()}function $o(t){return t.type!=="connection"}function Ro(t){return t.type==="connection"}function Lo(t){return t.id}function pt(t){const e=C.c(7),{keys:s,label:a}=t;let n;e[0]!==s?(n=s.map(zo),e[0]=s,e[1]=n):n=e[1];let r;e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-0.5",children:n}),e[2]=n,e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==r?(i=o.jsxs("span",{className:"flex items-center gap-1.5",children:[r,a]}),e[4]=a,e[5]=r,e[6]=i):i=e[6],i}function zo(t){return o.jsx("kbd",{className:"inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border bg-muted px-1 font-mono text-2xs",children:t},t)}const tt=new Ss(!1);function Do(){tt.set(!0)}function Mo(){tt.set(!1)}function Fo(){const t=C.c(2),e=G.useSyncExternalStore(tt.subscribe,tt.get);let s;return t[0]!==e?(s=[e,tt.set],t[0]=e,t[1]=s):s=t[1],s}const qo=300*1e3,Bo=2;function Ko(t,e,s){return!e||e===s?{version:null,count:0}:t.version===e?{version:e,count:t.count+1}:{version:e,count:1}}function Ho(t,e){return t.count>=Bo&&t.version!==null&&t.version!==e}function Uo(){const t=C.c(31),e=J();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={queryKey:Xe.appVersionCheck(),queryFn:Jo,refetchInterval:qo,refetchIntervalInBackground:!0,staleTime:0},t[0]=s):s=t[0];const{data:a,dataUpdatedAt:n}=he(s),[r,i]=G.useState(0);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={version:null,count:0},t[1]=l):l=t[1];const[d,g]=G.useState(l);n!==r&&(i(n),g(j=>Ko(j,a,"4.573.0")));const[h,f]=G.useState(null);if(!Ho(d,h))return null;let m;t[2]!==e?(m=e("announcements.version.ariaLabel"),t[2]=e,t[3]=m):m=t[3];let c;t[4]!==e?(c=e("announcements.version.dismiss"),t[4]=e,t[5]=c):c=t[5];let y;t[6]!==e?(y=e("announcements.version.eyebrow"),t[6]=e,t[7]=y):y=t[7];let u;t[8]!==e?(u=e("announcements.version.title"),t[8]=e,t[9]=u):u=t[9];let p;t[10]!==e?(p=e("announcements.version.description"),t[10]=e,t[11]=p):p=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx(_t,{size:16}),t[12]=S):S=t[12];let x;t[13]!==d.version?(x=()=>f(d.version),t[13]=d.version,t[14]=x):x=t[14];let b;t[15]!==e?(b=e("announcements.version.currentSession",{version:"4.573.0"}),t[15]=e,t[16]=b):b=t[16];let v;t[17]!==e?(v=e("announcements.version.refresh"),t[17]=e,t[18]=v):v=t[18];let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(_t,{size:14}),t[19]=w):w=t[19];let N;t[20]!==v?(N=o.jsxs(D,{size:"sm",onClick:Go,children:[v,w]}),t[20]=v,t[21]=N):N=t[21];let T;return t[22]!==N||t[23]!==m||t[24]!==c||t[25]!==y||t[26]!==u||t[27]!==p||t[28]!==x||t[29]!==b?(T=o.jsx(sn,{ariaLabel:m,dismissLabel:c,eyebrow:y,title:u,description:p,icon:S,tone:"system",onDismiss:x,footerLeading:b,actions:N}),t[22]=N,t[23]=m,t[24]=c,t[25]=y,t[26]=u,t[27]=p,t[28]=x,t[29]=b,t[30]=T):T=t[30],T}function Go(){return window.location.reload()}async function Jo(){const t=await fetch("/api/config",{cache:"no-store"}),{config:e}=await t.json();return e.version}function Vo(t){return{has(){try{return localStorage.getItem(t)==="1"}catch{return!1}},mark(){try{localStorage.setItem(t,"1")}catch{}}}}const Yo=Date.parse("2026-07-21T00:00:00Z"),Ft=t=>Vo(ge.ptBrAnnouncementSeen(t));function Wo(){const t=C.c(35),e=J(),[s,a]=Nn(),{data:n,isPending:r}=ne.useSession(),i=n?.user,l=i?.id,d=i?.createdAt,g=d!=null&&new Date(d).getTime()<Yo,h=Pn()==="pt-BR",f=!r&&!!l&&g&&h&&s.language==="en"&&!Ft(l).has(),[m,c]=G.useState(!1),[y,u]=G.useState(!1);!m&&!r&&(c(!0),f&&l&&(Ft(l).mark(),a(Xo),u(!0),St("pt_br_auto_switch_shown")));let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p=z=>{St("pt_br_auto_switch_closed",{action:z}),u(!1)},t[0]=p):p=t[0];const S=p;let x;t[1]!==a?(x=()=>{a(Qo),S("switch-back")},t[1]=a,t[2]=x):x=t[2];const b=x;let v;t[3]===Symbol.for("react.memo_cache_sentinel")?(v=z=>!z&&S("dismiss"),t[3]=v):v=t[3];let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx("div",{className:"text-4xl","aria-hidden":"true",children:"🇧🇷"}),t[4]=w):w=t[4];let N;t[5]!==e?(N=e("announcements.ptBr.title"),t[5]=e,t[6]=N):N=t[6];let T;t[7]!==N?(T=o.jsx(Jt,{children:N}),t[7]=N,t[8]=T):T=t[8];let j;t[9]!==e?(j=e("announcements.ptBr.description"),t[9]=e,t[10]=j):j=t[10];let P;t[11]!==j?(P=o.jsx(_n,{children:j}),t[11]=j,t[12]=P):P=t[12];let _;t[13]!==T||t[14]!==P?(_=o.jsxs(Gt,{children:[T,P]}),t[13]=T,t[14]=P,t[15]=_):_=t[15];let O;t[16]!==e?(O=e("announcements.ptBr.switchBack"),t[16]=e,t[17]=O):O=t[17];let A;t[18]!==b||t[19]!==O?(A=o.jsx(D,{variant:"outline",onClick:b,children:O}),t[18]=b,t[19]=O,t[20]=A):A=t[20];let $;t[21]===Symbol.for("react.memo_cache_sentinel")?($=()=>S("ok"),t[21]=$):$=t[21];let R;t[22]!==e?(R=e("announcements.ptBr.ok"),t[22]=e,t[23]=R):R=t[23];let L;t[24]!==R?(L=o.jsx(D,{onClick:$,children:R}),t[24]=R,t[25]=L):L=t[25];let I;t[26]!==A||t[27]!==L?(I=o.jsxs(On,{children:[A,L]}),t[26]=A,t[27]=L,t[28]=I):I=t[28];let B;t[29]!==I||t[30]!==_?(B=o.jsxs(Vt,{className:"sm:max-w-md",children:[w,_,I]}),t[29]=I,t[30]=_,t[31]=B):B=t[31];let H;return t[32]!==y||t[33]!==B?(H=o.jsx(Yt,{open:y,onOpenChange:v,children:B}),t[32]=y,t[33]=B,t[34]=H):H=t[34],H}function Qo(t){return{...t,language:"en"}}function Xo(t){return{...t,language:"pt-BR"}}function Zo(t){const e=In(t);return typeof e=="string"?e:void 0}function ei(){return Zo("experiment-pipeline-check"),null}function ti(t){const e=C.c(1),{activeOrg:s}=t;if(!s)return null;An(s.id,{name:s.name??void 0,slug:s.slug??void 0}),En();let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(ei,{}),e[0]=a):a=e[0],a}function ni(t){const{prev:e,virtualMcpId:s,decopilotId:a,savedLayout:n,opts:r,autosendValue:i}=t,l={mainpanel:void 0};s?l.virtualmcpid=s:e.virtualmcpid&&(l.virtualmcpid=e.virtualmcpid);const d=typeof e.virtualmcpid=="string"?e.virtualmcpid:a,h=(s??d)!==d;let f,m;return r?.panel?m=r.panel:r?.newThread&&!h&&Cn(e.tabId)?(m=e.tabId,l.mainpanel=e.mainpanel,f=e.sidepanel):n?(m=n.tab,n.sidepanel!==void 0&&(f=n.sidepanel),n.mainpanel!==void 0&&(l.mainpanel=n.mainpanel)):!h&&e.tabId&&!$n(e.tabId)&&(m=e.tabId),f!==void 0&&(l.sidepanel=f),r?.autosend&&(l.autosend=i),{tabId:m,search:l}}const hn="studio:thread-layout:v4",si=50;function pn(t){const e={};return t===null||typeof t!="object"||(typeof t.tab=="string"&&(e.tab=t.tab),typeof t.mainpanel=="boolean"&&(e.mainpanel=t.mainpanel),typeof t.sidepanel=="boolean"&&(e.sidepanel=t.sidepanel)),e}function oi(t,e,s,a=si){const n=t.filter(([r])=>r!==e);for(n.push([e,pn(s)]);n.length>a;)n.shift();return n}function Nt(){try{const t=sessionStorage.getItem(hn);if(!t)return[];const e=JSON.parse(t);return Array.isArray(e)?e.filter(s=>Array.isArray(s)&&s.length===2&&typeof s[0]=="string"):[]}catch{return[]}}function yn(t){try{sessionStorage.setItem(hn,JSON.stringify(t))}catch{}}function ii(t,e){t&&yn(oi(Nt(),t,e))}function ai(t){if(!t)return null;const e=Nt().find(([s])=>s===t);return e?pn(e[1]):null}function ta(t){if(!t)return;const e=Nt(),s=e.filter(([a])=>a!==t);s.length!==e.length&&yn(s)}function xn(t){return{queryKey:Xe.homeNextActions(t),queryFn:async()=>{const e=await fetch(`/api/${t}/home-next-actions`,{cache:"no-store"});if(!e.ok)throw new Error("Failed to load home next actions");return await e.json()},staleTime:0,refetchOnWindowFocus:"always"}}function na(t){const e=C.c(10);let s;e[0]!==t?(s=xn(t),e[0]=t,e[1]=s):s=e[1];const a=he(s);let n;e[2]!==a.data?.prompts?(n=a.data?.prompts??[],e[2]=a.data?.prompts,e[3]=n):n=e[3];let r;e[4]!==a.data?.tiles?(r=a.data?.tiles??[],e[4]=a.data?.tiles,e[5]=r):r=e[5];let i;return e[6]!==a.isLoading||e[7]!==n||e[8]!==r?(i={isLoading:a.isLoading,prompts:n,tiles:r},e[6]=a.isLoading,e[7]=n,e[8]=r,e[9]=i):i=e[9],i}function ri(t){const e=C.c(31),{orgSlug:s,orgName:a,domain:n}=t,r=J();let i;e[0]!==s?(i=()=>{window.location.href=`/api/${encodeURIComponent(s)}/sso/authorize`},e[0]=s,e[1]=i):i=e[1];const l=i,d=li;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("div",{className:"bg-primary/10 p-3 rounded-full","aria-hidden":"true",children:o.jsx(qt,{className:"h-6 w-6 text-primary"})}),e[2]=g):g=e[2];let h;e[3]!==r?(h=r("common.ssoRequiredScreen.title"),e[3]=r,e[4]=h):h=e[4];let f;e[5]!==h?(f=o.jsx("h3",{className:"text-lg font-medium",children:h}),e[5]=h,e[6]=f):f=e[6];let m;e[7]!==n||e[8]!==a||e[9]!==r?(m=a?o.jsxs(o.Fragment,{children:[o.jsx("strong",{children:a})," ",r("common.ssoRequiredScreen.requiresSsoAuth"),n?` ${r("common.ssoRequiredScreen.via",{domain:n})}`:"","."]}):r("common.ssoRequiredScreen.orgRequiresSsoAuth"),e[7]=n,e[8]=a,e[9]=r,e[10]=m):m=e[10];let c;e[11]!==m?(c=o.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[11]=m,e[12]=c):c=e[12];let y;e[13]!==f||e[14]!==c?(y=o.jsxs("div",{className:"space-y-2",children:[f,c]}),e[13]=f,e[14]=c,e[15]=y):y=e[15];let u;e[16]!==r?(u=r("common.ssoRequiredScreen.signInWithSso"),e[16]=r,e[17]=u):u=e[17];let p;e[18]!==l||e[19]!==u?(p=o.jsx(D,{onClick:l,children:u}),e[18]=l,e[19]=u,e[20]=p):p=e[20];let S;e[21]!==r?(S=r("common.goBack"),e[21]=r,e[22]=S):S=e[22];let x;e[23]!==S?(x=o.jsx(D,{variant:"ghost",onClick:d,children:S}),e[23]=S,e[24]=x):x=e[24];let b;e[25]!==x||e[26]!==p?(b=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[p,x]}),e[25]=x,e[26]=p,e[27]=b):b=e[27];let v;return e[28]!==b||e[29]!==y?(v=o.jsxs(xe,{children:[g,y,b]}),e[28]=b,e[29]=y,e[30]=v):v=e[30],v}function li(){window.location.href="/"}function ci(t){const e=C.c(27),{notice:s,orgSlug:a}=t,n=J();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:o.jsx(Rn,{className:"h-6 w-6 text-destructive"})}),e[0]=r):r=e[0];let i;e[1]!==s.title?(i=o.jsx("h3",{className:"text-lg font-medium",children:s.title}),e[1]=s.title,e[2]=i):i=e[2];let l;e[3]!==s.message?(l=o.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-line",children:s.message}),e[3]=s.message,e[4]=l):l=e[4];let d;e[5]!==i||e[6]!==l?(d=o.jsxs("div",{className:"space-y-2",children:[i,l]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==s.ctaLabel||e[9]!==s.ctaUrl?(g=s.ctaUrl&&s.ctaLabel?o.jsx(D,{asChild:!0,children:o.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,e[8]=s.ctaLabel,e[9]=s.ctaUrl,e[10]=g):g=e[10];const h=`/${encodeURIComponent(a)}/settings/infra-billing`;let f;e[11]!==n?(f=n("common.blockedOrgScreen.goToBilling"),e[11]=n,e[12]=f):f=e[12];let m;e[13]!==h||e[14]!==f?(m=o.jsx(D,{variant:"outline",asChild:!0,children:o.jsx("a",{href:h,children:f})}),e[13]=h,e[14]=f,e[15]=m):m=e[15];let c;e[16]!==n?(c=n("common.blockedOrgScreen.switchOrg"),e[16]=n,e[17]=c):c=e[17];let y;e[18]!==c?(y=o.jsx(D,{variant:"ghost",asChild:!0,children:o.jsx("a",{href:"/",children:c})}),e[18]=c,e[19]=y):y=e[19];let u;e[20]!==y||e[21]!==g||e[22]!==m?(u=o.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[g,m,y]}),e[20]=y,e[21]=g,e[22]=m,e[23]=u):u=e[23];let p;return e[24]!==u||e[25]!==d?(p=o.jsxs(xe,{children:[r,d,u]}),e[24]=u,e[25]=d,e[26]=p):p=e[26],p}function di(t){const e=C.c(8);let s;e[0]!==t?(s=Xe.orgNotice(t??""),e[0]=t,e[1]=s):s=e[1];let a;e[2]!==t?(a=async()=>{const i=await fetch(`/api/${t}/notice`,{credentials:"include"});return i.ok?(await i.json()).notice??null:null},e[2]=t,e[3]=a):a=e[3];const n=!!t;let r;return e[4]!==s||e[5]!==a||e[6]!==n?(r={queryKey:s,queryFn:a,enabled:n,staleTime:6e4},e[4]=s,e[5]=a,e[6]=n,e[7]=r):r=e[7],he(r)}const ui="/settings/infra-billing";function mi(t){return(t.endsWith("/")?t.slice(0,-1):t).endsWith(ui)}function fi(t){const e=C.c(7),{org:s,children:a}=t;let n;e[0]!==s.id||e[1]!==s.name?(n={id:s.id,organizationId:s.id,slug:"_org",name:s.name,ui:null},e[0]=s.id,e[1]=s.name,e[2]=n):n=e[2];const r=n;let i;return e[3]!==a||e[4]!==s||e[5]!==r?(i=o.jsx(Kn,{org:s,project:r,children:a}),e[3]=a,e[4]=s,e[5]=r,e[6]=i):i=e[6],i}function gi(){const t=kt(),e=vs(),{org:s}=Tt(),a=Ln({strict:!1}),n=nn(),{openPanel:r,closePanel:i}=is(),l=ks(),d=Ts(),g=Ns(),h=Ps(),f=(u,p=!0)=>t({to:".",search:u,replace:p}),m=()=>f(u=>({...u,sidepanel:!0})),c=(u,p,S)=>{const x=!!d&&d===u;d&&!x&&ii(d,{tab:n,mainpanel:a.mainpanel,sidepanel:a.sidepanel});const b=x?null:ai(u),v=Xt(s.id).id,w=ni({prev:{virtualmcpid:l,tabId:n,mainpanel:a.mainpanel,sidepanel:a.sidepanel},virtualMcpId:p,decopilotId:v,savedLayout:b,opts:S,autosendValue:as});return h(u,()=>w.search,{virtualMcpId:p,view:{tabId:w.tabId}})};return{openSidePanel:m,setTaskId:c,createNewTask:async(u,p,S)=>{const x=crypto.randomUUID(),b=u??g;try{await e?.create({id:x,virtual_mcp_id:b,...p?{branch:p}:{}})}catch{}c(x,b,{...S,newThread:!0})},openTab:r,closeTab:i}}const hi=new Set(["/$org/","/$org/home"]);function pi(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:yi},t[0]=e):e=t[0],Zt(e)}function yi(t){const e=t.matches.at(-1)?.fullPath;return e!==void 0&&hi.has(e)}function xi(){const t=C.c(53);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org",shouldThrow:!1},t[0]=e):e=t[0];const a=zn(e)?.params.org,[n,r]=G.useState(!1),[i,l]=Fo(),[d,g]=xs(),h=Dn(),f=pi(),m=a??"";let c;t[1]!==m?(c=xn(m),t[1]=m,t[2]=c):c=t[2];const y=!!a&&f;let u;t[3]!==c||t[4]!==y?(u={...c,enabled:y},t[3]=c,t[4]=y,t[5]=u):u=t[5],he(u);const{data:p}=ne.useSession(),S=p?.user?.id;let x,b;t[6]!==h?(x=()=>{const E=q=>{if(It(q)&&q.code==="KeyK"){q.preventDefault(),Do();return}if(q.key==="?"&&!Bn(q.target)){q.preventDefault(),r(!0);return}It(q)&&q.code==="BracketLeft"&&h.history.canGoBack()&&(q.preventDefault(),h.history.back())};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},b=[h],t[6]=h,t[7]=x,t[8]=b):(x=t[7],b=t[8]),G.useEffect(x,b);let v;t[9]!==a||t[10]!==S?(v=Mn(a,S),t[9]=a,t[10]=S,t[11]=v):v=t[11];const{data:w}=Kt(v),N=w?.id,T=w?.slug,{data:j}=_s(N,T),P=!!j?.ssoRequired&&!j.authenticated,{data:_}=di(T);let O;t[12]===Symbol.for("react.memo_cache_sentinel")?(O={select:bi},t[12]=O):O=t[12];const A=Zt(O),$=_?.severity==="block"&&!mi(A),R=N??"",L=T??"";let I;t[13]!==L||t[14]!==R?(I=ys({connectionId:Qt,orgId:R,orgSlug:L}),t[13]=L,t[14]=R,t[15]=I):I=t[15];const B=!!N&&!!T;let H;if(t[16]!==I||t[17]!==B?(H={...I,enabled:B},t[16]=I,t[17]=B,t[18]=H):H=t[18],he(H),(!w||Ot(w)||P||$)&&Mo(),!w){let E;return t[19]!==a?(E=o.jsx(Fs,{orgSlug:a}),t[19]=a,t[20]=E):E=t[20],E}if(Ot(w)){localStorage.getItem(ge.lastOrgSlug())===a&&localStorage.removeItem(ge.lastOrgSlug()),Ht()?.org===a&&Ut();let E;return t[21]!==w.name?(E=o.jsx(Fn,{orgName:w.name}),t[21]=w.name,t[22]=E):E=t[22],E}if($&&_){let E;return t[23]!==w.slug||t[24]!==_?(E=o.jsx(ci,{notice:_,orgSlug:w.slug}),t[23]=w.slug,t[24]=_,t[25]=E):E=t[25],E}if(P){let E;return t[26]!==w.id||t[27]!==w.name||t[28]!==w.slug||t[29]!==j.domain?(E=o.jsx(ri,{orgId:w.id,orgSlug:w.slug,orgName:w.name,domain:j.domain}),t[26]=w.id,t[27]=w.name,t[28]=w.slug,t[29]=j.domain,t[30]=E):E=t[30],E}const re=w.logo??null;let Z;t[31]!==w||t[32]!==re?(Z={...w,logo:re},t[31]=w,t[32]=re,t[33]=Z):Z=t[33];let ee;t[34]!==w?(ee=o.jsx(ti,{activeOrg:w}),t[34]=w,t[35]=ee):ee=t[35];let se;t[36]===Symbol.for("react.memo_cache_sentinel")?(se=o.jsx(qn,{}),t[36]=se):se=t[36];let te;t[37]===Symbol.for("react.memo_cache_sentinel")?(te=o.jsxs("div",{className:"fixed bottom-6 right-6 z-50 flex w-[min(360px,calc(100vw-3rem))] flex-col gap-3",children:[o.jsx(mo,{}),o.jsx(Uo,{})]}),t[37]=te):te=t[37];let V;t[38]!==i||t[39]!==l?(V=i&&o.jsx(Eo,{open:i,onOpenChange:l}),t[38]=i,t[39]=l,t[40]=V):V=t[40];let Y;t[41]!==d||t[42]!==g?(Y=d&&o.jsx(bs,{open:!0,onOpenChange:g,source:ws()}),t[41]=d,t[42]=g,t[43]=Y):Y=t[43];let K;t[44]!==n?(K=o.jsx(go,{open:n,onOpenChange:r}),t[44]=n,t[45]=K):K=t[45];let W;t[46]===Symbol.for("react.memo_cache_sentinel")?(W=o.jsx(Wo,{}),t[46]=W):W=t[46];let Q;return t[47]!==Z||t[48]!==ee||t[49]!==V||t[50]!==Y||t[51]!==K?(Q=o.jsxs(fi,{org:Z,children:[ee,se,te,V,Y,K,W]}),t[47]=Z,t[48]=ee,t[49]=V,t[50]=Y,t[51]=K,t[52]=Q):Q=t[52],Q}function bi(t){return t.location.pathname}function wi(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(js,{children:o.jsx(xi,{})}),t[0]=e):e=t[0],e}const sa=Object.freeze(Object.defineProperty({__proto__:null,default:wi,usePanelActions:gi},Symbol.toStringTag,{value:"Module"}));export{gn as E,Vi as I,qs as L,un as O,wo as a,fn as b,_o as c,Wi as d,Zi as e,Yi as f,gi as g,Qi as h,rn as i,oo as j,ta as k,Qs as l,ea as m,na as n,Do as o,Gi as p,sa as q,No as r,Ji as s,Xi as t,di as u,To as w};
|