decocms 4.400.6 → 4.401.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-CiIF9Yxb.js → AlertCircle-D1gV07Oe.js} +1 -1
- package/dist/client/assets/{AreaChart-CiScmeLa.js → AreaChart-lv4gftWl.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Cw8zoASu.js → ArrowLeft-Bpb3sor7.js} +1 -1
- package/dist/client/assets/{ArrowRight-DXuJxv6z.js → ArrowRight-BFyYdKNd.js} +1 -1
- package/dist/client/assets/{ArrowUp-i7W4PLl8.js → ArrowUp-COLR6KTW.js} +1 -1
- package/dist/client/assets/{CartesianChart-CAtvwpDL.js → CartesianChart-CJGGumCB.js} +1 -1
- package/dist/client/assets/{Check-Cxn5ODoZ.js → Check-C-Vn17o5.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cb0ohXc_.js → CheckCircle-CyKBJceB.js} +1 -1
- package/dist/client/assets/{ChevronUp-B3Rmv2Rm.js → ChevronUp-Dto8qCq2.js} +1 -1
- package/dist/client/assets/{Copy01-CDFMtB2-.js → Copy01-B2GuMU9Q.js} +1 -1
- package/dist/client/assets/{CreditCard01-Bpp7DUE2.js → CreditCard01-CoMSE38C.js} +1 -1
- package/dist/client/assets/{DotsVertical-CsphgVVa.js → DotsVertical-R1tuLE9v.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-Cmgr12jK.js → ErrorBarContext-viPSAyu4.js} +1 -1
- package/dist/client/assets/{Eye-BaKrr1k0.js → Eye-BhTmzCKr.js} +1 -1
- package/dist/client/assets/{Globe04-BjYimuB_.js → Globe04-BLoVxWaz.js} +1 -1
- package/dist/client/assets/{Image01-BokX_Ygh.js → Image01-D02_x5mu.js} +1 -1
- package/dist/client/assets/{Key01--iK_92aj.js → Key01-BuudAO_W.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DbmxTpPW.js → LayoutLeft-CuG2yJZR.js} +1 -1
- package/dist/client/assets/{Line-CkGSu-B6.js → Line-CsKmpStn.js} +1 -1
- package/dist/client/assets/{Link01-CwRVjiFm.js → Link01-CVUd8ZSz.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C1LIoQUC.js → LinkExternal01-Bo5cppL4.js} +1 -1
- package/dist/client/assets/{Monitor01-B-jx6SlO.js → Monitor01-Cj93oSbT.js} +1 -1
- package/dist/client/assets/{Palette-BZ8zPcQQ.js → Palette-CEa7GqA9.js} +1 -1
- package/dist/client/assets/{Plus-BeOCeSsu.js → Plus-Ch1uJBgh.js} +1 -1
- package/dist/client/assets/{SearchMd-CmoIwdFD.js → SearchMd-B_MXZ22A.js} +1 -1
- package/dist/client/assets/{Sector-L9R2CZ3j.js → Sector-CNfzRqjQ.js} +1 -1
- package/dist/client/assets/{Share07-BQpOEypi.js → Share07-D6XgmppM.js} +1 -1
- package/dist/client/assets/{Sun-BwQeSpzv.js → Sun-Dy_rDhHe.js} +1 -1
- package/dist/client/assets/{Tool01-CFPgtTUB.js → Tool01-BoO1X0ZH.js} +1 -1
- package/dist/client/assets/{Trash01-yjy5Djos.js → Trash01-D4CwdSy9.js} +1 -1
- package/dist/client/assets/{Upload01-C3YaZ92x.js → Upload01-hQyKBWZL.js} +1 -1
- package/dist/client/assets/{User01-CxY9-OxA.js → User01-gmEyKvLo.js} +1 -1
- package/dist/client/assets/{UserSquare-D1SexGLq.js → UserSquare-DXqYCX9F.js} +1 -1
- package/dist/client/assets/{Users01-C234jzz1.js → Users01-BBb4-Wbt.js} +1 -1
- package/dist/client/assets/{X-C49OUFcX.js → X-CEngH8b7.js} +1 -1
- package/dist/client/assets/{XClose-CKQjrGZS.js → XClose-Dvx_qcsQ.js} +1 -1
- package/dist/client/assets/{Zap-GTFewWZO.js → Zap-DkS3ccHw.js} +1 -1
- package/dist/client/assets/{ZoomOut-BCbY44Eu.js → ZoomOut-D3wne5dx.js} +1 -1
- package/dist/client/assets/{access-gate-BWJ5-fyg.js → access-gate-D2mi3EXZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BRSOSKaa.js → add-connection-dialog-mm-WrmAR.js} +1 -1
- package/dist/client/assets/agent-analytics-IX3kP91L.js +2 -0
- package/dist/client/assets/agent-app-CliE0mM3.js +1 -0
- package/dist/client/assets/agent-assets-BbU_YrcZ.js +1 -0
- package/dist/client/assets/agent-automation-v13d06rk.js +20 -0
- package/dist/client/assets/agent-automations-yzTI8Hoc.js +1 -0
- package/dist/client/assets/agent-connect-sources-CEF4jbih.js +1 -0
- package/dist/client/assets/agent-deck-rRdXFIQU.js +1 -0
- package/dist/client/assets/agent-e2e-SKpj9Qv7.js +1 -0
- package/dist/client/assets/agent-experiments-DPD7MHX9.js +1 -0
- package/dist/client/assets/agent-file-CBIwfV0H.js +1 -0
- package/dist/client/assets/{agent-git-CEsra0W5.js → agent-git-N-SzMySX.js} +2 -2
- package/dist/client/assets/agent-hosting-BnzsqBpZ.js +1 -0
- package/dist/client/assets/{agent-icon-B4H17A-3.js → agent-icon-CjNFk4Bw.js} +1 -1
- package/dist/client/assets/agent-library-file-DHUyHSwO.js +1 -0
- package/dist/client/assets/agent-monitor-BeURekaz.js +1 -0
- package/dist/client/assets/agent-overview-By923wES.js +1 -0
- package/dist/client/assets/agent-settings-DiYW6DT3.js +1 -0
- package/dist/client/assets/{agent-site-editor-DqHsR1Oa.js → agent-site-editor-B7WR4KwZ.js} +13 -13
- package/dist/client/assets/agent-site-editor-code-A3lMFnBk.js +2 -0
- package/dist/client/assets/agent-site-editor-content-CTyxs9-E.js +9 -0
- package/dist/client/assets/agent-site-editor-preview-Db1buU8G.js +518 -0
- package/dist/client/assets/agent-view-Ct7YMMW7.js +1 -0
- package/dist/client/assets/{agent-view-guard-AncI1H8B.js → agent-view-guard-BpwecHVM.js} +1 -1
- package/dist/client/assets/agents-list-XIrdiWMz.js +1 -0
- package/dist/client/assets/{ai-providers-C91I1RIi.js → ai-providers-CsYNRATt.js} +2 -2
- package/dist/client/assets/{alert-Vv8Gd72t.js → alert-BYraKSPm.js} +1 -1
- package/dist/client/assets/{alert-dialog-p_yxBHYu.js → alert-dialog-DpzgB-Ls.js} +1 -1
- package/dist/client/assets/{analytics-sections-CJlCPTTn.js → analytics-sections-C2rbPWDv.js} +1 -1
- package/dist/client/assets/api-keys-B9Lt-UrM.js +1 -0
- package/dist/client/assets/api-keys-CzlAuC7_.js +1 -0
- package/dist/client/assets/app-editor-tD7rn_1-.js +1 -0
- package/dist/client/assets/{asset-utils-brdDGay3.js → asset-utils-4p52RC3c.js} +1 -1
- package/dist/client/assets/{auth-DN1jUXQS.js → auth-Dafjkfpj.js} +1 -1
- package/dist/client/assets/{auth-catchall-B8jjuh3t.js → auth-catchall-DD401U-a.js} +1 -1
- package/dist/client/assets/auth-entry-CEr7Y2wf.js +1 -0
- package/dist/client/assets/{auth-split-layout-9lXDS5uC.js → auth-split-layout-DLRovWby.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BS0KLtdr.js → authenticate-and-persist-oauth-DIl2N_8B.js} +1 -1
- package/dist/client/assets/{automation-list-row-Z-oEG96S.js → automation-list-row-ueTfZfDa.js} +1 -1
- package/dist/client/assets/{automation-runs-BfoVhm3K.js → automation-runs-iTxxsepZ.js} +1 -1
- package/dist/client/assets/{automations-BPxNxlY1.js → automations-Cad12Ows.js} +1 -1
- package/dist/client/assets/{autosend-C9lP7MMD.js → autosend-DeYn5nkP.js} +1 -1
- package/dist/client/assets/{avatar-CaSFUaWf.js → avatar-B6HmPhM4.js} +1 -1
- package/dist/client/assets/{badge-DO3CQ_LV.js → badge-4kURMy-V.js} +1 -1
- package/dist/client/assets/block-document-CgGOvOyl.js +3 -0
- package/dist/client/assets/{blocks-preview-workspace-context-Bsh7P3Oa.js → blocks-preview-workspace-context-Bm8P7H4k.js} +1 -1
- package/dist/client/assets/{buckets-DAqePqsj.js → buckets-CK1WY8Rz.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DKmCIRM5.js → build-improve-prompt-doc-BYdufdhy.js} +1 -1
- package/dist/client/assets/{calendar-v3rFo_Cq.js → calendar-CZsGTekl.js} +1 -1
- package/dist/client/assets/{capability-load-error-nzBIi4Tr.js → capability-load-error-CaE4aliY.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BMiVfW6D.js → cards-DaNm0Rmg.js} +3 -3
- package/dist/client/assets/category-editor-CyFQk1RV.js +1 -0
- package/dist/client/assets/{chart-CXdIvQqa.js → chart-_YADtzsN.js} +1 -1
- package/dist/client/assets/{chat-context-CypzFnUJ.js → chat-context-v9O7Tar9.js} +5 -5
- package/dist/client/assets/{chat-draft-bJa35Dyv.js → chat-draft-BSL5UQWs.js} +1 -1
- package/dist/client/assets/{checkbox-RuVP2KAD.js → checkbox-BMxilLAm.js} +1 -1
- package/dist/client/assets/{choose-editor-B6bnAbTO.js → choose-editor-TgQWBIvA.js} +1 -1
- package/dist/client/assets/{claim-phase-copy-IBG3Spfs.js → claim-phase-copy-DHsomph6.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Gnusnqeq.js → cli-auth-success-Bsu7TVxL.js} +1 -1
- package/dist/client/assets/{client-icons-DeH3wN29.js → client-icons-PiLBRjl7.js} +1 -1
- package/dist/client/assets/{collapsible-Bx8hZ5vv.js → collapsible-bc19817o.js} +1 -1
- package/dist/client/assets/collection-detail-DpwCwzTH.js +1 -0
- package/dist/client/assets/{collection-display-button-B4JQi_wC.js → collection-display-button-BBRywDRf.js} +1 -1
- package/dist/client/assets/{collection-search-CPwy4oTQ.js → collection-search-kj64tBFw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DzLC9Cad.js → collection-table-wrapper-D2tmoW8T.js} +1 -1
- package/dist/client/assets/collection-tabs-DCLfzEOA.js +1 -0
- package/dist/client/assets/{combobox-bXWHxi5l.js → combobox-DlQnH8_N.js} +1 -1
- package/dist/client/assets/command-vKgGCoFF.js +1 -0
- package/dist/client/assets/{companion-mcps-section-BiiIWMdJ.js → companion-mcps-section-Dpcawwvl.js} +1 -1
- package/dist/client/assets/connect-Dick3000.js +8 -0
- package/dist/client/assets/{connect-layout-C5m144rF.js → connect-layout-BfLs3zCI.js} +1 -1
- package/dist/client/assets/{connection-C1Cmv_sz.js → connection-CTAV5crm.js} +1 -1
- package/dist/client/assets/{connection-card-lUin0zXZ.js → connection-card-DXWUKoxP.js} +1 -1
- package/dist/client/assets/connection-detail-BsIDB4zB.js +1 -0
- package/dist/client/assets/{connection-form-helpers-DiXUvzY1.js → connection-form-helpers-BrejHCrx.js} +1 -1
- package/dist/client/assets/connections-dBKfZKZY.js +1 -0
- package/dist/client/assets/{context-lYPc9MR3.js → context-VbsY_yj4.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CVGvbMrB.js → create-organization-dialog-BCpMYw7e.js} +1 -1
- package/dist/client/assets/{decofile-api-D2rDGWIR.js → decofile-api-5Nr0-h_v.js} +1 -1
- package/dist/client/assets/{decopilot-DZa7cUdc.js → decopilot-DlmPNMn_.js} +2 -2
- package/dist/client/assets/dialog-CEiE0rPQ.js +1 -0
- package/dist/client/assets/discover-BvxkrONV.js +1 -0
- package/dist/client/assets/{domain-settings-BoCWiWyd.js → domain-settings-D1tynvCC.js} +1 -1
- package/dist/client/assets/{download-app-dialog-B8fu6N4W.js → download-app-dialog-fmWolHKD.js} +1 -1
- package/dist/client/assets/{drawer-Dj7i5SNu.js → drawer-mNZA6mOf.js} +1 -1
- package/dist/client/assets/{editor-CStKuO5E.js → editor-BGAJHie_.js} +1 -1
- package/dist/client/assets/{empty-state-DuOhKQcg.js → empty-state-BJxP56xq.js} +1 -1
- package/dist/client/assets/{empty-state-C8J78MMg.js → empty-state-BgjUu2bT.js} +1 -1
- package/dist/client/assets/{extract-connection-data-BN6Gn7S7.js → extract-connection-data-erEsLv_0.js} +1 -1
- package/dist/client/assets/{feature-gate-BYtexfTr.js → feature-gate-BdRUy7K_.js} +1 -1
- package/dist/client/assets/{feature-paywall-Do9-TIse.js → feature-paywall-Tj9HTPlX.js} +1 -1
- package/dist/client/assets/{file-explorer-sM87NUct.js → file-explorer-0KdYuesc.js} +2 -2
- package/dist/client/assets/{file-preview-Cctwbzua.js → file-preview-i5I4Vmk2.js} +1 -1
- package/dist/client/assets/file-share-button-FS8XJyOj.js +3 -0
- package/dist/client/assets/{file-type-icon-C--_TBMw.js → file-type-icon-Cv10yXI0.js} +1 -1
- package/dist/client/assets/{folder-icon-Be-ry1Lo.js → folder-icon-DJuQAXN-.js} +1 -1
- package/dist/client/assets/{form-msoIoPH9.js → form-CCT2OtgN.js} +1 -1
- package/dist/client/assets/{gateway-client-B7EtyAUZ.js → gateway-client-hbsOo-al.js} +1 -1
- package/dist/client/assets/{general-B5uAiOFe.js → general-B_HDEt1Q.js} +1 -1
- package/dist/client/assets/{github-icon-Czf3JIe0.js → github-icon-BpCOzzV8.js} +1 -1
- package/dist/client/assets/home-CMRSzFNz.js +1 -0
- package/dist/client/assets/{hooks-BunFzIMc.js → hooks-CcmbiBeQ.js} +4 -4
- package/dist/client/assets/{icon-button-TBoaqswf.js → icon-button-B8KzCtPE.js} +1 -1
- package/dist/client/assets/index-BeJdXzSv.css +1 -0
- package/dist/client/assets/{index-C4bcGTWO.js → index-BpvXUNGE.js} +27 -27
- package/dist/client/assets/index-BsLVRPrU.js +26 -0
- package/dist/client/assets/{index-Bv9cknRX.js → index-CDe2yrwT.js} +1 -1
- package/dist/client/assets/index-CGxhGPsv.js +5 -0
- package/dist/client/assets/{index-DU8D4REs.js → index-CKZ6XrRd.js} +1 -1
- package/dist/client/assets/{index-B4lO5kiB.js → index-CWksyNR9.js} +1 -1
- package/dist/client/assets/{index-BO3WDGm0.js → index-ClooW3Im.js} +1 -1
- package/dist/client/assets/{index-DNOKSPYL.js → index-DVgj8U7g.js} +1 -1
- package/dist/client/assets/index-D_lD_4br.js +1 -0
- package/dist/client/assets/{index-B-RfjkQs.js → index-De5sr9zh.js} +44 -44
- package/dist/client/assets/{index-bU1o14-j.js → index-Kwx27vNK.js} +1 -1
- package/dist/client/assets/index-bMw4G7-h.js +1 -0
- package/dist/client/assets/{index-CUoS9PHq.js → index-gldwodyc.js} +1 -1
- package/dist/client/assets/{index-haAT4fp-.js → index-ldS2WUeM.js} +1 -1
- package/dist/client/assets/index-redirect-CfY3ykU_.js +1 -0
- package/dist/client/assets/{infiniteQueryObserver-CFFZE0G7.js → infiniteQueryObserver-CwgE9ndj.js} +1 -1
- package/dist/client/assets/{infra-billing-CI3pPi6s.js → infra-billing-TzlPUT1_.js} +1 -1
- package/dist/client/assets/{input-DgwTyBrI.js → input-B-DIEGoS.js} +1 -1
- package/dist/client/assets/{input-CkBBlArz.js → input-CogQggtY.js} +1 -1
- package/dist/client/assets/input-DMbK8B2u.js +8 -0
- package/dist/client/assets/{integration-icon-DuRUAYQY.js → integration-icon-CsYMgjoT.js} +1 -1
- package/dist/client/assets/{label-COhaglCI.js → label-Baft7ecp.js} +1 -1
- package/dist/client/assets/{last-preview-page-C2BRWzsU.js → last-preview-page-DkIjQnDn.js} +1 -1
- package/dist/client/assets/{layout-ezpRdHMe.js → layout-CI3O4gkp.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-7Ua9_FGE.js → legacy-agents-deep-BvWpwcOc.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-CoKgMaf6.js → legacy-main-redirect-CQgWSIje.js} +1 -1
- package/dist/client/assets/library-CAwdTP4-.js +161 -0
- package/dist/client/assets/{login-zL3v_Zks.js → login-DJ5PeYOE.js} +1 -1
- package/dist/client/assets/{markdown-CL_7eJfo.js → markdown-UaZeehfy.js} +2 -2
- package/dist/client/assets/{mcp-app-renderer-BF1xjUD_.js → mcp-app-renderer-DVXFXjZU.js} +2 -2
- package/dist/client/assets/{mcp-oauth-CYUMx6Lt.js → mcp-oauth-DpJ1IX9I.js} +1 -1
- package/dist/client/assets/members-CXM5jx_X.js +1 -0
- package/dist/client/assets/message-templates-54foej4h.js +1 -0
- package/dist/client/assets/{mini-report-page-D2G_6nvn.js → mini-report-page-B1sFW1ww.js} +1 -1
- package/dist/client/assets/mock-board-BbS_eZEl.js +10 -0
- package/dist/client/assets/{monaco-editor-B-WPLOla.js → monaco-editor-B9FUV1NZ.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-IwXyXgpg.js → monitoring-stats-row-Cl5_OBZ5.js} +1 -1
- package/dist/client/assets/multi-select-VDMM47xB.js +1 -0
- package/dist/client/assets/{mustache-D5b2aALH.js → mustache-DZ4FV0Nc.js} +1 -1
- package/dist/client/assets/{oauth-callback-XaDe1ZVU.js → oauth-callback-OoZf3jL0.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CG6P6aWc.js → oauth-callback-ai-provider-foDaIFwI.js} +1 -1
- package/dist/client/assets/{onboarding-C0P9leUg.js → onboarding-Dq71FOpN.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BULTvoQH.js → optimistic-project-sidebar-views-CgB8Gy1s.js} +1 -1
- package/dist/client/assets/org-file-open-context-Mx8jC4-P.js +1 -0
- package/dist/client/assets/{organization-choice-5mEr1aKE.js → organization-choice-ZqNf00EY.js} +1 -1
- package/dist/client/assets/{orgs-3MZWLo-q.js → orgs-B8y0HHqF.js} +1 -1
- package/dist/client/assets/page-seo-form-DPObRKD4.js +1 -0
- package/dist/client/assets/{pair-CSXFDEIQ.js → pair-D39JYx1G.js} +5 -5
- package/dist/client/assets/{plan-ladder-B7xKH1KD.js → plan-ladder-D85oNnSr.js} +1 -1
- package/dist/client/assets/{popover-DFY37Yvw.js → popover-DCaw39mN.js} +1 -1
- package/dist/client/assets/{post-calendar-Jvfo43V-.js → post-calendar-Dpixo2IP.js} +1 -1
- package/dist/client/assets/{post-editor-D0HMXnr-.js → post-editor-BivV74bZ.js} +1 -1
- package/dist/client/assets/{preview-content-DyylZdej.js → preview-content-ziDhpr9V.js} +1 -1
- package/dist/client/assets/{preview-dialog-GxP1iGgN.js → preview-dialog-DHJShsrA.js} +1 -1
- package/dist/client/assets/profile-C9xI3KvS.js +1 -0
- package/dist/client/assets/{project-app-view-C-S_SBUQ.js → project-app-view-CFWAaKq_.js} +1 -1
- package/dist/client/assets/project-feed-D6D6bSHY.js +1 -0
- package/dist/client/assets/{project-icon-CsZAOQy_.js → project-icon-CXM68zVZ.js} +1 -1
- package/dist/client/assets/project-reports-8SYQbI2J.js +1 -0
- package/dist/client/assets/project-tasks-DrEyprGU.js +1 -0
- package/dist/client/assets/{prompts-CvgNBkYO.js → prompts-CVNAEIJB.js} +1 -1
- package/dist/client/assets/record-editor-CKxwz78L.js +1 -0
- package/dist/client/assets/{redirect-editor-D2NLj98m.js → redirect-editor-Dy1UJRrv.js} +1 -1
- package/dist/client/assets/{reports-BCYtzeDa.js → reports-BvZHk8Hk.js} +2 -2
- package/dist/client/assets/reports-DyvsxSR9.js +1 -0
- package/dist/client/assets/{reports-onboarding-BG7_PC6g.js → reports-onboarding-D4Uaui5Y.js} +1 -1
- package/dist/client/assets/reports-tab-CwwTWlIS.js +2 -0
- package/dist/client/assets/{repositories-C5RyL_z1.js → repositories-CqbcdDdH.js} +1 -1
- package/dist/client/assets/{repository-import-picker-ByioO6uG.js → repository-import-picker-BXQhU82J.js} +1 -1
- package/dist/client/assets/{repository-picker-BPuZL7HO.js → repository-picker-D1hSYB_G.js} +1 -1
- package/dist/client/assets/require-capability-Cab5QyjH.js +1 -0
- package/dist/client/assets/{required-auth-layout-Duev8t_N.js → required-auth-layout-scRrBHKS.js} +1 -1
- package/dist/client/assets/{reset-password-JANPJ9Jd.js → reset-password-CDE1iX3h.js} +1 -1
- package/dist/client/assets/{resizable-yTD1tEOl.js → resizable-D2L182YF.js} +1 -1
- package/dist/client/assets/{review-settings-vW0-yRPH.js → review-settings-B98rLFs_.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BUscMTY0.js → rich-text-link-control-DwRx0-0K.js} +1 -1
- package/dist/client/assets/roles-CZvYgdUZ.js +1 -0
- package/dist/client/assets/route-B9TApoqS.js +1 -0
- package/dist/client/assets/route-N926-QRJ.js +1 -0
- package/dist/client/assets/route-OKy5_TxY.js +1 -0
- package/dist/client/assets/route-page-header-ErgCCo2N.js +1 -0
- package/dist/client/assets/runnable-block-editor-C2YphDcL.js +17 -0
- package/dist/client/assets/{sandbox-lifecycle-context-BZ0OGbvt.js → sandbox-lifecycle-context-o4KKoGrI.js} +2 -2
- package/dist/client/assets/{schema-kN4UiUD7.js → schema-DkZUkArz.js} +1 -1
- package/dist/client/assets/{scroll-area-DtmE_V3W.js → scroll-area-Ca9Mo_QH.js} +1 -1
- package/dist/client/assets/{search-input-5SNth6iW.js → search-input-DRWRYRPs.js} +1 -1
- package/dist/client/assets/{search-toggle-BQLp0m3w.js → search-toggle-B5FB44XX.js} +1 -1
- package/dist/client/assets/{secret-picker-CNRCwGgJ.js → secret-picker-DLap6vTC.js} +1 -1
- package/dist/client/assets/secrets-jZp-bTCf.js +1 -0
- package/dist/client/assets/sections-editor-BFbkxXEt.js +1 -0
- package/dist/client/assets/{select-lkzYgXdD.js → select-BZ6sktb7.js} +1 -1
- package/dist/client/assets/select-model-BIWsu5PV.js +1 -0
- package/dist/client/assets/{seo-editor-C5sUOmWC.js → seo-editor-PDlEaSFK.js} +1 -1
- package/dist/client/assets/{separator-DIB2NY6d.js → separator-D_UVaWw6.js} +1 -1
- package/dist/client/assets/settings-tab-BBHI-Kul.js +5 -0
- package/dist/client/assets/{sheet-B5VBlNbo.js → sheet-Kja83qKC.js} +1 -1
- package/dist/client/assets/shell-layout-ynqF32RZ.js +1 -0
- package/dist/client/assets/{skill-preview-_2hXoPIK.js → skill-preview-BjeMKh94.js} +1 -1
- package/dist/client/assets/skills-BVNUFN8s.js +1 -0
- package/dist/client/assets/{sso-kIq_TNP0.js → sso-CbvzPnGh.js} +1 -1
- package/dist/client/assets/{suggestion-Bm5WiIMl.js → suggestion-DMGPIg87.js} +1 -1
- package/dist/client/assets/{switch-C_Vj5_E0.js → switch-CSgTLkLq.js} +1 -1
- package/dist/client/assets/synced-repos-DkDa4E03.js +1 -0
- package/dist/client/assets/{table-EewUoElk.js → table-BNlBwUw8.js} +1 -1
- package/dist/client/assets/{tabs-Dn00_KeP.js → tabs-DWl7SNDG.js} +1 -1
- package/dist/client/assets/{task-board-B1qWBX1A.js → task-board-C6TTBmRS.js} +1 -1
- package/dist/client/assets/{task-route-D--4JOl_.js → task-route-Bz3woGSP.js} +1 -1
- package/dist/client/assets/{task-status-Nj47Imo6.js → task-status-CnFMIlt_.js} +1 -1
- package/dist/client/assets/taskboard-analytics-DoJw1Xfg.js +1 -0
- package/dist/client/assets/tasks-CIdMsSLJ.js +1 -0
- package/dist/client/assets/{tasks-BKvSOVwi.js → tasks-Cqz8mQiU.js} +2 -2
- package/dist/client/assets/{textarea-BJstaU_4.js → textarea-CufiKBr1.js} +1 -1
- package/dist/client/assets/thread-analytics-CC-_zVgm.js +1 -0
- package/dist/client/assets/thread-button-Ds-0KssI.js +1 -0
- package/dist/client/assets/{thread-intent-Dv_ln6w2.js → thread-intent-rbLXiRX-.js} +1 -1
- package/dist/client/assets/{thread-route-C2QO3TRR.js → thread-route-B3__WRb1.js} +1 -1
- package/dist/client/assets/thread-route-D_-4E_Qa.js +1 -0
- package/dist/client/assets/{thread-sheet-body-a-hPHT_-.js → thread-sheet-body-C6Nvo-gY.js} +1 -1
- package/dist/client/assets/toggle-group-CEb1zCbt.js +1 -0
- package/dist/client/assets/toolbar-icon-button-B7ENG3u2.js +1 -0
- package/dist/client/assets/{tooltip-1YZ9_LEc.js → tooltip-Bdu4_ay-.js} +1 -1
- package/dist/client/assets/{track-BdOLl-rI.js → track-DYcNrkYj.js} +1 -1
- package/dist/client/assets/{types-BcA15it5.js → types-C1lh-7rD.js} +3 -3
- package/dist/client/assets/{usage-stats-BXm3jzMp.js → usage-stats-C8kdutYl.js} +1 -1
- package/dist/client/assets/{use-ai-providers-OZaiJf_i.js → use-ai-providers-DdvmCGxF.js} +1 -1
- package/dist/client/assets/{use-automations-D-L8pJyH.js → use-automations-By-N-e6c.js} +1 -1
- package/dist/client/assets/{use-autosave-WOg9IhGs.js → use-autosave-tkO4DMDZ.js} +1 -1
- package/dist/client/assets/use-connect-companion-CRgCDVPT.js +1 -0
- package/dist/client/assets/{use-connection-B5_J2wP6.js → use-connection-CzhqmkxY.js} +1 -1
- package/dist/client/assets/{use-copy-B6plqh15.js → use-copy-D35bNj5j.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BHGrzRmt.js → use-create-virtual-mcp-DSS6KW-Y.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-giBeaSOM.js → use-date-fns-locale-B65-a3KP.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-B9G4Lz7n.js → use-debounced-autosave-UCDN4Lw3.js} +1 -1
- package/dist/client/assets/{use-debounced-value-CUPne1nm.js → use-debounced-value-CWshbX7F.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BhBg4qYv.js → use-deco-credits-DTu_Qf20.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CrYWYj1F.js → use-decopilot-events-BvKgG5Ws.js} +1 -1
- package/dist/client/assets/{use-delete-connection-XgJ1tVSe.js → use-delete-connection-1XhxmMPF.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DhLAmeuE.js → use-deployment-admin-DMXwbJU8.js} +1 -1
- package/dist/client/assets/{use-entitlements-Bk0dyRQ2.js → use-entitlements-Da1bmf67.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BfzrR4he.js → use-fast-preview-draft-url-C7L3VsQn.js} +1 -1
- package/dist/client/assets/{use-file-configs-Q9mf6jQo.js → use-file-configs-C7xVU8E2.js} +1 -1
- package/dist/client/assets/use-in-settings-icIKIpSR.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-BAK1V_oQ.js → use-infinite-scroll-7-m4dXi3.js} +1 -1
- package/dist/client/assets/{use-join-requests-DbabBnEV.js → use-join-requests-D_x3dmzZ.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-B5g6e1MJ.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-DetA28-g.js → use-mcp-auth-status-nDkEwx2c.js} +1 -1
- package/dist/client/assets/{use-mcp-client-6HSoOGyN.js → use-mcp-client-CkjkRUta.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-1aH_UXpe.js → use-mcp-prompts-D2XJcis0.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-yAkOUoVS.js → use-mcp-tools-DZlo67bQ.js} +1 -1
- package/dist/client/assets/{use-members-CNAxK8NG.js → use-members-CdPjttiy.js} +1 -1
- package/dist/client/assets/{use-mobile-BA2OXMES.js → use-mobile-DVMuGaln.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B7J0geak.js → use-navigate-to-agent-BCcYux8q.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-CdE8qyDV.js → use-open-billing-url-CJn1G7pV.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-DJC4lcTZ.js → use-org-auth-client-D8dxsLtj.js} +1 -1
- package/dist/client/assets/{use-org-fs-DxNvtETC.js → use-org-fs-3jzMRDSK.js} +1 -1
- package/dist/client/assets/{use-org-sso-D0y0H-Wd.js → use-org-sso-Bb_2_N0Z.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CTjyx7IB.js → use-organization-roles-ixSaPxG5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-fx1CniIO.js → use-organization-settings-B0mobgxG.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-ZqAXzPy8.js → use-panel-navigate-CjSWJCy4.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-DU2K0Eyd.js → use-project-native-view-presence-_PPun-xm.js} +1 -1
- package/dist/client/assets/{use-project-scope-Hp7aDrht.js → use-project-scope-CJnr8HCi.js} +1 -1
- package/dist/client/assets/{use-releases-BXIf7cF0.js → use-releases-CT-nVxtd.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-D7jrD_HD.js → use-reports-diagnostic-AsJIEIvt.js} +1 -1
- package/dist/client/assets/{use-route-default-main-DGbZPJrO.js → use-route-default-main-CQGz2KW9.js} +1 -1
- package/dist/client/assets/{use-secrets-C-Xp8b4K.js → use-secrets-DgNcVRY9.js} +1 -1
- package/dist/client/assets/use-section-preview-base-mIL7vKdH.js +1 -0
- package/dist/client/assets/{use-session-runtime-BGl1FWUp.js → use-session-runtime-B9eFlXyW.js} +1 -1
- package/dist/client/assets/{use-tags-pwsJJDvy.js → use-tags-BM82Yu0K.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Dh7V7MPv.js → use-task-board-analytics-D_ruF5p9.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DKjAQSZf.js → use-task-metadata-qZ-qzNT-.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CusHOOmZ.js → use-thread-analytics-BcEpZDI1.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-8akdlycY.js → use-thread-outputs-CIF4-tq_.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CbHEuH0C.js → use-virtual-mcp-BKP1YfD8.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DhVx-Xnv.js +1 -0
- package/dist/client/assets/{useQueries-B5DxQ3Sp.js → useQueries-CbuhlNe5.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CB90sByh.js +1 -0
- package/dist/client/assets/{users-p9MUZzW1.js → users-CDy-vhRi.js} +1 -1
- package/dist/client/assets/{utils-BkPwCtYS.js → utils-VRidfAJX.js} +1 -1
- package/dist/client/assets/{variant-calendar-CcJNDqFN.js → variant-calendar-C5Yhhu_f.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-CexHfhU3.js → variant-matcher-override-NRDTBNQG.js} +1 -1
- package/dist/client/assets/view-mode-toggle-P-VmNhrj.js +1 -0
- package/dist/client/assets/{virtual-mcp-Dd5g9b73.js → virtual-mcp-DXr1jTLu.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-DvZELmro.js +0 -2
- package/dist/client/assets/agent-app-CR4dhbC3.js +0 -1
- package/dist/client/assets/agent-assets-CAIo2BGp.js +0 -1
- package/dist/client/assets/agent-automation-4_v-jQ62.js +0 -20
- package/dist/client/assets/agent-automations-DideyLR7.js +0 -1
- package/dist/client/assets/agent-connect-sources-C16mG4Vi.js +0 -1
- package/dist/client/assets/agent-deck-B2S-lir7.js +0 -1
- package/dist/client/assets/agent-e2e-CQ-lGjg-.js +0 -1
- package/dist/client/assets/agent-experiments-CXowDnMX.js +0 -1
- package/dist/client/assets/agent-file-DVtUKLrb.js +0 -1
- package/dist/client/assets/agent-hosting-B95vsATF.js +0 -1
- package/dist/client/assets/agent-library-file-c5FcaNLf.js +0 -1
- package/dist/client/assets/agent-monitor-DKyHOvd6.js +0 -1
- package/dist/client/assets/agent-overview-Dq7efx0u.js +0 -1
- package/dist/client/assets/agent-settings-tjDRwuVg.js +0 -1
- package/dist/client/assets/agent-site-editor-code-D1x0TO9d.js +0 -2
- package/dist/client/assets/agent-site-editor-content-C0C8gdKB.js +0 -9
- package/dist/client/assets/agent-site-editor-preview-BPAT7NTN.js +0 -518
- package/dist/client/assets/agent-view-DECRuUKv.js +0 -1
- package/dist/client/assets/agents-list-DdpIsQof.js +0 -1
- package/dist/client/assets/api-keys-CAMHVAF8.js +0 -1
- package/dist/client/assets/api-keys-Ct4yGdka.js +0 -1
- package/dist/client/assets/app-editor-BWuGvl0o.js +0 -1
- package/dist/client/assets/auth-entry-BZ-zlX-A.js +0 -1
- package/dist/client/assets/block-document-BQbcWy3F.js +0 -3
- package/dist/client/assets/breadcrumb-D3KLnh1b.js +0 -1
- package/dist/client/assets/category-editor-CLkY8j6x.js +0 -1
- package/dist/client/assets/collection-detail-Xqlt3OgU.js +0 -1
- package/dist/client/assets/collection-tabs-VZH79ort.js +0 -1
- package/dist/client/assets/command-C0IXiNme.js +0 -1
- package/dist/client/assets/connect-B9RtRyUW.js +0 -8
- package/dist/client/assets/connection-detail-Bgtg-egn.js +0 -1
- package/dist/client/assets/connections-CIFiKTz-.js +0 -1
- package/dist/client/assets/dialog-fTIcTyHb.js +0 -1
- package/dist/client/assets/discover-BZC8PmWN.js +0 -1
- package/dist/client/assets/file-share-button-Dcpl3tTi.js +0 -3
- package/dist/client/assets/home-nqrW03_D.js +0 -1
- package/dist/client/assets/index-B48I-F_s.js +0 -26
- package/dist/client/assets/index-CnM-XjMS.js +0 -1
- package/dist/client/assets/index-CnlnpiW9.js +0 -1
- package/dist/client/assets/index-Cnm8iPpl.js +0 -5
- package/dist/client/assets/index-DQQ8_5-n.css +0 -1
- package/dist/client/assets/index-redirect-lHlkLUpP.js +0 -1
- package/dist/client/assets/input-bCtnK_dS.js +0 -8
- package/dist/client/assets/library-nbbFy0YJ.js +0 -161
- package/dist/client/assets/members-Ci31aIzf.js +0 -1
- package/dist/client/assets/message-templates-Dievwyon.js +0 -1
- package/dist/client/assets/mock-board-MGFiZQqD.js +0 -10
- package/dist/client/assets/multi-select-B5cPO8Zc.js +0 -1
- package/dist/client/assets/org-file-open-context-C6mgZPAr.js +0 -1
- package/dist/client/assets/page-seo-form-BHc2C0F_.js +0 -1
- package/dist/client/assets/profile-Bl7SMbnv.js +0 -1
- package/dist/client/assets/project-feed-C9k9tVu9.js +0 -1
- package/dist/client/assets/project-reports-h9XKnGzZ.js +0 -1
- package/dist/client/assets/project-tasks-CvQsB5FR.js +0 -1
- package/dist/client/assets/record-editor-Dco1ladi.js +0 -1
- package/dist/client/assets/reports-KVVIwKGA.js +0 -1
- package/dist/client/assets/reports-tab-CZyY8SM6.js +0 -2
- package/dist/client/assets/require-capability-BlL45yDc.js +0 -1
- package/dist/client/assets/roles-B-T-wGt2.js +0 -1
- package/dist/client/assets/route-BoE0K809.js +0 -1
- package/dist/client/assets/route-Ciyyz2ig.js +0 -1
- package/dist/client/assets/route-X5r9RmD7.js +0 -1
- package/dist/client/assets/route-page-header-Ck32Z_z1.js +0 -1
- package/dist/client/assets/runnable-block-editor-DXtvF8jt.js +0 -17
- package/dist/client/assets/secrets-BUndq66A.js +0 -1
- package/dist/client/assets/sections-editor-BMGHgar4.js +0 -1
- package/dist/client/assets/select-model-L0RmAR5m.js +0 -1
- package/dist/client/assets/settings-tab-BQA673_Z.js +0 -5
- package/dist/client/assets/shell-layout-t1NP6lxk.js +0 -1
- package/dist/client/assets/sidebar-Bsj1oRm2.js +0 -1
- package/dist/client/assets/skills-D_mDF0TE.js +0 -1
- package/dist/client/assets/synced-repos-wPtrwk-M.js +0 -1
- package/dist/client/assets/taskboard-analytics-DlcZmFmP.js +0 -1
- package/dist/client/assets/tasks-DhBfoBLp.js +0 -1
- package/dist/client/assets/thread-analytics-CJvSEofm.js +0 -1
- package/dist/client/assets/thread-button-Dg0_8ATn.js +0 -1
- package/dist/client/assets/thread-route-BBwMAr4Q.js +0 -1
- package/dist/client/assets/toggle-group-n81OZ_Uu.js +0 -1
- package/dist/client/assets/toolbar-icon-button-G0ZB62BK.js +0 -1
- package/dist/client/assets/use-connect-companion-dh23z2e4.js +0 -1
- package/dist/client/assets/use-in-settings-_C3gW9Az.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-rnsNQmUO.js +0 -1
- package/dist/client/assets/use-section-preview-base-BIeB_qzV.js +0 -1
- package/dist/client/assets/useInfiniteQuery-CEwPAAtp.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CC4BMd5I.js +0 -1
- package/dist/client/assets/view-mode-toggle-CJHrx4Q2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as $,b as U,r as B,l as Y,j as s,h as je,Y as le,as as Se,ar as Fe,E as Ct,a as Re,K as Pt,m as nt,q as ce,a4 as at,at as ls,au as os,V as At,t as It,al as cs,d as Be,U as rt,n as pt,av as Mt,aw as ds,f as Ne,C as xt,e as us,u as Oe,k as fs,ax as ms,ay as hs,O as Lt,az as ps,N as xs,B as gs,P as Le}from"./index-B-RfjkQs.js";import{i as it}from"./AlertCircle-CiIF9Yxb.js";import{i as bs}from"./LayoutLeft-DbmxTpPW.js";import{u as vs}from"./sidebar-Bsj1oRm2.js";import{T as De,p as js}from"./toolbar-icon-button-G0ZB62BK.js";import{C as ee,w as ys}from"./index-CnM-XjMS.js";import{u as ks,a as Ss}from"./use-organization-settings-fx1CniIO.js";import{d as Ns,i as Ts}from"./decofile-api-D2rDGWIR.js";import{u as ze,a as $t,b as Ge,c as Dt,d as _s,e as ws,s as Cs}from"./chat-context-CypzFnUJ.js";import{u as Et}from"./use-session-runtime-BGl1FWUp.js";import{u as Ps}from"./use-ai-providers-OZaiJf_i.js";import{i as As}from"./CheckCircle-Cb0ohXc_.js";import{q as Is,r as gt,A as ye,u as Ms,v as Ls,w as $s,x as Ds,y as Es,z as Fs,B as Ft,C as Rs,D as Bs,E as Os,n as zs}from"./agent-icon-B4H17A-3.js";import{s as bt}from"./XClose-CKQjrGZS.js";import{a as de,b as Rt}from"./use-virtual-mcp-CbHEuH0C.js";import{I as Bt}from"./integration-icon-DuRUAYQY.js";import{b as Gs}from"./use-entitlements-Bk0dyRQ2.js";import{t as lt}from"./ChevronUp-B3Rmv2Rm.js";import{O as Hs}from"./pair-CSXFDEIQ.js";import{u as Us,a as Vs}from"./use-thread-outputs-8akdlycY.js";import{u as Ks}from"./use-deco-credits-BhBg4qYv.js";import{a as ot,b as Ws,f as qs,L as Ot,s as Ys,c as Qs}from"./shell-layout-t1NP6lxk.js";import{f as Zs,b as Xs}from"./use-project-scope-Hp7aDrht.js";import{g as et,u as Js,n as en,a as tn}from"./use-releases-BXIf7cF0.js";import{d as zt,c as sn}from"./thread-intent-Dv_ln6w2.js";import{u as nn,a as ct,b as dt,c as ut}from"./hooks-BunFzIMc.js";import{f as an,a as Gt,b as rn}from"./use-navigate-to-agent-B7J0geak.js";import{o as ln,s as on,u as cn,S as dn,a as un}from"./sandbox-lifecycle-context-BZ0OGbvt.js";import{E as Ht}from"./empty-state-DuOhKQcg.js";import{t as fn,m as mn,u as hn}from"./thread-button-Dg0_8ATn.js";import{g as Ut}from"./github-repo-BknN0SVI.js";import{u as Vt}from"./use-mobile-BA2OXMES.js";import{C as vt,u as pn,P as xn}from"./index-CnlnpiW9.js";import{a as Kt,b as Wt,P as qt}from"./popover-DFY37Yvw.js";import{T as Te,a as _e,c as we}from"./tooltip-1YZ9_LEc.js";import{T as gn,a as bn}from"./toggle-group-n81OZ_Uu.js";import{u as Yt,a as He,r as vn,b as Qt,c as jn,d as yn}from"./thread-route-C2QO3TRR.js";import{d as kn,h as Sn,c as Nn,b as Tn,D as _n}from"./dialog-fTIcTyHb.js";import{c as wn,C as Cn,a as Pn,b as An,e as In,d as Mn}from"./command-C0IXiNme.js";import{i as Zt}from"./Zap-GTFewWZO.js";import{A as Ln,a as $n,b as Dn,c as En,g as Fn,d as Rn,e as Bn,f as On}from"./alert-dialog-p_yxBHYu.js";import{g as zn,S as Gn}from"./task-status-Nj47Imo6.js";import{a as Hn}from"./format-time-BtXRrtv4.js";import{i as Un,a as Vn}from"./Share07-BQpOEypi.js";import{a as Kn}from"./ZoomOut-BCbY44Eu.js";import{a as ft,u as Wn}from"./use-panel-navigate-ZqAXzPy8.js";import{u as mt}from"./use-main-panel-tabs-rnsNQmUO.js";import{b as qn,c as Xt,S as Yn,d as Qn}from"./select-lkzYgXdD.js";import{L as ht,a as Zn}from"./legacy-main-redirect-CoKgMaf6.js";import{L as Xn}from"./preview-dialog-GxP1iGgN.js";import{O as Jn}from"./org-file-open-context-C6mgZPAr.js";import{B as jt}from"./blocks-preview-workspace-context-Bsh7P3Oa.js";import{u as Jt}from"./use-is-desktop-app-BNujXJc_.js";import{p as ea}from"./virtual-mcp-Dd5g9b73.js";import"./sheet-B5VBlNbo.js";import"./X-C49OUFcX.js";import"./ArrowUp-i7W4PLl8.js";import"./gateway-client-B7EtyAUZ.js";import"./drawer-Dj7i5SNu.js";import"./collection-search-CPwy4oTQ.js";import"./SearchMd-CmoIwdFD.js";import"./use-mcp-client-6HSoOGyN.js";import"./auth-DN1jUXQS.js";import"./use-mcp-prompts-1aH_UXpe.js";import"./index-B4lO5kiB.js";import"./form-msoIoPH9.js";import"./label-COhaglCI.js";import"./input-DgwTyBrI.js";import"./utils-CVEq3hMx.js";import"./input-bCtnK_dS.js";import"./autosend-C9lP7MMD.js";import"./chat-draft-bJa35Dyv.js";import"./ArrowRight-DXuJxv6z.js";import"./Check-Cxn5ODoZ.js";import"./Image01-BokX_Ygh.js";import"./Upload01-C3YaZ92x.js";import"./Copy01-CDFMtB2-.js";import"./ArrowLeft-Cw8zoASu.js";import"./usage-stats-BXm3jzMp.js";import"./use-copy-B6plqh15.js";import"./markdown-CL_7eJfo.js";import"./Eye-BaKrr1k0.js";import"./tabs-Dn00_KeP.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-CdE8qyDV.js";import"./decopilot-DZa7cUdc.js";import"./checkbox-RuVP2KAD.js";import"./Tool01-CFPgtTUB.js";import"./Key01--iK_92aj.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Monitor01-B-jx6SlO.js";import"./avatar-CaSFUaWf.js";import"./User01-CxY9-OxA.js";import"./download-app-dialog-B8fu6N4W.js";import"./index-haAT4fp-.js";import"./input-CkBBlArz.js";import"./suggestion-Bm5WiIMl.js";import"./use-org-fs-DxNvtETC.js";import"./Link01-CwRVjiFm.js";import"./Plus-BeOCeSsu.js";import"./question-004-sINsf4GQ.js";import"./use-members-CNAxK8NG.js";import"./use-org-auth-client-DJC4lcTZ.js";import"./feature-paywall-Do9-TIse.js";import"./plan-ladder-B7xKH1KD.js";import"./add-connection-dialog-BRSOSKaa.js";import"./extract-connection-data-BN6Gn7S7.js";import"./metadata-D72DunRR.js";import"./connection-C1Cmv_sz.js";import"./connection-card-lUin0zXZ.js";import"./useInfiniteQuery-CEwPAAtp.js";import"./infiniteQueryObserver-CFFZE0G7.js";import"./connection-slug-CITJ0kGN.js";import"./slugify-CEUa2lfQ.js";import"./textarea-BJstaU_4.js";import"./use-connection-B5_J2wP6.js";import"./UserSquare-D1SexGLq.js";import"./connection-form-helpers-DiXUvzY1.js";import"./Trash01-yjy5Djos.js";import"./authenticate-and-persist-oauth-BS0KLtdr.js";import"./mcp-oauth-CYUMx6Lt.js";import"./collection-tabs-VZH79ort.js";import"./badge-DO3CQ_LV.js";import"./use-infinite-scroll-BAK1V_oQ.js";import"./useSuspenseInfiniteQuery-CC4BMd5I.js";import"./schema-kN4UiUD7.js";import"./task-board-B1qWBX1A.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-CrYWYj1F.js";import"./Globe04-BjYimuB_.js";import"./CreditCard01-Bpp7DUE2.js";import"./DotsVertical-CsphgVVa.js";import"./LinkExternal01-C1LIoQUC.js";import"./Sun-BwQeSpzv.js";import"./Palette-BZ8zPcQQ.js";import"./Users01-C234jzz1.js";import"./collapsible-Bx8hZ5vv.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BF1xjUD_.js";import"./types-BcA15it5.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./file-type-icon-C--_TBMw.js";import"./project-icon-CsZAOQy_.js";import"./required-auth-layout-Duev8t_N.js";import"./use-org-sso-D0y0H-Wd.js";import"./serial-task-queue-CGOeQgpr.js";import"./backoff-8mStPHYB.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./use-route-default-main-DGbZPJrO.js";import"./use-in-settings-_C3gW9Az.js";import"./resizable-yTD1tEOl.js";import"./route-page-header-Ck32Z_z1.js";import"./index-DNOKSPYL.js";import"./index-bU1o14-j.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-mcp-tools-yAkOUoVS.js";import"./use-task-metadata-DKjAQSZf.js";import"./use-project-native-view-presence-DU2K0Eyd.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-Q9mf6jQo.js";import"./site-slug-DebpOoQq.js";import"./preview-content-DyylZdej.js";import"./file-preview-Cctwbzua.js";import"./utils-BkPwCtYS.js";import"./editor-CStKuO5E.js";import"./file-share-button-Dcpl3tTi.js";function ta({isThreadLocked:t,hasCloudProviderKeys:e}){return t?!1:!e}function sa(){const t=$.c(3),e=Ps(),r=ze()?.isThreadLocked??!1,i=e.length>0;let a;return t[0]!==r||t[1]!==i?(a=ta({isThreadLocked:r,hasCloudProviderKeys:i}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function ve(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Qe(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 na(t){return t?t.replace(/-\d{8}(?:-[a-z0-9]+)*$/i,"").replace(/-/g," "):"—"}function aa(t){const e=$.c(4),{items:n}=t;let r;e[0]!==n?(r=n.map(ra),e[0]=n,e[1]=r):r=e[1];let i;return e[2]!==r?(i=s.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 ra(t){return s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[s.jsx("span",{className:"text-xs text-muted-foreground truncate",children:t.label}),s.jsx("span",{className:"text-sm text-foreground tabular-nums truncate",children:t.value})]},t.label)}function ia(t){const e=$.c(33),{userTokens:n,assistantTokens:r,otherTokens:i}=t,a=U(),l=n+r+i,d=l>0?n/l*100:0,u=l>0?r/l*100:0,o=l>0?i/l*100:0;let c;e[0]!==d?(c=d>0&&s.jsx("div",{className:"h-full bg-chart-1",style:{width:`${d}%`}}),e[0]=d,e[1]=c):c=e[1];let f;e[2]!==u?(f=u>0&&s.jsx("div",{className:"h-full bg-chart-2",style:{width:`${u}%`}}),e[2]=u,e[3]=f):f=e[3];let m;e[4]!==o?(m=o>0&&s.jsx("div",{className:"h-full bg-muted-foreground/30",style:{width:`${o}%`}}),e[4]=o,e[5]=m):m=e[5];let h;e[6]!==c||e[7]!==f||e[8]!==m?(h=s.jsxs("div",{className:"flex h-2 w-full overflow-hidden rounded-full bg-muted",children:[c,f,m]}),e[6]=c,e[7]=f,e[8]=m,e[9]=h):h=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-1 shrink-0"}),e[10]=g):g=e[10];let v;e[11]!==a||e[12]!==d?(v=a("chat.contextPanel.userPercent",{pct:d.toFixed(1)}),e[11]=a,e[12]=d,e[13]=v):v=e[13];let j;e[14]!==v?(j=s.jsxs("div",{className:"flex items-center gap-1.5",children:[g,s.jsx("span",{className:"text-xs text-muted-foreground",children:v})]}),e[14]=v,e[15]=j):j=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-chart-2 shrink-0"}),e[16]=x):x=e[16];let b;e[17]!==u||e[18]!==a?(b=a("chat.contextPanel.assistantPercent",{pct:u.toFixed(1)}),e[17]=u,e[18]=a,e[19]=b):b=e[19];let k;e[20]!==b?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[x,s.jsx("span",{className:"text-xs text-muted-foreground",children:b})]}),e[20]=b,e[21]=k):k=e[21];let y;e[22]!==o||e[23]!==i||e[24]!==a?(y=i>0&&s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"inline-block h-2 w-2 rounded-sm bg-muted-foreground/30 shrink-0"}),s.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]=y):y=e[25];let p;e[26]!==k||e[27]!==y||e[28]!==j?(p=s.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[j,k,y]}),e[26]=k,e[27]=y,e[28]=j,e[29]=p):p=e[29];let T;return e[30]!==p||e[31]!==h?(T=s.jsxs("div",{className:"flex flex-col gap-2",children:[h,p]}),e[30]=p,e[31]=h,e[32]=T):T=e[32],T}function la(t){const e=$.c(14),{agentId:n,isError:r}=t,i=de(n),a=U();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 d=l,u=i?.icon??null;let o;e[3]!==u||e[4]!==d?(o=s.jsx(Bt,{icon:u,name:d,size:"xs",className:"size-6 rounded-md shrink-0"}),e[3]=u,e[4]=d,e[5]=o):o=e[5];const c=r?"text-destructive":"text-foreground";let f;e[6]!==c?(f=Y("shrink-0 font-medium",c),e[6]=c,e[7]=f):f=e[7];let m;e[8]!==d||e[9]!==f?(m=s.jsx("span",{className:f,children:d}),e[8]=d,e[9]=f,e[10]=m):m=e[10];let h;return e[11]!==o||e[12]!==m?(h=s.jsxs(s.Fragment,{children:[o,m]}),e[11]=o,e[12]=m,e[13]=h):h=e[13],h}function oa(t){const e=$.c(12),{isError:n}=t,r=U();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=s.jsx(Bt,{icon:null,name:a,size:"xs",className:"size-6 rounded-md shrink-0"}),e[2]=a,e[3]=l):l=e[3];const d=n?"text-destructive":"text-foreground";let u;e[4]!==d?(u=Y("shrink-0 font-medium",d),e[4]=d,e[5]=u):u=e[5];let o;e[6]!==a||e[7]!==u?(o=s.jsx("span",{className:u,children:a}),e[6]=a,e[7]=u,e[8]=o):o=e[8];let c;return e[9]!==l||e[10]!==o?(c=s.jsxs(s.Fragment,{children:[l,o]}),e[9]=l,e[10]=o,e[11]=c):c=e[11],c}function ca(t){const e=$.c(18),{part:n}=t,r=n.input?.agent_id,i=n.state==="input-streaming"||n.state==="input-available"||n.state==="output-available"&&n.preliminary===!0,a=n.state==="output-error",l=n.state==="approval-requested";let d;e[0]!==a?(d=s.jsx(oa,{isError:a}),e[0]=a,e[1]=d):d=e[1];let u;e[2]!==r||e[3]!==a?(u=s.jsx(la,{agentId:r,isError:a}),e[2]=r,e[3]=a,e[4]=u):u=e[4];let o;e[5]!==d||e[6]!==u?(o=s.jsx(B.Suspense,{fallback:d,children:u}),e[5]=d,e[6]=u,e[7]=o):o=e[7];let c;e[8]!==n.input?(c=n.input?.prompt&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/50",children:"·"}),s.jsx("span",{className:"truncate text-muted-foreground",children:n.input.prompt})]}),e[8]=n.input,e[9]=c):c=e[9];let f;e[10]!==l||e[11]!==a||e[12]!==i?(f=s.jsx("span",{className:"ml-auto shrink-0",children:i?s.jsx(je,{className:"size-3 text-muted-foreground"}):a?s.jsx(Is,{size:12,className:"text-destructive"}):l?s.jsx(it,{size:12,className:"text-warning"}):s.jsx(As,{size:12,className:"text-success"})}),e[10]=l,e[11]=a,e[12]=i,e[13]=f):f=e[13];let m;return e[14]!==o||e[15]!==c||e[16]!==f?(m=s.jsxs("div",{className:"flex items-center gap-2 text-xs min-w-0",children:[o,c,f]}),e[14]=o,e[15]=c,e[16]=f,e[17]=m):m=e[17],m}function da(t){const e=$.c(51),{onClose:n,back:r,className:i}=t,a=U(),[l,d]=B.useState(null),{messages:u}=$t(),{activeTask:o}=Ge(),{selectedModel:c,selectedVirtualMcp:f}=Dt(),m=_s(u),h=[...u].reverse().find(ya),g=h?.metadata?.usage,v=h?.metadata?.modelLimits?.contextWindow??c?.limits?.contextWindow??null,j=g?.contextTokens??0,x=v&&v>0?(j/v*100).toFixed(1):null,b=u;let k;e[0]!==b?(k=b.filter(ja).reduce(va,0),e[0]=b,e[1]=k):k=e[1];const y=k,p=u;let T;e[2]!==p?(T=p.filter(ba).reduce(ga,0),e[2]=p,e[3]=T):T=e[3];const S=T,N=Math.max(0,m.totalTokens-y-S),_=u[0],C=u.at(-1),w=_?.metadata?.created_at??o?.created_at,A=C?.metadata?.created_at??o?.updated_at,P=u.filter(xa),M=u.flatMap(ha),I=c?.modelId?na(c.modelId):"—",D=f?.title??"Super Agent",E=Gs(),F=[{label:a("chat.contextPanel.sessionLabel"),value:o?.title??a("chat.contextPanel.newChat")},{label:a("chat.contextPanel.messagesLabel"),value:P.length},{label:a("chat.contextPanel.agentLabel"),value:D},...E?[{label:a("chat.contextPanel.modelLabel"),value:I}]:[],{label:a("chat.contextPanel.contextLimitLabel"),value:v?ve(v):"—"},{label:a("chat.contextPanel.sessionTokensLabel"),value:m.totalTokens>0?ve(m.totalTokens):"0"},{label:a("chat.contextPanel.usageLabel"),value:x!==null?`${x}%`:"—"},{label:a("chat.contextPanel.inputTokensLabel"),value:m.inputTokens>0?ve(m.inputTokens):"0"},{label:a("chat.contextPanel.outputTokensLabel"),value:m.outputTokens>0?ve(m.outputTokens):"0"},{label:a("chat.contextPanel.reasoningTokensLabel"),value:m.reasoningTokens>0?ve(m.reasoningTokens):"0"},...E?[{label:a("chat.contextPanel.costLabel"),value:m.cost>0?`$${m.cost<.001?m.cost.toFixed(6):m.cost.toFixed(4)}`:"$0.00"}]:[],{label:a("chat.contextPanel.sessionCreatedLabel"),value:Qe(w)},{label:a("chat.contextPanel.lastActivityLabel"),value:Qe(A)}];if(!o&&P.length===0){let H;e[4]!==i?(H=Y("flex flex-col h-full w-full border-l border-border bg-background",i),e[4]=i,e[5]=H):H=e[5];let q;e[6]!==a?(q=a("chat.contextPanel.title"),e[6]=a,e[7]=q):q=e[7];let ae;e[8]!==q?(ae=s.jsx("span",{className:"text-sm font-medium text-foreground",children:q}),e[8]=q,e[9]=ae):ae=e[9];let ie;e[10]!==r?(ie=r?s.jsx(gt,{size:14,className:"text-muted-foreground"}):s.jsx(bt,{size:14,className:"text-muted-foreground"}),e[10]=r,e[11]=ie):ie=e[11];let J;e[12]!==n||e[13]!==ie?(J=s.jsx("button",{type:"button",onClick:n,className:"flex size-6 items-center justify-center classic:rounded hover:bg-accent transition-colors compact:rounded-lg",children:ie}),e[12]=n,e[13]=ie,e[14]=J):J=e[14];let oe;e[15]!==ae||e[16]!==J?(oe=s.jsxs("div",{className:"h-11 px-4 flex items-center justify-between shrink-0 border-b border-border/50",children:[ae,J]}),e[15]=ae,e[16]=J,e[17]=oe):oe=e[17];let te;e[18]!==a?(te=a("chat.contextPanel.emptyState"),e[18]=a,e[19]=te):te=e[19];let se;e[20]!==te?(se=s.jsx("div",{className:"flex-1 flex items-center justify-center px-4 text-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:te})}),e[20]=te,e[21]=se):se=e[21];let re;return e[22]!==oe||e[23]!==se||e[24]!==H?(re=s.jsxs("div",{className:H,children:[oe,se]}),e[22]=oe,e[23]=se,e[24]=H,e[25]=re):re=e[25],re}let L;e[26]!==i?(L=Y("flex flex-col h-full w-full border-l border-border bg-background overflow-y-auto",i),e[26]=i,e[27]=L):L=e[27];let G;e[28]!==a?(G=a("chat.contextPanel.title"),e[28]=a,e[29]=G):G=e[29];let O;e[30]!==G?(O=s.jsx("span",{className:"text-sm font-medium text-foreground",children:G}),e[30]=G,e[31]=O):O=e[31];let K;e[32]!==r?(K=r?s.jsx(gt,{size:14}):s.jsx(bt,{size:14}),e[32]=r,e[33]=K):K=e[33];let R;e[34]!==n||e[35]!==K?(R=s.jsx("button",{type:"button",onClick:n,className:"flex h-7 w-7 items-center justify-center classic:rounded-md compact:rounded-lg text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:K}),e[34]=n,e[35]=K,e[36]=R):R=e[36];let Q;e[37]!==O||e[38]!==R?(Q=s.jsxs("div",{className:"flex h-11 shrink-0 items-center justify-between border-b border-border/50 px-4",children:[O,R]}),e[37]=O,e[38]=R,e[39]=Q):Q=e[39];let V;e[40]!==a?(V=a("chat.contextPanel.contextBreakdownSection"),e[40]=a,e[41]=V):V=e[41];let W;e[42]!==V?(W=s.jsx("span",{className:"text-xs text-muted-foreground",children:V}),e[42]=V,e[43]=W):W=e[43];let Z;e[44]!==S||e[45]!==N||e[46]!==y?(Z=s.jsx(ia,{userTokens:y,assistantTokens:S,otherTokens:N}),e[44]=S,e[45]=N,e[46]=y,e[47]=Z):Z=e[47];let X;return e[48]!==W||e[49]!==Z?(X=s.jsxs("div",{className:"flex flex-col gap-3",children:[W,Z]}),e[48]=W,e[49]=Z,e[50]=X):X=e[50],s.jsxs("div",{className:L,children:[Q,s.jsxs("div",{className:"flex flex-col gap-8 p-6",children:[M.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.subtasksSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:M.map(ma)})]}),s.jsx(aa,{items:F}),X,P.length>0&&s.jsxs("div",{className:"flex flex-col gap-3",children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:a("chat.contextPanel.rawMessagesSection")}),s.jsx("div",{className:"flex flex-col gap-1",children:P.map(H=>{const q=H.metadata?.created_at,ae=l?.id===H.id;return s.jsxs("div",{className:"rounded-md border border-border/50 overflow-hidden",children:[s.jsxs("button",{type:"button",onClick:()=>d(ae?null:H),className:"flex items-center justify-between gap-2 px-3 py-2 text-xs hover:bg-accent/50 w-full text-left cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx("span",{className:Y("shrink-0 font-medium",H.role==="user"?"text-chart-1":"text-chart-2"),children:H.role}),s.jsx("span",{className:"text-muted-foreground",children:"•"}),s.jsx("span",{className:"truncate text-muted-foreground font-mono",children:H.id})]}),q&&s.jsx("span",{className:"shrink-0 text-muted-foreground tabular-nums",children:Qe(q)})]}),ae&&s.jsxs(s.Fragment,{children:[H.role==="assistant"&&(()=>{const ie=H.metadata?._request;if(!ie)return null;const J=ie.systemSections??[],oe=Math.max(1,...J.map(fa)),te=J.reduce(ua,0);return s.jsxs("div",{className:"border-t border-border/50 px-3 py-2.5 text-xs space-y-2.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"font-medium text-foreground",children:a("chat.contextPanel.requestLabel")}),s.jsxs("span",{className:"text-muted-foreground tabular-nums",children:[ie.activeTools??0," / ",ie.tools??0," ",a("chat.contextPanel.toolsActive")]})]}),J.length>0&&s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"text-muted-foreground",children:[a("chat.contextPanel.systemPromptLabel")," ",s.jsxs("span",{className:"tabular-nums",children:["~",Math.round(te/4).toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),J.map((se,re)=>{const ue=se.preview.match(/^<([a-z-]+)/i)?.[1]??`section ${re}`,ge=se.chars/oe*100,fe=Math.round(se.chars/4);return s.jsxs("div",{className:"space-y-0.5",children:[s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsx("span",{className:"font-mono text-foreground truncate",children:ue}),s.jsxs("span",{className:"text-muted-foreground tabular-nums shrink-0",children:["~",fe.toLocaleString()," ",a("chat.contextPanel.tokAbbrev")]})]}),s.jsx("div",{className:"h-1 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-chart-3",style:{width:`${ge}%`}})})]},re)})]})]})})(),s.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(H,null,2)})]})]},H.id)})})]})]})]})}function ua(t,e){return t+e.chars}function fa(t){return t.chars}function ma(t,e){return s.jsx(ca,{part:t},e)}function ha(t){return(t.parts??[]).filter(pa)}function pa(t){return t.type==="tool-subtask"}function xa(t){return t.role!=="system"}function ga(t,e){const n=e.metadata?.usage;return t+(n?.outputTokens??0)}function ba(t){return t.role==="assistant"}function va(t,e){const n=e.metadata?.usage;return t+(n?.inputTokens??0)}function ja(t){return t.role==="user"}function ya(t){return t.role==="assistant"&&t.metadata?.usage}function ka(t){const e=$.c(21),{onOpenContextPanel:n}=t,{org:r}=le(),{selectedVirtualMcp:i}=Dt();let a;e[0]!==r.id?(a=Se(r.id),e[0]=r.id,e[1]=a):a=e[1];const d=i??a,o=de(d.id)??d,c=o.title??"Super Agent",f=o.icon??null,m=o.description??null;let h;e[2]!==f||e[3]!==c?(h=s.jsx(ye,{icon:f,name:c,size:"lg"}),e[2]=f,e[3]=c,e[4]=h):h=e[4];let g;e[5]!==c?(g=s.jsx("h2",{className:"text-2xl font-semibold tracking-tight text-foreground",children:c}),e[5]=c,e[6]=g):g=e[6];let v;e[7]!==m?(v=m?s.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-balance",children:m}):null,e[7]=m,e[8]=v):v=e[8];let j;e[9]!==g||e[10]!==v?(j=s.jsxs("div",{className:"space-y-1.5",children:[g,v]}),e[9]=g,e[10]=v,e[11]=j):j=e[11];let x;e[12]!==h||e[13]!==j?(x=s.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,j]}),e[12]=h,e[13]=j,e[14]=x):x=e[14];let b;e[15]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(ee.IceBreakers,{className:"pb-3"}),e[15]=b):b=e[15];let k;e[16]!==n?(k=s.jsxs(ee.Footer,{children:[b,s.jsx(ee.Input,{onOpenContextPanel:n})]}),e[16]=n,e[17]=k):k=e[17];let y;return e[18]!==x||e[19]!==k?(y=s.jsxs(s.Fragment,{children:[x,k]}),e[18]=x,e[19]=k,e[20]=y):y=e[20],y}function yt(t){const e=$.c(17),{outputs:n,collapsed:r,onToggle:i,variant:a}=t,l=a==="card"?"rounded-xl border border-border bg-muted/95 shadow-sm backdrop-blur-sm":"border-b border-border bg-background";let d;e[0]!==l?(d=Y(l),e[0]=l,e[1]=d):d=e[1];let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.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 c;e[3]!==o?(c=Y("size-4 text-muted-foreground transition-transform",o),e[3]=o,e[4]=c):c=e[4];let f;e[5]!==c?(f=s.jsx(lt,{className:c}),e[5]=c,e[6]=f):f=e[6];let m;e[7]!==i||e[8]!==f?(m=s.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between px-3 py-2.5 text-left",children:[u,f]}),e[7]=i,e[8]=f,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==n?(h=!r&&s.jsx("div",{className:"flex max-h-72 flex-col gap-1.5 overflow-y-auto px-2 pb-2",children:n.map(Sa)}),e[10]=r,e[11]=n,e[12]=h):h=e[12];let g;return e[13]!==d||e[14]!==m||e[15]!==h?(g=s.jsxs("div",{className:d,children:[m,h]}),e[13]=d,e[14]=m,e[15]=h,e[16]=g):g=e[16],g}function Sa(t){return s.jsx(Hs,{file:t},t.key)}function Na(){const t=$.c(13),e=ze()?.taskId??null,n=Us();let r;t[0]!==n?(r={enabled:n},t[0]=n,t[1]=r):r=t[1];const{data:i}=Vs(e,r),[a,l]=B.useState(!1),[d,u]=B.useState(!0);if(!e||!i||i.length===0)return null;let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=()=>l(_a),t[2]=o):o=t[2];let c;t[3]!==a||t[4]!==i?(c=s.jsx("div",{className:"absolute top-2 right-2 z-10 hidden w-72 @[1280px]:block",children:s.jsx(yt,{variant:"card",outputs:i,collapsed:a,onToggle:o})}),t[3]=a,t[4]=i,t[5]=c):c=t[5];let f;t[6]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(Ta),t[6]=f):f=t[6];let m;t[7]!==d||t[8]!==i?(m=s.jsx("div",{className:"shrink-0 @[1280px]:hidden",children:s.jsx(yt,{variant:"bar",outputs:i,collapsed:d,onToggle:f})}),t[7]=d,t[8]=i,t[9]=m):m=t[9];let h;return t[10]!==c||t[11]!==m?(h=s.jsxs(s.Fragment,{children:[c,m]}),t[10]=c,t[11]=m,t[12]=h):h=t[12],h}function Ta(t){return!t}function _a(t){return!t}function wa(){const t=$.c(31),{org:e}=le(),n=ze(),{isChatEmpty:r}=$t(),[i,a]=B.useState("chat"),l=Ks(),d=sa(),{runtime:u}=Et(n?.virtualMcpId);if(d&&u!=="cms"){let C;return t[0]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ee,{className:"animate-in fade-in-0 duration-200",children:s.jsx(ee.Main,{className:"flex flex-col items-center",children:s.jsx(ee.EmptyState,{children:s.jsx(ee.NoAiProviderEmptyState,{})})})}),t[0]=C):C=t[0],C}let c;t[1]!==l.hasDecoKey||t[2]!==l.hasOnlyDecoProvider||t[3]!==l.isLoading||t[4]!==l.isZeroBalance||t[5]!==r||t[6]!==e?(c=l.hasDecoKey&&l.isZeroBalance&&l.hasOnlyDecoProvider&&!l.isLoading&&r&&!ys(e.id),t[1]=l.hasDecoKey,t[2]=l.hasOnlyDecoProvider,t[3]=l.isLoading,t[4]=l.isZeroBalance,t[5]=r,t[6]=e,t[7]=c):c=t[7];const f=c;let m;t[8]!==f?(m=f&&s.jsx(ee.CreditsEmptyState,{}),t[8]=f,t[9]=m):m=t[9];const h=i!=="chat"?!0:void 0,g=i!=="chat",v=i!=="chat"?"opacity-0 pointer-events-none":"opacity-100";let j;t[10]!==v?(j=Y("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",v),t[10]=v,t[11]=j):j=t[11];let x;t[12]!==r||t[13]!==u?(x=r&&u!=="cms"?s.jsx(ka,{onOpenContextPanel:()=>a("context")}):s.jsxs(s.Fragment,{children:[s.jsxs(ee.Main,{className:"relative flex flex-col overflow-hidden @container",children:[s.jsx(Na,{}),s.jsx("div",{className:"min-h-0 flex-1",children:s.jsx(ee.Messages,{})})]}),s.jsx(ee.Footer,{children:s.jsx(ee.Input,{onOpenContextPanel:()=>a("context")})})]}),t[12]=r,t[13]=u,t[14]=x):x=t[14];let b;t[15]!==h||t[16]!==g||t[17]!==j||t[18]!==x?(b=s.jsx("div",{inert:h,"aria-hidden":g,className:j,children:x}),t[15]=h,t[16]=g,t[17]=j,t[18]=x,t[19]=b):b=t[19];const k=i!=="context"?!0:void 0,y=i!=="context",p=i==="context"?"opacity-100":"opacity-0 pointer-events-none";let T;t[20]!==p?(T=Y("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",p),t[20]=p,t[21]=T):T=t[21];let S;t[22]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(da,{back:!0,onClose:()=>a("chat")}),t[22]=S):S=t[22];let N;t[23]!==T||t[24]!==k||t[25]!==y?(N=s.jsx("div",{inert:k,"aria-hidden":y,className:T,children:S}),t[23]=T,t[24]=k,t[25]=y,t[26]=N):N=t[26];let _;return t[27]!==m||t[28]!==N||t[29]!==b?(_=s.jsxs(ee,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[m,b,N]}),t[27]=m,t[28]=N,t[29]=b,t[30]=_):_=t[30],_}function Ca(){const t=$.c(7),e=U();let n;t[0]!==e?(n=e("agentShellLayout.agentShellLayout.chatLoadingError"),t[0]=e,t[1]=n):n=t[1];let r;t[2]!==n?(r=s.jsx("div",{role:"alert",className:"flex h-full flex-1 items-center justify-center text-sm text-muted-foreground",children:n}),t[2]=n,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Fe,{children:s.jsx(wa,{})}),t[4]=i):i=t[4];let a;return t[5]!==r?(a=s.jsx(Ct,{fallback:r,children:i}),t[5]=r,t[6]=a):a=t[6],a}function Pa(t){const e=$.c(10),{org:n}=le(),r=nn(),{data:i}=Re.useSession(),a=i?.user?.id,l=t?.id??null,d=!!t&&!!a&&!!t.created_by&&t.created_by!==a;let u;e[0]!==n.id||e[1]!==l?(u=Pt.viewedThreadMetadataRefresh(n.id,l??""),e[0]=n.id,e[1]=l,e[2]=u):u=e[2];const o=!!r&&!!l&&d;let c;e[3]!==r||e[4]!==l?(c=async()=>(await r?.refreshThreadMetadata(l??""),!0),e[3]=r,e[4]=l,e[5]=c):c=e[5];let f;e[6]!==u||e[7]!==o||e[8]!==c?(f={queryKey:u,enabled:o,staleTime:Number.POSITIVE_INFINITY,queryFn:c},e[6]=u,e[7]=o,e[8]=c,e[9]=f):f=e[9],nt(f)}function Ze(t){const e=$.c(14),{label:n,value:r,onChange:i,options:a}=t;let l;e[0]!==n?(l=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=l):l=e[1];let d;e[2]!==i?(d=f=>f&&i(f),e[2]=i,e[3]=d):d=e[3];let u;e[4]!==a?(u=a.map(Aa),e[4]=a,e[5]=u):u=e[5];let o;e[6]!==n||e[7]!==d||e[8]!==u||e[9]!==r?(o=s.jsx(bn,{type:"single",size:"sm",value:r,onValueChange:d,"aria-label":n,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:u}),e[6]=n,e[7]=d,e[8]=u,e[9]=r,e[10]=o):o=e[10];let c;return e[11]!==l||e[12]!==o?(c=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l,o]}),e[11]=l,e[12]=o,e[13]=c):c=e[13],c}function Aa(t){return s.jsxs(gn,{value:t.value,className:"h-6 gap-1.5 classic:rounded-md compact:rounded-lg border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function Ia(t){const e=$.c(91),{panel:n,className:r}=t,i=r===void 0?"md:size-[34px]":r,a=U();let l;e[0]!==a?(l=a("sidebar.taskGroupsList.filterChats"),e[0]=a,e[1]=l):l=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Ms,{size:16}),e[2]=d):d=e[2];let u;e[3]!==n.filtersActive?(u=n.filtersActive&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"}),e[3]=n.filtersActive,e[4]=u):u=e[4];let o;e[5]!==i||e[6]!==n.filtersActive||e[7]!==l||e[8]!==u?(o=s.jsx(Te,{asChild:!0,children:s.jsx(Kt,{asChild:!0,children:s.jsxs(De,{"aria-label":l,active:n.filtersActive,className:i,children:[d,u]})})}),e[5]=i,e[6]=n.filtersActive,e[7]=l,e[8]=u,e[9]=o):o=e[9];let c;e[10]!==a?(c=a("sidebar.taskGroupsList.filterChats"),e[10]=a,e[11]=c):c=e[11];let f;e[12]!==c?(f=s.jsx(_e,{side:"bottom",children:c}),e[12]=c,e[13]=f):f=e[13];let m;e[14]!==o||e[15]!==f?(m=s.jsxs(we,{children:[o,f]}),e[14]=o,e[15]=f,e[16]=m):m=e[16];let h;e[17]!==a?(h=a("sidebar.taskGroupsList.filterView"),e[17]=a,e[18]=h):h=e[18];const g=n.groupBy;let v;e[19]!==n?(v=q=>{ce("tasks_panel_group_by_changed",{to_value:q}),n.setGroupBy(q)},e[19]=n,e[20]=v):v=e[20];let j;e[21]!==a?(j=a("sidebar.taskGroupsList.viewList"),e[21]=a,e[22]=j):j=e[22];let x;e[23]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ls,{size:13}),e[23]=x):x=e[23];let b;e[24]!==j?(b={value:"flat",label:j,icon:x},e[24]=j,e[25]=b):b=e[25];let k;e[26]!==a?(k=a("sidebar.taskGroupsList.viewStatus"),e[26]=a,e[27]=k):k=e[27];let y;e[28]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx($s,{size:13}),e[28]=y):y=e[28];let p;e[29]!==k?(p={value:"status",label:k,icon:y},e[29]=k,e[30]=p):p=e[30];let T;e[31]!==b||e[32]!==p?(T=[b,p],e[31]=b,e[32]=p,e[33]=T):T=e[33];let S;e[34]!==n.groupBy||e[35]!==v||e[36]!==T||e[37]!==h?(S=s.jsx(Ze,{label:h,value:g,onChange:v,options:T}),e[34]=n.groupBy,e[35]=v,e[36]=T,e[37]=h,e[38]=S):S=e[38];let N;e[39]!==a?(N=a("sidebar.taskGroupsList.filterType"),e[39]=a,e[40]=N):N=e[40];const _=n.typeFilter;let C;e[41]!==n?(C=q=>{ce("tasks_panel_filter_changed",{to_value:q}),n.setTypeFilter(q)},e[41]=n,e[42]=C):C=e[42];let w;e[43]!==a?(w=a("sidebar.taskGroupsList.typeAll"),e[43]=a,e[44]=w):w=e[44];let A;e[45]!==w?(A={value:"all",label:w},e[45]=w,e[46]=A):A=e[46];let P;e[47]!==a?(P=a("sidebar.taskGroupsList.typeChats"),e[47]=a,e[48]=P):P=e[48];let M;e[49]!==P?(M={value:"manual",label:P},e[49]=P,e[50]=M):M=e[50];let I;e[51]!==a?(I=a("sidebar.taskGroupsList.typeAuto"),e[51]=a,e[52]=I):I=e[52];let D;e[53]!==I?(D={value:"automation",label:I},e[53]=I,e[54]=D):D=e[54];let E;e[55]!==A||e[56]!==M||e[57]!==D?(E=[A,M,D],e[55]=A,e[56]=M,e[57]=D,e[58]=E):E=e[58];let F;e[59]!==n.typeFilter||e[60]!==N||e[61]!==C||e[62]!==E?(F=s.jsx(Ze,{label:N,value:_,onChange:C,options:E}),e[59]=n.typeFilter,e[60]=N,e[61]=C,e[62]=E,e[63]=F):F=e[63];let L;e[64]!==a?(L=a("sidebar.taskGroupsList.filterScope"),e[64]=a,e[65]=L):L=e[65];const G=n.showAll?"team":"mine";let O;e[66]!==n?(O=q=>n.setShowAll(q==="team"),e[66]=n,e[67]=O):O=e[67];let K;e[68]!==a?(K=a("sidebar.taskGroupsList.scopeMine"),e[68]=a,e[69]=K):K=e[69];let R;e[70]!==K?(R={value:"mine",label:K},e[70]=K,e[71]=R):R=e[71];let Q;e[72]!==a?(Q=a("sidebar.taskGroupsList.scopeTeam"),e[72]=a,e[73]=Q):Q=e[73];let V;e[74]!==Q?(V={value:"team",label:Q},e[74]=Q,e[75]=V):V=e[75];let W;e[76]!==R||e[77]!==V?(W=[R,V],e[76]=R,e[77]=V,e[78]=W):W=e[78];let Z;e[79]!==L||e[80]!==G||e[81]!==O||e[82]!==W?(Z=s.jsx(Ze,{label:L,value:G,onChange:O,options:W}),e[79]=L,e[80]=G,e[81]=O,e[82]=W,e[83]=Z):Z=e[83];let X;e[84]!==S||e[85]!==F||e[86]!==Z?(X=s.jsxs(Wt,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[S,F,Z]}),e[84]=S,e[85]=F,e[86]=Z,e[87]=X):X=e[87];let H;return e[88]!==X||e[89]!==m?(H=s.jsxs(qt,{children:[m,X]}),e[88]=X,e[89]=m,e[90]=H):H=e[90],H}function Ma(t,e){return t.filter(n=>n.id===e||!!n.trigger_id||fn(n))}function La(){const t=$.c(2),e=Rt()??[];let n;return t[0]!==e?(n=r=>{if(!r)return;const i=e.find(a=>a.id===r);return i?zt(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}function $a(t){const e=$.c(9),{virtualMcpId:n,size:r,showAutomationBadge:i}=t,a=r===void 0?"sm":r,l=U();let d;e[0]!==a||e[1]!==n?(d=n?s.jsx(Da,{virtualMcpId:n,size:a}):s.jsx(ye,{icon:null,name:"?",size:a}),e[0]=a,e[1]=n,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==l?(u=i&&s.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:s.jsx(Zt,{size:10,className:"text-white"})}),e[3]=i,e[4]=l,e[5]=u):u=e[5];let o;return e[6]!==d||e[7]!==u?(o=s.jsxs("div",{className:"relative shrink-0",children:[d,u]}),e[6]=d,e[7]=u,e[8]=o):o=e[8],o}function Da(t){const e=$.c(6),{virtualMcpId:n,size:r}=t,i=de(n);if(!i){let d;return e[0]!==r?(d=s.jsx(ye,{icon:null,name:"?",size:r}),e[0]=r,e[1]=d):d=e[1],d}const a=i.icon??null;let l;return e[2]!==i.title||e[3]!==r||e[4]!==a?(l=s.jsx(ye,{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 kt=["thread"];function Ea(t){const e=$.c(53),{open:n,onOpenChange:r}=t,[i,a]=B.useState(""),{org:l}=le(),{setTaskId:d}=ot(),u=at(),o=U();let c,f,m,h;e[0]!==l.id||e[1]!==i?(h=i.trim(),c=h?20:10,m=nt,f=Pt.globalSearch(l.id,h,c,kt),e[0]=l.id,e[1]=i,e[2]=c,e[3]=f,e[4]=m,e[5]=h):(c=e[2],f=e[3],m=e[4],h=e[5]);let g;e[6]!==c||e[7]!==u||e[8]!==h?(g=async()=>{const L=await u.call("GLOBAL_SEARCH",{query:h,limit:c,types:[...kt]});return{...L,items:L.items.filter(Fa)}},e[6]=c,e[7]=u,e[8]=h,e[9]=g):g=e[9];let v;e[10]!==n||e[11]!==f||e[12]!==g?(v={queryKey:f,enabled:n,queryFn:g,staleTime:1e4},e[10]=n,e[11]=f,e[12]=g,e[13]=v):v=e[13];const{data:j,isFetching:x}=m(v);let b;e[14]!==j?.items?(b=j?.items??[],e[14]=j?.items,e[15]=b):b=e[15];const k=b;let y;e[16]!==r?(y=L=>{L||a(""),r(L)},e[16]=r,e[17]=y):y=e[17];const p=y;let T;e[18]!==p||e[19]!==d?(T=L=>{p(!1),d(L.id,L.virtual_mcp_id??void 0)},e[18]=p,e[19]=d,e[20]=T):T=e[20];const S=T;let N;e[21]!==o?(N=o("tasksPanel.globalSearchDialog.title"),e[21]=o,e[22]=N):N=e[22];let _;e[23]!==N?(_=s.jsx(kn,{children:N}),e[23]=N,e[24]=_):_=e[24];let C;e[25]!==o?(C=o("tasksPanel.globalSearchDialog.description"),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==C?(w=s.jsx(Sn,{children:C}),e[27]=C,e[28]=w):w=e[28];let A;e[29]!==w||e[30]!==_?(A=s.jsxs(Nn,{className:"sr-only",children:[_,w]}),e[29]=w,e[30]=_,e[31]=A):A=e[31];let P;e[32]!==o?(P=o("tasksPanel.globalSearchDialog.placeholder"),e[32]=o,e[33]=P):P=e[33];let M;e[34]!==i||e[35]!==P?(M=s.jsx(In,{value:i,onValueChange:a,placeholder:P}),e[34]=i,e[35]=P,e[36]=M):M=e[36];let I;e[37]!==S||e[38]!==x||e[39]!==k||e[40]!==o||e[41]!==h?(I=s.jsx(wn,{children:x&&k.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:o("tasksPanel.globalSearchDialog.searching")}):k.length===0?s.jsx(Cn,{children:o("tasksPanel.globalSearchDialog.noResults")}):s.jsx(Pn,{heading:h?void 0:o("tasksPanel.globalSearchDialog.recent"),children:k.map(L=>L.type==="thread"?s.jsxs(An,{value:`thread:${L.id}:${L.title}`,onSelect:()=>S(L),className:"gap-2.5",children:[s.jsx($a,{virtualMcpId:L.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:L.title||o("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(L.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${L.id}`):null)})}),e[37]=S,e[38]=x,e[39]=k,e[40]=o,e[41]=h,e[42]=I):I=e[42];let D;e[43]!==M||e[44]!==I?(D=s.jsxs(Mn,{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,I]}),e[43]=M,e[44]=I,e[45]=D):D=e[45];let E;e[46]!==A||e[47]!==D?(E=s.jsxs(Tn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[A,D]}),e[46]=A,e[47]=D,e[48]=E):E=e[48];let F;return e[49]!==p||e[50]!==n||e[51]!==E?(F=s.jsx(_n,{open:n,onOpenChange:p,children:E}),e[49]=p,e[50]=n,e[51]=E,e[52]=F):F=e[52],F}function Fa(t){return t.type==="thread"}function Ra(t){const e=$.c(43),{branch:n,onOutcome:r}=t,i=U();let a;e[0]!==r?(a=S=>{S||r("cancel")},e[0]=r,e[1]=a):a=e[1];let l;e[2]!==i?(l=i("sidebar.archiveWorktreeDialog.title"),e[2]=i,e[3]=l):l=e[3];let d;e[4]!==l?(d=s.jsx(Ln,{children:l}),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==i?(u=i("sidebar.archiveWorktreeDialog.stopsAndDeletesBefore"),e[6]=i,e[7]=u):u=e[7];let o;e[8]!==n?(o=s.jsx("span",{className:"font-mono",children:n}),e[8]=n,e[9]=o):o=e[9];let c;e[10]!==i?(c=i("sidebar.archiveWorktreeDialog.stopsAndDeletesAfter"),e[10]=i,e[11]=c):c=e[11];let f;e[12]!==u||e[13]!==o||e[14]!==c?(f=s.jsxs($n,{children:[u," ",o," ",c]}),e[12]=u,e[13]=o,e[14]=c,e[15]=f):f=e[15];let m;e[16]!==d||e[17]!==f?(m=s.jsxs(Dn,{children:[d,f]}),e[16]=d,e[17]=f,e[18]=m):m=e[18];let h;e[19]!==r?(h=()=>r("cancel"),e[19]=r,e[20]=h):h=e[20];let g;e[21]!==i?(g=i("sidebar.archiveWorktreeDialog.cancel"),e[21]=i,e[22]=g):g=e[22];let v;e[23]!==g||e[24]!==h?(v=s.jsx(En,{onClick:h,children:g}),e[23]=g,e[24]=h,e[25]=v):v=e[25];let j;e[26]===Symbol.for("react.memo_cache_sentinel")?(j=Y(ls({variant:"destructive"})),e[26]=j):j=e[26];let x;e[27]!==r?(x=()=>r("confirm"),e[27]=r,e[28]=x):x=e[28];let b;e[29]!==i?(b=i("sidebar.archiveWorktreeDialog.confirm"),e[29]=i,e[30]=b):b=e[30];let k;e[31]!==x||e[32]!==b?(k=s.jsx(Fn,{className:j,onClick:x,children:b}),e[31]=x,e[32]=b,e[33]=k):k=e[33];let y;e[34]!==v||e[35]!==k?(y=s.jsxs(Rn,{children:[v,k]}),e[34]=v,e[35]=k,e[36]=y):y=e[36];let p;e[37]!==y||e[38]!==m?(p=s.jsxs(Bn,{children:[m,y]}),e[37]=y,e[38]=m,e[39]=p):p=e[39];let T;return e[40]!==a||e[41]!==p?(T=s.jsx(On,{open:!0,onOpenChange:a,children:p}),e[40]=a,e[41]=p,e[42]=T):T=e[42],T}function Ba(t,e,n){if(!n)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===n)return a}for(let i=r-1;i>=0;i--){const a=t[i];if(a?.created_by===n)return a}}}function Oa(t){return t==="ephemeral"||t.startsWith("thread:")}function es(t){const e=$.c(45),{task:n,isActive:r,onClick:i,onArchive:a,showAutomationBadge:l,showAgentIcon:d,hideStatusIdle:u,indented:o}=t,c=U(),f=zn(n.status),m=f.icon,h=n.metadata?.kind==="tool_call_run",g=de(h?void 0:n.virtual_mcp_id);let v;e[0]!==g?(v=Ut(g),e[0]=g,e[1]=v):v=e[1];const j=v;Ws(6e4);const x=l||!!n.trigger_id,b=n.id,k="button",y=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 T=o?"-ml-4 pl-6":"pl-[9px]",S=r?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==T||e[5]!==S?(N=Y("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",T,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",S),e[4]=T,e[5]=S,e[6]=N):N=e[6];let _;e[7]!==h||e[8]!==d||e[9]!==g?.icon||e[10]!==g?.title?(_=d&&!h&&s.jsx(ye,{icon:g?.icon??null,name:g?.title??"?",size:"2xs"}),e[7]=h,e[8]=d,e[9]=g?.icon,e[10]=g?.title,e[11]=_):_=e[11];let C;e[12]!==x||e[13]!==c?(C=x&&s.jsx(Zt,{size:12,"aria-label":c("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-special"}),e[12]=x,e[13]=c,e[14]=C):C=e[14];let w;e[15]!==c||e[16]!==n.title?(w=n.title||c("tasksPanel.taskRow.untitledTask"),e[15]=c,e[16]=n.title,e[17]=w):w=e[17];let A;e[18]!==w?(A=s.jsx("div",{className:"text-sm text-foreground truncate",children:w}),e[18]=w,e[19]=A):A=e[19];let P;e[20]!==C||e[21]!==A?(P=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[C,A]}),e[20]=C,e[21]=A,e[22]=P):P=e[22];let M;e[23]!==j||e[24]!==r||e[25]!==n.branch||e[26]!==n.updated_at?(M=n.updated_at&&s.jsxs("div",{className:Y("flex items-center gap-1 text-[11px] min-w-0",r?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Oa(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):j?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[j.owner,"/",j.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Hn(new Date(n.updated_at))})]}),e[23]=j,e[24]=r,e[25]=n.branch,e[26]=n.updated_at,e[27]=M):M=e[27];let I;e[28]!==P||e[29]!==M?(I=s.jsxs("div",{className:"flex-1 min-w-0",children:[P,M]}),e[28]=P,e[29]=M,e[30]=I):I=e[30];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!u&&s.jsx("span",{className:Y("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",a&&"group-hover/row:opacity-0"),"aria-label":c("tasksPanel.taskRow.statusLabel",{status:c(f.labelKey)}),children:n.status==="in_progress"?s.jsx(je,{className:Y("size-3.5",f.iconClassName)}):s.jsx(m,{size:14,className:f.iconClassName})});let F;e[31]!==a||e[32]!==c?(F=a&&s.jsxs(we,{children:[s.jsx(Te,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":c("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 transition-opacity flex size-8 items-center justify-center classic:rounded-md compact:rounded-lg text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(os,{size:14})})}),s.jsx(_e,{side:"right",children:c("tasksPanel.taskRow.archive")})]}),e[31]=a,e[32]=c,e[33]=F):F=e[33];let L;e[34]!==E||e[35]!==F?(L=s.jsxs("div",{className:D,children:[E,F]}),e[34]=E,e[35]=F,e[36]=L):L=e[36];let G;return e[37]!==i||e[38]!==I||e[39]!==L||e[40]!==p||e[41]!==N||e[42]!==_||e[43]!==n.id?(G=s.jsxs("div",{"data-task-id":b,role:k,tabIndex:y,onClick:i,onKeyDown:p,className:N,children:[_,I,L]}),e[37]=i,e[38]=I,e[39]=L,e[40]=p,e[41]=N,e[42]=_,e[43]=n.id,e[44]=G):G=e[44],G}const St=["requires_action","in_progress","failed","expired","completed"];function za(t){const e=new Map(St.map(n=>[n,[]]));for(const n of t){const r=n.status??"completed";(e.get(r)??e.get("completed")).push(n)}return St.map(n=>({status:n,threads:e.get(n)}))}const Ga="sidebar.group.expanded.";function Ha(t,e){const n=$.c(3),[r,i]=At(`${Ga}${t}`,e);let a;return n[0]!==r||n[1]!==i?(a=[r,i],n[0]=r,n[1]=i,n[2]=a):a=n[2],a}function ts(t){const e=$.c(18),{onClick:n,isFetching:r,indented:i}=t,a=U();let l;e[0]!==a?(l=a("sidebar.showMoreButton.ariaLabel"),e[0]=a,e[1]=l):l=e[1];const d=i?"-ml-4 pl-6 pr-2":"px-2";let u;e[2]!==d?(u=Y("flex items-center gap-2 py-1.5 classic:rounded-md compact:rounded-lg text-sm text-muted-foreground",d,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=d,e[3]=u):u=e[3];let o;e[4]!==r?(o=r&&s.jsx(je,{className:"size-3.5"}),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==r||e[7]!==a?(c=a(r?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=r,e[7]=a,e[8]=c):c=e[8];let f;e[9]!==c?(f=s.jsx("span",{children:c}),e[9]=c,e[10]=f):f=e[10];let m;return e[11]!==r||e[12]!==n||e[13]!==l||e[14]!==u||e[15]!==o||e[16]!==f?(m=s.jsxs("button",{type:"button","aria-label":l,onClick:n,disabled:r,className:u,children:[o,f]}),e[11]=r,e[12]=n,e[13]=l,e[14]=u,e[15]=o,e[16]=f,e[17]=m):m=e[17],m}function Ua(t,e,n,r){return[t,e,n,r.type,r.member,r.currentUserId??""].join("|")}function Va(t){return t.member==="mine"&&!t.currentUserId}const ss=4;let $e=0;const tt=[];function Ka(){for(;$e<ss&&tt.length>0;){const t=tt.shift();t&&t()}}function ns(t){return new Promise((e,n)=>{const r=()=>{$e++,t().then(e,n).finally(()=>{$e--,Ka()})};$e<ss?r():tt.push(r)})}const Ue=10;function Nt(t,e,n,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:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return l.status=e,l}function Wa(t,e,n,r){let i=0;for(const a of t)as(a,e,n,r)&&i++;return i}function Xe(t,e,n,r){return Wa(t,e,n,r)}function qa(t,e){return!!(t>=Ue||t===0&&e)}function Tt(t,e){return t<e}function Ya(t,e){return e===!1?!1:e===!0?!0:t}function as(t,e,n,r){return!(t.hidden||(t.status??"completed")!==n||r.member==="mine"&&r.currentUserId&&t.created_by!==r.currentUserId||r.type==="automation"&&!t.trigger_id||r.type==="manual"&&t.trigger_id)}const Ee=new Map,Me=new Map;function Qa(t,e){return e?t>=Ue?!0:null:!1}function _t(t){return Ee.get(t)}function Za(t,e){Ee.set(t,e)}function Xa(t,e,n){const r=Ee.get(t);if(r!==void 0){n(r);return}let i=Me.get(t);i||(i=ns(e).then(a=>(Ee.set(t,a),Me.delete(t),a)).catch(()=>(Me.delete(t),Promise.reject(new Error("group probe failed")))),Me.set(t,i)),i.then(n,()=>n(!1))}function wt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ue,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function Ja(t,e,n,r,i){let a=0;for(const l of t)e.has(l.id)||as(l,n,r,i)&&a++;return a}function er(t,e,n,r){const i=$.c(8),{org:a}=le(),l=Ua(a.id,t,e,n);let d;i[0]!==n?(d=Va(n),i[0]=n,i[1]=d):d=i[1];const u=d,[o,c]=B.useState({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});o.identity!==l&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:null,serverHasMore:null});const f=ct(),{threads:m,hasMore:h}=dt(),g=Xe(m,t,e,n),v=qa(g,h),j=Qa(g,h),x=at();if(o.identity===l&&o.serverHasMore===null){const S=j??_t(l);S!==void 0&&c({isFetching:!1,isProbing:!1,identity:l,probeSubscribedIdentity:o.probeSubscribedIdentity,serverHasMore:S})}!u&&o.identity===l&&o.serverHasMore===null&&j===null&&_t(l)===void 0&&o.probeSubscribedIdentity!==l&&(c(S=>S.identity===l?{...S,isProbing:!0,probeSubscribedIdentity:l}:S),Xa(l,async()=>{const S=Nt(t,e,0,n,1),N=await x.call("COLLECTION_THREADS_LIST",S),{totalCount:_}=wt(N),C=Xe(f.threads.get(),t,e,n);return _===void 0?!1:Tt(C,_)},S=>{c(N=>N.identity!==l?N:{...N,isProbing:!1,serverHasMore:S})}));const k=async function(){if(o.isFetching||o.isProbing||u)return;const N=l;c(_=>_.identity===N?{..._,isFetching:!0}:_);try{const _=Xe(m,t,e,n),C=Nt(t,e,_,n,Ue),w=await ns(()=>x.call("COLLECTION_THREADS_LIST",C)),{items:A,hasMore:P,totalCount:M}=wt(w),I=new Set(m.map(tr)),D=Ja(A,I,t,e,n),E=_;f.mergeThreads(A),c(F=>{if(F.identity!==N)return F;let L;return M!==void 0?L=Tt(E+D,M):L=A.length===0||D===0?!1:P,Za(N,L),{...F,isFetching:!1,serverHasMore:L}})}catch(_){const C=_,w=C instanceof Error?C.message:String(C);It.error(`Could not load more tasks: ${w}`),c(A=>A.identity===N?{...A,isFetching:!1}:A)}},y=o.isFetching||o.isProbing,p=!u&&!y&&Ya(v,o.serverHasMore);let T;return i[2]!==y||i[3]!==k||i[4]!==p||i[5]!==o.isProbing||i[6]!==o.serverHasMore?(T={hasMore:p,isFetching:y,isProbing:o.isProbing,serverHasMore:o.serverHasMore,loadMore:k},i[2]=y,i[3]=k,i[4]=p,i[5]=o.isProbing,i[6]=o.serverHasMore,i[7]=T):T=i[7],T}function tr(t){return t.id}function sr(t){const e=$.c(20),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,{isFetching:o,isProbing:c,loadMore:f,hasMore:m,serverHasMore:h}=er("status",n,u),[g,v]=B.useState(!1);!g&&r.length===0&&h===!0&&!o&&!c&&(v(!0),queueMicrotask(()=>{f()}));let j;if(e[0]!==i||e[1]!==d||e[2]!==u||e[3]!==l||e[4]!==a||e[5]!==r){let k;e[7]!==i||e[8]!==d||e[9]!==u||e[10]!==l||e[11]!==a?(k=y=>s.jsx(es,{task:y,isActive:i===y.id,onClick:()=>a(y),onArchive:d&&y.created_by===u.currentUserId?()=>l(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[7]=i,e[8]=d,e[9]=u,e[10]=l,e[11]=a,e[12]=k):k=e[12],j=r.map(k),e[0]=i,e[1]=d,e[2]=u,e[3]=l,e[4]=a,e[5]=r,e[6]=j}else j=e[6];let x;e[13]!==m||e[14]!==o||e[15]!==f?(x=(m||o)&&s.jsx(ts,{onClick:()=>{f()},isFetching:o,indented:!0}),e[13]=m,e[14]=o,e[15]=f,e[16]=x):x=e[16];let b;return e[17]!==j||e[18]!==x?(b=s.jsxs(s.Fragment,{children:[j,x]}),e[17]=j,e[18]=x,e[19]=b):b=e[19],b}function nr(t){const e=$.c(43),{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u}=t,o=U(),c=Gn[n],f=c.icon,[m,h]=Ha(`status-${n}`,!1);let g;e[0]!==m||e[1]!==h?(g=function(){h(!m)},e[0]=m,e[1]=h,e[2]=g):g=e[2];const v=g;let j;e[3]!==c.labelKey||e[4]!==o?(j=o("sidebar.taskGroupsList.toggleStatusGroup",{status:o(c.labelKey)}),e[3]=c.labelKey,e[4]=o,e[5]=j):j=e[5];let x;e[6]!==v?(x=w=>{w.target===w.currentTarget&&(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),v())},e[6]=v,e[7]=x):x=e[7];let b;e[8]!==f||e[9]!==c.iconClassName?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(f,{size:12,className:c.iconClassName})}),e[8]=f,e[9]=c.iconClassName,e[10]=b):b=e[10];let k;e[11]!==m?(k=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(lt,{size:14}):s.jsx(cs,{size:14})}),e[11]=m,e[12]=k):k=e[12];let y;e[13]!==b||e[14]!==k?(y=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[b,k]}),e[13]=b,e[14]=k,e[15]=y):y=e[15];let p;e[16]!==c.labelKey||e[17]!==o?(p=o(c.labelKey),e[16]=c.labelKey,e[17]=o,e[18]=p):p=e[18];let T;e[19]!==p?(T=s.jsx("span",{className:"flex-1 truncate",children:p}),e[19]=p,e[20]=T):T=e[20];let S;e[21]!==r.length?(S=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:r.length})}),e[21]=r.length,e[22]=S):S=e[22];let N;e[23]!==m||e[24]!==v||e[25]!==j||e[26]!==x||e[27]!==y||e[28]!==T||e[29]!==S?(N=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-label":j,onClick:v,onKeyDown:x,className:"group/group flex items-center gap-2 px-2 py-1.5 classic:rounded-md compact:rounded-lg text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[y,T,S]}),e[23]=m,e[24]=v,e[25]=j,e[26]=x,e[27]=y,e[28]=T,e[29]=S,e[30]=N):N=e[30];let _;e[31]!==i||e[32]!==d||e[33]!==m||e[34]!==u||e[35]!==l||e[36]!==a||e[37]!==n||e[38]!==r?(_=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(sr,{status:n,threads:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:d,filters:u})}),e[31]=i,e[32]=d,e[33]=m,e[34]=u,e[35]=l,e[36]=a,e[37]=n,e[38]=r,e[39]=_):_=e[39];let C;return e[40]!==N||e[41]!==_?(C=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[N,_]}),e[40]=N,e[41]=_,e[42]=C):C=e[42],C}function ar(t){const e=$.c(41),{threads:n,groupBy:r,activeTaskId:i,onSelectTask:a,onArchiveTask:l,filters:d,hasMore:u,isFetchingMore:o,onLoadMore:c,filtersActive:f}=t,m=U();if(n.length===0&&!u&&!o){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ds,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];let b;e[1]!==f||e[2]!==m?(b=m(f?"sidebar.myThreadsSection.noChatsMatchFilters":"sidebar.myThreadsSection.noChatsYet"),e[1]=f,e[2]=m,e[3]=b):b=e[3];let k;return e[4]!==b?(k=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,s.jsx("p",{className:"text-sm",children:b})]}),e[4]=b,e[5]=k):k=e[5],k}const h=n.length>1||u;if(r==="status"){let x;if(e[6]!==i||e[7]!==h||e[8]!==d||e[9]!==l||e[10]!==a||e[11]!==n){let k;e[13]!==i||e[14]!==h||e[15]!==d||e[16]!==l||e[17]!==a?(k=y=>s.jsx(nr,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:a,onArchiveTask:l,canArchive:h,filters:d},y.status),e[13]=i,e[14]=h,e[15]=d,e[16]=l,e[17]=a,e[18]=k):k=e[18],x=za(n).map(k),e[6]=i,e[7]=h,e[8]=d,e[9]=l,e[10]=a,e[11]=n,e[12]=x}else x=e[12];let b;return e[19]!==x?(b=s.jsx(s.Fragment,{children:x}),e[19]=x,e[20]=b):b=e[20],b}let g;if(e[21]!==i||e[22]!==h||e[23]!==d||e[24]!==l||e[25]!==a||e[26]!==n){let x;e[28]!==i||e[29]!==h||e[30]!==d||e[31]!==l||e[32]!==a?(x=b=>s.jsx(es,{task:b,isActive:i===b.id,onClick:()=>a(b),onArchive:h&&b.created_by===d.currentUserId?()=>l(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[28]=i,e[29]=h,e[30]=d,e[31]=l,e[32]=a,e[33]=x):x=e[33],g=n.map(x),e[21]=i,e[22]=h,e[23]=d,e[24]=l,e[25]=a,e[26]=n,e[27]=g}else g=e[27];let v;e[34]!==u||e[35]!==o||e[36]!==c?(v=(u||o)&&s.jsx(ts,{onClick:c,isFetching:o}),e[34]=u,e[35]=o,e[36]=c,e[37]=v):v=e[37];let j;return e[38]!==g||e[39]!==v?(j=s.jsxs(s.Fragment,{children:[g,v]}),e[38]=g,e[39]=v,e[40]=j):j=e[40],j}function rr(t,e){return null}function ir(t,e){return t.some(n=>n.id!==e.taskId&&!n.hidden&&n.branch===e.branch&&n.virtual_mcp_id===e.virtualMcpId)}const lr=["archive","reclaim-worktree"],or=[];function cr(t){return t==="confirm"?lr:or}function dr(t){const e=$.c(11),{panel:n}=t;let r;return e[0]!==n.activeTaskId||e[1]!==n.archiveTask||e[2]!==n.filters||e[3]!==n.filtersActive||e[4]!==n.groupBy||e[5]!==n.hasMore||e[6]!==n.isFetchingMore||e[7]!==n.loadMore||e[8]!==n.selectTask||e[9]!==n.threads?(r=s.jsx(ar,{threads:n.threads,groupBy:n.groupBy,activeTaskId:n.activeTaskId,onSelectTask:n.selectTask,onArchiveTask:n.archiveTask,filters:n.filters,hasMore:n.hasMore,isFetchingMore:n.isFetchingMore,onLoadMore:n.loadMore,filtersActive:n.filtersActive}),e[0]=n.activeTaskId,e[1]=n.archiveTask,e[2]=n.filters,e[3]=n.filtersActive,e[4]=n.groupBy,e[5]=n.hasMore,e[6]=n.isFetchingMore,e[7]=n.loadMore,e[8]=n.selectTask,e[9]=n.threads,e[10]=r):r=e[10],r}function ur(t){const e=$.c(83);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:r}=n,i=U(),{data:a}=Re.useSession(),l=a?.user?.id,{org:d}=le();let u;e[2]!==d.id?(u=Se(d.id),e[2]=d.id,e[3]=u):u=e[3];const o=u.id,c=La(),{threads:f,hasMore:m,isFetchingMore:h,fetchNextPage:g}=dt(),v=f.filter(pr),{hide:j,setScope:x}=ut(),b=Be(),k=at(),{setTaskId:y,createNewTask:p}=ot(),T=Yt(),S=He();let N;e[4]!==S||e[5]!==f||e[6]!==T?(N=vn({routeAgentId:T,threadVirtualMcpId:f.find(z=>z.id===S)?.virtual_mcp_id}),e[4]=S,e[5]=f,e[6]=T,e[7]=N):N=e[7];const _=N;let C;e[8]!==r?(C=()=>{r?.()},e[8]=r,e[9]=C):C=e[9];const w=C,A=[...v].sort(hr),[P,M]=B.useState("all"),[I,D]=B.useState("flat"),[E,F]=At("sidebar-threads-scope-all",!1),[L,G]=B.useState(!1),[O,K]=B.useState(!1);let R;e[10]!==G?(R=()=>{ce("tasks_panel_search_opened"),K(!0),G(!0)},e[10]=G,e[11]=R):R=e[11];const Q=R,[V,W]=B.useState(null),Z=l??null;let X;e[12]!==Z||e[13]!==P?(X={type:P,member:"mine",currentUserId:Z},e[12]=Z,e[13]=P,e[14]=X):X=e[14];const H=X,q={};E||(q.created_by="me"),x(q);let ae;e[15]!==l?(ae=z=>l?z.filter(ne=>ne.created_by===l):[],e[15]=l,e[16]=ae):ae=e[16];const ie=ae;let J;e[17]!==P?(J=z=>P==="automation"?z.filter(mr):P==="manual"?z.filter(fr):z,e[17]=P,e[18]=J):J=e[18];const oe=J,te=Ma(oe(E?A:ie(A)),S);let se;e[19]!==S||e[20]!==w||e[21]!==l||e[22]!==j||e[23]!==b||e[24]!==d.slug||e[25]!==y||e[26]!==te?(se=z=>{const ne=z.id===S,xe=j(z.id);if(qs(z.id),!ne)return xe;const be=Ba(te,z.id,l);return w(),be?y(be.id,be.virtual_mcp_id):b({to:"/$org",params:{org:d.slug}}),xe},e[19]=S,e[20]=w,e[21]=l,e[22]=j,e[23]=b,e[24]=d.slug,e[25]=y,e[26]=te,e[27]=se):se=e[27];const re=se;let ue;e[28]!==k||e[29]!==i?(ue=async z=>{try{await k.call("SANDBOX_DELETE",{virtualMcpId:z.virtualMcpId,branch:z.branch,removeWorktree:!0})}catch{It.error(i("sidebar.archiveWorktreeDialog.reclaimFailed",{branch:z.branch}))}},e[28]=k,e[29]=i,e[30]=ue):ue=e[30];const ge=ue;let fe;e[31]!==f||e[32]!==re||e[33]!==l||e[34]!==W?(fe=z=>{if(l&&z.created_by&&z.created_by!==l)return;const ne=rr();if(!ne||ir(f,ne)){re(z);return}W({task:z,target:ne})},e[31]=f,e[32]=re,e[33]=l,e[34]=W,e[35]=fe):fe=e[35];const Ve=fe;let Ce;e[36]!==re||e[37]!==V||e[38]!==ge||e[39]!==W?(Ce=z=>{const ne=V;ne&&(W(null),(async()=>{for(const xe of cr(z))if(xe==="archive")try{await re(ne.task)}catch{return}else await ge(ne.target)})())},e[36]=re,e[37]=V,e[38]=ge,e[39]=W,e[40]=Ce):Ce=e[40];const Ke=Ce;let Pe;e[41]!==w||e[42]!==y?(Pe=z=>{w(),y(z.id,z.virtual_mcp_id)},e[41]=w,e[42]=y,e[43]=Pe):Pe=e[43];const We=Pe;let Ae;e[44]!==_||e[45]!==S||e[46]!==f||e[47]!==w||e[48]!==p||e[49]!==l||e[50]!==o||e[51]!==c||e[52]!==y?(Ae=()=>{const z=_??o;ce("sidebar_new_thread_clicked",{virtual_mcp_id:z}),w();const ne=an(f,z,l,c(z));if(ne){y(ne.id,ne.virtual_mcp_id);return}const xe=f.find(be=>be.id===S)?.branch??null;p(z,xe)},e[44]=_,e[45]=S,e[46]=f,e[47]=w,e[48]=p,e[49]=l,e[50]=o,e[51]=c,e[52]=y,e[53]=Ae):Ae=e[53];const qe=Ae;let me;e[54]!==g?(me=()=>{g()},e[54]=g,e[55]=me):me=e[55];const Ye=I!=="flat"||P!=="all"||E;let he;e[56]!==Ke||e[57]!==V?(he=V?s.jsx(Ra,{branch:V.target.branch,onOutcome:Ke}):null,e[56]=Ke,e[57]=V,e[58]=he):he=e[58];let pe;e[59]!==O||e[60]!==L||e[61]!==G?(pe=O?s.jsx(Ea,{open:L,onOpenChange:G}):null,e[59]=O,e[60]=L,e[61]=G,e[62]=pe):pe=e[62];let Ie;return e[63]!==S||e[64]!==Ve||e[65]!==H||e[66]!==I||e[67]!==m||e[68]!==h||e[69]!==qe||e[70]!==Q||e[71]!==We||e[72]!==D||e[73]!==F||e[74]!==M||e[75]!==E||e[76]!==me||e[77]!==Ye||e[78]!==he||e[79]!==pe||e[80]!==P||e[81]!==te?(Ie={threads:te,activeTaskId:S,filters:H,hasMore:m,isFetchingMore:h,loadMore:me,groupBy:I,setGroupBy:D,typeFilter:P,setTypeFilter:M,showAll:E,setShowAll:F,filtersActive:Ye,selectTask:We,archiveTask:Ve,newThread:qe,openSearch:Q,reclaimDialog:he,searchDialog:pe},e[63]=S,e[64]=Ve,e[65]=H,e[66]=I,e[67]=m,e[68]=h,e[69]=qe,e[70]=Q,e[71]=We,e[72]=D,e[73]=F,e[74]=M,e[75]=E,e[76]=me,e[77]=Ye,e[78]=he,e[79]=pe,e[80]=P,e[81]=te,e[82]=Ie):Ie=e[82],Ie}function fr(t){return!t.trigger_id}function mr(t){return!!t.trigger_id}function hr(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function pr(t){return!t.hidden}function xr(){const t=$.c(60),e=U(),[n,r]=B.useState(!1);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={onNavigate:()=>r(!1)},t[0]=i):i=t[0];const a=ur(i),l=ze()?.activeTask;let d;t[1]!==l?.title||t[2]!==a.activeTaskId||t[3]!==a.threads||t[4]!==e?(d=l?.title||a.threads.find(F=>F.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]=d):d=t[5];const u=d;let o;t[6]!==a?(o=()=>{r(!1),a.openSearch()},t[6]=a,t[7]=o):o=t[7];const c=o;let f;t[8]!==e?(f=e("chat.threadsMenu.chats"),t[8]=e,t[9]=f):f=t[9];const m=n&&"bg-sidebar-accent";let h;t[10]!==m?(h=Y("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/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",m),t[10]=m,t[11]=h):h=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Es,{size:16,className:"shrink-0"}),t[12]=g):g=t[12];let v;t[13]!==u?(v=s.jsx("span",{className:"truncate max-w-[10rem] font-medium",children:u}),t[13]=u,t[14]=v):v=t[14];let j;t[15]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(lt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[15]=j):j=t[15];let x;t[16]!==f||t[17]!==h||t[18]!==v?(x=s.jsx(Te,{asChild:!0,children:s.jsx(Kt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":f,className:h,children:[g,v,j]})})}),t[16]=f,t[17]=h,t[18]=v,t[19]=x):x=t[19];let b;t[20]!==e?(b=e("chat.threadsMenu.chats"),t[20]=e,t[21]=b):b=t[21];let k;t[22]!==b?(k=s.jsx(_e,{side:"bottom",children:b}),t[22]=b,t[23]=k):k=t[23];let y;t[24]!==k||t[25]!==x?(y=s.jsxs(we,{children:[x,k]}),t[24]=k,t[25]=x,t[26]=y):y=t[26];let p;t[27]!==a?(p=s.jsx(Ia,{panel:a,className:"size-8 classic:rounded-lg"}),t[27]=a,t[28]=p):p=t[28];let T;t[29]!==e?(T=e("sidebar.taskGroupsList.searchChats"),t[29]=e,t[30]=T):T=t[30];let S;t[31]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Fs,{size:16}),t[31]=S):S=t[31];let N;t[32]!==c||t[33]!==T?(N=s.jsx(De,{"aria-label":T,onClick:c,className:"size-8 classic:rounded-lg",children:S}),t[32]=c,t[33]=T,t[34]=N):N=t[34];let _;t[35]!==e?(_=e("sidebar.taskGroupsList.newChat"),t[35]=e,t[36]=_):_=t[36];let C;t[37]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ft,{size:16}),t[37]=C):C=t[37];let w;t[38]!==a.newThread||t[39]!==_?(w=s.jsx(De,{"aria-label":_,onClick:a.newThread,className:"size-8 classic:rounded-lg",children:C}),t[38]=a.newThread,t[39]=_,t[40]=w):w=t[40];let A;t[41]!==N||t[42]!==w?(A=s.jsxs("div",{className:"flex items-center gap-0.5",children:[N,w]}),t[41]=N,t[42]=w,t[43]=A):A=t[43];let P;t[44]!==p||t[45]!==A?(P=s.jsxs("div",{className:"flex shrink-0 items-center justify-between",children:[p,A]}),t[44]=p,t[45]=A,t[46]=P):P=t[46];let M;t[47]!==a?(M=s.jsx("div",{className:"flex max-h-[60vh] min-h-0 flex-col gap-0.5 overflow-y-auto overscroll-contain",children:s.jsx(dr,{panel:a})}),t[47]=a,t[48]=M):M=t[48];let I;t[49]!==P||t[50]!==M?(I=s.jsxs(Wt,{align:"start",side:"bottom",onOpenAutoFocus:gr,className:"flex w-80 flex-col gap-2 p-2",children:[P,M]}),t[49]=P,t[50]=M,t[51]=I):I=t[51];let D;t[52]!==n||t[53]!==y||t[54]!==I?(D=s.jsxs(qt,{open:n,onOpenChange:r,children:[y,I]}),t[52]=n,t[53]=y,t[54]=I,t[55]=D):D=t[55];let E;return t[56]!==a.reclaimDialog||t[57]!==a.searchDialog||t[58]!==D?(E=s.jsxs(s.Fragment,{children:[D,a.searchDialog,a.reclaimDialog]}),t[56]=a.reclaimDialog,t[57]=a.searchDialog,t[58]=D,t[59]=E):E=t[59],E}function gr(t){return t.preventDefault()}function br(){const t=$.c(20),e=U(),{threads:n}=dt(),{createNewTask:r}=ot(),i=Qt(),a=He();let l;t[0]!==a||t[1]!==n?(l=n.find(j=>j.id===a)?.branch??null,t[0]=a,t[1]=n,t[2]=l):l=t[2];const d=l;let u;t[3]!==i||t[4]!==r||t[5]!==d?(u=()=>{r(i,d)},t[3]=i,t[4]=r,t[5]=d,t[6]=u):u=t[6];const o=u;let c;t[7]!==e?(c=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=c):c=t[8];let f;t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ft,{size:16}),t[9]=f):f=t[9];let m;t[10]!==o||t[11]!==c?(m=s.jsx(Te,{asChild:!0,children:s.jsx("button",{type:"button",onClick:o,"aria-label":c,className:"flex shrink-0 items-center classic:rounded-md compact:rounded-lg p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:f})}),t[10]=o,t[11]=c,t[12]=m):m=t[12];let h;t[13]!==e?(h=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=h):h=t[14];let g;t[15]!==h?(g=s.jsx(_e,{side:"bottom",children:h}),t[15]=h,t[16]=g):g=t[16];let v;return t[17]!==m||t[18]!==g?(v=s.jsxs(we,{children:[m,g]}),t[17]=m,t[18]=g,t[19]=v):v=t[19],v}function vr(t){const e=$.c(14),{virtualMcp:n}=t,r=U(),i=Rt(),{navigateToTask:a}=ws(),{create:l}=ut();let d,u;if(e[0]!==i||e[1]!==l||e[2]!==a||e[3]!==r||e[4]!==n){u=Symbol.for("react.early_return_sentinel");e:{const o=Zs(n,i);if(!o){u=null;break e}const c=o.mode==="dev";let f;e[7]!==l||e[8]!==a?(f=async x=>{const b=crypto.randomUUID();try{await l({id:b,virtual_mcp_id:x})}catch{}a(b,{virtualMcpId:x})},e[7]=l,e[8]=a,e[9]=f):f=e[9];const m=f,h=(x,b,k)=>s.jsxs("button",{type:"button","aria-pressed":b,"aria-label":x,title:x,onClick:()=>{b||m(o.targetId)},className:Y("inline-flex items-center gap-1.5 px-2.5 py-1 classic:rounded-md compact:rounded-lg transition-colors",b?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[s.jsx(k,{className:"size-3.5 shrink-0"}),s.jsx("span",{className:"@max-3xl/panel-header:hidden",children:x})]});let g;e[10]!==r?(g=r("devAgent.devAgentControl.develop"),e[10]=r,e[11]=g):g=e[11];const v=h(g,c,Rs);let j;e[12]!==r?(j=r("devAgent.devAgentControl.live"),e[12]=r,e[13]=j):j=e[13],d=s.jsxs("div",{className:"inline-flex items-center rounded-lg border border-border bg-muted p-0.5 text-xs font-medium",children:[v,h(j,!c,Un)]})}e[0]=i,e[1]=l,e[2]=a,e[3]=r,e[4]=n,e[5]=d,e[6]=u}else d=e[5],u=e[6];return u!==Symbol.for("react.early_return_sentinel")?u:d}function ke(t){const e=$.c(10),{icon:n,className:r}=t,i=r===void 0?"size-4":r;if(n.kind==="component"){const{Component:l}=n;let d;return e[0]!==l||e[1]!==i?(d=s.jsx(l,{className:i}),e[0]=l,e[1]=i,e[2]=d):d=e[2],d}if(n.kind==="url"){const l=n.src;let d;e[3]!==i?(d=Y(i,"rounded-sm object-cover"),e[3]=i,e[4]=d):d=e[4];let u;return e[5]!==n.src||e[6]!==d?(u=s.jsx("img",{src:l,alt:"",className:d}),e[5]=n.src,e[6]=d,e[7]=u):u=e[7],u}let a;return e[8]!==i?(a=s.jsx(Kn,{className:i}),e[8]=i,e[9]=a):a=e[9],a}const jr={sooner:"@max-3xl/panel-header:hidden",later:"@max-xl/panel-header:hidden"};function yr(t){const e=$.c(29),{title:n,icon:r,active:i,onClick:a,disabled:l,locked:d,className:u,testId:o,tooltip:c,labelCollapse:f,showIcon:m}=t,h=l===void 0?!1:l,g=d===void 0?!1:d,v=f===void 0?"later":f,j=m===void 0?!0:m,x=g||void 0;let b;e[0]!==i||e[1]!==u||e[2]!==g?(b=Y("shrink-0 flex items-center gap-1.5 h-7 rounded-md px-2",js(i),"disabled:opacity-40 disabled:pointer-events-none",g&&"pointer-events-none",u),e[0]=i,e[1]=u,e[2]=g,e[3]=b):b=e[3];let k;e[4]!==r||e[5]!==j?(k=j&&s.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:s.jsx(ke,{icon:r})}),e[4]=r,e[5]=j,e[6]=k):k=e[6];const y=j&&jr[v];let p;e[7]!==y?(p=Y(y,"whitespace-nowrap text-sm font-medium leading-none"),e[7]=y,e[8]=p):p=e[8];let T;e[9]!==p||e[10]!==n?(T=s.jsx("span",{className:p,children:n}),e[9]=p,e[10]=n,e[11]=T):T=e[11];let S;e[12]!==i||e[13]!==h||e[14]!==a||e[15]!==T||e[16]!==x||e[17]!==b||e[18]!==k||e[19]!==o||e[20]!==n?(S=s.jsxs("button",{type:"button",onClick:a,disabled:h,"data-testid":o,"aria-pressed":i,"aria-disabled":x,"aria-label":n,className:b,children:[k,T]}),e[12]=i,e[13]=h,e[14]=a,e[15]=T,e[16]=x,e[17]=b,e[18]=k,e[19]=o,e[20]=n,e[21]=S):S=e[21];const N=S;let _;e[22]!==N?(_=s.jsx(Te,{asChild:!0,children:N}),e[22]=N,e[23]=_):_=e[23];const C=c??n;let w;e[24]!==C?(w=s.jsx(_e,{side:"bottom",children:C}),e[24]=C,e[25]=w):w=e[25];let A;return e[26]!==_||e[27]!==w?(A=s.jsxs(we,{children:[_,w]}),e[26]=_,e[27]=w,e[28]=A):A=e[28],A}function kr(t){const e=$.c(16),{virtualMcpId:n,taskId:r}=t,{openPanel:i}=ft();let a;e[0]!==r||e[1]!==n?(a={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=a):a=e[2];const{tabs:l,activeTab:d,mainOpen:u}=mt(a);if(l.length===0)return null;let o;if(e[3]!==d||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==n){let f;e[9]!==d||e[10]!==u||e[11]!==i||e[12]!==n?(f=m=>{const h=m.id==="automations"?Mt({activeTab:d,mainOpen:u}):u&&m.id===d;return s.jsxs(pt.Tab,{active:h,onClick:()=>{h||(ce("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:m.id,tab_kind:m.kind,was_active:!1}),i(m.id))},children:[s.jsx("span",{"aria-hidden":"true",className:"flex size-4 shrink-0 items-center justify-center",children:s.jsx(ke,{icon:m.icon})}),m.title]},m.id)},e[9]=d,e[10]=u,e[11]=i,e[12]=n,e[13]=f):f=e[13],o=l.map(f),e[3]=d,e[4]=u,e[5]=i,e[6]=l,e[7]=n,e[8]=o}else o=e[8];let c;return e[14]!==o?(c=s.jsx(pt.Tabs,{"data-tour":Ot.surfaceTabs,children:o}),e[14]=o,e[15]=c):c=e[15],c}function Sr(t){const e=$.c(18),{virtualMcpId:n,taskId:r,disableActiveMainToggle:i}=t,a=i===void 0?!1:i,{openPanel:l,closePanel:d}=ft();let u;e[0]!==r||e[1]!==n?(u={virtualMcpId:n,taskId:r},e[0]=r,e[1]=n,e[2]=u):u=e[2];const{tabs:o,activeTab:c,mainOpen:f,setActiveTab:m}=mt(u);let h,g,v;if(e[3]!==c||e[4]!==d||e[5]!==a||e[6]!==f||e[7]!==l||e[8]!==m||e[9]!==o||e[10]!==n){const x=Mt({activeTab:c,mainOpen:f}),b=p=>p.id==="automations"?x:f&&p.id===c,k=p=>{const T=o.find(N=>N.id===p);if(a&&T&&b(T))return;const S=f&&c===p;if(ce("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:p,tab_kind:T?.kind??null,was_active:S}),p==="automations"){const N=ds({activeTab:c,mainOpen:f});"close"in N?d():l(N.tabId);return}m(p)},y=o.map(p=>({id:p.id,title:p.title,icon:p.icon,active:b(p),locked:a&&b(p),onSelect:()=>k(p.id),labelCollapse:p.kind==="system"?"sooner":"later"}));h="flex items-center min-w-0 gap-0.5 overflow-x-auto no-scrollbar",g=Ot.surfaceTabs,v=y.map(Nr),e[3]=c,e[4]=d,e[5]=a,e[6]=f,e[7]=l,e[8]=m,e[9]=o,e[10]=n,e[11]=h,e[12]=g,e[13]=v}else h=e[11],g=e[12],v=e[13];let j;return e[14]!==h||e[15]!==g||e[16]!==v?(j=s.jsx("div",{className:h,"data-tour":g,children:v}),e[14]=h,e[15]=g,e[16]=v,e[17]=j):j=e[17],j}function Nr(t){return s.jsx(yr,{title:t.title,icon:t.icon,showIcon:t.id!=="site-editor"&&t.id!=="content",active:t.active,locked:t.locked,onClick:t.onSelect,labelCollapse:t.labelCollapse},t.id)}function Tr(t){const e=$.c(3),n=rt();let r;return e[0]!==n||e[1]!==t?(r=n?s.jsx(kr,{...t}):s.jsx(Sr,{...t}),e[0]=n,e[1]=t,e[2]=r):r=e[2],r}function _r(t){return{threadId:t.routeThreadId,providerKey:t.routeThreadId??t.fallbackKey}}const Je="__mobile-main-panel-tab-select__",st="main";function wr({tabs:t,activeTab:e,mainOpen:n,t:r}){const i=t.find(l=>l.id===e),a=r("mainPanelTabs.mobileMainPanelTabSelect.mainView");return n?i?.title??a:i?.title??t[0]?.title??a}const Cr={kind:"component",Component:Bs},Pr={kind:"component",Component:zs},Ar={kind:"component",Component:Vn},Ir={kind:"component",Component:Os};function Mr({tabs:t,overlayEnabled:e,t:n}){return[{value:"chat",title:n("mainPanelTabs.mobileMainPanelTabSelect.chat"),icon:Cr},...t.length>0?t.map(r=>({value:r.id,title:r.title,icon:r.icon})):[{value:st,title:n("mainPanelTabs.mobileMainPanelTabSelect.mainView"),icon:Ir}],...e?[{value:"board",title:n("mainPanelTabs.mobileMainPanelTabSelect.tasks"),icon:Pr},{value:"files",title:n("mainPanelTabs.mobileMainPanelTabSelect.library"),icon:Ar}]:[]]}function rs(t){const e=$.c(53),{virtualMcpId:n,taskId:r}=t,i=U(),a=Be(),{openPanel:l}=ft();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const u=Ne(d);let o;e[1]!==r||e[2]!==n?(o={virtualMcpId:n,taskId:r},e[1]=r,e[2]=n,e[3]=o):o=e[3];const{tabs:c,activeTab:f,mainOpen:m}=mt(o),{org:h}=le(),g=ks();let v;e[4]!==h.id?(v=xt(h.id),e[4]=h.id,e[5]=v):v=e[5];const j=n===v;let x,b,k,y,p,T,S,N,_,C;if(e[6]!==f||e[7]!==m||e[8]!==a||e[9]!==j||e[10]!==l||e[11]!==h.id||e[12]!==u.org||e[13]!==u.taskId||e[14]!==g||e[15]!==i||e[16]!==c||e[17]!==n){y=Symbol.for("react.early_return_sentinel");e:{const P=Mr({tabs:c,overlayEnabled:!!(u.org&&u.taskId),t:i}),M=m?P.find(R=>R.value===f)?.value??st:"chat",I=P.find(R=>R.value===M),D=I?.title??wr({tabs:c,activeTab:f,mainOpen:m,t:i});let E;e[28]!==a?(E=R=>{a({to:".",search:Q=>({...Q,...mn(R)}),replace:!0})},e[28]=a,e[29]=E):E=e[29];const F=E;let L;e[30]!==j||e[31]!==l||e[32]!==h.id||e[33]!==g||e[34]!==F||e[35]!==n?(L=R=>{if(R!==Je){if(ce("main_panel_tab_clicked",{virtual_mcp_id:n,tab_id:R,source:"mobile_select"}),Ys({reportsOnly:g,onReportAgent:j,tabId:R})){l(R,{virtualmcpid:xt(h.id),search:Dr});return}if(R==="chat"||R===st){F(R==="chat"?"chat":"main");return}l(R,{search:$r})}},e[30]=j,e[31]=l,e[32]=h.id,e[33]=g,e[34]=F,e[35]=n,e[36]=L):L=e[36];const G=L,O=P.find(R=>R.value!==M);if(P.length===2&&O){y=s.jsxs("button",{type:"button",onClick:()=>G(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 classic:rounded-md compact:rounded-lg px-1.5 text-xs text-foreground transition-colors hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(ke,{icon:O.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:O.title})]});break e}b=Yn,_=Je,C=G;let K;e[37]!==i?(K=i("mainPanelTabs.mobileMainPanelTabSelect.view"),e[37]=i,e[38]=K):K=e[38],k=s.jsx(qn,{"aria-label":K,className:"h-10! w-full min-w-0 max-w-[7.5rem] classic:rounded-md compact:rounded-lg border-0 bg-transparent px-1.5 text-xs shadow-none [--card-shadow:none]",children:s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[I&&s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(ke,{icon:I.icon,className:"size-5"})}),s.jsx("span",{className:"min-w-0 truncate",children:D})]})}),x=Qn,p="end",T="w-56",e[39]!==D?(S=s.jsx(Xt,{value:Je,disabled:!0,hideCheck:!0,className:"hidden",children:D}),e[39]=D,e[40]=S):S=e[40],N=P.map(Lr)}e[6]=f,e[7]=m,e[8]=a,e[9]=j,e[10]=l,e[11]=h.id,e[12]=u.org,e[13]=u.taskId,e[14]=g,e[15]=i,e[16]=c,e[17]=n,e[18]=x,e[19]=b,e[20]=k,e[21]=y,e[22]=p,e[23]=T,e[24]=S,e[25]=N,e[26]=_,e[27]=C}else x=e[18],b=e[19],k=e[20],y=e[21],p=e[22],T=e[23],S=e[24],N=e[25],_=e[26],C=e[27];if(y!==Symbol.for("react.early_return_sentinel"))return y;let w;e[41]!==x||e[42]!==p||e[43]!==T||e[44]!==S||e[45]!==N?(w=s.jsxs(x,{align:p,className:T,children:[S,N]}),e[41]=x,e[42]=p,e[43]=T,e[44]=S,e[45]=N,e[46]=w):w=e[46];let A;return e[47]!==b||e[48]!==k||e[49]!==w||e[50]!==_||e[51]!==C?(A=s.jsxs(b,{value:_,onValueChange:C,children:[k,w]}),e[47]=b,e[48]=k,e[49]=w,e[50]=_,e[51]=C,e[52]=A):A=e[52],A}function Lr(t){return s.jsx(Xt,{value:t.value,children:s.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[s.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center",children:s.jsx(ke,{icon:t.icon})}),s.jsx("span",{className:"min-w-0 truncate",children:t.title})]})},t.value)}function $r(t){return{...t,sidepanel:!1}}function Dr(t){return{...t,thread:void 0,sidepanel:!1}}function Er(t,e,n){const r=$.c(33),i=ct(),{locator:a}=le(),l=B.useSyncExternalStore(i.threads.subscribe,i.threads.get),d=B.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,[c,f]=B.useState(void 0),[m,h]=B.useState(t);m!==t&&(h(t),f(void 0));let g,v;r[3]!==c||r[4]!==t||r[5]!==o||r[6]!==i||r[7]!==d.kind?(g=()=>{t!==null&&(o||d.kind!=="loading"&&c===void 0&&(f("pending"),i.fetchThreadIntoSlot(t).then(p=>{f(p)})))},v=[t,o,d.kind,c,i],r[3]=c,r[4]=t,r[5]=o,r[6]=i,r[7]=d.kind,r[8]=g,r[9]=v):(g=r[8],v=r[9]),B.useEffect(g,v);let j;r[10]!==n||r[11]!==a||r[12]!==i||r[13]!==e?(j={mutationFn:async p=>i.create({id:p,virtual_mcp_id:e,...n?{branch:n}:{},...sn(sessionStorage,a,p)})},r[10]=n,r[11]=a,r[12]=i,r[13]=e,r[14]=j):j=r[14];const x=us(j);let b,k;if(r[15]!==x||r[16]!==c||r[17]!==t||r[18]!==o||r[19]!==d.kind?(b=()=>{t!==null&&(o||c===null&&d.kind!=="loading"&&(x.isPending||x.variables!==t&&x.mutate(t)))},k=[t,o,c,d.kind,x],r[15]=x,r[16]=c,r[17]=t,r[18]=o,r[19]=d.kind,r[20]=b,r[21]=k):(b=r[20],k=r[21]),B.useEffect(b,k),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(c&&typeof c=="object"){let p;return r[25]!==c?(p={status:"ready",task:c},r[25]=c,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||d.kind!=="loading"){let p;return r[31]===Symbol.for("react.memo_cache_sentinel")?(p={status:"creating"},r[31]=p):p=r[31],p}let y;return r[32]===Symbol.for("react.memo_cache_sentinel")?(y={status:"loading"},r[32]=y):y=r[32],y}function Fr(t){const e=$.c(13),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=Ne(r);let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[1]=a):a=e[1];const l=Oe(a);let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d={select:Rr},e[2]=d):d=e[2];const u=fs(d),{org:o}=le();let c;e[3]!==o||e[4]!==i.agentId||e[5]!==i.legacyView||e[6]!==i.org||e[7]!==u||e[8]!==l?(c=i.org?ms({pathname:u,org:i.org,pathAgentId:i.agentId,pathLegacyView:i.legacyView,fallbackAgentId:Se(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]=c):c=e[9];const f=c;let m;return e[10]!==n||e[11]!==f?(m=f?s.jsx(ht,{target:f}):n,e[10]=n,e[11]=f,e[12]=m):m=e[12],m}function Rr(t){return t.matches.at(-1)?.pathname??t.location.pathname}function Br(){const t=$.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Ne(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[1]=r):r=t[1];const i=Oe(r),{org:a}=le(),{org:l,taskId:d}=n;if(!l||d===void 0)return null;let u;return t[2]!==l||t[3]!==a.id||t[4]!==i||t[5]!==d?(u=hs({org:l,taskId:d,fallbackAgentId:Se(a.id).id,search:i}),t[2]=l,t[3]=a.id,t[4]=i,t[5]=d,t[6]=u):u=t[6],u}function Or(){const t=$.c(2),e=Br();let n;return t[0]!==e?(n=e?s.jsx(ht,{target:e}):null,t[0]=e,t[1]=n):n=t[1],n}function zr(){const t=$.c(6),e=Vt(),n=Be();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const{preview:i}=Oe(r);if(!e||!i)return null;let a;t[1]!==n?(a=()=>n({to:".",search:Gr}),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==i||t[4]!==a?(l=s.jsx(Xn,{previewPath:i,onClose:a,showSeeInLibrary:!0}),t[3]=i,t[4]=a,t[5]=l):l=t[5],l}function Gr(t){const{preview:e,...n}=t;return n}const Hr=B.createContext(null);function is(){return B.useContext(Hr)}function Ur(t){const e=$.c(13),{children:n}=t,r=U(),i=Jt(),a=is(),l=He()!==null;let d;e[0]!==l||e[1]!==i||e[2]!==a?(d=s.jsx(Ca,{}),e[0]=l,e[1]=i,e[2]=a,e[3]=d):d=e[3];const u=d;let o;e[4]!==r?(o=r("agentShellLayout.agentShellLayout.chatLoadingError"),e[4]=r,e[5]=o):o=e[5];let c;e[6]!==o?(c=s.jsx("div",{role:"alert",className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:o}),e[6]=o,e[7]=c):c=e[7];const f=n??u;let m;e[8]!==f?(m=s.jsx(Fe,{children:f}),e[8]=f,e[9]=m):m=e[9];let h;return e[10]!==c||e[11]!==m?(h=s.jsx(Ct,{fallback:c,children:m}),e[10]=c,e[11]=m,e[12]=h):h=e[12],h}function Vr(t){const e=$.c(13),{threadId:n,children:r}=t;if(U(),is(),n===null){let a;return e[0]!==r?(a=s.jsx(ee.ThreadlessProvider,{children:r}),e[0]=r,e[1]=a):a=e[1],a}let i;return e[10]!==r||e[11]!==n?(i=s.jsx(ee.ActiveTaskProvider,{taskId:n,children:r}),e[10]=r,e[11]=n,e[12]=i):i=e[12],i}function Kr(t){const e=$.c(3),{onNewTaskRef:n,createNewTask:r}=t;let i;return e[0]!==r||e[1]!==n?(i=()=>(n.current=r,()=>{n.current=null}),e[0]=r,e[1]=n,e[2]=i):i=e[2],B.useLayoutEffect(i),null}function Wr({virtualMcpId:t,hasActiveGithubRepo:e,sandboxMap:n,children:r}){const i=U(),{currentBranch:a,activeTask:l,setCurrentTaskBranch:d}=Ge(),u=Jt(),o="agent-sandbox",{data:c}=Re.useSession(),f=c?.user?.id,m=!Cs({isDesktopApp:u,harnessId:l?.harness_id}),h=ln({agentSandboxMap:n,threadSandboxMap:l?.metadata?.sandboxMap,userId:f,ownerId:l?.created_by,branch:a}),g=e||Xs(l?.metadata),v=B.useRef(null),j=m&&on({threadLoaded:!!l,isOwner:!!f&&l?.created_by===f,hasActiveGithubRepo:g,branch:a??null,attempted:v.current===(l?.id??null)});B.useEffect(()=>{!j||!l||(v.current=l.id,d(et(c?.user?.name||c?.user?.email?.split("@")[0])))},[j,l,c,d]);const{org:x}=le(),b=Ss("cms_auto_fresh_branch"),k=Et(t),y=B.useRef(null),p=b&&k.resolved&&k.runtime==="cms"&&!!x?.slug&&!!a&&y.current!==(l?.id??null),S=nt({...Ns({orgSlug:x?.slug??"",virtualMcpId:t,branch:a??""}),enabled:p}).data?.lastCommitAt??null;B.useEffect(()=>{!p||!l||Ts(S,Date.now())&&(y.current=l.id,d(et(c?.user?.name||c?.user?.email?.split("@")[0])))},[p,S,l,c,d]);const N=de(t),_=Gt(N,a),{releases:C,createRelease:w}=Js(t),P=!!f&&l?.created_by===f&&!!a&&a!==_&&!C.some(O=>O.branch===a),M=B.useRef(null);B.useEffect(()=>{!P||!a||M.current!==a&&(M.current=a,w({branch:a,name:tn(C,i("thread.branchPicker.defaultVersionName")),color:en(C.length),createdBy:f,createdAt:new Date().toISOString()}).catch(()=>{}))},[P,a,C,w,f,i]);const I=k.resolved?k.runtime:null,D=cn(t,a??void 0),F=(f&&a?ea(h?.[f]?.[a]):{})[o]??null,L=F?.previewUrl??null,G=m&&I!=="cms"&&(!!F||D);return m?I==="cms"?s.jsx(jt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`):s.jsx(dn,{virtualMcpId:t,branch:a??null,previewUrl:L,enabled:G,children:s.jsx(un,{executionEnabled:m,virtualMcpId:t,branch:a??null,userId:f??null,hasActiveGithubRepo:g,vmEntry:F,threadId:l?.id??null,children:s.jsx(jt,{children:r},`${t}:${a??"no-branch"}:${l?.id??""}`)})},l?.id??"no-thread"):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex h-full rounded-[0.75rem] bg-background card-shadow",children:s.jsx(Ht,{image:s.jsx(it,{size:48,className:"text-muted-foreground"}),title:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWeb"),description:i("agentShellLayout.agentShellLayout.runtimeUnavailableOnWebDescription")})})})}function qr(){const t=$.c(22),e=rt(),n=pn(),r=U(),{toggleSidebar:i}=vs(),{virtualMcpId:a,taskId:l}=Ge();let d;t[0]!==r?(d=r("layouts.shellControls.toggleSidebar"),t[0]=r,t[1]=d):d=t[1];let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(bs,{size:16}),t[2]=u):u=t[2];let o;t[3]!==d||t[4]!==i?(o=s.jsx(De,{className:"classic:hidden md:hidden",onClick:i,"aria-label":d,children:u}),t[3]=d,t[4]=i,t[5]=o):o=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(xr,{}),t[6]=c):c=t[6];let f;t[7]!==o?(f=s.jsxs(Le.Topbar.Left,{children:[o,c]}),t[7]=o,t[8]=f):f=t[8];let m;t[9]!==l||t[10]!==a?(m=s.jsx("div",{className:"classic:hidden min-w-0 md:hidden",children:s.jsx(rs,{virtualMcpId:a,taskId:l})}),t[9]=l,t[10]=a,t[11]=m):m=t[11];let h;t[12]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(br,{}),t[12]=h):h=t[12];let g;t[13]!==e||t[14]!==n?(g=!e&&!n.contentOpen&&s.jsx(xn,{side:"right",open:n.contentOpen,onToggle:n.toggleContent}),t[13]=e,t[14]=n,t[15]=g):g=t[15];let v;t[16]!==g?(v=s.jsxs(Le.Topbar.Right,{className:"shrink-0",children:[h,g]}),t[16]=g,t[17]=v):v=t[17];let j;return t[18]!==f||t[19]!==m||t[20]!==v?(j=s.jsxs(Le.Topbar,{className:"compact:border-b compact:border-border/60 compact:px-3",children:[f,m,v]}),t[18]=f,t[19]=m,t[20]=v,t[21]=j):j=t[21],j}function Yr(t){const e=$.c(24),{layout:n,onNewTaskRef:r,createNewTask:i}=t,{virtualMcpId:a,taskId:l}=Ge(),d=rt(),u=Vt(),o=de(a),c=Wn()??"overview";let f;e[0]!==d||e[1]!==u||e[2]!==l||e[3]!==a?(f=!d&&u&&s.jsx(Le.Topbar.Center.Portal,{children:s.jsx(rs,{virtualMcpId:a,taskId:l})}),e[0]=d,e[1]=u,e[2]=l,e[3]=a,e[4]=f):f=e[4];let m;e[5]!==i||e[6]!==r?(m=s.jsx(Kr,{onNewTaskRef:r,createNewTask:i}),e[5]=i,e[6]=r,e[7]=m):m=e[7];let h;e[8]!==l||e[9]!==a?(h=s.jsx(Tr,{virtualMcpId:a,taskId:l}),e[8]=l,e[9]=a,e[10]=h):h=e[10];let g;e[11]!==o?(g=o&&s.jsx(vr,{virtualMcp:o}),e[11]=o,e[12]=g):g=e[12];let v,j;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(vt.Thread,{topbar:s.jsx(qr,{}),children:s.jsx(Ur,{})}),j=s.jsx(Lt,{}),e[13]=v,e[14]=j):(v=e[13],j=e[14]);let x;e[15]!==c||e[16]!==n||e[17]!==h||e[18]!==g?(x=s.jsxs(vt,{...n,contentKey:c,contentNavigation:h,contentActions:g,children:[v,j]}),e[15]=c,e[16]=n,e[17]=h,e[18]=g,e[19]=x):x=e[19];let b;return e[20]!==f||e[21]!==m||e[22]!==x?(b=s.jsxs(s.Fragment,{children:[f,m,x]}),e[20]=f,e[21]=m,e[22]=x,e[23]=b):b=e[23],b}function Qr(){const t=U(),e=Be(),n=jn(),{create:r}=ut(),{org:i}=le(),l=Ne({strict:!1}).org??"",d=Oe({strict:!1}),u=He(),o=Qt(),c=Yt(),[f]=B.useState(()=>crypto.randomUUID()),{data:m}=Re.useSession(),[h]=B.useState(()=>et(m?.user?.name||m?.user?.email?.split("@")[0])),g=ct(),v=B.useSyncExternalStore(g.threads.subscribe,g.threads.get),j=B.useSyncExternalStore(g.threadsStatus.subscribe,g.threadsStatus.get),x=de(o),b=!!(x&&Ut(x)),k=Gt(x,null),y=Er(u,o,h);Pa(y.status==="ready"?y.task:null);const p=x?.metadata?.ui?.layout??null,T=p?{defaultMainView:p.defaultMainView??null,chatDefaultOpen:p.chatDefaultOpen??null}:null,S=hn(T),{threadId:N,providerKey:_}=_r({routeThreadId:u,fallbackKey:f}),C=async()=>{const M=crypto.randomUUID(),I=v.find(D=>D.id===N)?.branch??null;try{await r({id:M,virtual_mcp_id:o,...I?{branch:I}:{}})}catch{}n(M,()=>({}))},w=B.useRef(null);B.useEffect(()=>{const M=I=>{Qs(I)&&I.shiftKey&&I.code==="KeyS"&&!I.repeat&&(I.preventDefault(),w.current?.())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[]);const A=y.status==="ready"?y.task:null,P=A?.virtual_mcp_id;if(A&&P&&!yn({routeAgentId:o,threadAgentId:P})){const M=ps({org:l,agentId:P,superAgentId:Se(i.id).id});return s.jsx(ht,{target:{route:M,search:{thread:A.id,sidepanel:d.sidepanel,mainpanel:d.mainpanel,autosend:d.autosend}}})}if(u===null&&c&&x){if(j.kind==="loading")return s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})});const I=rn(v,o,m?.user?.id,zt(x.metadata),b,{baseBranch:k})?.id??(b?f:null);if(I)return s.jsx(xs,{to:".",replace:!0,search:D=>({...D,thread:I})})}return y.status==="creating"||y.status==="loading"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"status","aria-live":"polite",className:"flex h-full items-center justify-center bg-background card-shadow rounded-[0.75rem] text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 mr-2"}),t("agentShellLayout.agentShellLayout.creatingTask")]})}):y.status==="error"?s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsxs("div",{role:"alert",className:"flex flex-col h-full items-center justify-center gap-2 bg-background card-shadow rounded-[0.75rem] p-8 text-sm",children:[s.jsx("div",{className:"font-medium",children:t("agentShellLayout.agentShellLayout.taskUnavailable")}),s.jsx("div",{className:"text-muted-foreground",children:y.error.message})]})}):x?s.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:s.jsx(ee.Provider,{virtualMcpId:o,task:y.status==="ready"?y.task:null,children:s.jsx(Wr,{virtualMcpId:o,hasActiveGithubRepo:b,sandboxMap:x.metadata?.sandboxMap,children:s.jsx(Vr,{threadId:N,children:s.jsx(Fe,{children:s.jsx(Yr,{layout:S,onNewTaskRef:w,createNewTask:C})})},_)})},o)}):s.jsx("div",{className:"flex-1 min-h-0 pr-1.5 pb-1.5 overflow-hidden",children:s.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:s.jsx(Ht,{image:s.jsx(it,{size:48,className:"text-muted-foreground"}),title:t("agentShellLayout.agentShellLayout.agentNotFound"),description:t("agentShellLayout.agentShellLayout.agentNotFoundDescription",{virtualMcpId:o}),actions:s.jsx(gs,{variant:"outline",onClick:()=>e({to:"/$org",params:{org:l}}),children:t("agentShellLayout.agentShellLayout.goToOrgHome")})})})})}function nc(){const t=$.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const n=Ne(e);if(n.taskId!==void 0){let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Or,{}),t[1]=i):i=t[1],i}if(n._splat!==void 0){let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Lt,{}),t[2]=i):i=t[2],i}let r;return t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Fe,{children:s.jsx(Fr,{children:s.jsx(Zn,{children:s.jsxs(Jn,{children:[s.jsx(Qr,{}),s.jsx(zr,{})]})})})}),t[3]=r):r=t[3],r}export{nc as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,b as z,j as n,U as de,V as It,r as T,X as hs,P as we,Y as B,l as O,B as Ee,Z as bs,_ as _e,$ as Le,q as W,a as ee,d as $e,a0 as js,x as zt,t as re,a1 as vs,a2 as ys,p as Ze,a3 as Tt,a4 as At,o as Ot,e as Ss,K as Fe,y as ks,a5 as Ns,m as nt,a6 as ws,w as _s,L as Rt,a7 as D,J as ue,a8 as ot,a9 as $s,aa as jt,ab as Cs,ac as Ps,ad as Is,ae as zs,af as Ts,ag as As,ah as Os,ai as Rs,aj as Ds,f as Ms,k as Ls,ak as Es,al as Fs,E as qs,u as Bs,O as Vs}from"./index-B-RfjkQs.js";import{u as Ce,S as Ks,a as Ws,b as Us,c as le,d as q,e as oe,f as et,g as Hs,h as Gs}from"./sidebar-Bsj1oRm2.js";import{S as Qs,a as Js,b as Xs}from"./sheet-B5VBlNbo.js";import{u as it}from"./use-mobile-BA2OXMES.js";import{i as at}from"./LayoutLeft-DbmxTpPW.js";import{T as rt,I as Ys}from"./toolbar-icon-button-G0ZB62BK.js";import{u as Ue}from"./use-in-settings-_C3gW9Az.js";import{S as Zs,a as Dt}from"./thread-button-Dg0_8ATn.js";import{u as en,L as te,i as Mt}from"./shell-layout-t1NP6lxk.js";import{u as ke,a as He,b as Lt}from"./use-project-scope-Hp7aDrht.js";import{u as tn}from"./thread-route-C2QO3TRR.js";import{P as lt,a as Ge,b as ct}from"./popover-DFY37Yvw.js";import{D as Et,a as Ft,b as qt,c as sn}from"./drawer-Dj7i5SNu.js";import{A as qe}from"./avatar-CaSFUaWf.js";import{T as dt,a as ut,b as nn,c as mt}from"./tooltip-1YZ9_LEc.js";import{a as on}from"./Copy01-CDFMtB2-.js";import{n as an}from"./Eye-BaKrr1k0.js";import{t as rn,i as tt,a as ln,b as cn,c as dn,d as un,e as Bt,s as ft,f as mn,A as fn,g as pn,n as Vt,h as Kt,j as xn,k as gn,l as hn,m as bn,o as jn,p as vn}from"./agent-icon-B4H17A-3.js";import{i as yn,a as Sn}from"./Share07-BQpOEypi.js";import{n as Wt}from"./LinkExternal01-C1LIoQUC.js";import{i as Ut}from"./Monitor01-B-jx6SlO.js";import{n as kn,a as Nn}from"./Sun-BwQeSpzv.js";import{a as Ht,i as wn,t as _n}from"./Tool01-CFPgtTUB.js";import{u as $n}from"./use-deployment-admin-DhLAmeuE.js";import{u as Cn}from"./use-is-desktop-app-BNujXJc_.js";import{i as Pn,a as vt,D as In}from"./download-app-dialog-B8fu6N4W.js";import{I as zn,u as Tn}from"./use-join-requests-DbabBnEV.js";import{u as An}from"./use-deco-credits-BhBg4qYv.js";import{u as On,a as Gt}from"./use-entitlements-Bk0dyRQ2.js";import{u as Rn,P as Dn}from"./plan-ladder-B7xKH1KD.js";import{u as Mn}from"./use-organization-settings-fx1CniIO.js";import{S as Ln}from"./scroll-area-DtmE_V3W.js";import{u as En}from"./useInfiniteQuery-CEwPAAtp.js";import{n as Fn}from"./hooks-BunFzIMc.js";import{t as Qt,S as qn,b as Bn,p as Vn,a as Kn,i as Wn,c as Un,d as Hn}from"./task-route-D--4JOl_.js";import{g as Gn}from"./get-initials-D-f_fDFw.js";import{a as Qn}from"./format-time-BtXRrtv4.js";import{i as Be}from"./Check-Cxn5ODoZ.js";import{s as Jt}from"./Plus-BeOCeSsu.js";import{C as yt,a as Me,b as Ve,c as Jn,d as Xn,e as Yn}from"./command-C0IXiNme.js";import{P as pt}from"./project-icon-CsZAOQy_.js";import{C as Zn}from"./create-organization-dialog-CVGvbMrB.js";import{s as eo,c as to}from"./XClose-CKQjrGZS.js";import{u as so}from"./use-virtual-mcp-CbHEuH0C.js";import{i as no}from"./ArrowLeft-Cw8zoASu.js";import{u as oo}from"./use-thread-analytics-CusHOOmZ.js";import{e as io,r as Xt,u as ao,s as ro,p as lo,P as co}from"./use-project-native-view-presence-DU2K0Eyd.js";import{u as Yt}from"./optimistic-project-sidebar-views-BULTvoQH.js";import{u as xt}from"./use-navigate-to-agent-B7J0geak.js";import{a as uo}from"./Image01-BokX_Ygh.js";import{u as mo}from"./use-panel-navigate-ZqAXzPy8.js";import{R as fo}from"./repository-import-picker-ByioO6uG.js";import{t as po}from"./ChevronUp-B3Rmv2Rm.js";import{t as xo}from"./Globe04-BjYimuB_.js";import{i as go}from"./CreditCard01-Bpp7DUE2.js";import{i as ho}from"./Key01--iK_92aj.js";import{s as bo}from"./User01-CxY9-OxA.js";import{i as jo}from"./Zap-GTFewWZO.js";import{p as vo,q as yo}from"./question-004-sINsf4GQ.js";import{u as So}from"./use-decopilot-events-CrYWYj1F.js";import"./X-C49OUFcX.js";import"./use-route-default-main-DGbZPJrO.js";import"./UserSquare-D1SexGLq.js";import"./CheckCircle-Cb0ohXc_.js";import"./dialog-fTIcTyHb.js";import"./integration-icon-DuRUAYQY.js";import"./use-mcp-client-6HSoOGyN.js";import"./auth-DN1jUXQS.js";import"./required-auth-layout-Duev8t_N.js";import"./autosend-C9lP7MMD.js";import"./use-org-sso-D0y0H-Wd.js";import"./github-repo-BknN0SVI.js";import"./index-DNOKSPYL.js";import"./AlertCircle-CiIF9Yxb.js";import"./ArrowUp-i7W4PLl8.js";import"./ArrowRight-DXuJxv6z.js";import"./ZoomOut-BCbY44Eu.js";import"./DotsVertical-CsphgVVa.js";import"./Link01-CwRVjiFm.js";import"./Palette-BZ8zPcQQ.js";import"./SearchMd-CmoIwdFD.js";import"./Trash01-yjy5Djos.js";import"./Upload01-C3YaZ92x.js";import"./Users01-C234jzz1.js";import"./form-msoIoPH9.js";import"./label-COhaglCI.js";import"./select-lkzYgXdD.js";import"./textarea-BJstaU_4.js";import"./use-org-auth-client-DJC4lcTZ.js";import"./use-organization-roles-CTjyx7IB.js";import"./use-ai-providers-OZaiJf_i.js";import"./schema-kN4UiUD7.js";import"./task-board-B1qWBX1A.js";import"./infiniteQueryObserver-CFFZE0G7.js";import"./backoff-8mStPHYB.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-bU1o14-j.js";import"./alert-dialog-p_yxBHYu.js";import"./input-DgwTyBrI.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-Q9mf6jQo.js";import"./site-slug-DebpOoQq.js";import"./thread-intent-Dv_ln6w2.js";import"./slugify-CEUa2lfQ.js";import"./repository-picker-BPuZL7HO.js";import"./github-icon-Czf3JIe0.js";import"./collection-search-CPwy4oTQ.js";import"./use-debounced-value-CUPne1nm.js";function ie(){const{state:t,isMobile:e}=Ce();return t==="collapsed"&&!e}function ko(t){const e=S.c(15),{width:s,minWidth:a,maxWidth:o,onPointerDown:i,onKeyDown:r,onDoubleClick:l}=t,c=z(),{isMobile:d}=Ce(),m=ie();if(d||m)return null;let u;e[0]!==c?(u=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=u):u=e[1];let f;e[2]!==c?(f=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=f):f=e[3];let p,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},x=n.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=p,e[5]=x):(p=e[4],x=e[5]);let h;return e[6]!==o||e[7]!==a||e[8]!==l||e[9]!==r||e[10]!==i||e[11]!==u||e[12]!==f||e[13]!==s?(h=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":u,"aria-valuenow":s,"aria-valuemin":a,"aria-valuemax":o,title:f,tabIndex:0,onPointerDown:i,onKeyDown:r,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:p,children:x}),e[6]=o,e[7]=a,e[8]=l,e[9]=r,e[10]=i,e[11]=u,e[12]=f,e[13]=s,e[14]=h):h=e[14],h}const Xe=400,St=16,No="sidebar.width";function wo(){const t=S.c(23),s=de()?224:240;let a;t[0]!==s?(a=g=>Math.max(s,Math.min(Xe,g)),t[0]=s,t[1]=a):a=t[1];const o=a;let i;t[2]!==o||t[3]!==s?(i=g=>typeof g=="number"?o(g):s,t[2]=o,t[3]=s,t[4]=i):i=t[4];const[r,l]=It(No,i),c=T.useRef(null);let d;t[5]!==o||t[6]!==l||t[7]!==r?(d=g=>{g.preventDefault();const j=g.clientX,v=o(r),y=c.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),k=y?Array.from(y.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const _ of k)_.style.transition="none";const N=_=>{const $=o(v+(_.clientX-j));y?.style.setProperty("--sidebar-width",`${$}px`)},w=_=>{const $=o(v+(_.clientX-j));l($);for(const C of k)C.style.transition="";window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",w),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",N),window.addEventListener("pointerup",w),window.addEventListener("pointercancel",w)},t[5]=o,t[6]=l,t[7]=r,t[8]=d):d=t[8];const m=d;let u;t[9]!==s||t[10]!==l?(u=()=>{l(s)},t[9]=s,t[10]=l,t[11]=u):u=t[11];const f=u;let p;t[12]!==o||t[13]!==s||t[14]!==l||t[15]!==r?(p=g=>{if(g.key==="ArrowLeft")l(o(r-St));else if(g.key==="ArrowRight")l(o(r+St));else if(g.key==="Home")l(s);else if(g.key==="End")l(Xe);else return;g.preventDefault()},t[12]=o,t[13]=s,t[14]=l,t[15]=r,t[16]=p):p=t[16];const x=p,h=o(r);let b;return t[17]!==s||t[18]!==x||t[19]!==m||t[20]!==f||t[21]!==h?(b={width:h,minWidth:s,maxWidth:Xe,wrapperRef:c,onStartResize:m,onKeyDownResize:x,resetWidth:f},t[17]=s,t[18]=x,t[19]=m,t[20]=f,t[21]=h,t[22]=b):b=t[22],b}const Zt=T.createContext(null);function es(){const t=T.use(Zt);if(!t)throw new Error("Layout regions require a Layout");return t}function _o({children:t,notice:e}){const s=it(),a=de(),o=Ue(),[i,r]=It(hs.sidebarOpen(),!0),l=wo();return n.jsx(Zt,{value:{isMobile:s,resize:l},children:n.jsx(Ks,{open:!a&&o||i,onOpenChange:r,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Ws,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":a?"3.25rem":"3.125rem"},children:n.jsx(Zs,{children:t})})]})})})}function $o(t){const e=S.c(26),{children:s,renderMobile:a}=t,o=z(),{isMobile:i,resize:r}=es(),{openMobile:l,setOpenMobile:c}=Ce();if(!i){let h;e[0]!==r.maxWidth||e[1]!==r.minWidth||e[2]!==r.onKeyDownResize||e[3]!==r.onStartResize||e[4]!==r.resetWidth||e[5]!==r.width?(h=n.jsx(ko,{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,onPointerDown:r.onStartResize,onKeyDown:r.onKeyDownResize,onDoubleClick:r.resetWidth}),e[0]=r.maxWidth,e[1]=r.minWidth,e[2]=r.onKeyDownResize,e[3]=r.onStartResize,e[4]=r.resetWidth,e[5]=r.width,e[6]=h):h=e[6];let b;return e[7]!==s||e[8]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[7]=s,e[8]=h,e[9]=b):b=e[9],b}let d;e[10]!==o?(d=o("layouts.shellControls.navigationTitle"),e[10]=o,e[11]=d):d=e[11];let m;e[12]!==d?(m=n.jsx(Qs,{className:"sr-only",children:d}),e[12]=d,e[13]=m):m=e[13];let u;e[14]!==c?(u=()=>c(!1),e[14]=c,e[15]=u):u=e[15];let f;e[16]!==a||e[17]!==u?(f=a({onClose:u}),e[16]=a,e[17]=u,e[18]=f):f=e[18];let p;e[19]!==m||e[20]!==f?(p=n.jsxs(Js,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[m,f]}),e[19]=m,e[20]=f,e[21]=p):p=e[21];let x;return e[22]!==l||e[23]!==c||e[24]!==p?(x=n.jsx(Xs,{open:l,onOpenChange:c,children:p}),e[22]=l,e[23]=c,e[24]=p,e[25]=x):x=e[25],x}function Co(t){const e=S.c(11),{children:s}=t,a=de(),o=z(),{isMobile:i}=es(),{toggleSidebar:r}=Ce();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={background:"transparent",containerType:"inline-size"},e[0]=l):l=e[0];let c;e[1]!==a||e[2]!==i||e[3]!==o||e[4]!==r?(c=!a&&i&&n.jsxs(we.Topbar,{className:"px-1 bg-sidebar",children:[n.jsx(we.Topbar.Left,{className:"shrink-0",children:n.jsx(rt,{onClick:r,"aria-label":o("layouts.shellControls.toggleSidebar"),children:n.jsx(at,{size:16})})}),n.jsx(we.Topbar.Center,{className:"justify-start",children:n.jsx(we.Topbar.Center.Target,{})})]}),e[1]=a,e[2]=i,e[3]=o,e[4]=r,e[5]=c):c=e[5];let d;e[6]!==s?(d=n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s}),e[6]=s,e[7]=d):d=e[7];let m;return e[8]!==c||e[9]!==d?(m=n.jsx(Us,{className:"flex flex-col min-h-0",style:l,children:n.jsxs(we,{variant:"plain",className:"bg-sidebar",children:[c,d]})}),e[8]=c,e[9]=d,e[10]=m):m=e[10],m}const Ye=Object.assign(_o,{Sidebar:$o,Content:Co});function Po(){const t=S.c(19),{org:e}=B(),{data:s}=en(e.slug);if(!s)return null;const a=s.severity==="block",o=a?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let i;t[0]!==o?(i=O("flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b px-4 py-2 text-sm",o),t[0]=o,t[1]=i):i=t[1];const r=a?void 0:"text-warning";let l;t[2]!==r?(l=O("size-4 shrink-0",r),t[2]=r,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(bs,{className:l}),t[4]=l,t[5]=c):c=t[5];let d;t[6]!==s.title?(d=n.jsx("span",{className:"font-medium",children:s.title}),t[6]=s.title,t[7]=d):d=t[7];let m;t[8]!==s.message?(m=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=m):m=t[9];let u;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(u=s.ctaUrl&&s.ctaLabel?n.jsx(Ee,{size:"sm",variant:"outline",asChild:!0,children:n.jsx("a",{href:s.ctaUrl,target:"_blank",rel:"noreferrer noopener",children:s.ctaLabel})}):null,t[10]=s.ctaLabel,t[11]=s.ctaUrl,t[12]=u):u=t[12];let f;return t[13]!==i||t[14]!==c||t[15]!==d||t[16]!==m||t[17]!==u?(f=n.jsxs("div",{role:"alert",className:i,children:[c,d,m,u]}),t[13]=i,t[14]=c,t[15]=d,t[16]=m,t[17]=u,t[18]=f):f=t[18],f}function Io(){const t=S.c(4),{setScope:e}=ke(),s=tn(),a=_e();let o;return t[0]!==a||t[1]!==s||t[2]!==e?(o=()=>{const i=s!==void 0?"route_resolves_scope":Le(a,null)?null:"route_needs_scope";W("scope_cleared",{relocated:i!==null,reason:i}),e(null)},t[0]=a,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}const Ke="size-4 shrink-0";function gt(t){const e=S.c(5),{children:s,className:a}=t;let o;e[0]!==a?(o=O("flex w-4 shrink-0 items-center justify-center",a),e[0]=a,e[1]=o):o=e[1];let i;return e[2]!==s||e[3]!==o?(i=n.jsx("span",{className:o,children:s}),e[2]=s,e[3]=o,e[4]=i):i=e[4],i}function Se(t){const e=S.c(26),{item:s,onClose:a}=t;let o;e[0]!==s.className?(o=O("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",s.className),e[0]=s.className,e[1]=o):o=e[1];const i=o;if(s.href){const m=s.external?"_blank":void 0,u=s.external?"noopener noreferrer":void 0;let f;e[2]!==s.icon?(f=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[2]=s.icon,e[3]=f):f=e[3];let p;e[4]!==s.label?(p=n.jsx("span",{className:"flex-1",children:s.label}),e[4]=s.label,e[5]=p):p=e[5];let x;return e[6]!==i||e[7]!==s.href||e[8]!==a||e[9]!==m||e[10]!==u||e[11]!==f||e[12]!==p?(x=n.jsxs("a",{href:s.href,target:m,rel:u,className:i,onClick:a,children:[f,p]}),e[6]=i,e[7]=s.href,e[8]=a,e[9]=m,e[10]=u,e[11]=f,e[12]=p,e[13]=x):x=e[13],x}let r;e[14]!==s||e[15]!==a?(r=()=>{s.onClick?.(),a()},e[14]=s,e[15]=a,e[16]=r):r=e[16];let l;e[17]!==s.icon?(l=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[17]=s.icon,e[18]=l):l=e[18];let c;e[19]!==s.label?(c=n.jsx("span",{className:"flex-1",children:s.label}),e[19]=s.label,e[20]=c):c=e[20];let d;return e[21]!==i||e[22]!==r||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:r,className:i,children:[l,c]}),e[21]=i,e[22]=r,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function zo(){const t=S.c(4),e=z();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let a;return t[2]!==s?(a=n.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:s}),t[2]=s,t[3]=a):a=t[3],a}function kt(t){const e=S.c(38),{user:s,userImage:a,isImpersonating:o,isMobile:i}=t,r=z(),l=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=O("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let m;e[2]!==d||e[3]!==a?(m=n.jsx(qe,{url:a,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=a,e[4]=m):m=e[4];let u;e[5]!==r||e[6]!==s?.name?(u=s?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=s?.name,e[7]=u):u=e[7];let f;e[8]!==u?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:u}),e[8]=u,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(zo,{}),e[10]=o,e[11]=p):p=e[11];let x;e[12]!==f||e[13]!==p?(x=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14];const h=s?.email;let b;e[15]!==h?(b=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[15]=h,e[16]=b):b=e[16];let g;e[17]!==b||e[18]!==x?(g=n.jsxs("div",{className:"flex-1 min-w-0",children:[x,b]}),e[17]=b,e[18]=x,e[19]=g):g=e[19];let j;e[20]!==r||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=s,e[22]=j):j=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(on,{size:14}),e[23]=v):v=e[23];let y;e[24]!==j?(y=n.jsx(dt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[24]=j,e[25]=y):y=e[25];let k;e[26]!==r?(k=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(ut,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let w;e[30]!==y||e[31]!==N?(w=n.jsx(nn,{delayDuration:300,children:n.jsxs(mt,{children:[y,N]})}),e[30]=y,e[31]=N,e[32]=w):w=e[32];let _;return e[33]!==g||e[34]!==w||e[35]!==c||e[36]!==m?(_=n.jsxs("div",{className:c,children:[m,g,w]}),e[33]=g,e[34]=w,e[35]=c,e[36]=m,e[37]=_):_=e[37],_}function Nt(t){const e=S.c(35),{themeOptions:s,preferences:a,setPreferences:o,isMobile:i}=t,r=z(),l=i?"size-8":"size-7",c=i?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=O("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let m;if(e[2]!==l||e[3]!==a.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==a.theme||e[9]!==o?(k=N=>{const{value:w,icon:_,label:$}=N;return n.jsx("button",{type:"button","aria-label":$,onClick:()=>o(C=>({...C,theme:w})),className:O(l,"classic:rounded-md compact:rounded-lg flex items-center justify-center transition-colors",a.theme===w?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:_},w)},e[7]=l,e[8]=a.theme,e[9]=o,e[10]=k):k=e[10],m=s.map(k),e[2]=l,e[3]=a.theme,e[4]=o,e[5]=s,e[6]=m}else m=e[6];let u;e[11]!==m?(u=n.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=u):u=e[12];let f;e[13]!==a.enableSounds||e[14]!==r?(f=a.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=a.enableSounds,e[14]=r,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(To),e[16]=o,e[17]=p):p=e[17];const x=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let h;e[18]!==l||e[19]!==x?(h=O(l,"classic:rounded-md compact:rounded-lg flex items-center justify-center transition-colors",x),e[18]=l,e[19]=x,e[20]=h):h=e[20];let b;e[21]!==a.enableSounds?(b=a.enableSounds?n.jsx(cn,{size:14}):n.jsx(dn,{size:14}),e[21]=a.enableSounds,e[22]=b):b=e[22];let g;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(g=n.jsx("button",{type:"button","aria-label":f,onClick:p,className:h,children:b}),e[23]=f,e[24]=p,e[25]=h,e[26]=b,e[27]=g):g=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.400.6"]}),e[28]=j):j=e[28];let v;e[29]!==g?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[g,j]}),e[29]=g,e[30]=v):v=e[30];let y;return e[31]!==v||e[32]!==d||e[33]!==u?(y=n.jsxs("div",{className:d,children:[u,v]}),e[31]=v,e[32]=d,e[33]=u,e[34]=y):y=e[34],y}function To(t){return{...t,enableSounds:!t.enableSounds}}function wt(t){const e=S.c(54),{user:s,userImage:a,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:m,close:u,isMobile:f}=t;if(f){let y;e[0]!==l||e[1]!==s||e[2]!==a?(y=n.jsx(kt,{user:s,userImage:a,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=a,e[3]=y):y=e[3];let k;if(e[4]!==u||e[5]!==o){let I;e[7]!==u?(I=R=>n.jsx(Se,{item:R,onClose:u},R.key),e[7]=u,e[8]=I):I=e[8],k=o.map(I),e[4]=u,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==u||e[10]!==r?(N=r&&n.jsx(Se,{item:r,onClose:u}),e[9]=u,e[10]=r,e[11]=N):N=e[11];let w;e[12]!==u||e[13]!==i?(w=n.jsx(Se,{item:i,onClose:u}),e[12]=u,e[13]=i,e[14]=w):w=e[14];let _;e[15]!==k||e[16]!==N||e[17]!==w?(_=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[k,N,w]})}),e[15]=k,e[16]=N,e[17]=w,e[18]=_):_=e[18];let $;e[19]!==d||e[20]!==m||e[21]!==c?($=n.jsx(Nt,{themeOptions:c,preferences:d,setPreferences:m,isMobile:!0}),e[19]=d,e[20]=m,e[21]=c,e[22]=$):$=e[22];let C;return e[23]!==y||e[24]!==_||e[25]!==$?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,_,$]}),e[23]=y,e[24]=_,e[25]=$,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==a?(p=n.jsx(kt,{user:s,userImage:a,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=a,e[30]=p):p=e[30];let x;if(e[31]!==u||e[32]!==o){let y;e[34]!==u?(y=k=>n.jsx(Se,{item:k,onClose:u},k.key),e[34]=u,e[35]=y):y=e[35],x=o.map(y),e[31]=u,e[32]=o,e[33]=x}else x=e[33];let h;e[36]!==u||e[37]!==r?(h=r&&n.jsx(Se,{item:r,onClose:u}),e[36]=u,e[37]=r,e[38]=h):h=e[38];let b;e[39]!==u||e[40]!==i?(b=n.jsx(Se,{item:i,onClose:u}),e[39]=u,e[40]=i,e[41]=b):b=e[41];let g;e[42]!==x||e[43]!==h||e[44]!==b?(g=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[x,h,b]}),e[42]=x,e[43]=h,e[44]=b,e[45]=g):g=e[45];let j;e[46]!==d||e[47]!==m||e[48]!==c?(j=n.jsx(Nt,{themeOptions:c,preferences:d,setPreferences:m,isMobile:!1}),e[46]=d,e[47]=m,e[48]=c,e[49]=j):j=e[49];let v;return e[50]!==p||e[51]!==g||e[52]!==j?(v=n.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:n.jsxs("div",{className:"flex flex-col",children:[p,g,j]})}),e[50]=p,e[51]=g,e[52]=j,e[53]=v):v=e[53],v}function st(){const t=S.c(107),e=z(),{data:s}=ee.useSession(),{org:a}=B(),o=$e();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const l=js(i)?.params.org,[c,d]=zt(),m=it(),{isAdmin:u}=$n(),f=Cn(),[p,x]=T.useState(!1),[h,b]=T.useState(!1),g=s?.user,j=g?.image,v=!!s?.session?.impersonatedBy;let y;t[1]===Symbol.for("react.memo_cache_sentinel")?(y=()=>x(!1),t[1]=y):y=t[1];const k=y;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let w;t[4]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Ht,{size:16}),t[4]=w):w=t[4];let _;t[5]!==o||t[6]!==l?(_=()=>{o({to:"/$org/settings/profile",params:{org:l??""}})},t[5]=o,t[6]=l,t[7]=_):_=t[7];let $;t[8]!==N||t[9]!==_?($={key:"preferences",label:N,icon:w,onClick:_},t[8]=N,t[9]=_,t[10]=$):$=t[10];let C;t[11]!==a||t[12]!==o?(C=a?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(Wt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:a.slug}})}}]:[],t[11]=a,t[12]=o,t[13]=C):C=t[13];let I;t[14]!==f||t[15]!==e?(I=(Pn()||vt())&&!f?[{key:"install-desktop-app",label:vt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(an,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=I):I=t[16];let R;t[17]!==e?(R=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=R):R=t[18];let U;t[19]===Symbol.for("react.memo_cache_sentinel")?(U=n.jsx(ln,{size:16}),t[19]=U):U=t[19];let L;t[20]!==R?(L={key:"terms",label:R,icon:U,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=R,t[21]=L):L=t[21];let A;t[22]!==e?(A=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=A):A=t[23];let V;t[24]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(vs,{size:16}),t[24]=V):V=t[24];let E;t[25]!==A?(E={key:"privacy",label:A,icon:V,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=A,t[26]=E):E=t[26];let K;t[27]!==e?(K=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=K):K=t[28];let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(ys,{className:"w-4 h-4"}),t[29]=H):H=t[29];let G;t[30]!==K?(G={key:"github",label:K,icon:H,href:"https://github.com/decocms/studio",external:!0},t[30]=K,t[31]=G):G=t[31];let X;t[32]!==e?(X=e("common.accountPopover.community"),t[32]=e,t[33]=X):X=t[33];let se;t[34]===Symbol.for("react.memo_cache_sentinel")?(se=n.jsx(Ze,{size:16}),t[34]=se):se=t[34];let Y;t[35]!==X?(Y={key:"community",label:X,icon:se,href:"https://decocms.com/discord",external:!0},t[35]=X,t[36]=Y):Y=t[36];let Q;t[37]!==e?(Q=e("common.accountPopover.homepage"),t[37]=e,t[38]=Q):Q=t[38];let fe;t[39]===Symbol.for("react.memo_cache_sentinel")?(fe=n.jsx(yn,{size:16}),t[39]=fe):fe=t[39];let F;t[40]!==Q?(F={key:"homepage",label:Q,icon:fe,href:"https://decocms.com",external:!0},t[40]=Q,t[41]=F):F=t[41];let J;t[42]!==u||t[43]!==o||t[44]!==e?(J=u?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(rn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=u,t[43]=o,t[44]=e,t[45]=J):J=t[45];let ae;t[46]!==L||t[47]!==E||t[48]!==G||t[49]!==Y||t[50]!==F||t[51]!==J||t[52]!==$||t[53]!==C||t[54]!==I?(ae=[$,...C,...I,L,E,G,Y,F,...J],t[46]=L,t[47]=E,t[48]=G,t[49]=Y,t[50]=F,t[51]=J,t[52]=$,t[53]=C,t[54]=I,t[55]=ae):ae=t[55];const Ne=ae;let Z;t[56]!==e?(Z=e("common.accountPopover.signOut"),t[56]=e,t[57]=Z):Z=t[57];let ne;t[58]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(tt,{size:16}),t[58]=ne):ne=t[58];let P;t[59]!==Z?(P={key:"logout",label:Z,icon:ne,onClick:Oo},t[59]=Z,t[60]=P):P=t[60];const M=P;let Pe;t[61]!==v||t[62]!==e?(Pe=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(tt,{size:16}),onClick:async()=>{const{error:bt}=await ee.admin.stopImpersonating();if(bt){re.error(bt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[61]=v,t[62]=e,t[63]=Pe):Pe=t[63];const Qe=Pe;let Ie;t[64]===Symbol.for("react.memo_cache_sentinel")?(Ie=n.jsx(kn,{size:14}),t[64]=Ie):Ie=t[64];let pe;t[65]!==e?(pe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=pe):pe=t[66];let xe;t[67]!==pe?(xe={value:"light",icon:Ie,label:pe},t[67]=pe,t[68]=xe):xe=t[68];let ze;t[69]===Symbol.for("react.memo_cache_sentinel")?(ze=n.jsx(Nn,{size:14}),t[69]=ze):ze=t[69];let ge;t[70]!==e?(ge=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=ge):ge=t[71];let he;t[72]!==ge?(he={value:"dark",icon:ze,label:ge},t[72]=ge,t[73]=he):he=t[73];let Te;t[74]===Symbol.for("react.memo_cache_sentinel")?(Te=n.jsx(Ut,{size:14}),t[74]=Te):Te=t[74];let be;t[75]!==e?(be=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=be):be=t[76];let je;t[77]!==be?(je={value:"system",icon:Te,label:be},t[77]=be,t[78]=je):je=t[78];let Ae;t[79]!==xe||t[80]!==he||t[81]!==je?(Ae=[xe,he,je],t[79]=xe,t[80]=he,t[81]=je,t[82]=Ae):Ae=t[82];const Je=Ae;let Oe;t[83]!==v||t[84]!==m||t[85]!==Ne||t[86]!==c||t[87]!==d||t[88]!==M||t[89]!==Qe||t[90]!==Je||t[91]!==g||t[92]!==j?(Oe={user:g,userImage:j,menuItems:Ne,signOutItem:M,stopImpersonatingItem:Qe,isImpersonating:v,themeOptions:Je,preferences:c,setPreferences:d,close:k,isMobile:m},t[83]=v,t[84]=m,t[85]=Ne,t[86]=c,t[87]=d,t[88]=M,t[89]=Qe,t[90]=Je,t[91]=g,t[92]=j,t[93]=Oe):Oe=t[93];const Re=Oe;let ve;t[94]!==v||t[95]!==m||t[96]!==p||t[97]!==Re||t[98]!==e||t[99]!==g?.name||t[100]!==j?(ve=m?n.jsxs(Et,{open:p,onOpenChange:x,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>x(!0),className:O("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",v&&"border-2 border-dashed border-warning"),children:[n.jsx(qe,{url:j,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Ft,{className:"h-[80dvh] p-0",children:[n.jsx(qt,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(wt,{...Re})]})]}):n.jsxs(lt,{open:p,onOpenChange:x,children:[n.jsx(Ge,{asChild:!0,children:n.jsxs(le,{"data-tour":te.account,tooltip:g?.name??e("common.accountPopover.defaultAccountLabel"),className:O(v&&"border-2 border-dashed border-warning"),children:[n.jsx(gt,{children:n.jsx(qe,{url:j,fallback:g?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:g?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(ct,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ao,children:n.jsx(wt,{...Re})})]}),t[94]=v,t[95]=m,t[96]=p,t[97]=Re,t[98]=e,t[99]=g?.name,t[100]=j,t[101]=ve):ve=t[101];let ye;t[102]!==h?(ye=n.jsx(In,{open:h,onOpenChange:b}),t[102]=h,t[103]=ye):ye=t[103];let De;return t[104]!==ve||t[105]!==ye?(De=n.jsxs(n.Fragment,{children:[ve,ye]}),t[104]=ve,t[105]=ye,t[106]=De):De=t[106],De}function Ao(t){return t.preventDefault()}function Oo(){W("signed_out",{source:"account_popover"}),Tt(),ee.signOut()}class Ro extends T.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Do(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Mo(){const t=S.c(17),e=$e(),{org:s}=B(),{hasDecoKey:a,balanceDollars:o}=An();if(!a)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let r;t[2]!==o?(r=O(o!=null&&Do(o)),t[2]=o,t[3]=r):r=t[3];let l;t[4]!==e||t[5]!==s.slug?(l=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[4]=e,t[5]=s.slug,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(un,{}),t[7]=c):c=t[7];let d;t[8]!==o?(d=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=d):d=t[9];let m;t[10]!==d?(m=n.jsx("span",{children:d}),t[10]=d,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==r||t[14]!==l||t[15]!==m?(u=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:i,className:r,onClick:l,children:[c,m]})})}),t[12]=i,t[13]=r,t[14]=l,t[15]=m,t[16]=u):u=t[16],u}const Lo={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},Eo={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Fo(){const t=S.c(40),e=z(),s=ie(),a=$e(),{org:o}=B(),{data:i}=Gt();if(!i?.usage||!i.features.chat)return null;let r,l;if(t[0]!==i.usage.percent?(r=Math.round(i.usage.percent*100),l=Number.isFinite(r),t[0]=i.usage.percent,t[1]=r,t[2]=l):(r=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,r)),d=i.plan.name;let m;t[3]!==e?(m=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=m):m=t[4];const u=`${d} · ${m} ${c}%`;let f;t[5]!==a||t[6]!==o.slug?(f=()=>a({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=a,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let x;t[8]!==p?(x=O(p),t[8]=p,t[9]=x):x=t[9];let h;t[10]!==i.plan.id||t[11]!==i.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Bo,{percent:c,state:i.usage.state}):n.jsx(qo,{planId:i.plan.id}),t[10]=i.plan.id,t[11]=i.usage.state,t[12]=s,t[13]=c,t[14]=h):h=t[14];let b;t[15]!==x||t[16]!==h?(b=n.jsx(gt,{className:x,children:h}),t[15]=x,t[16]=h,t[17]=b):b=t[17];let g;t[18]!==i.plan.name?(g=n.jsx("span",{className:"truncate font-medium",children:i.plan.name}),t[18]=i.plan.name,t[19]=g):g=t[19];let j;t[20]!==c?(j=n.jsxs("span",{className:"tabular-nums text-xs text-muted-foreground",children:[c,"%"]}),t[20]=c,t[21]=j):j=t[21];let v;t[22]!==j||t[23]!==g?(v=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[g,j]}),t[22]=j,t[23]=g,t[24]=v):v=t[24];const y=Eo[i.usage.state];let k;t[25]!==y?(k=O("block h-full rounded-full",y),t[25]=y,t[26]=k):k=t[26];const N=`${c}%`;let w;t[27]!==N?(w={width:N},t[27]=N,t[28]=w):w=t[28];let _;t[29]!==k||t[30]!==w?(_=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:w})}),t[29]=k,t[30]=w,t[31]=_):_=t[31];let $;t[32]!==v||t[33]!==_?($=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[v,_]}),t[32]=v,t[33]=_,t[34]=$):$=t[34];let C;return t[35]!==$||t[36]!==u||t[37]!==f||t[38]!==b?(C=n.jsx(q,{children:n.jsx(oe,{children:n.jsxs(le,{tooltip:u,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,$]})})}),t[35]=$,t[36]=u,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function qo(t){const e=S.c(6),{planId:s}=t,{data:a}=Rn();let o;e[0]!==s||e[1]!==a?(o=a?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=a,e[2]=o):o=e[2];const i=o;if(i<0){let l;return e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Bt,{className:Ke}),e[3]=l):l=e[3],l}let r;return e[4]!==i?(r=n.jsx(Dn,{index:i,className:Ke}),e[4]=i,e[5]=r):r=e[5],r}function Bo(t){const e=S.c(5),{percent:s,state:a}=t,o=2*Math.PI*8;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=O("-rotate-90",Ke),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=r):r=e[1];const l=Lo[a],c=`${o*s/100} ${o}`;let d;return e[2]!==l||e[3]!==c?(d=n.jsxs("svg",{viewBox:"0 0 20 20",className:i,"aria-hidden":"true",children:[r,n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",strokeLinecap:"round",className:l,strokeDasharray:c})]}),e[2]=l,e[3]=c,e[4]=d):d=e[4],d}function Vo(){return On()?n.jsx(Fo,{}):n.jsx(Mo,{})}function _t(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ro,{children:n.jsx(T.Suspense,{fallback:null,children:n.jsx(Vo,{})})}),t[0]=e):e=t[0],e}const Ko=6e4;function Wo(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function Uo(t,e){if(!t)return t;const s=e?new Set(e):null;let a=0;const o=t.pages.map(r=>{const l=r.notifications.filter(c=>s&&!s.has(c.id)?!0:(a++,!1));return{...r,notifications:l}}),i=s?Math.max(0,(t.pages[0]?.unreadCount??0)-a):0;return{...t,pages:o.map(r=>({...r,unreadCount:i}))}}function Ho(t,e){const s=S.c(4),{data:a}=ee.useSession(),o=a?.user?.id;let i;s[0]!==e||s[1]!==t||s[2]!==o?(i=r=>!t||!o?Jo:Fn.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),r()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=i):i=s[3],T.useSyncExternalStore(i,Qo,Go)}function Go(){return 0}function Qo(){return 0}function Jo(){}function ts(){const t=S.c(37),{locator:e,org:s}=B(),a=At(),o=Ot();let i;t[0]!==e?(i=Fe.notifications(e),t[0]=e,t[1]=i):i=t[1];const r=i;let l;t[2]!==a?(l=_=>{const{pageParam:$}=_;return Wo(a,$)},t[2]=a,t[3]=l):l=t[3];let c;t[4]!==r||t[5]!==l?(c={queryKey:r,queryFn:l,initialPageParam:void 0,getNextPageParam:Zo,refetchInterval:Ko},t[4]=r,t[5]=l,t[6]=c):c=t[6];const d=En(c);let m;t[7]!==o||t[8]!==r?(m=()=>o.invalidateQueries({queryKey:r,refetchType:"active"}),t[7]=o,t[8]=r,t[9]=m):m=t[9],Ho(s.slug,m);let u;t[10]!==a?(u=_=>a.call("NOTIFICATION_MARK_READ",_?{ids:_}:{}),t[10]=a,t[11]=u):u=t[11];let f,p;t[12]!==o||t[13]!==r?(f=async _=>{await o.cancelQueries({queryKey:r}),o.setQueryData(r,$=>Uo($,_))},p=()=>o.invalidateQueries({queryKey:r}),t[12]=o,t[13]=r,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let x;t[16]!==u||t[17]!==f||t[18]!==p?(x={mutationFn:u,onMutate:f,onSettled:p},t[16]=u,t[17]=f,t[18]=p,t[19]=x):x=t[19];const h=Ss(x);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const g=b;let j;t[22]!==g?(j=g.flatMap(Xo),t[22]=g,t[23]=j):j=t[23];const v=g[0]?.unreadCount??0;let y;t[24]!==d?(y=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=y):y=t[25];let k,N;t[26]!==h?(k=()=>h.mutate(null),N=_=>h.mutate([_]),t[26]=h,t[27]=k,t[28]=N):(k=t[27],N=t[28]);let w;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==v||t[32]!==y||t[33]!==k||t[34]!==N||t[35]!==j?(w={updates:j,redDotCount:v,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:y,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=v,t[32]=y,t[33]=k,t[34]=N,t[35]=j,t[36]=w):w=t[36],w}function Xo(t){return t.notifications.map(Yo)}function Yo(t){return{id:t.id,taskBoardItemId:t.taskBoardItemId,taskTitle:t.taskTitle,taskKeySeq:t.taskKeySeq,action:t.type,actorName:t.actorName,actorImage:t.actorImage,occurredAt:t.createdAt}}function Zo(t){return t.nextCursor??void 0}function ei(t){switch(t){case"mentioned":case"review_requested":return"font-medium text-foreground";case"merge_failed":case"review_changes_requested":return"font-medium text-destructive";case"review_approved":return"font-medium text-success";default:return""}}function ti(t,e){switch(t.action){case"commented":return e("sidebar.inbox.actionCommented");case"mentioned":return e("sidebar.inbox.actionMentioned");case"created":return e("sidebar.inbox.actionCreated");case"status_changed":return e("sidebar.inbox.actionStatusChanged");case"assignee_changed":return e("sidebar.inbox.actionAssigneeChanged");case"review_requested":return e("sidebar.inbox.actionReviewRequested");case"review_approved":return e("sidebar.inbox.actionReviewApproved");case"review_changes_requested":return e("sidebar.inbox.actionReviewChangesRequested");case"merge_failed":return e("sidebar.inbox.actionMergeFailed");default:{const s=t.action;return String(s)}}}function si(t){const e=S.c(36),{update:s,orgSlug:a,onSelect:o}=t,i=z();let r;e[0]!==a||e[1]!==s.taskKeySeq?(r=Qt(a,s.taskKeySeq),e[0]=a,e[1]=s.taskKeySeq,e[2]=r):r=e[2];const l=r,c=!s.actorName;let d;e[3]!==c||e[4]!==s.actorImage||e[5]!==s.actorName?(d=n.jsx("span",{className:"mt-0.5 shrink-0",children:c?n.jsx(qn,{size:24}):n.jsx(qe,{url:s.actorImage??void 0,fallback:Gn(s.actorName??void 0),shape:"circle",size:"xs"})}),e[3]=c,e[4]=s.actorImage,e[5]=s.actorName,e[6]=d):d=e[6];let m;e[7]!==s.taskTitle?(m=n.jsx("p",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:s.taskTitle}),e[7]=s.taskTitle,e[8]=m):m=e[8];let u;e[9]!==s.occurredAt?(u=Qn(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=u):u=e[10];let f;e[11]!==u?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:u}),e[11]=u,e[12]=f):f=e[12];let p;e[13]!==m||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[m,f]}),e[13]=m,e[14]=f,e[15]=p):p=e[15];let x;e[16]!==l?(x=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=x):x=e[17];let h;e[18]!==s.action?(h=O(ei(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==i||e[21]!==s?(b=ti(s,i),e[20]=i,e[21]=s,e[22]=b):b=e[22];let g;e[23]!==h||e[24]!==b?(g=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=g):g=e[25];let j;e[26]!==g||e[27]!==x?(j=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[x,g]}),e[26]=g,e[27]=x,e[28]=j):j=e[28];let v;e[29]!==j||e[30]!==p?(v=n.jsxs("div",{className:"min-w-0 flex-1",children:[p,j]}),e[29]=j,e[30]=p,e[31]=v):v=e[31];let y;return e[32]!==o||e[33]!==v||e[34]!==d?(y=n.jsxs("button",{type:"button",onClick:o,className:"flex w-full items-start gap-3 border-b border-border px-4 py-3 text-left transition-colors last:border-0 hover:bg-muted/25",children:[d,v]}),e[32]=o,e[33]=v,e[34]=d,e[35]=y):y=e[35],y}function ni(t){const e=S.c(2),{onReach:s}=t;let a;return e[0]!==s?(a=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const i=new IntersectionObserver(r=>{r.some(oi)&&s()});return i.observe(o),()=>i.disconnect()}}),e[0]=s,e[1]=a):a=e[1],a}function oi(t){return t.isIntersecting}function ii(t){const e=S.c(23),{onClose:s}=t,a=z(),o=$e(),{org:i}=B(),{updates:r,markAllRead:l,markRead:c,hasMore:d,fetchMore:m}=ts();let u;e[0]!==a?(u=a("sidebar.inbox.title"),e[0]=a,e[1]=u):u=e[1];let f;e[2]!==u?(f=n.jsx("h3",{className:"text-sm font-medium",children:u}),e[2]=u,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==a||e[6]!==r.length?(p=r.length>0&&n.jsx(Ee,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:a("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=a,e[6]=r.length,e[7]=p):p=e[7];let x;e[8]!==f||e[9]!==p?(x=n.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-border px-4 py-3",children:[f,p]}),e[8]=f,e[9]=p,e[10]=x):x=e[10];let h;e[11]!==m||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==i||e[17]!==a||e[18]!==r?(h=r.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 py-10 text-center",children:[n.jsx(ft,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:a("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:a("sidebar.inbox.emptyBody")})]}):n.jsxs(Ln,{className:"min-h-0 flex-1",children:[r.map(g=>{const j=Qt(i.slug,g.taskKeySeq);return n.jsx(si,{update:g,orgSlug:i.slug,onSelect:()=>{c(g.id),s(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:i.slug,taskKey:j}})}},g.id)}),d&&n.jsx(ni,{onReach:m})]}),e[11]=m,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=i,e[17]=a,e[18]=r,e[19]=h):h=e[19];let b;return e[20]!==x||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[x,h]}),e[20]=x,e[21]=h,e[22]=b):b=e[22],b}function ss(){const t=S.c(1),{redDotCount:e}=ts();if(e===0)return null;let s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("span",{className:"pointer-events-none absolute top-1 right-1 size-2 rounded-full bg-destructive"}),t[0]=s):s=t[0],s}function ns(t){const e=S.c(10),{open:s,onOpenChange:a,children:o}=t;let i;e[0]!==a||e[1]!==s?(i=s&&n.jsx(ii,{onClose:()=>a(!1)}),e[0]=a,e[1]=s,e[2]=i):i=e[2];let r;e[3]!==i?(r=n.jsx(ct,{side:"right",align:"end",sideOffset:12,collisionPadding:16,className:"flex max-h-[min(650px,calc(100dvh-4rem))] w-[min(400px,calc(100vw-2rem))] flex-col p-0",children:i}),e[3]=i,e[4]=r):r=e[4];let l;return e[5]!==o||e[6]!==a||e[7]!==s||e[8]!==r?(l=n.jsxs(lt,{open:s,onOpenChange:a,children:[o,r]}),e[5]=o,e[6]=a,e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function os(){const t=S.c(9),e=z(),[s,a]=T.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let i,r;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(ft,{size:15}),r=n.jsx(ss,{}),t[2]=i,t[3]=r):(i=t[2],r=t[3]);let l;t[4]!==o?(l=n.jsx(Ge,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center classic:rounded-md compact:rounded-lg text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[i,r]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(ns,{open:s,onOpenChange:a,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function ai(){const t=S.c(15),e=z(),[s,a]=T.useState(!1),o=ie();let i;t[0]!==o||t[1]!==e?(i=o?e("sidebar.inbox.title"):void 0,t[0]=o,t[1]=e,t[2]=i):i=t[2];let r,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(ft,{}),l=n.jsx(ss,{}),t[3]=r,t[4]=l):(r=t[3],l=t[4]);let c;t[5]!==e?(c=e("sidebar.inbox.title"),t[5]=e,t[6]=c):c=t[6];let d;t[7]!==c?(d=n.jsx("span",{className:"truncate",children:c}),t[7]=c,t[8]=d):d=t[8];let m;t[9]!==i||t[10]!==d?(m=n.jsx(Ge,{asChild:!0,children:n.jsxs(le,{tooltip:i,className:"relative",children:[r,l,d]})}),t[9]=i,t[10]=d,t[11]=m):m=t[11];let u;return t[12]!==s||t[13]!==m?(u=n.jsx(ns,{open:s,onOpenChange:a,children:m}),t[12]=s,t[13]=m,t[14]=u):u=t[14],u}function $t(){const t=S.c(10),e=z();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(gt,{children:n.jsx(mn,{className:Ke})}),t[2]=a):a=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=n.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let r;return t[7]!==s||t[8]!==i?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsx(zn,{trigger:n.jsxs(le,{tooltip:s,children:[a,i]})})})}),t[7]=s,t[8]=i,t[9]=r):r=t[9],r}function ri(){const t=S.c(13),e=ie(),a=!Mn();if(e){let c;t[0]!==a?(c=a&&n.jsx(_t,{}),t[0]=a,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx($t,{}),t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(oe,{children:n.jsx(ai,{})}),t[3]=m):m=t[3];let u;t[4]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(q,{children:[m,n.jsx(oe,{children:n.jsx(st,{})})]}),t[4]=u):u=t[4];let f;return t[5]!==c?(f=n.jsxs(et,{className:"px-2 pb-3 gap-1",children:[c,d,u]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==a?(o=a&&n.jsx(_t,{}),t[7]=a,t[8]=o):o=t[8];let i;t[9]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx($t,{}),t[9]=i):i=t[9];let r;t[10]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(q,{className:"gap-0.5",children:n.jsx(oe,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(st,{})}),n.jsx(os,{})]})})}),t[10]=r):r=t[10];let l;return t[11]!==o?(l=n.jsxs(et,{className:"px-2 pb-3 gap-0.5",children:[o,i,r]}),t[11]=o,t[12]=l):l=t[12],l}function li(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(et,{className:"px-2 pb-3",children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(q,{children:n.jsx(oe,{children:n.jsx(st,{})})})}),n.jsx(os,{})]})}),t[0]=e):e=t[0],e}function ci(t){let e=0;for(let a=0;a<t.length;a++)e=t.charCodeAt(a)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ht(t){const e=S.c(13),{org:s,size:a}=t,o=a===void 0?"sm":a,i=o==="xs"?"size-5":"size-6",r=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==i?(l=O(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:ci(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let d;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:O("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=d):d=e[8];let m;return e[9]!==l||e[10]!==c||e[11]!==d?(m=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=m):m=e[12],m}function di({invitation:t,onChanged:e}){const s=z(),[a,o]=T.useState(!1),i=t.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{o(!0);try{const d=await ee.organization.acceptInvitation({invitationId:t.id});if(d.error){re.error(d.error.message),o(!1);return}}catch{re.error(s("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}re.success(s("header.orgSwitcher.joined",{name:i})),ks();let c;try{c=(await ee.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await ee.organization.rejectInvitation({invitationId:t.id});if(c.error){re.error(c.error.message),o(!1);return}re.success(s("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{re.error(s("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[n.jsx(ht,{org:{name:i},size:"sm"}),n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"truncate text-sm font-medium",children:i}),n.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),n.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[n.jsx(Ee,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:a,children:s("header.orgSwitcher.accept")}),n.jsx(Ee,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:a,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:n.jsx(eo,{size:14})})]})]})}function is(){const t=T.useContext(Ns),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function ui(t){const e=S.c(13),s=t.trim(),{data:a}=ee.useSession(),o=a?.user?.id??"",i=s.length>0&&!!o,r=Fe.projectSearch(o,s);let l;e[0]!==s?(l=async g=>{const{signal:j}=g,v=await fetch(`/api/_me/projects/search?q=${encodeURIComponent(s)}`,{signal:j});if(!v.ok)throw new Error(`Project search failed: ${v.status}`);return await v.json()},e[0]=s,e[1]=l):l=e[1];let c;e[2]!==i||e[3]!==r||e[4]!==l?(c={queryKey:r,queryFn:l,enabled:i,placeholderData:ws,staleTime:3e4,retry:!1},e[2]=i,e[3]=r,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:m,isPlaceholderData:u,isError:f}=nt(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const x=i&&m,h=i&&u;let b;return e[8]!==f||e[9]!==p||e[10]!==x||e[11]!==h?(b={hits:p,isSearching:x,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=x,e[11]=h,e[12]=b):b=e[12],b}function Ct(t){const e=S.c(15),{id:s,label:a,createLabel:o,onCreate:i}=t;let r;e[0]!==s||e[1]!==a?(r=n.jsx("span",{id:s,className:"truncate",children:a}),e[0]=s,e[1]=a,e[2]=r):r=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Jt,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==i?(c=n.jsx(dt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer classic:rounded-md compact:rounded-lg p-1 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",onClick:i,children:l})}),e[4]=o,e[5]=i,e[6]=c):c=e[6];let d;e[7]!==o?(d=n.jsx(ut,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let m;e[9]!==c||e[10]!==d?(m=n.jsxs(mt,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=m):m=e[11];let u;return e[12]!==r||e[13]!==m?(u=n.jsxs("div",{className:"flex w-full items-center justify-between gap-2 px-2 py-1.5 text-xs font-medium text-muted-foreground",children:[r,m]}),e[12]=r,e[13]=m,e[14]=u):u=e[14],u}const We="min-h-9 items-center",me={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function mi(t){const e=S.c(9),{active:s,rows:a}=t,o=z();let i,r,l;if(e[0]!==s||e[1]!==a||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=a.get(s);if(d?.kind!=="travel"){l=null;break e}i="border-t border-border px-3 py-2 text-xs text-warning",r=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=a,e[2]=o,e[3]=i,e[4]=r,e[5]=l}else i=e[3],r=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==i||e[7]!==r?(c=n.jsx("div",{className:i,children:r}),e[6]=i,e[7]=r,e[8]=c):c=e[8],c}function fi(t){const e=S.c(25),{onClose:s,onCreateOrg:a,className:o}=t,i=z(),r=T.useId(),l=T.useId(),c=$e(),{org:d}=B(),{scopeId:m,projects:u,setScope:f}=ke(),{hasMore:p}=so(),[x,h]=T.useState(""),[b,g]=T.useState(me.allProjects),j=T.useDeferredValue(x);let v;e[0]!==j?(v=j.trim(),e[0]=j,e[1]=v):v=e[1];const y=v,k=y.length>0,{data:N}=_s(),{invitations:w,refetch:_}=is();let $;e[2]!==d.slug?($=(P,M)=>P.slug===d.slug?-1:M.slug===d.slug?1:0,e[2]=d.slug,e[3]=$):$=e[3];const C=(N??[]).slice().sort($),{hits:I,isSearching:R,isStale:U,isError:L}=ui(k?y:""),A=k?C.filter(P=>{const M=y.toLowerCase();return P.name.toLowerCase().includes(M)||P.slug.toLowerCase().includes(M)}):[],V=_e();let E;e[4]!==V?(E=V.startsWith("/$org/settings"),e[4]=V,e[5]=E):E=e[5];const K=E,H=new Map;let G;e[6]!==K||e[7]!==s||e[8]!==f?(G=P=>{W("scope_set",{scoped:P!==null,fromSettings:K}),f(P),s()},e[6]=K,e[7]=s,e[8]=f,e[9]=G):G=e[9];const X=G;let se;e[10]!==c||e[11]!==s?(se=(P,M)=>{W("org_project_travel",{scoped:!!M}),c(M?{to:"/$org/projects/$agentId",params:{org:P,agentId:M}}:{to:"/$org/home",params:{org:P}}),s()},e[10]=c,e[11]=s,e[12]=se):se=e[12];const Y=se;let Q;e[13]!==c||e[14]!==s||e[15]!==d.slug?(Q=()=>{W("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=Q):Q=e[16];const fe=Q;H.set(me.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let F;e[17]!==i?(F=i("sidebar.picker.searchPlaceholder"),e[17]=i,e[18]=F):F=e[18];let J;e[19]!==x||e[20]!==F?(J=n.jsx(Yn,{value:x,onValueChange:h,placeholder:F}),e[19]=x,e[20]=F,e[21]=J):J=e[21];const ae=Jn,Ne="max-h-none min-h-0 flex-1",Z=k?n.jsxs(n.Fragment,{children:[L&&n.jsx(yt,{children:i("sidebar.picker.searchFailed")}),!L&&!R&&I.length===0&&A.length===0&&n.jsx(yt,{children:i("sidebar.picker.noMatches",{query:y})}),!L&&I.length>0&&n.jsx(Me,{heading:i("sidebar.picker.projectsHeading"),className:O(U&&"opacity-50"),children:I.map(P=>n.jsx(pi,{hit:P,currentOrgSlug:d.slug,scopeId:m,rows:H,onScope:X,onTravel:Y},`${P.orgSlug}:${P.id}`))}),A.length>0&&n.jsx(Me,{heading:i("sidebar.picker.orgsHeading"),children:A.map(P=>n.jsx(Pt,{candidate:P,currentOrgSlug:d.slug,rows:H,onTravel:Y,onClose:s},P.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx(Ct,{id:r,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:fe}),n.jsxs(Me,{"aria-labelledby":r,children:[n.jsxs(Ve,{value:me.allProjects,className:We,onSelect:()=>X(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),m===null&&n.jsx(Be,{size:14})]}),u.map(P=>{const M=me.project(P.id);return H.set(M,{kind:"scope",label:P.title}),n.jsxs(Ve,{value:M,className:We,onSelect:()=>X(P.id),children:[n.jsx(pt,{icon:P.icon,name:P.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.title}),m===P.id&&n.jsx(Be,{size:14})]},P.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),n.jsx(Ct,{id:l,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:a}),n.jsxs(Me,{"aria-labelledby":l,children:[w.map(P=>n.jsx(di,{invitation:P,onChanged:_},P.id)),C.map(P=>n.jsx(Pt,{candidate:P,currentOrgSlug:d.slug,rows:H,onTravel:Y,onClose:s},P.id))]})]});let ne;return e[22]!==ae||e[23]!==Z?(ne=n.jsx(ae,{className:Ne,children:Z}),e[22]=ae,e[23]=Z,e[24]=ne):ne=e[24],n.jsxs(Xn,{shouldFilter:!1,value:b,onValueChange:g,className:o,children:[J,ne,n.jsx(mi,{active:b,rows:H})]})}function Pt(t){const e=S.c(22),{candidate:s,currentOrgSlug:a,rows:o,onTravel:i,onClose:r}=t,l=s.slug===a;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=me.org(s.slug),o.set(c,{kind:l?"scope":"travel",label:s.name}),e[0]=s.name,e[1]=s.slug,e[2]=l,e[3]=o,e[4]=c):c=e[4];let d;e[5]!==s.slug||e[6]!==l||e[7]!==r||e[8]!==i?(d=()=>l?r():i(s.slug),e[5]=s.slug,e[6]=l,e[7]=r,e[8]=i,e[9]=d):d=e[9];let m;e[10]!==s?(m=n.jsx(ht,{org:s,size:"xs"}),e[10]=s,e[11]=m):m=e[11];let u;e[12]!==s.name?(u=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=u):u=e[13];let f;e[14]!==l?(f=l&&n.jsx(Be,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==m||e[18]!==u||e[19]!==f||e[20]!==c?(p=n.jsxs(Ve,{value:c,className:We,onSelect:d,children:[m,u,f]}),e[16]=d,e[17]=m,e[18]=u,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function pi(t){const e=S.c(30),{hit:s,currentOrgSlug:a,scopeId:o,rows:i,onScope:r,onTravel:l}=t,c=s.orgSlug===a;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==i?(d=c?me.project(s.id):me.foreignProject(s.orgSlug,s.id),i.set(d,{kind:c?"scope":"travel",label:s.title}),e[0]=s.id,e[1]=s.orgSlug,e[2]=s.title,e[3]=c,e[4]=i,e[5]=d):d=e[5];let m;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==r||e[10]!==l?(m=()=>c?r(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=r,e[10]=l,e[11]=m):m=e[11];let u;e[12]!==s.icon||e[13]!==s.title?(u=n.jsx(pt,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=u):u=e[14];let f;e[15]!==s.title?(f=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.title}),e[15]=s.title,e[16]=f):f=e[16];let p;e[17]!==s.orgName?(p=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:s.orgName}),e[17]=s.orgName,e[18]=p):p=e[18];let x;e[19]!==s.id||e[20]!==c||e[21]!==o?(x=c&&o===s.id&&n.jsx(Be,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=x):x=e[22];let h;return e[23]!==m||e[24]!==u||e[25]!==f||e[26]!==p||e[27]!==x||e[28]!==d?(h=n.jsxs(Ve,{value:d,className:We,onSelect:m,children:[u,f,p,x]}),e[23]=m,e[24]=u,e[25]=f,e[26]=p,e[27]=x,e[28]=d,e[29]=h):h=e[29],h}function as(t){const e=S.c(32),{collapsed:s,onNavigate:a}=t,o=s===void 0?!1:s,i=z(),{org:r}=B(),{project:l}=ke(),{invitations:c}=is(),[d,m]=T.useState(!1),[u,f]=T.useState(!1),p=it();let x;if(e[0]!==o||e[1]!==c.length||e[2]!==r||e[3]!==l||e[4]!==i){const _=l?i("sidebar.picker.projectInOrg",{project:l.title,org:r.name}):r.name;let $;e[6]!==r||e[7]!==l?($=l?n.jsx(fn,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(ht,{org:r,size:"sm"}),e[6]=r,e[7]=l,e[8]=$):$=e[8];let C;e[9]!==c.length?(C=c.length>0&&n.jsx("span",{className:"absolute -right-1 -top-1 size-2.5 rounded-full bg-destructive ring-2 ring-background"}),e[9]=c.length,e[10]=C):C=e[10];let I;e[11]!==$||e[12]!==C?(I=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[$,C]}),e[11]=$,e[12]=C,e[13]=I):I=e[13];const R=I;x=o?n.jsx(le,{tooltip:_,"data-tour":te.switcher,children:R}):n.jsxs("button",{type:"button","data-tour":te.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:_}),className:O("flex min-w-0 flex-1 items-center gap-2 rounded-lg py-1.5 pl-1 pr-1.5 text-left md:h-[34px] md:py-0","[transition:background-color_180ms_ease] hover:bg-sidebar-accent",Ys),children:[R,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:r.name}),n.jsx(wn,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=r,e[3]=l,e[4]=i,e[5]=x}else x=e[5];const h=x,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let g;e[14]!==a?(g=()=>{m(!1),a?.()},e[14]=a,e[15]=g):g=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{m(!1),f(!0)},e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==g?(v=n.jsx(fi,{onClose:g,onCreateOrg:j,className:b}),e[17]=b,e[18]=g,e[19]=v):v=e[19];const y=v;let k;e[20]!==o||e[21]!==y||e[22]!==p||e[23]!==d||e[24]!==i||e[25]!==h?(k=p?n.jsxs(Et,{open:d,onOpenChange:m,direction:"bottom",children:[n.jsx(sn,{asChild:!0,children:h}),n.jsxs(Ft,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(qt,{className:"sr-only",children:i("sidebar.picker.title")}),y]})]}):n.jsxs(lt,{open:d,onOpenChange:m,children:[n.jsx(Ge,{asChild:!0,children:h}),n.jsx(ct,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:y})]}),e[20]=o,e[21]=y,e[22]=p,e[23]=d,e[24]=i,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==u?(N=n.jsx(Zn,{open:u,onOpenChange:f}),e[27]=u,e[28]=N):N=e[28];let w;return e[29]!==k||e[30]!==N?(w=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=w):w=e[31],w}const rs=16;function xi(){const t=S.c(11),e=de(),s=Ue(),a=ie();let o;t[0]!==a?(o=n.jsx(as,{collapsed:a}),t[0]=a,t[1]=o):o=t[1];let i;t[2]!==e||t[3]!==s?(i=(e||!s)&&n.jsx(hi,{}),t[2]=e,t[3]=s,t[4]=i):i=t[4];let r;t[5]!==e?(r=e&&n.jsx(Dt,{}),t[5]=e,t[6]=r):r=t[6];let l;return t[7]!==o||t[8]!==i||t[9]!==r?(l=n.jsxs(n.Fragment,{children:[o,i,r]}),t[7]=o,t[8]=i,t[9]=r,t[10]=l):l=t[10],l}function gi(t){const e=S.c(15),{onClose:s}=t,a=de(),o=z();let i;e[0]!==s?(i=n.jsx(as,{onNavigate:s}),e[0]=s,e[1]=i):i=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[2]=r):r=e[2];let l;e[3]!==a?(l=a&&n.jsx(Dt,{}),e[3]=a,e[4]=l):l=e[4];let c;e[5]!==o?(c=o("sidebar.header.closeSidebar"),e[5]=o,e[6]=c):c=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(at,{size:rs}),e[7]=d):d=e[7];let m;e[8]!==s||e[9]!==c?(m=n.jsx(rt,{onClick:s,"aria-label":c,children:d}),e[8]=s,e[9]=c,e[10]=m):m=e[10];let u;return e[11]!==i||e[12]!==l||e[13]!==m?(u=n.jsxs(n.Fragment,{children:[i,r,l,m]}),e[11]=i,e[12]=l,e[13]=m,e[14]=u):u=e[14],u}function hi(){const t=S.c(13),e=de(),s=z(),a=ie(),{toggleSidebar:o}=Ce(),i=e?a?"page.expandSidebar":"page.collapseSidebar":"sidebar.header.toggleSidebar";let r;t[0]!==s||t[1]!==i?(r=s(i),t[0]=s,t[1]=i,t[2]=r):r=t[2];const l=r;let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx(at,{size:rs}),t[3]=c):c=t[3];let d;t[4]!==l||t[5]!==o?(d=n.jsx(dt,{asChild:!0,children:n.jsx(rt,{"aria-label":l,onClick:o,className:"shrink-0 classic:rounded-lg classic:md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto compact:size-7 compact:group-data-[state=collapsed]/sidebar:size-8",children:c})}),t[4]=l,t[5]=o,t[6]=d):d=t[6];const m=!a;let u;t[7]!==l||t[8]!==m?(u=n.jsx(ut,{side:"right",hidden:m,children:l}),t[7]=l,t[8]=m,t[9]=u):u=t[9];let f;return t[10]!==d||t[11]!==u?(f=n.jsxs(mt,{children:[d,u]}),t[10]=d,t[11]=u,t[12]=f):f=t[12],f}function ce(t){const e=S.c(33),{icon:s,label:a,isActive:o,link:i,onSelect:r,ariaLabel:l,className:c,dataTour:d,children:m,trailing:u}=t,f=o===void 0?!1:o,p=ie(),x=l??a,h=p?x:void 0;let b;e[0]!==c||e[1]!==d||e[2]!==f||e[3]!==h?(b={isActive:f,tooltip:h,className:c,"data-tour":d},e[0]=c,e[1]=d,e[2]=f,e[3]=h,e[4]=b):b=e[4];const g=b;let j;e[5]!==u?(j=u&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:u}),e[5]=u,e[6]=j):j=e[6];let v;e[7]!==a?(v=n.jsx("span",{className:"truncate",children:a}),e[7]=a,e[8]=v):v=e[8];let y;e[9]!==s||e[10]!==j||e[11]!==v?(y=n.jsxs(n.Fragment,{children:[s,j,v]}),e[9]=s,e[10]=j,e[11]=v,e[12]=y):y=e[12];const k=y;if(i){const _=f?"page":void 0;let $;e[13]!==k||e[14]!==i||e[15]!==x||e[16]!==r||e[17]!==_?($=n.jsx(Rt,{...i,"aria-label":x,"aria-current":_,onClick:r,children:k}),e[13]=k,e[14]=i,e[15]=x,e[16]=r,e[17]=_,e[18]=$):$=e[18];let C;e[19]!==g||e[20]!==$?(C=n.jsx(le,{asChild:!0,...g,children:$}),e[19]=g,e[20]=$,e[21]=C):C=e[21];let I;return e[22]!==m||e[23]!==C?(I=n.jsxs(oe,{children:[C,m]}),e[22]=m,e[23]=C,e[24]=I):I=e[24],I}let N;e[25]!==k||e[26]!==x||e[27]!==r||e[28]!==g?(N=n.jsx(le,{...g,"aria-label":x,onClick:r,children:k}),e[25]=k,e[26]=x,e[27]=r,e[28]=g,e[29]=N):N=e[29];let w;return e[30]!==m||e[31]!==N?(w=n.jsxs(oe,{children:[N,m]}),e[30]=m,e[31]=N,e[32]=w):w=e[32],w}function ls(t){const e=S.c(5),{label:s,link:a,onSelect:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(no,{size:16}),e[0]=i):i=e[0];let r;return e[1]!==s||e[2]!==a||e[3]!==o?(r=n.jsx("div",{className:"classic:-mx-2 classic:border-b classic:border-sidebar-border classic:px-2 classic:py-2 compact:contents",children:n.jsx(q,{className:"shrink-0",children:n.jsx(ce,{icon:i,label:s,className:"text-sidebar-foreground/70",link:a,onSelect:o})})}),e[1]=s,e[2]=a,e[3]=o,e[4]=r):r=e[4],r}function bi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Mt(t)?"cms":null}function cs(){const t=S.c(2),{data:e}=Gt();let s;return t[0]!==e?(s=a=>{const o=bi(a);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const ji="settings",vi=["overview","reports","board","files","threadAnalytics"];function yi(t,e){return!t||!e?!1:!Lt(e.metadata)}function Si(t,e,s,a){if(!t||!e)return!0;const o=a!==void 0;return io(o?a:Xt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function ki(){const t=S.c(17),e=z(),{org:s}=B(),a=_e(),o=He(),{project:i,repo:r}=ke(),l=Yt(i?.id),c=oo().data?.isAdmin===!0;let d;t[0]!==i||t[1]!==o?(d=yi(o,i),t[0]=i,t[1]=o,t[2]=d):d=t[2];const m=d;let u;t[3]!==l||t[4]!==i||t[5]!==o?(u=x=>Si(o,i,x,l),t[3]=l,t[4]=i,t[5]=o,t[6]=u):u=t[6];const f=u;let p;if(t[7]!==f||t[8]!==c||t[9]!==m||t[10]!==a||t[11]!==s||t[12]!==i?.id||t[13]!==r||t[14]!==o||t[15]!==e){const x={overview:m||!f("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(xn,{size:16}),isActive:a===D.home||a===D.orgIndex||a===ue.root||a===`${ue.root}/`,trackAs:"overview",link:o?{to:ue.root,params:{org:s.slug,agentId:o}}:{to:D.home,params:{org:s.slug}}},reports:Le(D.reports,o)&&!m&&f("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Kt,{size:16}),isActive:a===D.reports||a===ue.reports,trackAs:"reports",link:o?{to:ue.reports,params:{org:s.slug,agentId:o}}:{to:D.reports,params:{org:s.slug}}}:null,board:m||!f("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Vt,{size:16}),isActive:a===D.tasks||a===ue.tasks,trackAs:"board",dataTour:te.tasks,link:{to:o?ue.tasks:D.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:h=>{const b=r??i?.id;return b?{...h,repo:b}:h}}},files:Le(D.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(Sn,{size:16}),isActive:a===D.library,trackAs:"files",link:{to:D.library,params:{org:s.slug}}}:null,threadAnalytics:c&&Le(D.threadAnalytics,o)?{key:"threadAnalytics",label:e("sidebar.navDestinations.threadAnalytics"),icon:n.jsx(pn,{size:16}),isActive:a===D.threadAnalytics,trackAs:"thread_analytics",link:{to:D.threadAnalytics,params:{org:s.slug}}}:null};p=vi.map(h=>x[h]).filter(Ni),t[7]=f,t[8]=c,t[9]=m,t[10]=a,t[11]=s,t[12]=i?.id,t[13]=r,t[14]=o,t[15]=e,t[16]=p}else p=t[16];return p}function Ni(t){return t!==null}function wi(t){const e=S.c(9),{onNavigate:s}=t,a=ki(),o=cs();let i;if(e[0]!==a||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ce,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(ot,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{W("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],i=a.map(l),e[0]=a,e[1]=o,e[2]=s,e[3]=i}else i=e[3];let r;return e[7]!==i?(r=n.jsx(q,{className:"gap-1",children:i}),e[7]=i,e[8]=r):r=e[8],r}function _i(t){const e=S.c(18),{onNavigate:s}=t,a=z(),{org:o}=B(),i=He(),r=xt(),l=_e(),c=$s();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(D.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const m=d;let u;e[3]!==a?(u=a("sidebar.navDestinations.settings"),e[3]=a,e[4]=u):u=e[4];const f=u;let p;e[5]!==o||e[6]!==i?(p=i?void 0:{to:"/$org/settings",params:{org:o.slug}},e[5]=o,e[6]=i,e[7]=p):p=e[7];const x=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Ht,{size:16}),e[8]=h):h=e[8];let b;e[9]!==r||e[10]!==s||e[11]!==i?(b=()=>{W("nav_destination_clicked",{destination:ji,target:i?"project":"org"}),i&&r(i,{panel:"settings"}),s?.()},e[9]=r,e[10]=s,e[11]=i,e[12]=b):b=e[12];let g;return e[13]!==m||e[14]!==f||e[15]!==x||e[16]!==b?(g=n.jsx(q,{className:"gap-1",children:n.jsx(ce,{dataTour:te.settings,icon:h,label:f,isActive:m,link:x,onSelect:b})}),e[13]=m,e[14]=f,e[15]=x,e[16]=b,e[17]=g):g=e[17],g}function $i(t,e){const s=new Set(e);return s.size===0?t:t.filter(a=>s.has(a.connectionId))}function Ci(t){const e=t.metadata?.ui;return Array.isArray(e?.pinnedViews)?e.pinnedViews.filter(s=>!!s&&typeof s=="object"&&typeof s.connectionId=="string"&&typeof s.toolName=="string"):[]}function Pi(t){const e=S.c(13),{onNavigate:s}=t,a=z(),{project:o}=ke(),i=xt(),r=_e(),l=mo(),c=ao(o),d=cs(),m=Yt(o?.id);if(!o)return null;let u;if(e[0]!==c.presence||e[1]!==m||e[2]!==o.metadata){const x=Lt(o.metadata),h=m??Xt(o.metadata);u=new Set(ro(h,lo(x,c.presence),m!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=m,e[2]=o.metadata,e[3]=u}else u=e[3];const f=u;let p;if(e[4]!==l||e[5]!==d||e[6]!==r||e[7]!==i||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==a){const x=[];f.has("site-editor")&&x.push({key:"site-editor",label:a("sidebar.projectNav.siteEditor"),icon:n.jsx(Ut,{size:16}),panel:"site-editor",isActive:Ti,dataTour:te.siteEditor});const h={assets:{label:a("common.mainPanelTabs.assets"),icon:n.jsx(uo,{size:16})},hosting:{label:a("common.mainPanelTabs.hosting"),icon:n.jsx(Cs,{size:16})},e2e:{label:a("common.mainPanelTabs.e2e"),icon:n.jsx(bn,{size:16})},analytics:{label:a("common.mainPanelTabs.analytics"),icon:n.jsx(Kt,{size:16})},cdn:{label:a("common.mainPanelTabs.cdn"),icon:n.jsx(hn,{size:16})},experiments:{label:a("experiments.title"),icon:n.jsx(gn,{size:16})}};for(const g of co){if(!f.has(g))continue;const j=h[g];x.push({key:g,label:j.label,icon:j.icon,panel:g,isActive:v=>v===g})}for(const g of $i(Ci(o),(o.connections??[]).map(zi)))g.toolName!=="fetch_assets"&&x.push({key:`pinned:${g.connectionId}:${g.toolName}`,label:g.label||g.toolName,icon:g.icon?n.jsx("img",{src:g.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(to,{size:16}),panel:jt(g.connectionId,g.toolName),isActive:j=>j===jt(g.connectionId,g.toolName)});f.has("automations")&&x.push({key:"automations",label:a("sidebar.projectNav.automations"),icon:n.jsx(Bt,{size:16}),panel:"automations",isActive:Ii,dataTour:te.automations});const b=r.startsWith(D.projects);p=n.jsx(q,{className:"gap-1",children:x.map(g=>n.jsx(ce,{icon:g.icon,label:g.label,dataTour:g.dataTour,isActive:b&&g.isActive(l),trailing:d(g.panel)?n.jsx(ot,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{W("project_nav_clicked",{surface:g.key}),i(o.id,{panel:g.panel}),s?.()}},g.key))}),e[4]=l,e[5]=d,e[6]=r,e[7]=i,e[8]=s,e[9]=o,e[10]=f,e[11]=a,e[12]=p}else p=e[12];return p}function Ii(t){return t==="automations"||Ps(t)!==null}function zi(t){return t.connection_id}function Ti(t){return!!t&&Mt(t)}const Ai=3;function Oi(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:Wn(t)||Un(t)}function Ri(t,e,s){const a=new Map;for(const i of e){if(!Oi(i,s))continue;const r=Vn(i,t);for(const l of r){const c=a.get(l.id)??[];c.push({task:i,only:r.length===1}),a.set(l.id,c)}}const o=new Map;for(const[i,r]of a)r.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(i,r.slice(0,Ai).map(l=>l.task));return o}function Di(t){const e=S.c(21),{task:s,orgSlug:a,isLast:o,onNavigate:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{"aria-hidden":"true",className:"absolute top-0 left-4 h-1/2 w-3 rounded-bl-lg border-b border-l border-sidebar-border"}),e[0]=r):r=e[0];let l;e[1]!==o?(l=!o&&n.jsx("span",{"aria-hidden":"true",className:"absolute top-1/2 bottom-0 left-4 border-l border-sidebar-border"}),e[1]=o,e[2]=l):l=e[2];let c;e[3]!==a||e[4]!==s?(c=Kn(a,s),e[3]=a,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==a||e[7]!==c?(d={org:a,taskKey:c},e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==i||e[10]!==s.status?(m=()=>{W("sidebar_attention_task_clicked",{status:s.status}),i?.()},e[9]=i,e[10]=s.status,e[11]=m):m=e[11];let u;e[12]!==s.title?(u=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=u):u=e[13];let f;e[14]!==d||e[15]!==m||e[16]!==u?(f=n.jsx(Rt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:m,className:"flex h-8 items-center rounded-lg pr-2 pl-9 text-sm text-sidebar-foreground/70 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:u}),e[14]=d,e[15]=m,e[16]=u,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[r,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function Mi(t){const e=S.c(43),{onNavigate:s}=t,a=z(),o=ie(),i=de(),[r,l]=T.useState(!1),{granted:c}=Is("agents:manage"),{org:d,locator:m}=B(),u=At(),{projects:f}=ke(),p=He(),x=xt(),{data:h}=ee.useSession();let b;e[0]!==m||e[1]!==u?(b=Hn(m,u),e[0]=m,e[1]=u,e[2]=b):b=e[2];const g=!o&&!p;let j;e[3]!==b||e[4]!==g?(j={...b,enabled:g},e[3]=b,e[4]=g,e[5]=j):j=e[5];const{data:v}=nt(j);if(p||f.length===0&&(!i||!c))return null;let y,k,N,w,_,$;if(e[6]!==o||e[7]!==v?.items||e[8]!==x||e[9]!==s||e[10]!==d||e[11]!==f||e[12]!==p||e[13]!==h?.user?.id||e[14]!==a){const L=Ri(Bn(f),v?.items??[],h?.user?.id);w="flex flex-col classic:gap-1 compact:gap-2 classic:group-data-[state=collapsed]/sidebar:pt-3",_=te.projects,e[21]!==o||e[22]!==a?($=!o&&n.jsx("p",{className:"px-2 classic:pt-5 classic:pb-0.5 text-xs font-medium classic:text-muted-foreground/60 compact:text-muted-foreground",children:a("sidebar.projects.heading")}),e[21]=o,e[22]=a,e[23]=$):$=e[23],y=q,k="gap-1",N=f.map(A=>{const V=L.get(A.id)??[];return n.jsx(ce,{icon:n.jsx(pt,{icon:A.icon,name:A.title}),label:A.title,isActive:A.id===p,onSelect:()=>{W("sidebar_project_clicked"),x(A.id,{panel:zs(A.metadata?.ui?.layout)}),s?.()},children:!o&&V.length>0&&n.jsx("ul",{className:"flex flex-col",children:V.map((E,K)=>n.jsx(Di,{task:E,orgSlug:d.slug,isLast:K===V.length-1,onNavigate:s},E.id))})},A.id)}),e[6]=o,e[7]=v?.items,e[8]=x,e[9]=s,e[10]=d,e[11]=f,e[12]=p,e[13]=h?.user?.id,e[14]=a,e[15]=y,e[16]=k,e[17]=N,e[18]=w,e[19]=_,e[20]=$}else y=e[15],k=e[16],N=e[17],w=e[18],_=e[19],$=e[20];let C;e[24]!==c||e[25]!==i||e[26]!==a?(C=i&&c&&n.jsx(ce,{icon:n.jsx(Jt,{size:16}),label:a("sidebar.projects.addProject"),onSelect:()=>l(!0)}),e[24]=c,e[25]=i,e[26]=a,e[27]=C):C=e[27];let I;e[28]!==y||e[29]!==k||e[30]!==N||e[31]!==C?(I=n.jsxs(y,{className:k,children:[N,C]}),e[28]=y,e[29]=k,e[30]=N,e[31]=C,e[32]=I):I=e[32];let R;e[33]!==r||e[34]!==x||e[35]!==s?(R=r&&n.jsx(T.Suspense,{fallback:null,children:n.jsx(fo,{open:!0,onOpenChange:l,onImportComplete:L=>{const{virtualMcpId:A}=L;A&&x(A),s?.()}})}),e[33]=r,e[34]=x,e[35]=s,e[36]=R):R=e[36];let U;return e[37]!==I||e[38]!==R||e[39]!==w||e[40]!==_||e[41]!==$?(U=n.jsxs("div",{className:w,"data-tour":_,children:[$,I,R]}),e[37]=I,e[38]=R,e[39]=w,e[40]=_,e[41]=$,e[42]=U):U=e[42],U}function Li(){const t=S.c(8),e=z(),{capabilities:s,isPrivileged:a,loading:o,error:i}=Ts(),r=Tn().length,l=As();let c;return t[0]!==s||t[1]!==i||t[2]!==a||t[3]!==r||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(bo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(xo,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(go,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(Wt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Vt,{size:14}),to:"/$org/settings/task-board",requires:"org:manage"}]},{key:"build",label:e("settings.nav.build"),items:[{key:"repositories",label:e("settings.nav.repositories"),icon:n.jsx(Os,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(jn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(Ze,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(jo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(_n,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(vn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(Ze,{size:14}),to:"/$org/settings/members",group:"members",badge:r}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(ho,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(Rs,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(ot,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(m=>({...m,items:m.items.flatMap(u=>{if(u.group){const[f]=l[u.group];return f?[{...u,to:f.to}]:Ds(u.group)?[]:[u]}return o||i?[u]:u.privilegedOnly?a?[u]:[]:u.requires?a||s[u.requires]?[u]:[]:[u]})})).filter(Ei),t[0]=s,t[1]=i,t[2]=a,t[3]=r,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Ei(t){return t.items.length>0}function ds(){const t=S.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org"},t[0]=e):e=t[0];const{org:s}=Ms(e);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={select:Fi},t[1]=a):a=t[1];const o=Ls(a);let i;if(t[2]!==s||t[3]!==o){const c=d=>{const m=d.replace("$org",s);return o===m||o.startsWith(`${m}/`)};i=d=>[d.to,...d.group?Es(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=i}else i=t[4];const r=i;let l;return t[5]!==r||t[6]!==s?(l={org:s,isActive:r},t[5]=r,t[6]=s,t[7]=l):l=t[7],l}function Fi(t){return t.location.pathname}function qi(){const t=S.c(9),{isActive:e}=ds();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[a,o]=T.useState(s);let i;t[1]!==e||t[2]!==a?(i=m=>a[m.key]??(!m.collapsible||m.items.some(e)),t[1]=e,t[2]=a,t[3]=i):i=t[3];const r=i;let l;t[4]!==r?(l=m=>o(u=>({...u,[m.key]:!r(m)})),t[4]=r,t[5]=l):l=t[5];const c=l;let d;return t[6]!==r||t[7]!==c?(d={isOpen:r,toggle:c},t[6]=r,t[7]=c,t[8]=d):d=t[8],d}function Bi(t){const e=S.c(21),{group:s,open:a,onToggle:o,className:i}=t;let r,l,c,d,m;if(e[0]!==i||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==a){m=Symbol.for("react.early_return_sentinel");e:{const x=O("text-xs font-medium text-muted-foreground/60 truncate",i);if(!s.collapsible){m=n.jsx("p",{className:x,children:s.label});break e}r="button",l=o,c=a,d=O("flex w-full items-center gap-1 classic:rounded-md compact:rounded-lg hover:text-muted-foreground",x)}e[0]=i,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=a,e[5]=r,e[6]=l,e[7]=c,e[8]=d,e[9]=m}else r=e[5],l=e[6],c=e[7],d=e[8],m=e[9];if(m!==Symbol.for("react.early_return_sentinel"))return m;let u;e[10]!==a?(u=a?n.jsx(po,{size:12}):n.jsx(Fs,{size:12}),e[10]=a,e[11]=u):u=e[11];let f;e[12]!==s.label?(f=n.jsx("span",{className:"truncate",children:s.label}),e[12]=s.label,e[13]=f):f=e[13];let p;return e[14]!==r||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==u||e[19]!==f?(p=n.jsxs("button",{type:r,onClick:l,"aria-expanded":c,className:d,children:[u,f]}),e[14]=r,e[15]=l,e[16]=c,e[17]=d,e[18]=u,e[19]=f,e[20]=p):p=e[20],p}function Vi(t){const e=S.c(5),{icon:s,badge:a}=t;let o;e[0]!==a?(o=a?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=a,e[1]=o):o=e[1];let i;return e[2]!==s||e[3]!==o?(i=n.jsxs("span",{className:"relative shrink-0",children:[s,o]}),e[2]=s,e[3]=o,e[4]=i):i=e[4],i}function us(t){const e=S.c(24),{onNavigate:s}=t,a=ie(),o=z(),i=Li(),{org:r,isActive:l}=ds(),{isOpen:c,toggle:d}=qi();let m;if(e[0]!==a||e[1]!==i||e[2]!==l||e[3]!==c||e[4]!==s||e[5]!==r||e[6]!==d){let b;e[8]!==a||e[9]!==l||e[10]!==c||e[11]!==s||e[12]!==r||e[13]!==d?(b=(g,j)=>n.jsxs("div",{className:"flex flex-col",children:[g.label&&!a&&n.jsx(Bi,{group:g,open:c(g),onToggle:()=>d(g),className:O("px-2 pt-1.5 pb-0.5",j>0&&"mt-3")}),(a||c(g))&&n.jsx(q,{className:"gap-0.5",children:g.items.map(v=>n.jsx(ce,{icon:n.jsx(Vi,{icon:v.icon,badge:v.badge}),label:v.label,isActive:l(v),link:{to:v.to,params:{org:r}},className:"gap-2.5",onSelect:()=>{W("settings_nav_clicked",{section_key:v.key,group_key:g.key}),s?.()}},v.key))})]},g.key),e[8]=a,e[9]=l,e[10]=c,e[11]=s,e[12]=r,e[13]=d,e[14]=b):b=e[14],m=i.map(b),e[0]=a,e[1]=i,e[2]=l,e[3]=c,e[4]=s,e[5]=r,e[6]=d,e[7]=m}else m=e[7];let u;e[15]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50 compact:hidden"}),e[15]=u):u=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx("span",{className:"shrink-0",children:n.jsx(tt,{size:14})}),e[16]=f):f=e[16];let p;e[17]!==o?(p=o("settings.nav.signOut"),e[17]=o,e[18]=p):p=e[18];let x;e[19]!==p?(x=n.jsxs("div",{className:"mt-auto flex flex-col compact:pt-4",children:[u,n.jsx(q,{className:"gap-0.5",children:n.jsx(ce,{icon:f,label:p,className:"gap-2.5",onSelect:Ki})})]}),e[19]=p,e[20]=x):x=e[20];let h;return e[21]!==m||e[22]!==x?(h=n.jsxs(n.Fragment,{children:[m,x]}),e[21]=m,e[22]=x,e[23]=h):h=e[23],h}function Ki(){W("signed_out",{source:"settings_sidebar"}),Tt(),ee.signOut()}function ms(t){const e=S.c(8),{onNavigate:s}=t,a=z(),{org:o}=B();let i;e[0]!==a?(i=a("settings.nav.backToHome"),e[0]=a,e[1]=i):i=e[1];let r;e[2]!==o.slug?(r={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=r):r=e[3];let l;return e[4]!==s||e[5]!==i||e[6]!==r?(l=n.jsx(ls,{label:i,link:r,onSelect:s}),e[4]=s,e[5]=i,e[6]=r,e[7]=l):l=e[7],l}function fs(){const t=S.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1 group-data-[state=collapsed]/sidebar:hidden",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.400.6"]})}),t[0]=e):e=t[0],e}const Wi="pt-1.5";function ps(t){const e=S.c(23),{header:s,back:a,body:o,footer:i,sheet:r}=t,l=de();let c;e[0]!==s?(c=s&&n.jsx("div",{"data-slot":"sidebar-picker-header",className:"flex h-12 shrink-0 flex-row items-center classic:gap-2 compact:gap-1 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col compact:group-data-[state=collapsed]/sidebar:gap-2 group-data-[state=collapsed]/sidebar:py-2",children:s}),e[0]=s,e[1]=c):c=e[1];let d;e[2]!==s?(d=s&&n.jsx("div",{className:"compact:hidden mt-1.5 h-px shrink-0 bg-sidebar-border"}),e[2]=s,e[3]=d):d=e[3];let m;e[4]!==a||e[5]!==l?(m=!l&&a&&n.jsx("div",{className:"shrink-0 px-2",children:a}),e[4]=a,e[5]=l,e[6]=m):m=e[6];let u;e[7]!==a||e[8]!==l?(u=l&&a&&n.jsx("div",{className:"sticky top-0 z-10 hidden shrink-0 bg-sidebar pb-2 not-empty:block",children:a}),e[7]=a,e[8]=l,e[9]=u):u=e[9];let f;e[10]!==o||e[11]!==u?(f=n.jsxs(Hs,{className:"gap-0 overflow-y-auto px-2 classic:pt-2 compact:pt-3 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:[u,o]}),e[10]=o,e[11]=u,e[12]=f):f=e[12];let p;e[13]!==i||e[14]!==c||e[15]!==d||e[16]!==m||e[17]!==f?(p=n.jsxs(n.Fragment,{children:[c,d,m,f,i]}),e[13]=i,e[14]=c,e[15]=d,e[16]=m,e[17]=f,e[18]=p):p=e[18];const x=p;if(r){let b;return e[19]!==x?(b=n.jsx("div",{className:"group/sidebar flex h-full w-full flex-col bg-sidebar text-sidebar-foreground","data-sidebar":"sidebar","data-state":"expanded","data-tour":te.nav,children:x}),e[19]=x,e[20]=b):b=e[20],b}let h;return e[21]!==x?(h=n.jsx(Gs,{className:Wi,"data-tour":te.nav,children:x}),e[21]=x,e[22]=h):h=e[22],h}function xs(t){const e=S.c(8),{onNavigate:s}=t,a=z(),o=He(),i=Io();if(!o)return null;let r;e[0]!==a?(r=a("sidebar.scope.allProjects"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==i||e[3]!==s?(l=()=>{i(),s?.()},e[2]=i,e[3]=s,e[4]=l):l=e[4];let c;return e[5]!==r||e[6]!==l?(c=n.jsx(ls,{label:r,onSelect:l}),e[5]=r,e[6]=l,e[7]=c):c=e[7],c}function gs(t){const e=S.c(2),{onNavigate:s}=t;let a;return e[0]!==s?(a=n.jsx(qs,{children:n.jsxs("div",{className:"flex flex-col classic:gap-1 compact:gap-6",children:[n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(wi,{onNavigate:s}),n.jsx(Pi,{onNavigate:s}),n.jsx(_i,{onNavigate:s})]}),n.jsx(Mi,{onNavigate:s})]})}),e[0]=s,e[1]=a):a=e[1],a}function Ui(){const t=S.c(3),e=Ue();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xi,{}),t[0]=s):s=t[0];let a;return t[1]!==e?(a=n.jsx(ps,{header:s,back:e?n.jsx(ms,{}):n.jsx(xs,{}),body:e?n.jsx(us,{}):n.jsx(gs,{}),footer:e?n.jsx(fs,{}):n.jsx(ri,{})}),t[1]=e,t[2]=a):a=t[2],a}function Hi(t){const e=S.c(13),{onClose:s}=t,a=Ue();let o;e[0]!==s?(o=n.jsx(gi,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let i,r;e[2]!==a||e[3]!==s?(i=a?n.jsx(ms,{onNavigate:s}):n.jsx(xs,{onNavigate:s}),r=a?n.jsx(us,{onNavigate:s}):n.jsx(gs,{onNavigate:s}),e[2]=a,e[3]=s,e[4]=i,e[5]=r):(i=e[4],r=e[5]);let l;e[6]!==a?(l=a?n.jsx(fs,{}):n.jsx(li,{}),e[6]=a,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r||e[11]!==l?(c=n.jsx(ps,{sheet:!0,header:o,back:i,body:r,footer:l}),e[8]=o,e[9]=i,e[10]=r,e[11]=l,e[12]=c):c=e[12],c}const Gi=new Set(["completed","failed","requires_action"]);function Qi(t){const e=S.c(5),[s]=zt();let a;e[0]!==s?(a=i=>{s.enableSounds&&Gi.has(i.data.status)&&vo(yo.dataUri).catch(Ji)},e[0]=s,e[1]=a):a=e[1];let o;e[2]!==t||e[3]!==a?(o={orgSlug:t,onTaskStatus:a},e[2]=t,e[3]=a,e[4]=o):o=e[4],So(o)}function Ji(t){console.warn("[status-sounds] playback failed:",t)}const Xi=2e3,Yi=4e4;function Zi(t){return t==="success"||t==="updated"}function ea(t){const e=S.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const a=Bs(s),o=Ot();let i;e[1]!==a.checkout?(i=Zi(a.checkout),e[1]=a.checkout,e[2]=i):i=e[2];const r=i,[l]=T.useState(ta);let c;e[3]!==t?(c=Fe.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Xi:!1,e[5]=l,e[6]=d):d=e[6];let m;e[7]!==t||e[8]!==o?(m=async()=>(await o.invalidateQueries({queryKey:Fe.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=m):m=e[9];let u;e[10]!==r||e[11]!==c||e[12]!==d||e[13]!==m?(u={queryKey:c,enabled:r,gcTime:0,staleTime:0,refetchInterval:d,queryFn:m},e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=u):u=e[14],nt(u)}function ta(){return Date.now()+Yi}function nl(){const t=S.c(3),{org:e}=B();Qi(e.slug),ea(e.id);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(Po,{}),t[0]=s):s=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ye.Sidebar,{renderMobile:sa,children:n.jsx(Ui,{})}),t[1]=a):a=t[1];let o;return t[2]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsxs(Ye,{notice:s,children:[a,n.jsx(Ye.Content,{children:n.jsx(Vs,{})})]}),t[2]=o):o=t[2],o}function sa(t){const{onClose:e}=t;return n.jsx(Hi,{onClose:e})}export{nl as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as p,l as d,j as e,n as f,P as c,ar as u,O as x}from"./index-B-RfjkQs.js";import{u as j}from"./use-mobile-BA2OXMES.js";import{R as h}from"./route-page-header-Ck32Z_z1.js";import"./LayoutLeft-DbmxTpPW.js";import"./sidebar-Bsj1oRm2.js";import"./sheet-B5VBlNbo.js";import"./X-C49OUFcX.js";import"./tooltip-1YZ9_LEc.js";import"./index-DNOKSPYL.js";import"./toolbar-icon-button-G0ZB62BK.js";import"./use-in-settings-_C3gW9Az.js";import"./use-project-scope-Hp7aDrht.js";import"./use-virtual-mcp-CbHEuH0C.js";import"./use-mcp-client-6HSoOGyN.js";import"./auth-DN1jUXQS.js";import"./github-repo-BknN0SVI.js";function $(){const t=p.c(9),m=j(),n=!m&&"p-1.5";let i;t[0]!==n?(i=d("flex-1 min-h-0",n),t[0]=n,t[1]=i):i=t[1];const l=m?"plain":"card";let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(h,{}),t[2]=s):s=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsxs(f.Breadcrumbs.Provider,{children:[s,e.jsx(c.Content,{children:e.jsx(u,{children:e.jsx(x,{})})})]}),t[3]=o):o=t[3];let r;t[4]!==l?(r=e.jsx(c,{"data-testid":"settings-panel",variant:l,children:o}),t[4]=l,t[5]=r):r=t[5];let a;return t[6]!==i||t[7]!==r?(a=e.jsx("div",{className:i,children:r}),t[6]=i,t[7]=r,t[8]=a):a=t[8],a}export{$ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as P,U as R,b as D,Y as $,k as w,j as _,n as H}from"./index-B-RfjkQs.js";import{i as B}from"./LayoutLeft-DbmxTpPW.js";import{u as E}from"./sidebar-Bsj1oRm2.js";import{T as L}from"./toolbar-icon-button-G0ZB62BK.js";import{u as N}from"./use-in-settings-_C3gW9Az.js";import{a as V}from"./use-project-scope-Hp7aDrht.js";import{d as z}from"./use-virtual-mcp-CbHEuH0C.js";function O(g){const e=P.c(44),{actions:x,navigation:T}=g,C=R(),t=D(),{org:a}=$(),i=V(),y=z(i),v=N(),{toggleSidebar:I}=E();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={select:M},e[0]=p):p=e[0];const f=w(p),r=f?.mainView==="overview";let d;e[1]!==y?.title||e[2]!==t?(d=y?.title??t("common.loading"),e[1]=y?.title,e[2]=t,e[3]=d):d=e[3];const n=d;let b;e[4]!==r||e[5]!==f?.pageTitle||e[6]!==n||e[7]!==i||e[8]!==t?(b=r?i?n:t("sidebar.navDestinations.home"):t(f?.pageTitle??"page.view"),e[4]=r,e[5]=f?.pageTitle,e[6]=n,e[7]=i,e[8]=t,e[9]=b):b=e[9];const u=b;if(!C)return null;let l;if(e[10]!==v||e[11]!==r||e[12]!==a||e[13]!==n||e[14]!==i||e[15]!==t||e[16]!==u){if(l=[],v){let s;e[18]!==t?(s=t("sidebar.navDestinations.settings"),e[18]=t,e[19]=s):s=e[19];let o;e[20]!==a.slug?(o={to:"/$org/settings/general",params:{org:a.slug}},e[20]=a.slug,e[21]=o):o=e[21];let k;e[22]!==s||e[23]!==o?(k={key:"settings",label:s,link:o},e[22]=s,e[23]=o,e[24]=k):k=e[24],l.push(k)}else if(i&&!r){let s;e[25]!==a.slug||e[26]!==i?(s={to:"/$org/projects/$agentId",params:{org:a.slug,agentId:i}},e[25]=a.slug,e[26]=i,e[27]=s):s=e[27];let o;e[28]!==n||e[29]!==s?(o={key:"project",label:n,link:s},e[28]=n,e[29]=s,e[30]=o):o=e[30],l.push(o)}let S;e[31]!==u?(S={key:"page",label:u},e[31]=u,e[32]=S):S=e[32],l.push(S),e[10]=v,e[11]=r,e[12]=a,e[13]=n,e[14]=i,e[15]=t,e[16]=u,e[17]=l}else l=e[17];let c;e[33]!==t?(c=t("layouts.shellControls.toggleSidebar"),e[33]=t,e[34]=c):c=e[34];let h;e[35]===Symbol.for("react.memo_cache_sentinel")?(h=_.jsx(B,{size:16}),e[35]=h):h=e[35];let m;e[36]!==c||e[37]!==I?(m=_.jsx(L,{className:"md:hidden",onClick:I,"aria-label":c,children:h}),e[36]=c,e[37]=I,e[38]=m):m=e[38];let j;return e[39]!==x||e[40]!==l||e[41]!==T||e[42]!==m?(j=_.jsx(H.Header,{leading:m,breadcrumbs:l,actions:x,navigation:T}),e[39]=x,e[40]=l,e[41]=T,e[42]=m,e[43]=j):j=e[43],j}function M(g){return g.matches.findLast(U)?.staticData}function U(g){return g.staticData.pageTitle}export{O as R};
|