decocms 4.367.6 → 4.367.7
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-CZODjB-G.js → AlertCircle-CMdkAjxQ.js} +1 -1
- package/dist/client/assets/{AreaChart-CIyBmnKJ.js → AreaChart-jIv2Q0sS.js} +1 -1
- package/dist/client/assets/{ArrowLeft-qXobBdxD.js → ArrowLeft-DGJWLWaL.js} +1 -1
- package/dist/client/assets/{ArrowRight-_qaicB3i.js → ArrowRight-D_1DZN2N.js} +1 -1
- package/dist/client/assets/{ArrowUp-B2y3FAZT.js → ArrowUp-Bx3jqyJU.js} +1 -1
- package/dist/client/assets/{Check-DYuLLcXz.js → Check-HvrCGvlV.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cpa5ukkn.js → CheckCircle-CQTpywHl.js} +1 -1
- package/dist/client/assets/{ChevronRight-BvrNCsKT.js → ChevronRight-dkkIYuGe.js} +1 -1
- package/dist/client/assets/{ChevronUp-B-GxN-tN.js → ChevronUp-BANcOZ09.js} +1 -1
- package/dist/client/assets/{Copy01-BKbbYkAO.js → Copy01-D4tr9F1r.js} +1 -1
- package/dist/client/assets/{CreditCard01-D16_sfKz.js → CreditCard01-CX8hLF54.js} +1 -1
- package/dist/client/assets/{Database01-C9bPAMOv.js → Database01-C6v3VKBC.js} +1 -1
- package/dist/client/assets/{DotsVertical-BKAvE_4x.js → DotsVertical-DEpQR8Rs.js} +1 -1
- package/dist/client/assets/{Download01-BvE_0avp.js → Download01-G8ZhNqF3.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-C42cr3OZ.js → ErrorBarContext-DNwZJRAX.js} +1 -1
- package/dist/client/assets/{Eye-CO0I0F0e.js → Eye-wRiP-IKY.js} +1 -1
- package/dist/client/assets/{File02-Cnt06RSY.js → File02-C5Axd7Wg.js} +1 -1
- package/dist/client/assets/{GitBranch01-BPIVJl4U.js → GitBranch01-xiI7ahmy.js} +1 -1
- package/dist/client/assets/{Globe01-DjDoxbql.js → Globe01-BJfrzyV2.js} +1 -1
- package/dist/client/assets/{HardDrive-UFyvehqQ.js → HardDrive-BtlNN50l.js} +1 -1
- package/dist/client/assets/{Image01-D3ZQNp9r.js → Image01-ZQpSr40Q.js} +1 -1
- package/dist/client/assets/{Key01-0kVvyKcG.js → Key01-TUQZiePT.js} +1 -1
- package/dist/client/assets/{Link01-Ct7pxTAu.js → Link01-Dubdh0XV.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DCfxP5B_.js → LinkExternal01-DsoIvXMf.js} +1 -1
- package/dist/client/assets/{MessageCircle01-CweHuqp7.js → MessageCircle01-DrVOv17x.js} +1 -1
- package/dist/client/assets/{Monitor01-BWZHqfxa.js → Monitor01-8akol8yD.js} +1 -1
- package/dist/client/assets/{Package-T9dujty4.js → Package-6pCyxdj-.js} +1 -1
- package/dist/client/assets/{Palette-B9i9hnCi.js → Palette-8_jSprTt.js} +1 -1
- package/dist/client/assets/{Play-BIZK_qUZ.js → Play-B2WDpGm-.js} +1 -1
- package/dist/client/assets/{Plus-DaMIkku0.js → Plus-B6iViyXP.js} +1 -1
- package/dist/client/assets/{Printer-AWNoUKRJ.js → Printer-1AF1IGx9.js} +1 -1
- package/dist/client/assets/{SearchLg-C2sftj0S.js → SearchLg-o3jjSP_H.js} +1 -1
- package/dist/client/assets/{SearchMd-B6arCmyn.js → SearchMd-BFooCWLz.js} +1 -1
- package/dist/client/assets/{Sector-BM01w_NE.js → Sector-D27lvJUl.js} +1 -1
- package/dist/client/assets/{Settings02-Cng3FY1l.js → Settings02-11lXkxuh.js} +1 -1
- package/dist/client/assets/{Share07-BgGqkker.js → Share07-2izyqHpD.js} +1 -1
- package/dist/client/assets/{Shield01-CVF7EZQb.js → Shield01-C_NSoVzs.js} +1 -1
- package/dist/client/assets/{Stars01-DSWmseOt.js → Stars01-dQ6_BPZ3.js} +1 -1
- package/dist/client/assets/{Sun-B2S_0TDV.js → Sun-DqCbyuBS.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BaPOYupn.js → SwitchHorizontal01-Chrl4_cZ.js} +1 -1
- package/dist/client/assets/{Tool01-DW_T3YR5.js → Tool01-DekOr9OW.js} +1 -1
- package/dist/client/assets/{Tool02-zLL5jksN.js → Tool02-CgXadMFZ.js} +1 -1
- package/dist/client/assets/{Trash01-CchLM2HV.js → Trash01-DwLqZ5iv.js} +1 -1
- package/dist/client/assets/{TrendUp01-CSoUpxS1.js → TrendUp01-BJ6ZxGib.js} +1 -1
- package/dist/client/assets/{Upload01-G3c4UCfB.js → Upload01-zIaNWjGg.js} +1 -1
- package/dist/client/assets/{User01-CZRm273k.js → User01-Cuc8TQ2e.js} +1 -1
- package/dist/client/assets/{UserSquare-BdoEkD8Z.js → UserSquare-DO483pcO.js} +1 -1
- package/dist/client/assets/{Users01-D_H_0-Jf.js → Users01-C_FX7NZW.js} +1 -1
- package/dist/client/assets/{Users03-DSBIUomT.js → Users03-CBIUviMz.js} +1 -1
- package/dist/client/assets/{X-Dr0Tqjzv.js → X-BbEHf0ox.js} +1 -1
- package/dist/client/assets/{XCircle-Ce8PGmrS.js → XCircle-CIpucXWN.js} +1 -1
- package/dist/client/assets/{XClose-5naA93fy.js → XClose-D9lEUPrO.js} +1 -1
- package/dist/client/assets/{Zap-XMkPrxNc.js → Zap-FJBBk1lb.js} +1 -1
- package/dist/client/assets/{ZoomOut-BLK0GcJv.js → ZoomOut-DR5p3Py1.js} +1 -1
- package/dist/client/assets/{access-gate-Cql3KqwB.js → access-gate-BGLq5_fD.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BFK-aGDM.js → add-connection-dialog-CP-mB4l0.js} +1 -1
- package/dist/client/assets/{agent-analytics-BiLU3geK.js → agent-analytics-CwkHNxxG.js} +1 -1
- package/dist/client/assets/agent-app-DOZj_KNh.js +1 -0
- package/dist/client/assets/{agent-assets-l4c7ivCP.js → agent-assets-COVC5lPr.js} +1 -1
- package/dist/client/assets/{agent-automation-Dr_aQL2N.js → agent-automation-BWSPNjim.js} +1 -1
- package/dist/client/assets/{agent-automations-BtQVYGNC.js → agent-automations-BUDch-j3.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B72Z2yOq.js → agent-connect-sources-LY53id1I.js} +1 -1
- package/dist/client/assets/agent-deck-Ci4o3-Qm.js +1 -0
- package/dist/client/assets/{agent-e2e-BC-S1G-I.js → agent-e2e-CnVObhl4.js} +1 -1
- package/dist/client/assets/agent-file-cFbD0OqV.js +1 -0
- package/dist/client/assets/{agent-git-BCY9JF0p.js → agent-git-C-KtJQOB.js} +1 -1
- package/dist/client/assets/{agent-hosting-BTRnh7Qw.js → agent-hosting-Dr-g2CXP.js} +1 -1
- package/dist/client/assets/{agent-icon-I_u5FzRN.js → agent-icon-CL_nl9mo.js} +1 -1
- package/dist/client/assets/agent-library-file-DXMpRwGw.js +1 -0
- package/dist/client/assets/{agent-monitor-C3BUSOjB.js → agent-monitor-SvCw0nUy.js} +1 -1
- package/dist/client/assets/{agent-overview-DLgGJyEN.js → agent-overview-lLErih75.js} +1 -1
- package/dist/client/assets/agent-settings-BDT_wIMj.js +1 -0
- package/dist/client/assets/{agent-site-editor-CcVudugZ.js → agent-site-editor-BukowFNy.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-CaFMcCwi.js +2 -0
- package/dist/client/assets/{agent-site-editor-content-C_xKa1S3.js → agent-site-editor-content-DtzkoDLB.js} +2 -2
- package/dist/client/assets/{agent-site-editor-preview-DHkNf2Kb.js → agent-site-editor-preview-DX7U6V5V.js} +3 -3
- package/dist/client/assets/agent-view-BOmW_Ep_.js +1 -0
- package/dist/client/assets/{agent-view-guard-jbDY82eS.js → agent-view-guard-BMN6ThUt.js} +1 -1
- package/dist/client/assets/{agents-list-CF5eQ1pF.js → agents-list-C6ZSW07I.js} +1 -1
- package/dist/client/assets/{ai-providers-COjB4NMg.js → ai-providers-D2C1qlv0.js} +1 -1
- package/dist/client/assets/{alert-DwSbSu1x.js → alert-0Lc8v4N7.js} +1 -1
- package/dist/client/assets/{alert-dialog-dzu9U-o1.js → alert-dialog-BcLnZa7A.js} +1 -1
- package/dist/client/assets/api-keys-C2lfrWiE.js +1 -0
- package/dist/client/assets/{api-keys-Cpho4Cho.js → api-keys-Cf6bK86U.js} +1 -1
- package/dist/client/assets/app-editor-Cbs0w-F0.js +1 -0
- package/dist/client/assets/{asset-utils-DLlbY7-O.js → asset-utils-DIsXFmtL.js} +1 -1
- package/dist/client/assets/{auth-UveS8wF5.js → auth-DqeCOVzg.js} +1 -1
- package/dist/client/assets/{auth-catchall-CxHpvtO-.js → auth-catchall-BNIBQ_XR.js} +1 -1
- package/dist/client/assets/{auth-entry-BVtguEOj.js → auth-entry-Bq32N4lt.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DzJReBpa.js → auth-split-layout-DliwYz65.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CrVNvw_C.js → authenticate-and-persist-oauth-Eoth2qMz.js} +1 -1
- package/dist/client/assets/{automation-list-row-CXkhnqzA.js → automation-list-row-CpdfZzhf.js} +1 -1
- package/dist/client/assets/{automation-runs-DBxHk2or.js → automation-runs-DIEXu2AA.js} +1 -1
- package/dist/client/assets/{automations-DFVUH58q.js → automations-BpBth9hu.js} +1 -1
- package/dist/client/assets/{autosend-BsJQ1aCs.js → autosend-2Y4HgA_T.js} +1 -1
- package/dist/client/assets/{avatar-DV69nhm1.js → avatar-YOwDvuCo.js} +1 -1
- package/dist/client/assets/{badge-Bx6TdTjC.js → badge-CKy1DnEV.js} +1 -1
- package/dist/client/assets/{block-document-Bz-5kssp.js → block-document-aP19FM_M.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CzxgcZDm.js → blocks-preview-workspace-context-DP5_u2Xp.js} +1 -1
- package/dist/client/assets/{breadcrumb-D4EWX36X.js → breadcrumb-BY8W5NfH.js} +1 -1
- package/dist/client/assets/{buckets-B9z_Rm90.js → buckets-Bhe2phyM.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BWFSRTpm.js → build-improve-prompt-doc-DVZMfB_k.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Dq461a8g.js → bulk-category-panel-dbBPINFu.js} +1 -1
- package/dist/client/assets/{calendar-BGdb4p0V.js → calendar-O0niDXgD.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dnwh9vPw.js → capability-load-error-JtYpAIDC.js} +1 -1
- package/dist/client/assets/{cards-CnQ4nU1q.js → cards-CljnVFGF.js} +1 -1
- package/dist/client/assets/category-editor-B984VME1.js +1 -0
- package/dist/client/assets/{chart-D7o3Rjgy.js → chart-DjxuH9z1.js} +1 -1
- package/dist/client/assets/{chat-context-Bj6XM8r6.js → chat-context-DT13Ns9e.js} +1 -1
- package/dist/client/assets/{chat-draft-B57QKpbd.js → chat-draft-Bp7WKsio.js} +1 -1
- package/dist/client/assets/{checkbox-DXk_ASm3.js → checkbox-BAc6ON84.js} +1 -1
- package/dist/client/assets/{choose-editor-yiYqZgm0.js → choose-editor-Db-m1tPL.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DaIMiHKG.js → cli-auth-success-ORnUB4EZ.js} +1 -1
- package/dist/client/assets/{client-icons-BIZcUQix.js → client-icons-DH-s5V8p.js} +1 -1
- package/dist/client/assets/{collapsible-DvCpQaDP.js → collapsible-Cfc5GOq6.js} +1 -1
- package/dist/client/assets/{collection-detail-GwafUKCA.js → collection-detail-tLNt3mFd.js} +1 -1
- package/dist/client/assets/{collection-display-button-C8HgvUa3.js → collection-display-button-Q83lUSRW.js} +1 -1
- package/dist/client/assets/{collection-search-BgR7E5C_.js → collection-search-DOotlcr-.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CenPQBXL.js → collection-table-wrapper-L7fq3Ewq.js} +1 -1
- package/dist/client/assets/{collection-tabs-BKMxlcTD.js → collection-tabs-77YTqRx_.js} +1 -1
- package/dist/client/assets/{command-PF8SQ01C.js → command-BbfSNpjK.js} +1 -1
- package/dist/client/assets/{command-palette-store-3XeVzDCK.js → command-palette-store-CDXRiKfb.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-BcH1woZ_.js → companion-mcps-section-B3OT3fvW.js} +1 -1
- package/dist/client/assets/{connect-cRr5yrcf.js → connect-DYMJSd71.js} +1 -1
- package/dist/client/assets/{connect-layout-DlS-pJxG.js → connect-layout-Cb-8wVa_.js} +1 -1
- package/dist/client/assets/{connection-D83jUgKt.js → connection-C0h_riCe.js} +1 -1
- package/dist/client/assets/{connection-card-B6pHDnUn.js → connection-card-BnHVqPYb.js} +1 -1
- package/dist/client/assets/{connection-detail-cjhq0_Le.js → connection-detail-BukOET2K.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CjgrOGRh.js → connection-form-helpers-BGarejHH.js} +1 -1
- package/dist/client/assets/{connections-jZ71xb1b.js → connections-C94wvfI_.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-Wy8ivV4K.js → create-organization-dialog-BeMHfEec.js} +1 -1
- package/dist/client/assets/{decofile-api-DGTmPuak.js → decofile-api-D5P6O-Yb.js} +1 -1
- package/dist/client/assets/{decopilot-BQ5v61IW.js → decopilot-DEim_pMB.js} +1 -1
- package/dist/client/assets/{dialog-DKHdGeG-.js → dialog-DIO2BT5L.js} +1 -1
- package/dist/client/assets/{discover-BpZ5XWNf.js → discover-zXR45UVE.js} +1 -1
- package/dist/client/assets/{domain-settings-bYxFZI5Z.js → domain-settings-CoxAhG8y.js} +1 -1
- package/dist/client/assets/{download-app-dialog-BhmQVCrs.js → download-app-dialog-B-5SSg-B.js} +1 -1
- package/dist/client/assets/{drawer-B1TxBXeW.js → drawer-Dp27hT9C.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CoycaRIZ.js → dropdown-menu-BzAnwSL0.js} +1 -1
- package/dist/client/assets/{editor-BEf-Idam.js → editor-Dm21YC6a.js} +1 -1
- package/dist/client/assets/{empty-state-BN3l0e1m.js → empty-state-CvrLm3VU.js} +1 -1
- package/dist/client/assets/{empty-state-BuDUIKwc.js → empty-state-F709JYnF.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bs0-7FAn.js → extract-connection-data-Cfd0L2y0.js} +1 -1
- package/dist/client/assets/{feature-gate-DXl7j_Gb.js → feature-gate-CSQct_zD.js} +1 -1
- package/dist/client/assets/{feature-paywall-2uPHyVRd.js → feature-paywall-Cd5ZGlWk.js} +1 -1
- package/dist/client/assets/{file-explorer-CWZPR_uA.js → file-explorer-B6MMR_br.js} +1 -1
- package/dist/client/assets/{file-preview-CZ1TplhI.js → file-preview-B3un6Sja.js} +1 -1
- package/dist/client/assets/{file-share-button-I_P-fFZ5.js → file-share-button-BXZcNnFk.js} +1 -1
- package/dist/client/assets/{file-type-icon-SwABlaSO.js → file-type-icon-CzM4dKXx.js} +1 -1
- package/dist/client/assets/{folder-icon-Bj6hz7oH.js → folder-icon-Bjs4wWQI.js} +1 -1
- package/dist/client/assets/{form-CCI8usbr.js → form-DGoweIp4.js} +1 -1
- package/dist/client/assets/{gateway-client-2Mbrw7Hg.js → gateway-client-BKFdOqFV.js} +1 -1
- package/dist/client/assets/{general-T1zzubww.js → general-BER62NBk.js} +1 -1
- package/dist/client/assets/{github-icon-CCyh_tld.js → github-icon-D5mzGkJ1.js} +1 -1
- package/dist/client/assets/{home-nMTACPWA.js → home-9LhFhaJr.js} +1 -1
- package/dist/client/assets/{hooks-DxP9ms8F.js → hooks-DOi6gVdi.js} +1 -1
- package/dist/client/assets/{hooks-C4BbSdNW.js → hooks-DW28Wv6W.js} +1 -1
- package/dist/client/assets/{index-S-urKMuN.js → index-26VXD9YQ.js} +1 -1
- package/dist/client/assets/{index-BzGfYuHA.js → index-BKjzqVX4.js} +1 -1
- package/dist/client/assets/{index-B7wVUCeI.js → index-BVdPTogP.js} +1 -1
- package/dist/client/assets/{index-D6hy4U5O.js → index-BiIMwVbK.js} +1 -1
- package/dist/client/assets/{index-C1OUd215.js → index-BqEX4CxD.js} +1 -1
- package/dist/client/assets/{index-DvsuDjpW.js → index-C7nGODiq.js} +1 -1
- package/dist/client/assets/{index-CfiHR5p3.js → index-C9jQATHx.js} +2 -2
- package/dist/client/assets/{index-L41E_jdu.js → index-CLBWHxV4.js} +1 -1
- package/dist/client/assets/{index-BeW32OQZ.js → index-Ch3pSh1a.js} +1 -1
- package/dist/client/assets/{index-wju8DM5a.js → index-D3hBrAe3.js} +1 -1
- package/dist/client/assets/{index-BW3bCYgD.js → index-D9Pa20nR.js} +1 -1
- package/dist/client/assets/{index-DplUenCs.js → index-DDHop146.js} +1 -1
- package/dist/client/assets/{index-BpW_HPV1.js → index-DX88U1Fe.js} +1 -1
- package/dist/client/assets/{index-BIFBhz6Y.js → index-ebCjSNwh.js} +1 -1
- package/dist/client/assets/{index-CR7IhZdQ.js → index-kzbDuxts.js} +1 -1
- package/dist/client/assets/{index-redirect-D31X29B5.js → index-redirect-bdPeOdFP.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-F_wqd-Rj.js → infiniteQueryObserver-CrlFqUXS.js} +1 -1
- package/dist/client/assets/{infra-billing-D0PNqi3s.js → infra-billing-DBRnO5Xv.js} +1 -1
- package/dist/client/assets/{input-S-gsq7gD.js → input-BfoQkl5k.js} +1 -1
- package/dist/client/assets/{input-DOqceFPC.js → input-DCAbperr.js} +1 -1
- package/dist/client/assets/{input-SZCoDRD-.js → input-DxpPAL6X.js} +1 -1
- package/dist/client/assets/{integration-icon-_HXUWC0Q.js → integration-icon-DLbXRirx.js} +1 -1
- package/dist/client/assets/{label-DCUE6TYd.js → label-BZvBRfsC.js} +1 -1
- package/dist/client/assets/{last-preview-page-D9Fx5pKm.js → last-preview-page-DgNuT4mN.js} +1 -1
- package/dist/client/assets/{layout-DRh2IKmg.js → layout-D_2jgeSQ.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BPmqpQyn.js → legacy-agents-deep-D9-8wOwe.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-34brc64A.js → legacy-main-redirect-U48xVXg3.js} +1 -1
- package/dist/client/assets/{library-D0EEtDE-.js → library-DCHuYHcg.js} +1 -1
- package/dist/client/assets/{login-wXsz7PP7.js → login-DLU4Kv--.js} +1 -1
- package/dist/client/assets/{markdown-CCv5IlPx.js → markdown-BxIxTFHX.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BVpwtvW6.js → mcp-app-renderer-C5_SSFlp.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DbZXTEaP.js → mcp-oauth-Cj16tOMc.js} +1 -1
- package/dist/client/assets/{members-D8EXLICP.js → members-B8ghL5vq.js} +1 -1
- package/dist/client/assets/{message-templates-xXuDAWxI.js → message-templates-C0k0djOm.js} +1 -1
- package/dist/client/assets/{mini-report-page-BuRwBHqD.js → mini-report-page-DPr8miDS.js} +1 -1
- package/dist/client/assets/mock-board-CLCjiMWY.js +90 -0
- package/dist/client/assets/{monaco-editor-QBiS6INp.js → monaco-editor-D7KtEG80.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-YHUVjX34.js → monitoring-stats-row-C8qE8vIX.js} +1 -1
- package/dist/client/assets/{multi-select-BPe8FRks.js → multi-select-PUmjNPLo.js} +1 -1
- package/dist/client/assets/{mustache-Cghs0xAa.js → mustache-DoPKkDOt.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-PZGmoG1J.js → oauth-callback-ai-provider-BkPGppSA.js} +1 -1
- package/dist/client/assets/{oauth-callback-DasyYGDW.js → oauth-callback-yzNiiBZS.js} +1 -1
- package/dist/client/assets/{onboarding-CxwToftc.js → onboarding-DNDx-VJt.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CkdziasT.js → optimistic-project-sidebar-views-DQAcmOUC.js} +1 -1
- package/dist/client/assets/{organization-choice-DyW08sxK.js → organization-choice-X5fcp7VC.js} +1 -1
- package/dist/client/assets/{orgs-DJ8iJmJH.js → orgs-C71bHZfS.js} +1 -1
- package/dist/client/assets/{page-seo-form-Di_npWJ4.js → page-seo-form-CJ5C4DO5.js} +1 -1
- package/dist/client/assets/{pair-Dpg5RzdY.js → pair-D4JmcK-t.js} +1 -1
- package/dist/client/assets/{plan-ladder-ClS63sS8.js → plan-ladder-CQ1a44li.js} +1 -1
- package/dist/client/assets/{popover-RErMjkys.js → popover-cYfVOF_J.js} +1 -1
- package/dist/client/assets/{post-calendar-Ba_bnQmW.js → post-calendar-DW1nVDLh.js} +1 -1
- package/dist/client/assets/{post-editor-CMawN_7j.js → post-editor-C5j6zvkW.js} +1 -1
- package/dist/client/assets/{preview-content-Cir3xjov.js → preview-content-DlgGWAMY.js} +1 -1
- package/dist/client/assets/{preview-dialog-DXRDlQ04.js → preview-dialog-DMVdVz_V.js} +1 -1
- package/dist/client/assets/{primitives-D5fyRotM.js → primitives-7Kw_jkKz.js} +1 -1
- package/dist/client/assets/{profile-CARb014r.js → profile-fIXgfLVj.js} +1 -1
- package/dist/client/assets/{project-app-view-CbZ9X9YB.js → project-app-view-DpkzCjxR.js} +1 -1
- package/dist/client/assets/{project-feed-BnvodKMh.js → project-feed-D1Rnls8q.js} +1 -1
- package/dist/client/assets/{project-icon-B0ih2u61.js → project-icon-CWg_rHTZ.js} +1 -1
- package/dist/client/assets/project-reports-BcpuMQY2.js +1 -0
- package/dist/client/assets/project-tasks-Cbu0gYbc.js +1 -0
- package/dist/client/assets/{prompts-DC4p_0y3.js → prompts-D1i8e1V8.js} +1 -1
- package/dist/client/assets/record-editor-CQeidmi2.js +1 -0
- package/dist/client/assets/{redirect-editor-B55pPerd.js → redirect-editor-BL101gtT.js} +1 -1
- package/dist/client/assets/registry-Dkgi61cL.js +2 -0
- package/dist/client/assets/{registry-layout-hY2gP5kb.js → registry-layout-r2D039nl.js} +1 -1
- package/dist/client/assets/reports-StG6MJZE.js +1 -0
- package/dist/client/assets/{reports-BRDL0pEv.js → reports-TdOY4KuN.js} +1 -1
- package/dist/client/assets/{reports-onboarding-CVlJWsoz.js → reports-onboarding-s05s2vjv.js} +1 -1
- package/dist/client/assets/{reports-tab-DSQtYmT9.js → reports-tab-D0Xwzbct.js} +2 -2
- package/dist/client/assets/{repositories-D8heZRgl.js → repositories-JDvNAhI8.js} +1 -1
- package/dist/client/assets/{repository-import-picker-C2CebsOL.js → repository-import-picker-BNluAY2V.js} +1 -1
- package/dist/client/assets/{repository-picker-5XZZ15v0.js → repository-picker-D9agNhNi.js} +1 -1
- package/dist/client/assets/{require-capability-BJkKy0kt.js → require-capability-DjYcyxbJ.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BwX4AD0R.js → required-auth-layout-C3o3t9X1.js} +1 -1
- package/dist/client/assets/{reset-password-D0tmp0EO.js → reset-password-DOQza5N6.js} +1 -1
- package/dist/client/assets/{resizable-DDt8g8vK.js → resizable-BHYHfZY5.js} +1 -1
- package/dist/client/assets/{review-settings-BuR2yqLd.js → review-settings-zUGfHLOe.js} +1 -1
- package/dist/client/assets/{rich-text-link-control-BU04B-4N.js → rich-text-link-control-BMZBKHAS.js} +1 -1
- package/dist/client/assets/{roles-Dlq8_r8a.js → roles-CbYdUx8a.js} +1 -1
- package/dist/client/assets/{route-CVpzQ3gM.js → route--XOZLXQj.js} +1 -1
- package/dist/client/assets/{route-Kp0M8uVs.js → route-BMqM-gRN.js} +1 -1
- package/dist/client/assets/{route-DE-oHInD.js → route-DJ7DRiHo.js} +1 -1
- package/dist/client/assets/{runnable-block-editor-CS_U3fa-.js → runnable-block-editor-eIl1ZAUD.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CsT5D-QV.js → sandbox-lifecycle-context-dIh2VE9T.js} +1 -1
- package/dist/client/assets/{schema-kS1q2dfz.js → schema-DLCqAhaO.js} +1 -1
- package/dist/client/assets/{scroll-area-CXYGaVSO.js → scroll-area-B6yfQzTQ.js} +1 -1
- package/dist/client/assets/{search-input-BtpfjT5l.js → search-input-B9FxoKon.js} +1 -1
- package/dist/client/assets/{secrets-DriRRH1t.js → secrets-Ckg8Rd0M.js} +1 -1
- package/dist/client/assets/{sections-editor-C9C533d2.js → sections-editor-DfusxW9l.js} +1 -1
- package/dist/client/assets/{select-BOl9wnf6.js → select-BemZ3-RS.js} +1 -1
- package/dist/client/assets/{select-model-S4XMti-S.js → select-model-Dt_mcRLi.js} +1 -1
- package/dist/client/assets/{seo-editor-BFKhbHb8.js → seo-editor-BEgFLCyp.js} +1 -1
- package/dist/client/assets/{settings-tab-CzTdGYon.js → settings-tab-W9gLVP9Y.js} +1 -1
- package/dist/client/assets/{sheet-Ceo6cjp6.js → sheet-CAYJdNnO.js} +1 -1
- package/dist/client/assets/{shell-layout-CQI5EYIN.js → shell-layout-BZ9RU057.js} +1 -1
- package/dist/client/assets/{sidebar-Cr04YrvT.js → sidebar-kfvz7bzl.js} +1 -1
- package/dist/client/assets/{skill-preview-CJENC0FV.js → skill-preview-DKoageod.js} +1 -1
- package/dist/client/assets/{skills-_wNQ3Q4Z.js → skills-DZXynXjf.js} +1 -1
- package/dist/client/assets/{sso-DcjvBhN8.js → sso-aIkFrBYs.js} +1 -1
- package/dist/client/assets/{store-C8yaccqA.js → store-PyPRbE--.js} +1 -1
- package/dist/client/assets/store-registry-mk4k386L.js +2 -0
- package/dist/client/assets/{switch-DbzO6PiM.js → switch-CwYc17c1.js} +1 -1
- package/dist/client/assets/{synced-repos-CUy4rER9.js → synced-repos-LBwJXWce.js} +1 -1
- package/dist/client/assets/{table-CUSmiMk_.js → table-Dk8JamWN.js} +1 -1
- package/dist/client/assets/{tabs-52cPaZXm.js → tabs-CScSsCn-.js} +1 -1
- package/dist/client/assets/{task-board-CurTs85l.js → task-board-WxptS5oC.js} +1 -1
- package/dist/client/assets/{task-route-Bm0ou-_S.js → task-route-CgUDYaF5.js} +1 -1
- package/dist/client/assets/{task-status-BaM-QAj1.js → task-status-DYV2rHq2.js} +1 -1
- package/dist/client/assets/tasks-CwnRPaEK.js +1 -0
- package/dist/client/assets/{tasks-BwcO5_EM.js → tasks-Dyp4w1ZL.js} +1 -1
- package/dist/client/assets/{textarea-Q7sXwojB.js → textarea-C-rDHIo4.js} +1 -1
- package/dist/client/assets/{thread-intent-DEVJhxVt.js → thread-intent-Dqbb6tX6.js} +1 -1
- package/dist/client/assets/{thread-route-Dwt9n8IO.js → thread-route-B7ApJPMo.js} +1 -1
- package/dist/client/assets/{thread-route-D6xj1qQJ.js → thread-route-DGpNj7En.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BZp0HOAe.js → thread-sheet-body-CXERmuvO.js} +1 -1
- package/dist/client/assets/{toggle-group-CXPhZI2J.js → toggle-group-BwAc-516.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-B5qgEXx3.js → toolbar-icon-button-D5CIjxUn.js} +1 -1
- package/dist/client/assets/{tooltip-DIW02rf-.js → tooltip-D5dIOzcQ.js} +1 -1
- package/dist/client/assets/{track-B4UKRWe_.js → track-CfasnexS.js} +1 -1
- package/dist/client/assets/{types-B3jTqzVf.js → types-BKgDxdgt.js} +1 -1
- package/dist/client/assets/{usage-stats-Bb9Gp-Dh.js → usage-stats-CzjkHtFz.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DMafZHsF.js → use-ai-providers-DHpBr525.js} +1 -1
- package/dist/client/assets/{use-automations-COtBDrNr.js → use-automations-D8fUWM0i.js} +1 -1
- package/dist/client/assets/{use-autosave-CVgSUfQU.js → use-autosave-BcXFrygg.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DMsU19hB.js → use-connect-companion-BI8_ITvf.js} +1 -1
- package/dist/client/assets/{use-connection-Cgge7ejL.js → use-connection-1DEAzFaJ.js} +1 -1
- package/dist/client/assets/{use-copy-Cfn-m-ZW.js → use-copy-CrTQ1bFc.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CIJNntTR.js → use-create-virtual-mcp-6onzYx_V.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-BUWupqqb.js → use-date-fns-locale-CKJk6bHw.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Z2J2ec3T.js → use-debounced-autosave-CscEX7LB.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DfSh3fpE.js → use-debounced-value-Cd1Twr6w.js} +1 -1
- package/dist/client/assets/{use-deco-credits-Du018wK9.js → use-deco-credits-DXbh8RF9.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-B-nXlaQa.js → use-decopilot-events-BorkAE1x.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CbdREeJX.js → use-delete-connection-D14lo6hH.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BfQ856y9.js → use-deployment-admin-CnWMkexv.js} +1 -1
- package/dist/client/assets/{use-entitlements-Bir1zQcD.js → use-entitlements-CW1G9reZ.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-CI4dqTq2.js → use-fast-preview-draft-url-C6GlSiLC.js} +1 -1
- package/dist/client/assets/{use-file-configs-B04A692l.js → use-file-configs-CIuxe_Ni.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-NmeaxM7f.js → use-infinite-scroll-C3V6bChR.js} +1 -1
- package/dist/client/assets/{use-join-requests-DI0a8svX.js → use-join-requests-D9RxS7KW.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CBiJ8PZZ.js → use-main-panel-tabs-DXkaeHMV.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-B5PR04-x.js → use-mcp-auth-status-BH9IDFQ1.js} +1 -1
- package/dist/client/assets/{use-mcp-client-2DKlVY7y.js → use-mcp-client-2uEIRhaM.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DPn1lgbL.js → use-mcp-prompts-CoIIHF5C.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-0KttftJq.js → use-mcp-tools-BEXh2Dal.js} +1 -1
- package/dist/client/assets/{use-members-BOo0dfib.js → use-members-B9Bp6K2N.js} +1 -1
- package/dist/client/assets/{use-mobile-dc5AlUoG.js → use-mobile-CpN-x3jP.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BsM0_8Qa.js → use-navigate-to-agent-D91bju80.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-DU-RhPSk.js → use-open-billing-url-BerGO0rw.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-EU2_QrcX.js → use-org-auth-client-r5wiYH2P.js} +1 -1
- package/dist/client/assets/{use-org-fs-CPcFon5v.js → use-org-fs-Bts9OSaP.js} +1 -1
- package/dist/client/assets/{use-org-notice-CJ4ginwY.js → use-org-notice-CoJcS75H.js} +1 -1
- package/dist/client/assets/{use-org-sso-DliUqcof.js → use-org-sso-dhAsVLFb.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DWRM5Xlm.js → use-organization-roles-kAP23ZDQ.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CZaZMu7C.js → use-organization-settings-OP1vKLQc.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-ClG-UYrb.js → use-panel-navigate-DArr9jKh.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-YmT7vpKk.js → use-project-native-view-presence-7Bqoz-C1.js} +1 -1
- package/dist/client/assets/{use-project-scope-CsFUzitf.js → use-project-scope-DUmb12wa.js} +1 -1
- package/dist/client/assets/{use-registry-connections-JpgvKLOj.js → use-registry-connections-T5KGR_Hv.js} +1 -1
- package/dist/client/assets/{use-releases-Bgl6UW0_.js → use-releases-C3yM6r03.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-eNPzfjim.js → use-reports-diagnostic-vTs5yUh0.js} +1 -1
- package/dist/client/assets/{use-route-default-main-DDalOeoB.js → use-route-default-main-D6cfsdMd.js} +1 -1
- package/dist/client/assets/{use-secrets-WK-wxIoH.js → use-secrets-CVFKBXHe.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CUFpzI8Q.js → use-section-preview-base-YyD8NP1s.js} +1 -1
- package/dist/client/assets/{use-session-runtime-CwgGPQkM.js → use-session-runtime-Dg7Dw6FF.js} +1 -1
- package/dist/client/assets/{use-tags-BqLVEjBd.js → use-tags-yE947YEK.js} +1 -1
- package/dist/client/assets/{use-task-metadata-D1gl7viW.js → use-task-metadata-Cxd6otqh.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BnQmraib.js → use-thread-outputs-HjlkcFr2.js} +1 -1
- package/dist/client/assets/{use-view-mode-BLK8sDZS.js → use-view-mode-BsvAwGGR.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-vVWql7vM.js → use-virtual-mcp-De5-1hZU.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-TmIWCfQ-.js +1 -0
- package/dist/client/assets/{useQueries-Do0UR3yN.js → useQueries-Dg8jJOK1.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C8wrcyHJ.js +1 -0
- package/dist/client/assets/{users-DtkqmbRr.js → users-DmBfcg5F.js} +1 -1
- package/dist/client/assets/{utils-WGdymi8M.js → utils-Bx7x03n7.js} +1 -1
- package/dist/client/assets/{variant-calendar-DBuSS1Kj.js → variant-calendar-DPR_CnEY.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-zmFjw0un.js → variant-matcher-override-DyHDH8Wv.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-5ObOX782.js → view-mode-toggle-Cr1ou40b.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DhQhvEKt.js → virtual-mcp-BvoWP1mU.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-CmHjLSBh.js +0 -1
- package/dist/client/assets/agent-deck-BmbZkAAh.js +0 -1
- package/dist/client/assets/agent-file-DWz6GUfE.js +0 -1
- package/dist/client/assets/agent-library-file-Buf4K-5l.js +0 -1
- package/dist/client/assets/agent-settings-D9FokKv0.js +0 -1
- package/dist/client/assets/agent-site-editor-code-Bjs5yYWF.js +0 -2
- package/dist/client/assets/agent-view-DMFjk5Go.js +0 -1
- package/dist/client/assets/api-keys-CWLFncf0.js +0 -1
- package/dist/client/assets/app-editor-BwzQ2tDT.js +0 -1
- package/dist/client/assets/category-editor-DYvQntUV.js +0 -1
- package/dist/client/assets/mock-board-CRzDhPtf.js +0 -90
- package/dist/client/assets/project-reports-N4YBKsf_.js +0 -1
- package/dist/client/assets/project-tasks-Bhadpjy2.js +0 -1
- package/dist/client/assets/record-editor-B7I5ENzo.js +0 -1
- package/dist/client/assets/registry-C0G-_nW5.js +0 -2
- package/dist/client/assets/reports-B1m4nLcC.js +0 -1
- package/dist/client/assets/store-registry-C4goSG7S.js +0 -2
- package/dist/client/assets/tasks-B9F5PMjK.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BUDJQ-a0.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BCBsko2y.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,b as T,j as n,I as It,r as A,J as xs,M as E,l as z,B as Le,F as gs,R as we,U as Xe,o as F,X as Pt,a as Y,d as $e,v as Tt,t as re,Y as hs,Z as zt,_ as At,n as Ot,e as bs,K as Ee,w as js,$ as vs,m as st,a0 as ys,s as Ss,L as Rt,a1 as M,C as ce,D as nt,a2 as ks,a3 as jt,a4 as Ns,a5 as _s,a6 as ws,a7 as $s,a8 as Cs,f as Is,k as Ps,a9 as Ts,E as zs,u as As,O as Os}from"./index-CfiHR5p3.js";import{u as Ce,S as Rs,a as Ds,b as Ms,c as ae,d as L,e as se,f as Ye,g as Ls,h as Es}from"./sidebar-Cr04YrvT.js";import{S as Fs,a as qs,b as Vs}from"./sheet-Ceo6cjp6.js";import{u as ot}from"./use-mobile-dc5AlUoG.js";import{i as it,a as Bs}from"./Printer-AWNoUKRJ.js";import{P as Ne}from"./index-wju8DM5a.js";import{T as rt,I as Us}from"./toolbar-icon-button-B5qgEXx3.js";import{u as Hs,i as Dt}from"./use-org-notice-CJ4ginwY.js";import{u as Se,a as He,b as Mt}from"./use-project-scope-CsFUzitf.js";import{u as Ks}from"./thread-route-D6xj1qQJ.js";import{L as Z}from"./anchors-yqDzZN4K.js";import{P as at,a as Ke,b as lt}from"./popover-RErMjkys.js";import{D as Lt,a as Et,b as Ft,c as Ws}from"./drawer-B1TxBXeW.js";import{A as Fe}from"./avatar-DV69nhm1.js";import{T as ct,a as dt,b as Gs,c as ut}from"./tooltip-DIW02rf-.js";import{a as Qs}from"./Copy01-BKbbYkAO.js";import{n as Js}from"./Download01-BvE_0avp.js";import{i as Xs}from"./Globe01-DjDoxbql.js";import{n as qt}from"./LinkExternal01-DCfxP5B_.js";import{g as Ze,e as Ys}from"./TrendUp01-CSoUpxS1.js";import{i as Vt}from"./Monitor01-BWZHqfxa.js";import{n as Zs,a as en}from"./Sun-B2S_0TDV.js";import{a as Bt}from"./Settings02-Cng3FY1l.js";import{i as tn}from"./Shield01-CVF7EZQb.js";import{t as sn,a as nn,i as on,b as rn,c as Ut,s as mt,d as an,A as ln,n as Ht,e as Kt,f as cn,g as dn,h as un,j as mn,k as fn,l as pn}from"./agent-icon-I_u5FzRN.js";import{b as et,t as xn}from"./Users03-DSBIUomT.js";import{u as gn}from"./use-deployment-admin-BfQ856y9.js";import{u as hn}from"./use-is-desktop-app-BNujXJc_.js";import{i as bn,a as vt,D as jn}from"./download-app-dialog-BhmQVCrs.js";import{I as vn,u as yn}from"./use-join-requests-DI0a8svX.js";import{u as Sn}from"./use-deco-credits-Du018wK9.js";import{u as kn,a as Wt}from"./use-entitlements-Bir1zQcD.js";import{u as Nn,P as _n}from"./plan-ladder-ClS63sS8.js";import{u as wn}from"./use-organization-settings-CZaZMu7C.js";import{S as $n}from"./scroll-area-CXYGaVSO.js";import{u as Cn}from"./useInfiniteQuery-BUDJQ-a0.js";import{n as In}from"./hooks-C4BbSdNW.js";import{t as Gt,S as Pn,b as Tn,p as zn,a as An,i as On,c as Rn,d as Dn}from"./task-route-Bm0ou-_S.js";import{g as Mn}from"./get-initials-D-f_fDFw.js";import{a as Ln}from"./format-time-BtXRrtv4.js";import{i as qe}from"./Check-DYuLLcXz.js";import{i as En}from"./Tool01-DW_T3YR5.js";import{s as Fn}from"./Plus-DaMIkku0.js";import{C as yt,a as Me,b as Ve,c as qn,d as Vn,e as Bn}from"./command-PF8SQ01C.js";import{P as ft}from"./project-icon-B0ih2u61.js";import{C as Un}from"./create-organization-dialog-Wy8ivV4K.js";import{s as Hn}from"./XClose-5naA93fy.js";import{u as Kn}from"./use-virtual-mcp-vVWql7vM.js";import{i as Wn}from"./Share07-BgGqkker.js";import{i as Gn}from"./ArrowLeft-qXobBdxD.js";import{e as Qn,r as Qt,u as Jn,s as Xn,p as Yn,P as Zn}from"./use-project-native-view-presence-YmT7vpKk.js";import{u as Jt}from"./optimistic-project-sidebar-views-CkdziasT.js";import{u as pt}from"./use-navigate-to-agent-BsM0_8Qa.js";import{c as eo}from"./SwitchHorizontal01-BaPOYupn.js";import{a as to}from"./Image01-D3ZQNp9r.js";import{u as so}from"./use-panel-navigate-ClG-UYrb.js";import{t as no}from"./ChevronUp-B-GxN-tN.js";import{i as oo}from"./ChevronRight-BvrNCsKT.js";import{i as io}from"./CreditCard01-D16_sfKz.js";import{i as ro}from"./GitBranch01-BPIVJl4U.js";import{i as ao}from"./HardDrive-UFyvehqQ.js";import{i as lo}from"./Key01-0kVvyKcG.js";import{t as co}from"./Stars01-DSWmseOt.js";import{s as uo}from"./User01-CZRm273k.js";import{i as mo}from"./Zap-XMkPrxNc.js";import{p as fo,q as po}from"./question-004-sINsf4GQ.js";import{u as xo}from"./use-decopilot-events-B-nXlaQa.js";import"./X-Dr0Tqjzv.js";import"./github-repo-BknN0SVI.js";import"./index-B7wVUCeI.js";import"./AlertCircle-CZODjB-G.js";import"./ArrowUp-B2y3FAZT.js";import"./Tool02-zLL5jksN.js";import"./ArrowRight-_qaicB3i.js";import"./ZoomOut-BLK0GcJv.js";import"./CheckCircle-Cpa5ukkn.js";import"./DotsVertical-BKAvE_4x.js";import"./UserSquare-BdoEkD8Z.js";import"./Database01-C9bPAMOv.js";import"./MessageCircle01-CweHuqp7.js";import"./Eye-CO0I0F0e.js";import"./File02-Cnt06RSY.js";import"./Link01-Ct7pxTAu.js";import"./Package-T9dujty4.js";import"./Palette-B9i9hnCi.js";import"./Play-BIZK_qUZ.js";import"./SearchLg-C2sftj0S.js";import"./SearchMd-B6arCmyn.js";import"./Trash01-CchLM2HV.js";import"./Upload01-G3c4UCfB.js";import"./Users01-D_H_0-Jf.js";import"./XCircle-Ce8PGmrS.js";import"./dialog-DKHdGeG-.js";import"./form-CCI8usbr.js";import"./label-DCUE6TYd.js";import"./select-BOl9wnf6.js";import"./textarea-Q7sXwojB.js";import"./use-org-auth-client-EU2_QrcX.js";import"./use-organization-roles-DWRM5Xlm.js";import"./use-ai-providers-DMafZHsF.js";import"./schema-kS1q2dfz.js";import"./task-board-CurTs85l.js";import"./infiniteQueryObserver-F_wqd-Rj.js";import"./use-mcp-client-2DKlVY7y.js";import"./auth-UveS8wF5.js";import"./backoff-8mStPHYB.js";import"./dropdown-menu-CoycaRIZ.js";import"./github-icon-CCyh_tld.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-CR7IhZdQ.js";import"./alert-dialog-dzu9U-o1.js";import"./input-DOqceFPC.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-B04A692l.js";import"./site-slug-uya6Wp4-.js";import"./thread-intent-DEVJhxVt.js";import"./slugify-CEUa2lfQ.js";function le(){const{state:t,isMobile:e}=Ce();return t==="collapsed"&&!e}function go(t){const e=y.c(11),{onPointerDown:s,onDoubleClick:r}=t,o=T(),{isMobile:i}=Ce(),a=le();if(i||a)return null;let l;e[0]!==o?(l=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==o?(c=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=c):c=e[3];let d,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(d={left:"var(--sidebar-width)"},u=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"}),e[4]=d,e[5]=u):(d=e[4],u=e[5]);let m;return e[6]!==r||e[7]!==s||e[8]!==l||e[9]!==c?(m=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":l,title:c,onPointerDown:s,onDoubleClick:r,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:d,children:u}),e[6]=r,e[7]=s,e[8]=l,e[9]=c,e[10]=m):m=e[10],m}const xt=240,ho=400,bo="sidebar.width";function _e(t){return Math.max(xt,Math.min(ho,t))}function jo(){const t=y.c(11),[e,s]=It(bo,vo),r=A.useRef(null);let o;t[0]!==s||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=_e(e),p=r.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),g=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of g)x.style.transition="none";const h=x=>{const j=_e(f+(x.clientX-m));p?.style.setProperty("--sidebar-width",`${j}px`)},b=x=>{const j=_e(f+(x.clientX-m));s(j);for(const v of g)v.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",b),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",b)},t[0]=s,t[1]=e,t[2]=o):o=t[2];const i=o;let a;t[3]!==s?(a=()=>{s(xt)},t[3]=s,t[4]=a):a=t[4];const l=a;let c;t[5]!==e?(c=_e(e),t[5]=e,t[6]=c):c=t[6];let d;return t[7]!==i||t[8]!==l||t[9]!==c?(d={width:c,wrapperRef:r,onStartResize:i,resetWidth:l},t[7]=i,t[8]=l,t[9]=c,t[10]=d):d=t[10],d}function vo(t){return typeof t=="number"?_e(t):xt}const Xt=A.createContext(null);function Yt(){const t=A.use(Xt);if(!t)throw new Error("Layout regions require a Layout");return t}function yo({children:t,notice:e,expandedSidebar:s=!1}){const r=ot(),[o,i]=It(xs.sidebarOpen(),!0),a=jo();return n.jsx(Xt,{value:{isMobile:r,resize:a},children:n.jsx(Rs,{open:s||o,onOpenChange:i,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Ds,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.125rem"},children:t})]})})})}function So(t){const e=y.c(22),{children:s,renderMobile:r}=t,o=T(),{isMobile:i,resize:a}=Yt(),{openMobile:l,setOpenMobile:c}=Ce();if(!i){let h;e[0]!==a.onStartResize||e[1]!==a.resetWidth?(h=n.jsx(go,{onPointerDown:a.onStartResize,onDoubleClick:a.resetWidth}),e[0]=a.onStartResize,e[1]=a.resetWidth,e[2]=h):h=e[2];let b;return e[3]!==s||e[4]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[3]=s,e[4]=h,e[5]=b):b=e[5],b}let d;e[6]!==o?(d=o("layouts.shellControls.navigationTitle"),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==d?(u=n.jsx(Fs,{className:"sr-only",children:d}),e[8]=d,e[9]=u):u=e[9];let m;e[10]!==c?(m=()=>c(!1),e[10]=c,e[11]=m):m=e[11];let f;e[12]!==r||e[13]!==m?(f=r({onClose:m}),e[12]=r,e[13]=m,e[14]=f):f=e[14];let p;e[15]!==u||e[16]!==f?(p=n.jsxs(qs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[15]=u,e[16]=f,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==c||e[20]!==p?(g=n.jsx(Vs,{open:l,onOpenChange:c,children:p}),e[18]=l,e[19]=c,e[20]=p,e[21]=g):g=e[21],g}function ko(t){const e=y.c(10),{children:s}=t,r=T(),{isMobile:o}=Yt(),{toggleSidebar:i}=Ce();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"transparent",containerType:"inline-size"},e[0]=a):a=e[0];let l;e[1]!==o||e[2]!==r||e[3]!==i?(l=o&&n.jsxs(Ne.Topbar,{className:"px-1 bg-sidebar",children:[n.jsx(Ne.Topbar.Left,{className:"shrink-0",children:n.jsx(rt,{onClick:i,"aria-label":r("layouts.shellControls.toggleSidebar"),children:n.jsx(it,{size:16})})}),n.jsx(Ne.Topbar.Center,{className:"justify-start",children:n.jsx(Ne.Topbar.Center.Target,{})})]}),e[1]=o,e[2]=r,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s?(c=n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s}),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==c?(d=n.jsx(Ms,{className:"flex flex-col min-h-0",style:a,children:n.jsxs(Ne,{variant:"plain",className:"bg-sidebar",children:[l,c]})}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}const Je=Object.assign(yo,{Sidebar:So,Content:ko});function No(){const t=y.c(19),{org:e}=E(),{data:s}=Hs(e.slug);if(!s)return null;const r=s.severity==="block",o=r?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let i;t[0]!==o?(i=z("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 a=r?void 0:"text-warning";let l;t[2]!==a?(l=z("size-4 shrink-0",a),t[2]=a,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(gs,{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 u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(Le,{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]=m):m=t[12];let f;return t[13]!==i||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:i,children:[c,d,u,m]}),t[13]=i,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function _o(){const t=y.c(4),{setScope:e}=Se(),s=Ks(),r=we();let o;return t[0]!==r||t[1]!==s||t[2]!==e?(o=()=>{const i=s!==void 0?"route_resolves_scope":Xe(r,null)?null:"route_needs_scope";F("scope_cleared",{relocated:i!==null,reason:i}),e(null)},t[0]=r,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}function We(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},t[0]=e):e=t[0],!!Pt(e)}const Be="size-4 shrink-0";function gt(t){const e=y.c(5),{children:s,className:r}=t;let o;e[0]!==r?(o=z("flex w-4 shrink-0 items-center justify-center",r),e[0]=r,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 ye(t){const e=y.c(26),{item:s,onClose:r}=t;let o;e[0]!==s.className?(o=z("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 u=s.external?"_blank":void 0,m=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 g;return e[6]!==i||e[7]!==s.href||e[8]!==r||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(g=n.jsxs("a",{href:s.href,target:u,rel:m,className:i,onClick:r,children:[f,p]}),e[6]=i,e[7]=s.href,e[8]=r,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=g):g=e[13],g}let a;e[14]!==s||e[15]!==r?(a=()=>{s.onClick?.(),r()},e[14]=s,e[15]=r,e[16]=a):a=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]!==a||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[l,c]}),e[21]=i,e[22]=a,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function wo(){const t=y.c(4),e=T();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let r;return t[2]!==s?(r=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]=r):r=t[3],r}function St(t){const e=y.c(38),{user:s,userImage:r,isImpersonating:o,isMobile:i}=t,a=T(),l=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=z("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==r?(u=n.jsx(Fe,{url:r,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=r,e[4]=u):u=e[4];let m;e[5]!==a||e[6]!==s?.name?(m=s?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(wo,{}),e[10]=o,e[11]=p):p=e[11];let g;e[12]!==f||e[13]!==p?(g=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=g):g=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 x;e[17]!==b||e[18]!==g?(x=n.jsxs("div",{className:"flex-1 min-w-0",children:[g,b]}),e[17]=b,e[18]=g,e[19]=x):x=e[19];let j;e[20]!==a||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=s,e[22]=j):j=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Qs,{size:14}),e[23]=v):v=e[23];let S;e[24]!==j?(S=n.jsx(ct,{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]=S):S=e[25];let k;e[26]!==a?(k=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(dt,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let _;e[30]!==S||e[31]!==N?(_=n.jsx(Gs,{delayDuration:300,children:n.jsxs(ut,{children:[S,N]})}),e[30]=S,e[31]=N,e[32]=_):_=e[32];let $;return e[33]!==x||e[34]!==_||e[35]!==c||e[36]!==u?($=n.jsxs("div",{className:c,children:[u,x,_]}),e[33]=x,e[34]=_,e[35]=c,e[36]=u,e[37]=$):$=e[37],$}function kt(t){const e=y.c(35),{themeOptions:s,preferences:r,setPreferences:o,isMobile:i}=t,a=T(),l=i?"size-8":"size-7",c=i?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=z("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==r.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==r.theme||e[9]!==o?(k=N=>{const{value:_,icon:$,label:w}=N;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o(C=>({...C,theme:_})),className:z(l,"rounded-md flex items-center justify-center transition-colors",r.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:$},_)},e[7]=l,e[8]=r.theme,e[9]=o,e[10]=k):k=e[10],u=s.map(k),e[2]=l,e[3]=r.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==r.enableSounds||e[14]!==a?(f=r.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=r.enableSounds,e[14]=a,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o($o),e[16]=o,e[17]=p):p=e[17];const g=r.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]!==g?(h=z(l,"rounded-md flex items-center justify-center transition-colors",g),e[18]=l,e[19]=g,e[20]=h):h=e[20];let b;e[21]!==r.enableSounds?(b=r.enableSounds?n.jsx(nn,{size:14}):n.jsx(on,{size:14}),e[21]=r.enableSounds,e[22]=b):b=e[22];let x;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(x=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]=x):x=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.367.6"]}),e[28]=j):j=e[28];let v;e[29]!==x?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[x,j]}),e[29]=x,e[30]=v):v=e[30];let S;return e[31]!==v||e[32]!==d||e[33]!==m?(S=n.jsxs("div",{className:d,children:[m,v]}),e[31]=v,e[32]=d,e[33]=m,e[34]=S):S=e[34],S}function $o(t){return{...t,enableSounds:!t.enableSounds}}function Nt(t){const e=y.c(54),{user:s,userImage:r,menuItems:o,signOutItem:i,stopImpersonatingItem:a,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let S;e[0]!==l||e[1]!==s||e[2]!==r?(S=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=r,e[3]=S):S=e[3];let k;if(e[4]!==m||e[5]!==o){let P;e[7]!==m?(P=O=>n.jsx(ye,{item:O,onClose:m},O.key),e[7]=m,e[8]=P):P=e[8],k=o.map(P),e[4]=m,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==m||e[10]!==a?(N=a&&n.jsx(ye,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=N):N=e[11];let _;e[12]!==m||e[13]!==i?(_=n.jsx(ye,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=_):_=e[14];let $;e[15]!==k||e[16]!==N||e[17]!==_?($=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,_]})}),e[15]=k,e[16]=N,e[17]=_,e[18]=$):$=e[18];let w;e[19]!==d||e[20]!==u||e[21]!==c?(w=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=w):w=e[22];let C;return e[23]!==S||e[24]!==$||e[25]!==w?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,$,w]}),e[23]=S,e[24]=$,e[25]=w,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==r?(p=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=r,e[30]=p):p=e[30];let g;if(e[31]!==m||e[32]!==o){let S;e[34]!==m?(S=k=>n.jsx(ye,{item:k,onClose:m},k.key),e[34]=m,e[35]=S):S=e[35],g=o.map(S),e[31]=m,e[32]=o,e[33]=g}else g=e[33];let h;e[36]!==m||e[37]!==a?(h=a&&n.jsx(ye,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==i?(b=n.jsx(ye,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=b):b=e[41];let x;e[42]!==g||e[43]!==h||e[44]!==b?(x=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[g,h,b]}),e[42]=g,e[43]=h,e[44]=b,e[45]=x):x=e[45];let j;e[46]!==d||e[47]!==u||e[48]!==c?(j=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=j):j=e[49];let v;return e[50]!==p||e[51]!==x||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,x,j]})}),e[50]=p,e[51]=x,e[52]=j,e[53]=v):v=e[53],v}function tt(){const t=y.c(107),e=T(),{data:s}=Y.useSession(),{org:r}=E(),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=Pt(i)?.params.org,[c,d]=Tt(),u=ot(),{isAdmin:m}=gn(),f=hn(),[p,g]=A.useState(!1),[h,b]=A.useState(!1),x=s?.user,j=x?.image,v=!!s?.session?.impersonatedBy;let S;t[1]===Symbol.for("react.memo_cache_sentinel")?(S=()=>g(!1),t[1]=S):S=t[1];const k=S;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Bt,{size:16}),t[4]=_):_=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 w;t[8]!==N||t[9]!==$?(w={key:"preferences",label:N,icon:_,onClick:$},t[8]=N,t[9]=$,t[10]=w):w=t[10];let C;t[11]!==r||t[12]!==o?(C=r?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(qt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:r.slug}})}}]:[],t[11]=r,t[12]=o,t[13]=C):C=t[13];let P;t[14]!==f||t[15]!==e?(P=(bn()||vt())&&!f?[{key:"install-desktop-app",label:vt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Js,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=P):P=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let ne;t[19]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Bs,{size:16}),t[19]=ne):ne=t[19];let K;t[20]!==O?(K={key:"terms",label:O,icon:ne,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=K):K=t[21];let W;t[22]!==e?(W=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=W):W=t[23];let oe;t[24]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(tn,{size:16}),t[24]=oe):oe=t[24];let q;t[25]!==W?(q={key:"privacy",label:W,icon:oe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=W,t[26]=q):q=t[26];let G;t[27]!==e?(G=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=G):G=t[28];let V;t[29]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(hs,{className:"w-4 h-4"}),t[29]=V):V=t[29];let B;t[30]!==G?(B={key:"github",label:G,icon:V,href:"https://github.com/decocms/studio",external:!0},t[30]=G,t[31]=B):B=t[31];let Q;t[32]!==e?(Q=e("common.accountPopover.community"),t[32]=e,t[33]=Q):Q=t[33];let ee;t[34]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(et,{size:16}),t[34]=ee):ee=t[34];let J;t[35]!==Q?(J={key:"community",label:Q,icon:ee,href:"https://decocms.com/discord",external:!0},t[35]=Q,t[36]=J):J=t[36];let U;t[37]!==e?(U=e("common.accountPopover.homepage"),t[37]=e,t[38]=U):U=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Xs,{size:16}),t[39]=me):me=t[39];let D;t[40]!==U?(D={key:"homepage",label:U,icon:me,href:"https://decocms.com",external:!0},t[40]=U,t[41]=D):D=t[41];let H;t[42]!==m||t[43]!==o||t[44]!==e?(H=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(sn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=H):H=t[45];let ie;t[46]!==K||t[47]!==q||t[48]!==B||t[49]!==J||t[50]!==D||t[51]!==H||t[52]!==w||t[53]!==C||t[54]!==P?(ie=[w,...C,...P,K,q,B,J,D,...H],t[46]=K,t[47]=q,t[48]=B,t[49]=J,t[50]=D,t[51]=H,t[52]=w,t[53]=C,t[54]=P,t[55]=ie):ie=t[55];const ke=ie;let X;t[56]!==e?(X=e("common.accountPopover.signOut"),t[56]=e,t[57]=X):X=t[57];let te;t[58]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(Ze,{size:16}),t[58]=te):te=t[58];let I;t[59]!==X?(I={key:"logout",label:X,icon:te,onClick:Io},t[59]=X,t[60]=I):I=t[60];const R=I;let Ie;t[61]!==v||t[62]!==e?(Ie=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ze,{size:16}),onClick:async()=>{const{error:bt}=await Y.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]=Ie):Ie=t[63];const Ge=Ie;let Pe;t[64]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(Zs,{size:14}),t[64]=Pe):Pe=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:Pe,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Te;t[69]===Symbol.for("react.memo_cache_sentinel")?(Te=n.jsx(en,{size:14}),t[69]=Te):Te=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Te,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let ze;t[74]===Symbol.for("react.memo_cache_sentinel")?(ze=n.jsx(Vt,{size:14}),t[74]=ze):ze=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:ze,label:he},t[77]=he,t[78]=be):be=t[78];let Ae;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ae=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ae):Ae=t[82];const Qe=Ae;let Oe;t[83]!==v||t[84]!==u||t[85]!==ke||t[86]!==c||t[87]!==d||t[88]!==R||t[89]!==Ge||t[90]!==Qe||t[91]!==x||t[92]!==j?(Oe={user:x,userImage:j,menuItems:ke,signOutItem:R,stopImpersonatingItem:Ge,isImpersonating:v,themeOptions:Qe,preferences:c,setPreferences:d,close:k,isMobile:u},t[83]=v,t[84]=u,t[85]=ke,t[86]=c,t[87]=d,t[88]=R,t[89]=Ge,t[90]=Qe,t[91]=x,t[92]=j,t[93]=Oe):Oe=t[93];const Re=Oe;let je;t[94]!==v||t[95]!==u||t[96]!==p||t[97]!==Re||t[98]!==e||t[99]!==x?.name||t[100]!==j?(je=u?n.jsxs(Lt,{open:p,onOpenChange:g,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>g(!0),className:z("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(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Et,{className:"h-[80dvh] p-0",children:[n.jsx(Ft,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(Nt,{...Re})]})]}):n.jsxs(at,{open:p,onOpenChange:g,children:[n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{"data-tour":Z.account,tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[n.jsx(gt,{children:n.jsx(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(lt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Co,children:n.jsx(Nt,{...Re})})]}),t[94]=v,t[95]=u,t[96]=p,t[97]=Re,t[98]=e,t[99]=x?.name,t[100]=j,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx(jn,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let De;return t[104]!==je||t[105]!==ve?(De=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=De):De=t[106],De}function Co(t){return t.preventDefault()}function Io(){F("signed_out",{source:"account_popover"}),zt(),Y.signOut()}class Po extends A.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 To(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function zo(){const t=y.c(17),e=$e(),{org:s}=E(),{hasDecoKey:r,balanceDollars:o}=Sn();if(!r)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 a;t[2]!==o?(a=z(o!=null&&To(o)),t[2]=o,t[3]=a):a=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(rn,{}),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 u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==a||t[14]!==l||t[15]!==u?(m=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:i,className:a,onClick:l,children:[c,u]})})}),t[12]=i,t[13]=a,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Ao={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},Oo={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Ro(){const t=y.c(40),e=T(),s=le(),r=$e(),{org:o}=E(),{data:i}=Wt();if(!i?.usage||!i.features.chat)return null;let a,l;if(t[0]!==i.usage.percent?(a=Math.round(i.usage.percent*100),l=Number.isFinite(a),t[0]=i.usage.percent,t[1]=a,t[2]=l):(a=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,a)),d=i.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==r||t[6]!==o.slug?(f=()=>r({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=r,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let g;t[8]!==p?(g=z(p),t[8]=p,t[9]=g):g=t[9];let h;t[10]!==i.plan.id||t[11]!==i.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Mo,{percent:c,state:i.usage.state}):n.jsx(Do,{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]!==g||t[16]!==h?(b=n.jsx(gt,{className:g,children:h}),t[15]=g,t[16]=h,t[17]=b):b=t[17];let x;t[18]!==i.plan.name?(x=n.jsx("span",{className:"truncate font-medium",children:i.plan.name}),t[18]=i.plan.name,t[19]=x):x=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]!==x?(v=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[x,j]}),t[22]=j,t[23]=x,t[24]=v):v=t[24];const S=Oo[i.usage.state];let k;t[25]!==S?(k=z("block h-full rounded-full",S),t[25]=S,t[26]=k):k=t[26];const N=`${c}%`;let _;t[27]!==N?(_={width:N},t[27]=N,t[28]=_):_=t[28];let $;t[29]!==k||t[30]!==_?($=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:_})}),t[29]=k,t[30]=_,t[31]=$):$=t[31];let w;t[32]!==v||t[33]!==$?(w=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[v,$]}),t[32]=v,t[33]=$,t[34]=w):w=t[34];let C;return t[35]!==w||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,w]})})}),t[35]=w,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function Do(t){const e=y.c(6),{planId:s}=t,{data:r}=Nn();let o;e[0]!==s||e[1]!==r?(o=r?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=r,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(Ut,{className:Be}),e[3]=l):l=e[3],l}let a;return e[4]!==i?(a=n.jsx(_n,{index:i,className:Be}),e[4]=i,e[5]=a):a=e[5],a}function Mo(t){const e=y.c(5),{percent:s,state:r}=t,o=2*Math.PI*8;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=z("-rotate-90",Be),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=a):a=e[1];const l=Ao[r],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:[a,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 Lo(){return kn()?n.jsx(Ro,{}):n.jsx(zo,{})}function _t(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Po,{children:n.jsx(A.Suspense,{fallback:null,children:n.jsx(Lo,{})})}),t[0]=e):e=t[0],e}const Eo=6e4;function Fo(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function qo(t,e){if(!t)return t;const s=e?new Set(e):null;let r=0;const o=t.pages.map(a=>{const l=a.notifications.filter(c=>s&&!s.has(c.id)?!0:(r++,!1));return{...a,notifications:l}}),i=s?Math.max(0,(t.pages[0]?.unreadCount??0)-r):0;return{...t,pages:o.map(a=>({...a,unreadCount:i}))}}function Vo(t,e){const s=y.c(4),{data:r}=Y.useSession(),o=r?.user?.id;let i;s[0]!==e||s[1]!==t||s[2]!==o?(i=a=>!t||!o?Ho:In.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),a()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=i):i=s[3],A.useSyncExternalStore(i,Uo,Bo)}function Bo(){return 0}function Uo(){return 0}function Ho(){}function Zt(){const t=y.c(37),{locator:e,org:s}=E(),r=At(),o=Ot();let i;t[0]!==e?(i=Ee.notifications(e),t[0]=e,t[1]=i):i=t[1];const a=i;let l;t[2]!==r?(l=$=>{const{pageParam:w}=$;return Fo(r,w)},t[2]=r,t[3]=l):l=t[3];let c;t[4]!==a||t[5]!==l?(c={queryKey:a,queryFn:l,initialPageParam:void 0,getNextPageParam:Go,refetchInterval:Eo},t[4]=a,t[5]=l,t[6]=c):c=t[6];const d=Cn(c);let u;t[7]!==o||t[8]!==a?(u=()=>o.invalidateQueries({queryKey:a,refetchType:"active"}),t[7]=o,t[8]=a,t[9]=u):u=t[9],Vo(s.slug,u);let m;t[10]!==r?(m=$=>r.call("NOTIFICATION_MARK_READ",$?{ids:$}:{}),t[10]=r,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==a?(f=async $=>{await o.cancelQueries({queryKey:a}),o.setQueryData(a,w=>qo(w,$))},p=()=>o.invalidateQueries({queryKey:a}),t[12]=o,t[13]=a,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let g;t[16]!==m||t[17]!==f||t[18]!==p?(g={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=g):g=t[19];const h=bs(g);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const x=b;let j;t[22]!==x?(j=x.flatMap(Ko),t[22]=x,t[23]=j):j=t[23];const v=x[0]?.unreadCount??0;let S;t[24]!==d?(S=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=S):S=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 _;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==v||t[32]!==S||t[33]!==k||t[34]!==N||t[35]!==j?(_={updates:j,redDotCount:v,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:S,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=v,t[32]=S,t[33]=k,t[34]=N,t[35]=j,t[36]=_):_=t[36],_}function Ko(t){return t.notifications.map(Wo)}function Wo(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 Go(t){return t.nextCursor??void 0}function Qo(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 Jo(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 Xo(t){const e=y.c(36),{update:s,orgSlug:r,onSelect:o}=t,i=T();let a;e[0]!==r||e[1]!==s.taskKeySeq?(a=Gt(r,s.taskKeySeq),e[0]=r,e[1]=s.taskKeySeq,e[2]=a):a=e[2];const l=a,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(Pn,{size:24}):n.jsx(Fe,{url:s.actorImage??void 0,fallback:Mn(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 u;e[7]!==s.taskTitle?(u=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]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=Ln(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let g;e[16]!==l?(g=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=g):g=e[17];let h;e[18]!==s.action?(h=z(Qo(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==i||e[21]!==s?(b=Jo(s,i),e[20]=i,e[21]=s,e[22]=b):b=e[22];let x;e[23]!==h||e[24]!==b?(x=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=x):x=e[25];let j;e[26]!==x||e[27]!==g?(j=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[g,x]}),e[26]=x,e[27]=g,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 S;return e[32]!==o||e[33]!==v||e[34]!==d?(S=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]=S):S=e[35],S}function Yo(t){const e=y.c(2),{onReach:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const i=new IntersectionObserver(a=>{a.some(Zo)&&s()});return i.observe(o),()=>i.disconnect()}}),e[0]=s,e[1]=r):r=e[1],r}function Zo(t){return t.isIntersecting}function ei(t){const e=y.c(23),{onClose:s}=t,r=T(),o=$e(),{org:i}=E(),{updates:a,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Zt();let m;e[0]!==r?(m=r("sidebar.inbox.title"),e[0]=r,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==r||e[6]!==a.length?(p=a.length>0&&n.jsx(Le,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:r("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=r,e[6]=a.length,e[7]=p):p=e[7];let g;e[8]!==f||e[9]!==p?(g=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]=g):g=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==i||e[17]!==r||e[18]!==a?(h=a.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(mt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:r("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:r("sidebar.inbox.emptyBody")})]}):n.jsxs($n,{className:"min-h-0 flex-1",children:[a.map(x=>{const j=Gt(i.slug,x.taskKeySeq);return n.jsx(Xo,{update:x,orgSlug:i.slug,onSelect:()=>{c(x.id),s(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:i.slug,taskKey:j}})}},x.id)}),d&&n.jsx(Yo,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=i,e[17]=r,e[18]=a,e[19]=h):h=e[19];let b;return e[20]!==g||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=b):b=e[22],b}function es(){const t=y.c(1),{redDotCount:e}=Zt();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 ts(t){const e=y.c(10),{open:s,onOpenChange:r,children:o}=t;let i;e[0]!==r||e[1]!==s?(i=s&&n.jsx(ei,{onClose:()=>r(!1)}),e[0]=r,e[1]=s,e[2]=i):i=e[2];let a;e[3]!==i?(a=n.jsx(lt,{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]=a):a=e[4];let l;return e[5]!==o||e[6]!==r||e[7]!==s||e[8]!==a?(l=n.jsxs(at,{open:s,onOpenChange:r,children:[o,a]}),e[5]=o,e[6]=r,e[7]=s,e[8]=a,e[9]=l):l=e[9],l}function ss(){const t=y.c(9),e=T(),[s,r]=A.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let i,a;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(mt,{size:15}),a=n.jsx(es,{}),t[2]=i,t[3]=a):(i=t[2],a=t[3]);let l;t[4]!==o?(l=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[i,a]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(ts,{open:s,onOpenChange:r,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function ti(){const t=y.c(15),e=T(),[s,r]=A.useState(!1),o=le();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 a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(mt,{}),l=n.jsx(es,{}),t[3]=a,t[4]=l):(a=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 u;t[9]!==i||t[10]!==d?(u=n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{tooltip:i,className:"relative",children:[a,l,d]})}),t[9]=i,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(ts,{open:s,onOpenChange:r,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function wt(){const t=y.c(10),e=T();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(gt,{children:n.jsx(an,{className:Be})}),t[2]=r):r=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 a;return t[7]!==s||t[8]!==i?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsx(vn,{trigger:n.jsxs(ae,{tooltip:s,children:[r,i]})})})}),t[7]=s,t[8]=i,t[9]=a):a=t[9],a}function si(){const t=y.c(13),e=le(),r=!wn();if(e){let c;t[0]!==r?(c=r&&n.jsx(_t,{}),t[0]=r,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(wt,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{children:n.jsx(ti,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(L,{children:[u,n.jsx(se,{children:n.jsx(tt,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Ye,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==r?(o=r&&n.jsx(_t,{}),t[7]=r,t[8]=o):o=t[8];let i;t[9]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(wt,{}),t[9]=i):i=t[9];let a;t[10]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(tt,{})}),n.jsx(ss,{})]})})}),t[10]=a):a=t[10];let l;return t[11]!==o?(l=n.jsxs(Ye,{className:"px-2 pb-3 gap-0.5",children:[o,i,a]}),t[11]=o,t[12]=l):l=t[12],l}function ni(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ye,{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(L,{children:n.jsx(se,{children:n.jsx(tt,{})})})}),n.jsx(ss,{})]})}),t[0]=e):e=t[0],e}function oi(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((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=y.c(13),{org:s,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",a=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==i?(l=z(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:oi(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]!==a?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:z("font-semibold leading-none",a),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=a,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function ii({invitation:t,onChanged:e}){const s=T(),[r,o]=A.useState(!1),i=t.organizationName??s("header.orgSwitcher.unknownOrganization"),a=async()=>{o(!0);try{const d=await Y.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})),js();let c;try{c=(await Y.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await Y.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(Le,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:a,disabled:r,children:s("header.orgSwitcher.accept")}),n.jsx(Le,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:r,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:n.jsx(Hn,{size:14})})]})]})}function ns(){const t=A.useContext(vs),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function ri(t){const e=y.c(13),s=t.trim(),{data:r}=Y.useSession(),o=r?.user?.id??"",i=s.length>0&&!!o,a=Ee.projectSearch(o,s);let l;e[0]!==s?(l=async x=>{const{signal:j}=x,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]!==a||e[4]!==l?(c={queryKey:a,queryFn:l,enabled:i,placeholderData:ys,staleTime:3e4,retry:!1},e[2]=i,e[3]=a,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=st(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const g=i&&u,h=i&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==g||e[11]!==h?(b={hits:p,isSearching:g,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=g,e[11]=h,e[12]=b):b=e[12],b}function $t(t){const e=y.c(15),{id:s,label:r,createLabel:o,onCreate:i}=t;let a;e[0]!==s||e[1]!==r?(a=n.jsx("span",{id:s,className:"truncate",children:r}),e[0]=s,e[1]=r,e[2]=a):a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Fn,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==i?(c=n.jsx(ct,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-md 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(dt,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(ut,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==a||e[13]!==u?(m=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:[a,u]}),e[12]=a,e[13]=u,e[14]=m):m=e[14],m}const Ue="min-h-9 items-center",de={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function ai(t){const e=y.c(9),{active:s,rows:r}=t,o=T();let i,a,l;if(e[0]!==s||e[1]!==r||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=r.get(s);if(d?.kind!=="travel"){l=null;break e}i="border-t border-border px-3 py-2 text-xs text-warning",a=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=r,e[2]=o,e[3]=i,e[4]=a,e[5]=l}else i=e[3],a=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==i||e[7]!==a?(c=n.jsx("div",{className:i,children:a}),e[6]=i,e[7]=a,e[8]=c):c=e[8],c}function li(t){const e=y.c(25),{onClose:s,onCreateOrg:r,className:o}=t,i=T(),a=A.useId(),l=A.useId(),c=$e(),{org:d}=E(),{scopeId:u,projects:m,setScope:f}=Se(),{hasMore:p}=Kn(),[g,h]=A.useState(""),[b,x]=A.useState(de.allProjects),j=A.useDeferredValue(g);let v;e[0]!==j?(v=j.trim(),e[0]=j,e[1]=v):v=e[1];const S=v,k=S.length>0,{data:N}=Ss(),{invitations:_,refetch:$}=ns();let w;e[2]!==d.slug?(w=(I,R)=>I.slug===d.slug?-1:R.slug===d.slug?1:0,e[2]=d.slug,e[3]=w):w=e[3];const C=(N??[]).slice().sort(w),{hits:P,isSearching:O,isStale:ne,isError:K}=ri(k?S:""),W=k?C.filter(I=>{const R=S.toLowerCase();return I.name.toLowerCase().includes(R)||I.slug.toLowerCase().includes(R)}):[],oe=we();let q;e[4]!==oe?(q=oe.startsWith("/$org/settings"),e[4]=oe,e[5]=q):q=e[5];const G=q,V=new Map;let B;e[6]!==G||e[7]!==s||e[8]!==f?(B=I=>{F("scope_set",{scoped:I!==null,fromSettings:G}),f(I),s()},e[6]=G,e[7]=s,e[8]=f,e[9]=B):B=e[9];const Q=B;let ee;e[10]!==c||e[11]!==s?(ee=(I,R)=>{F("org_project_travel",{scoped:!!R}),c(R?{to:"/$org/projects/$agentId",params:{org:I,agentId:R}}:{to:"/$org/home",params:{org:I}}),s()},e[10]=c,e[11]=s,e[12]=ee):ee=e[12];const J=ee;let U;e[13]!==c||e[14]!==s||e[15]!==d.slug?(U=()=>{F("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=U):U=e[16];const me=U;V.set(de.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let D;e[17]!==i?(D=i("sidebar.picker.searchPlaceholder"),e[17]=i,e[18]=D):D=e[18];let H;e[19]!==g||e[20]!==D?(H=n.jsx(Bn,{value:g,onValueChange:h,placeholder:D}),e[19]=g,e[20]=D,e[21]=H):H=e[21];const ie=qn,ke="max-h-none min-h-0 flex-1",X=k?n.jsxs(n.Fragment,{children:[K&&n.jsx(yt,{children:i("sidebar.picker.searchFailed")}),!K&&!O&&P.length===0&&W.length===0&&n.jsx(yt,{children:i("sidebar.picker.noMatches",{query:S})}),!K&&P.length>0&&n.jsx(Me,{heading:i("sidebar.picker.projectsHeading"),className:z(ne&&"opacity-50"),children:P.map(I=>n.jsx(ci,{hit:I,currentOrgSlug:d.slug,scopeId:u,rows:V,onScope:Q,onTravel:J},`${I.orgSlug}:${I.id}`))}),W.length>0&&n.jsx(Me,{heading:i("sidebar.picker.orgsHeading"),children:W.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx($t,{id:a,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Me,{"aria-labelledby":a,children:[n.jsxs(Ve,{value:de.allProjects,className:Ue,onSelect:()=>Q(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),u===null&&n.jsx(qe,{size:14})]}),m.map(I=>{const R=de.project(I.id);return V.set(R,{kind:"scope",label:I.title}),n.jsxs(Ve,{value:R,className:Ue,onSelect:()=>Q(I.id),children:[n.jsx(ft,{icon:I.icon,name:I.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:I.title}),u===I.id&&n.jsx(qe,{size:14})]},I.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),n.jsx($t,{id:l,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:r}),n.jsxs(Me,{"aria-labelledby":l,children:[_.map(I=>n.jsx(ii,{invitation:I,onChanged:$},I.id)),C.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))]})]});let te;return e[22]!==ie||e[23]!==X?(te=n.jsx(ie,{className:ke,children:X}),e[22]=ie,e[23]=X,e[24]=te):te=e[24],n.jsxs(Vn,{shouldFilter:!1,value:b,onValueChange:x,className:o,children:[H,te,n.jsx(ai,{active:b,rows:V})]})}function Ct(t){const e=y.c(22),{candidate:s,currentOrgSlug:r,rows:o,onTravel:i,onClose:a}=t,l=s.slug===r;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=de.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]!==a||e[8]!==i?(d=()=>l?a():i(s.slug),e[5]=s.slug,e[6]=l,e[7]=a,e[8]=i,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(ht,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(qe,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Ve,{value:c,className:Ue,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function ci(t){const e=y.c(30),{hit:s,currentOrgSlug:r,scopeId:o,rows:i,onScope:a,onTravel:l}=t,c=s.orgSlug===r;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==i?(d=c?de.project(s.id):de.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 u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==a||e[10]!==l?(u=()=>c?a(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=a,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ft,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=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 g;e[19]!==s.id||e[20]!==c||e[21]!==o?(g=c&&o===s.id&&n.jsx(qe,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=g):g=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==g||e[28]!==d?(h=n.jsxs(Ve,{value:d,className:Ue,onSelect:u,children:[m,f,p,g]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=g,e[28]=d,e[29]=h):h=e[29],h}function os(t){const e=y.c(32),{collapsed:s,onNavigate:r}=t,o=s===void 0?!1:s,i=T(),{org:a}=E(),{project:l}=Se(),{invitations:c}=ns(),[d,u]=A.useState(!1),[m,f]=A.useState(!1),p=ot();let g;if(e[0]!==o||e[1]!==c.length||e[2]!==a||e[3]!==l||e[4]!==i){const $=l?i("sidebar.picker.projectInOrg",{project:l.title,org:a.name}):a.name;let w;e[6]!==a||e[7]!==l?(w=l?n.jsx(ln,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(ht,{org:a,size:"sm"}),e[6]=a,e[7]=l,e[8]=w):w=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 P;e[11]!==w||e[12]!==C?(P=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[w,C]}),e[11]=w,e[12]=C,e[13]=P):P=e[13];const O=P;g=o?n.jsx(ae,{tooltip:$,"data-tour":Z.switcher,children:O}):n.jsxs("button",{type:"button","data-tour":Z.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:$}),className:z("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",Us),children:[O,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:a.name}),n.jsx(En,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=a,e[3]=l,e[4]=i,e[5]=g}else g=e[5];const h=g,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let x;e[14]!==r?(x=()=>{u(!1),r?.()},e[14]=r,e[15]=x):x=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{u(!1),f(!0)},e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==x?(v=n.jsx(li,{onClose:x,onCreateOrg:j,className:b}),e[17]=b,e[18]=x,e[19]=v):v=e[19];const S=v;let k;e[20]!==o||e[21]!==S||e[22]!==p||e[23]!==d||e[24]!==i||e[25]!==h?(k=p?n.jsxs(Lt,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Ws,{asChild:!0,children:h}),n.jsxs(Et,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Ft,{className:"sr-only",children:i("sidebar.picker.title")}),S]})]}):n.jsxs(at,{open:d,onOpenChange:u,children:[n.jsx(Ke,{asChild:!0,children:h}),n.jsx(lt,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:S})]}),e[20]=o,e[21]=S,e[22]=p,e[23]=d,e[24]=i,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==m?(N=n.jsx(Un,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let _;return e[29]!==k||e[30]!==N?(_=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=_):_=e[31],_}const is=16;function di(){const t=y.c(7),e=le(),s=We();let r;t[0]!==e?(r=n.jsx(os,{collapsed:e}),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==s?(o=!s&&n.jsx(mi,{}),t[2]=s,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=n.jsxs(n.Fragment,{children:[r,o]}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}function ui(t){const e=y.c(12),{onClose:s}=t,r=T();let o;e[0]!==s?(o=n.jsx(os,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex-1"}),e[2]=i):i=e[2];let a;e[3]!==r?(a=r("sidebar.header.closeSidebar"),e[3]=r,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(it,{size:is}),e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==a?(c=n.jsx(rt,{onClick:s,"aria-label":a,children:l}),e[6]=s,e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==o||e[10]!==c?(d=n.jsxs(n.Fragment,{children:[o,i,c]}),e[9]=o,e[10]=c,e[11]=d):d=e[11],d}function mi(){const t=y.c(12),e=T(),s=le(),{toggleSidebar:r}=Ce();let o;t[0]!==e?(o=e("sidebar.header.toggleSidebar"),t[0]=e,t[1]=o):o=t[1];const i=o;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(it,{size:is}),t[2]=a):a=t[2];let l;t[3]!==i||t[4]!==r?(l=n.jsx(ct,{asChild:!0,children:n.jsx(rt,{"aria-label":i,onClick:r,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:a})}),t[3]=i,t[4]=r,t[5]=l):l=t[5];const c=!s;let d;t[6]!==i||t[7]!==c?(d=n.jsx(dt,{side:"right",hidden:c,children:i}),t[6]=i,t[7]=c,t[8]=d):d=t[8];let u;return t[9]!==l||t[10]!==d?(u=n.jsxs(ut,{children:[l,d]}),t[9]=l,t[10]=d,t[11]=u):u=t[11],u}function ue(t){const e=y.c(33),{icon:s,label:r,isActive:o,link:i,onSelect:a,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=le(),g=l??r,h=p?g: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 x=b;let j;e[5]!==m?(j=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=j):j=e[6];let v;e[7]!==r?(v=n.jsx("span",{className:"truncate",children:r}),e[7]=r,e[8]=v):v=e[8];let S;e[9]!==s||e[10]!==j||e[11]!==v?(S=n.jsxs(n.Fragment,{children:[s,j,v]}),e[9]=s,e[10]=j,e[11]=v,e[12]=S):S=e[12];const k=S;if(i){const $=f?"page":void 0;let w;e[13]!==k||e[14]!==i||e[15]!==g||e[16]!==a||e[17]!==$?(w=n.jsx(Rt,{...i,"aria-label":g,"aria-current":$,onClick:a,children:k}),e[13]=k,e[14]=i,e[15]=g,e[16]=a,e[17]=$,e[18]=w):w=e[18];let C;e[19]!==x||e[20]!==w?(C=n.jsx(ae,{asChild:!0,...x,children:w}),e[19]=x,e[20]=w,e[21]=C):C=e[21];let P;return e[22]!==u||e[23]!==C?(P=n.jsxs(se,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=P):P=e[24],P}let N;e[25]!==k||e[26]!==g||e[27]!==a||e[28]!==x?(N=n.jsx(ae,{...x,"aria-label":g,onClick:a,children:k}),e[25]=k,e[26]=g,e[27]=a,e[28]=x,e[29]=N):N=e[29];let _;return e[30]!==u||e[31]!==N?(_=n.jsxs(se,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=_):_=e[32],_}function rs(t){const e=y.c(5),{label:s,link:r,onSelect:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Gn,{size:16}),e[0]=i):i=e[0];let a;return e[1]!==s||e[2]!==r||e[3]!==o?(a=n.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:n.jsx(L,{className:"shrink-0",children:n.jsx(ue,{icon:i,label:s,className:"text-sidebar-foreground/70",link:r,onSelect:o})})}),e[1]=s,e[2]=r,e[3]=o,e[4]=a):a=e[4],a}function fi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Dt(t)?"cms":null}function as(){const t=y.c(2),{data:e}=Wt();let s;return t[0]!==e?(s=r=>{const o=fi(r);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const pi="settings",xi=["overview","reports","board","files"];function gi(t,e){return!t||!e?!1:!Mt(e.metadata)}function hi(t,e,s,r){if(!t||!e)return!0;const o=r!==void 0;return Qn(o?r:Qt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function bi(){const t=y.c(16),e=T(),{org:s}=E(),r=we(),o=He(),{project:i,repo:a}=Se(),l=Jt(i?.id);let c;t[0]!==i||t[1]!==o?(c=gi(o,i),t[0]=i,t[1]=o,t[2]=c):c=t[2];const d=c;let u;t[3]!==l||t[4]!==i||t[5]!==o?(u=p=>hi(o,i,p,l),t[3]=l,t[4]=i,t[5]=o,t[6]=u):u=t[6];const m=u;let f;if(t[7]!==m||t[8]!==d||t[9]!==r||t[10]!==s||t[11]!==i?.id||t[12]!==a||t[13]!==o||t[14]!==e){const p={overview:d||!m("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(cn,{size:16}),isActive:r===M.home||r===M.orgIndex||r===ce.root||r===`${ce.root}/`,trackAs:"overview",link:o?{to:ce.root,params:{org:s.slug,agentId:o}}:{to:M.home,params:{org:s.slug}}},reports:Xe(M.reports,o)&&!d&&m("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Kt,{size:16}),isActive:r===M.reports||r===ce.reports,trackAs:"reports",link:o?{to:ce.reports,params:{org:s.slug,agentId:o}}:{to:M.reports,params:{org:s.slug}}}:null,board:d||!m("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Ht,{size:16}),isActive:r===M.tasks||r===ce.tasks,trackAs:"board",dataTour:Z.tasks,link:{to:o?ce.tasks:M.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:g=>{const h=a??i?.id;return h?{...g,repo:h}:g}}},files:Xe(M.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(Wn,{size:16}),isActive:r===M.library,trackAs:"files",link:{to:M.library,params:{org:s.slug}}}:null};f=xi.map(g=>p[g]).filter(ji),t[7]=m,t[8]=d,t[9]=r,t[10]=s,t[11]=i?.id,t[12]=a,t[13]=o,t[14]=e,t[15]=f}else f=t[15];return f}function ji(t){return t!==null}function vi(t){const e=y.c(9),{onNavigate:s}=t,r=bi(),o=as();let i;if(e[0]!==r||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ue,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],i=r.map(l),e[0]=r,e[1]=o,e[2]=s,e[3]=i}else i=e[3];let a;return e[7]!==i?(a=n.jsx(L,{className:"gap-1",children:i}),e[7]=i,e[8]=a):a=e[8],a}function yi(t){const e=y.c(18),{onNavigate:s}=t,r=T(),{org:o}=E(),i=He(),a=pt(),l=we(),c=ks();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(M.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==r?(m=r("sidebar.navDestinations.settings"),e[3]=r,e[4]=m):m=e[4];const f=m;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 g=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==a||e[10]!==s||e[11]!==i?(b=()=>{F("nav_destination_clicked",{destination:pi,target:i?"project":"org"}),i&&a(i,{panel:"settings"}),s?.()},e[9]=a,e[10]=s,e[11]=i,e[12]=b):b=e[12];let x;return e[13]!==u||e[14]!==f||e[15]!==g||e[16]!==b?(x=n.jsx(L,{className:"gap-1",children:n.jsx(ue,{dataTour:Z.settings,icon:h,label:f,isActive:u,link:g,onSelect:b})}),e[13]=u,e[14]=f,e[15]=g,e[16]=b,e[17]=x):x=e[17],x}function Si(t,e){const s=new Set(e);return s.size===0?t:t.filter(r=>s.has(r.connectionId))}function ki(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 Ni(t){const e=y.c(13),{onNavigate:s}=t,r=T(),{project:o}=Se(),i=pt(),a=we(),l=so(),c=Jn(o),d=as(),u=Jt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const g=Mt(o.metadata),h=u??Qt(o.metadata);m=new Set(Xn(h,Yn(g,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==a||e[7]!==i||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==r){const g=[];f.has("site-editor")&&g.push({key:"site-editor",label:r("sidebar.projectNav.siteEditor"),icon:n.jsx(Vt,{size:16}),panel:"site-editor",isActive:$i,dataTour:Z.siteEditor});const h={assets:{label:r("common.mainPanelTabs.assets"),icon:n.jsx(to,{size:16})},hosting:{label:r("common.mainPanelTabs.hosting"),icon:n.jsx(un,{size:16})},e2e:{label:r("common.mainPanelTabs.e2e"),icon:n.jsx(Ys,{size:16})},analytics:{label:r("common.mainPanelTabs.analytics"),icon:n.jsx(Kt,{size:16})},cdn:{label:r("common.mainPanelTabs.cdn"),icon:n.jsx(dn,{size:16})}};for(const x of Zn){if(!f.has(x))continue;const j=h[x];g.push({key:x,label:j.label,icon:j.icon,panel:x,isActive:v=>v===x})}for(const x of Si(ki(o),(o.connections??[]).map(wi)))x.toolName!=="fetch_assets"&&g.push({key:`pinned:${x.connectionId}:${x.toolName}`,label:x.label||x.toolName,icon:x.icon?n.jsx("img",{src:x.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(eo,{size:16}),panel:jt(x.connectionId,x.toolName),isActive:j=>j===jt(x.connectionId,x.toolName)});f.has("automations")&&g.push({key:"automations",label:r("sidebar.projectNav.automations"),icon:n.jsx(Ut,{size:16}),panel:"automations",isActive:_i,dataTour:Z.automations});const b=a.startsWith(M.projects);p=n.jsx(L,{className:"gap-1",children:g.map(x=>n.jsx(ue,{icon:x.icon,label:x.label,dataTour:x.dataTour,isActive:b&&x.isActive(l),trailing:d(x.panel)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("project_nav_clicked",{surface:x.key}),i(o.id,{panel:x.panel}),s?.()}},x.key))}),e[4]=l,e[5]=d,e[6]=a,e[7]=i,e[8]=s,e[9]=o,e[10]=f,e[11]=r,e[12]=p}else p=e[12];return p}function _i(t){return t==="automations"||Ns(t)!==null}function wi(t){return t.connection_id}function $i(t){return!!t&&Dt(t)}const Ci=3;function Ii(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:On(t)||Rn(t)}function Pi(t,e,s){const r=new Map;for(const i of e){if(!Ii(i,s))continue;const a=zn(i,t);for(const l of a){const c=r.get(l.id)??[];c.push({task:i,only:a.length===1}),r.set(l.id,c)}}const o=new Map;for(const[i,a]of r)a.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(i,a.slice(0,Ci).map(l=>l.task));return o}function Ti(t){const e=y.c(21),{task:s,orgSlug:r,isLast:o,onNavigate:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=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]=a):a=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]!==r||e[4]!==s?(c=An(r,s),e[3]=r,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==c?(d={org:r,taskKey:c},e[6]=r,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==i||e[10]!==s.status?(u=()=>{F("sidebar_attention_task_clicked",{status:s.status}),i?.()},e[9]=i,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(Rt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,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:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[a,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function zi(t){const e=y.c(35),{onNavigate:s}=t,r=T(),o=le(),{org:i,locator:a}=E(),l=At(),{projects:c}=Se(),d=He(),u=pt(),{data:m}=Y.useSession();let f;e[0]!==a||e[1]!==l?(f=Dn(a,l),e[0]=a,e[1]=l,e[2]=f):f=e[2];const p=!o&&!d;let g;e[3]!==f||e[4]!==p?(g={...f,enabled:p},e[3]=f,e[4]=p,e[5]=g):g=e[5];const{data:h}=st(g);if(d||c.length===0)return null;let b,x,j,v,S,k;if(e[6]!==o||e[7]!==h?.items||e[8]!==u||e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==d||e[13]!==m?.user?.id||e[14]!==r){const $=Pi(Tn(c),h?.items??[],m?.user?.id),w=o&&"pt-3";e[21]!==w?(v=z("flex flex-col gap-1",w),e[21]=w,e[22]=v):v=e[22],S=Z.projects,e[23]!==o||e[24]!==r?(k=!o&&n.jsx("p",{className:"px-2 pt-5 pb-0.5 text-xs font-medium text-muted-foreground/60",children:r("sidebar.projects.heading")}),e[23]=o,e[24]=r,e[25]=k):k=e[25],b=L,x="gap-1",j=c.map(C=>{const P=$.get(C.id)??[];return n.jsx(ue,{icon:n.jsx(ft,{icon:C.icon,name:C.title}),label:C.title,isActive:C.id===d,onSelect:()=>{F("sidebar_project_clicked"),u(C.id,{panel:_s(C.metadata?.ui?.layout)}),s?.()},children:!o&&P.length>0&&n.jsx("ul",{className:"flex flex-col",children:P.map((O,ne)=>n.jsx(Ti,{task:O,orgSlug:i.slug,isLast:ne===P.length-1,onNavigate:s},O.id))})},C.id)}),e[6]=o,e[7]=h?.items,e[8]=u,e[9]=s,e[10]=i,e[11]=c,e[12]=d,e[13]=m?.user?.id,e[14]=r,e[15]=b,e[16]=x,e[17]=j,e[18]=v,e[19]=S,e[20]=k}else b=e[15],x=e[16],j=e[17],v=e[18],S=e[19],k=e[20];let N;e[26]!==b||e[27]!==x||e[28]!==j?(N=n.jsx(b,{className:x,children:j}),e[26]=b,e[27]=x,e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==v||e[31]!==S||e[32]!==k||e[33]!==N?(_=n.jsxs("div",{className:v,"data-tour":S,children:[k,N]}),e[30]=v,e[31]=S,e[32]=k,e[33]=N,e[34]=_):_=e[34],_}function Ai(){const t=y.c(8),e=T(),{capabilities:s,isPrivileged:r,loading:o,error:i}=ws(),a=yn().length,l=$s();let c;return t[0]!==s||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(uo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(xn,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(io,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(qt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Ht,{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(ro,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(mn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(et,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(mo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(co,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(fn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(et,{size:14}),to:"/$org/settings/members",group:"members",badge:a}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(lo,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(ao,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:n.jsx(pn,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(nt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Cs(m.group)?[]:[m]}return o||i?[m]:m.privilegedOnly?r?[m]:[]:m.requires?r||s[m.requires]?[m]:[]:[m]})})).filter(Oi),t[0]=s,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Oi(t){return t.items.length>0}function ls(){const t=y.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}=Is(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:Ri},t[1]=r):r=t[1];const o=Ps(r);let i;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};i=d=>[d.to,...d.group?Ts(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=i}else i=t[4];const a=i;let l;return t[5]!==a||t[6]!==s?(l={org:s,isActive:a},t[5]=a,t[6]=s,t[7]=l):l=t[7],l}function Ri(t){return t.location.pathname}function Di(){const t=y.c(9),{isActive:e}=ls();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[r,o]=A.useState(s);let i;t[1]!==e||t[2]!==r?(i=u=>r[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=r,t[3]=i):i=t[3];const a=i;let l;t[4]!==a?(l=u=>o(m=>({...m,[u.key]:!a(u)})),t[4]=a,t[5]=l):l=t[5];const c=l;let d;return t[6]!==a||t[7]!==c?(d={isOpen:a,toggle:c},t[6]=a,t[7]=c,t[8]=d):d=t[8],d}function Mi(t){const e=y.c(21),{group:s,open:r,onToggle:o,className:i}=t;let a,l,c,d,u;if(e[0]!==i||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==r){u=Symbol.for("react.early_return_sentinel");e:{const g=z("text-xs font-medium text-muted-foreground/60 truncate",i);if(!s.collapsible){u=n.jsx("p",{className:g,children:s.label});break e}a="button",l=o,c=r,d=z("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",g)}e[0]=i,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=r,e[5]=a,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else a=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==r?(m=r?n.jsx(no,{size:12}):n.jsx(oo,{size:12}),e[10]=r,e[11]=m):m=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]!==a||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:a,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=a,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Li(t){const e=y.c(5),{icon:s,badge:r}=t;let o;e[0]!==r?(o=r?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=r,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 cs(t){const e=y.c(22),{onNavigate:s}=t,r=T(),o=Ai(),{org:i,isActive:a}=ls(),{isOpen:l,toggle:c}=Di();let d;if(e[0]!==o||e[1]!==a||e[2]!==l||e[3]!==s||e[4]!==i||e[5]!==c){let h;e[7]!==a||e[8]!==l||e[9]!==s||e[10]!==i||e[11]!==c?(h=(b,x)=>n.jsxs("div",{className:"flex flex-col",children:[b.label&&n.jsx(Mi,{group:b,open:l(b),onToggle:()=>c(b),className:z("px-2 pt-1.5 pb-0.5",x>0&&"mt-3")}),l(b)&&n.jsx(L,{className:"gap-0.5",children:b.items.map(j=>n.jsx(ue,{icon:n.jsx(Li,{icon:j.icon,badge:j.badge}),label:j.label,isActive:a(j),link:{to:j.to,params:{org:i}},className:"gap-2.5",onSelect:()=>{F("settings_nav_clicked",{section_key:j.key,group_key:b.key}),s?.()}},j.key))})]},b.key),e[7]=a,e[8]=l,e[9]=s,e[10]=i,e[11]=c,e[12]=h):h=e[12],d=o.map(h),e[0]=o,e[1]=a,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=d}else d=e[6];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=u):u=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("span",{className:"shrink-0",children:n.jsx(Ze,{size:14})}),e[14]=m):m=e[14];let f;e[15]!==r?(f=r("settings.nav.signOut"),e[15]=r,e[16]=f):f=e[16];let p;e[17]!==f?(p=n.jsxs("div",{className:"mt-auto flex flex-col",children:[u,n.jsx(L,{className:"gap-0.5",children:n.jsx(ue,{icon:m,label:f,className:"gap-2.5",onSelect:Ei})})]}),e[17]=f,e[18]=p):p=e[18];let g;return e[19]!==d||e[20]!==p?(g=n.jsxs(n.Fragment,{children:[d,p]}),e[19]=d,e[20]=p,e[21]=g):g=e[21],g}function Ei(){F("signed_out",{source:"settings_sidebar"}),zt(),Y.signOut()}function ds(t){const e=y.c(8),{onNavigate:s}=t,r=T(),{org:o}=E();let i;e[0]!==r?(i=r("settings.nav.backToHome"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==o.slug?(a={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=a):a=e[3];let l;return e[4]!==s||e[5]!==i||e[6]!==a?(l=n.jsx(rs,{label:i,link:a,onSelect:s}),e[4]=s,e[5]=i,e[6]=a,e[7]=l):l=e[7],l}function us(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.367.6"]})}),t[0]=e):e=t[0],e}const Fi="pt-1.5";function ms(t){const e=y.c(15),{header:s,back:r,body:o,footer:i,sheet:a}=t;let l;e[0]!==s?(l=s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),n.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==r?(c=r&&n.jsx("div",{className:"shrink-0 px-2",children:r}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==o?(d=n.jsx(Ls,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:o}),e[4]=o,e[5]=d):d=e[5];let u;e[6]!==i||e[7]!==l||e[8]!==c||e[9]!==d?(u=n.jsxs(n.Fragment,{children:[l,c,d,i]}),e[6]=i,e[7]=l,e[8]=c,e[9]=d,e[10]=u):u=e[10];const m=u;if(a){let p;return e[11]!==m?(p=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":Z.nav,children:m}),e[11]=m,e[12]=p):p=e[12],p}let f;return e[13]!==m?(f=n.jsx(Es,{className:Fi,"data-tour":Z.nav,children:m}),e[13]=m,e[14]=f):f=e[14],f}function fs(t){const e=y.c(8),{onNavigate:s}=t,r=T(),o=He(),i=_o();if(!o)return null;let a;e[0]!==r?(a=r("sidebar.scope.allProjects"),e[0]=r,e[1]=a):a=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]!==a||e[6]!==l?(c=n.jsx(rs,{label:a,onSelect:l}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function ps(t){const e=y.c(2),{onNavigate:s}=t;let r;return e[0]!==s?(r=n.jsx(zs,{children:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(vi,{onNavigate:s}),n.jsx(Ni,{onNavigate:s}),n.jsx(yi,{onNavigate:s}),n.jsx(zi,{onNavigate:s})]})}),e[0]=s,e[1]=r):r=e[1],r}function qi(){const t=y.c(3),e=We();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(di,{}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(ms,{header:s,back:e?n.jsx(ds,{}):n.jsx(fs,{}),body:e?n.jsx(cs,{}):n.jsx(ps,{}),footer:e?n.jsx(us,{}):n.jsx(si,{})}),t[1]=e,t[2]=r):r=t[2],r}function Vi(t){const e=y.c(13),{onClose:s}=t,r=We();let o;e[0]!==s?(o=n.jsx(ui,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let i,a;e[2]!==r||e[3]!==s?(i=r?n.jsx(ds,{onNavigate:s}):n.jsx(fs,{onNavigate:s}),a=r?n.jsx(cs,{onNavigate:s}):n.jsx(ps,{onNavigate:s}),e[2]=r,e[3]=s,e[4]=i,e[5]=a):(i=e[4],a=e[5]);let l;e[6]!==r?(l=r?n.jsx(us,{}):n.jsx(ni,{}),e[6]=r,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==a||e[11]!==l?(c=n.jsx(ms,{sheet:!0,header:o,back:i,body:a,footer:l}),e[8]=o,e[9]=i,e[10]=a,e[11]=l,e[12]=c):c=e[12],c}const Bi=new Set(["completed","failed","requires_action"]);function Ui(t){const e=y.c(5),[s]=Tt();let r;e[0]!==s?(r=i=>{s.enableSounds&&Bi.has(i.data.status)&&fo(po.dataUri).catch(Hi)},e[0]=s,e[1]=r):r=e[1];let o;e[2]!==t||e[3]!==r?(o={orgSlug:t,onTaskStatus:r},e[2]=t,e[3]=r,e[4]=o):o=e[4],xo(o)}function Hi(t){console.warn("[status-sounds] playback failed:",t)}const Ki=2e3,Wi=4e4;function Gi(t){return t==="success"||t==="updated"}function Qi(t){const e=y.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const r=As(s),o=Ot();let i;e[1]!==r.checkout?(i=Gi(r.checkout),e[1]=r.checkout,e[2]=i):i=e[2];const a=i,[l]=A.useState(Ji);let c;e[3]!==t?(c=Ee.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Ki:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Ee.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:a,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=a,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],st(m)}function Ji(){return Date.now()+Wi}function al(){const t=y.c(5),e=We(),{org:s}=E();Ui(s.slug),Qi(s.id);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(No,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Je.Sidebar,{renderMobile:Xi,children:n.jsx(qi,{})}),t[1]=o):o=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Je.Content,{children:n.jsx(Os,{})}),t[2]=i):i=t[2];let a;return t[3]!==e?(a=n.jsxs(Je,{expandedSidebar:e,notice:r,children:[o,i]}),t[3]=e,t[4]=a):a=t[4],a}function Xi(t){const{onClose:e}=t;return n.jsx(Vi,{onClose:e})}export{al as default};
|
|
1
|
+
import{c as y,b as T,j as n,I as It,r as A,J as xs,M as E,l as z,B as Le,F as gs,R as we,U as Xe,o as F,X as Pt,a as Y,d as $e,v as Tt,t as re,Y as hs,Z as zt,_ as At,n as Ot,e as bs,K as Ee,w as js,$ as vs,m as st,a0 as ys,s as Ss,L as Rt,a1 as M,C as ce,D as nt,a2 as ks,a3 as jt,a4 as Ns,a5 as _s,a6 as ws,a7 as $s,a8 as Cs,f as Is,k as Ps,a9 as Ts,E as zs,u as As,O as Os}from"./index-C9jQATHx.js";import{u as Ce,S as Rs,a as Ds,b as Ms,c as ae,d as L,e as se,f as Ye,g as Ls,h as Es}from"./sidebar-kfvz7bzl.js";import{S as Fs,a as qs,b as Vs}from"./sheet-CAYJdNnO.js";import{u as ot}from"./use-mobile-CpN-x3jP.js";import{i as it,a as Bs}from"./Printer-1AF1IGx9.js";import{P as Ne}from"./index-D3hBrAe3.js";import{T as rt,I as Us}from"./toolbar-icon-button-D5CIjxUn.js";import{u as Hs,i as Dt}from"./use-org-notice-CoJcS75H.js";import{u as Se,a as He,b as Mt}from"./use-project-scope-DUmb12wa.js";import{u as Ks}from"./thread-route-DGpNj7En.js";import{L as Z}from"./anchors-yqDzZN4K.js";import{P as at,a as Ke,b as lt}from"./popover-cYfVOF_J.js";import{D as Lt,a as Et,b as Ft,c as Ws}from"./drawer-Dp27hT9C.js";import{A as Fe}from"./avatar-YOwDvuCo.js";import{T as ct,a as dt,b as Gs,c as ut}from"./tooltip-D5dIOzcQ.js";import{a as Qs}from"./Copy01-D4tr9F1r.js";import{n as Js}from"./Download01-G8ZhNqF3.js";import{i as Xs}from"./Globe01-BJfrzyV2.js";import{n as qt}from"./LinkExternal01-DsoIvXMf.js";import{g as Ze,e as Ys}from"./TrendUp01-BJ6ZxGib.js";import{i as Vt}from"./Monitor01-8akol8yD.js";import{n as Zs,a as en}from"./Sun-DqCbyuBS.js";import{a as Bt}from"./Settings02-11lXkxuh.js";import{i as tn}from"./Shield01-C_NSoVzs.js";import{t as sn,a as nn,i as on,b as rn,c as Ut,s as mt,d as an,A as ln,n as Ht,e as Kt,f as cn,g as dn,h as un,j as mn,k as fn,l as pn}from"./agent-icon-CL_nl9mo.js";import{b as et,t as xn}from"./Users03-CBIUviMz.js";import{u as gn}from"./use-deployment-admin-CnWMkexv.js";import{u as hn}from"./use-is-desktop-app-BNujXJc_.js";import{i as bn,a as vt,D as jn}from"./download-app-dialog-B-5SSg-B.js";import{I as vn,u as yn}from"./use-join-requests-D9RxS7KW.js";import{u as Sn}from"./use-deco-credits-DXbh8RF9.js";import{u as kn,a as Wt}from"./use-entitlements-CW1G9reZ.js";import{u as Nn,P as _n}from"./plan-ladder-CQ1a44li.js";import{u as wn}from"./use-organization-settings-OP1vKLQc.js";import{S as $n}from"./scroll-area-B6yfQzTQ.js";import{u as Cn}from"./useInfiniteQuery-TmIWCfQ-.js";import{n as In}from"./hooks-DW28Wv6W.js";import{t as Gt,S as Pn,b as Tn,p as zn,a as An,i as On,c as Rn,d as Dn}from"./task-route-CgUDYaF5.js";import{g as Mn}from"./get-initials-D-f_fDFw.js";import{a as Ln}from"./format-time-BtXRrtv4.js";import{i as qe}from"./Check-HvrCGvlV.js";import{i as En}from"./Tool01-DekOr9OW.js";import{s as Fn}from"./Plus-B6iViyXP.js";import{C as yt,a as Me,b as Ve,c as qn,d as Vn,e as Bn}from"./command-BbfSNpjK.js";import{P as ft}from"./project-icon-CWg_rHTZ.js";import{C as Un}from"./create-organization-dialog-BeMHfEec.js";import{s as Hn}from"./XClose-D9lEUPrO.js";import{u as Kn}from"./use-virtual-mcp-De5-1hZU.js";import{i as Wn}from"./Share07-2izyqHpD.js";import{i as Gn}from"./ArrowLeft-DGJWLWaL.js";import{e as Qn,r as Qt,u as Jn,s as Xn,p as Yn,P as Zn}from"./use-project-native-view-presence-7Bqoz-C1.js";import{u as Jt}from"./optimistic-project-sidebar-views-DQAcmOUC.js";import{u as pt}from"./use-navigate-to-agent-D91bju80.js";import{c as eo}from"./SwitchHorizontal01-Chrl4_cZ.js";import{a as to}from"./Image01-ZQpSr40Q.js";import{u as so}from"./use-panel-navigate-DArr9jKh.js";import{t as no}from"./ChevronUp-BANcOZ09.js";import{i as oo}from"./ChevronRight-dkkIYuGe.js";import{i as io}from"./CreditCard01-CX8hLF54.js";import{i as ro}from"./GitBranch01-xiI7ahmy.js";import{i as ao}from"./HardDrive-BtlNN50l.js";import{i as lo}from"./Key01-TUQZiePT.js";import{t as co}from"./Stars01-dQ6_BPZ3.js";import{s as uo}from"./User01-Cuc8TQ2e.js";import{i as mo}from"./Zap-FJBBk1lb.js";import{p as fo,q as po}from"./question-004-sINsf4GQ.js";import{u as xo}from"./use-decopilot-events-BorkAE1x.js";import"./X-BbEHf0ox.js";import"./github-repo-BknN0SVI.js";import"./index-BVdPTogP.js";import"./AlertCircle-CMdkAjxQ.js";import"./ArrowUp-Bx3jqyJU.js";import"./Tool02-CgXadMFZ.js";import"./ArrowRight-D_1DZN2N.js";import"./ZoomOut-DR5p3Py1.js";import"./CheckCircle-CQTpywHl.js";import"./DotsVertical-DEpQR8Rs.js";import"./UserSquare-DO483pcO.js";import"./Database01-C6v3VKBC.js";import"./MessageCircle01-DrVOv17x.js";import"./Eye-wRiP-IKY.js";import"./File02-C5Axd7Wg.js";import"./Link01-Dubdh0XV.js";import"./Package-6pCyxdj-.js";import"./Palette-8_jSprTt.js";import"./Play-B2WDpGm-.js";import"./SearchLg-o3jjSP_H.js";import"./SearchMd-BFooCWLz.js";import"./Trash01-DwLqZ5iv.js";import"./Upload01-zIaNWjGg.js";import"./Users01-C_FX7NZW.js";import"./XCircle-CIpucXWN.js";import"./dialog-DIO2BT5L.js";import"./form-DGoweIp4.js";import"./label-BZvBRfsC.js";import"./select-BemZ3-RS.js";import"./textarea-C-rDHIo4.js";import"./use-org-auth-client-r5wiYH2P.js";import"./use-organization-roles-kAP23ZDQ.js";import"./use-ai-providers-DHpBr525.js";import"./schema-DLCqAhaO.js";import"./task-board-WxptS5oC.js";import"./infiniteQueryObserver-CrlFqUXS.js";import"./use-mcp-client-2uEIRhaM.js";import"./auth-DqeCOVzg.js";import"./backoff-8mStPHYB.js";import"./dropdown-menu-BzAnwSL0.js";import"./github-icon-D5mzGkJ1.js";import"./differenceInSeconds-C3x8sHUj.js";import"./index-kzbDuxts.js";import"./alert-dialog-BcLnZa7A.js";import"./input-DCAbperr.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./use-file-configs-CIuxe_Ni.js";import"./site-slug-uya6Wp4-.js";import"./thread-intent-Dqbb6tX6.js";import"./slugify-CEUa2lfQ.js";function le(){const{state:t,isMobile:e}=Ce();return t==="collapsed"&&!e}function go(t){const e=y.c(11),{onPointerDown:s,onDoubleClick:r}=t,o=T(),{isMobile:i}=Ce(),a=le();if(i||a)return null;let l;e[0]!==o?(l=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==o?(c=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=c):c=e[3];let d,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(d={left:"var(--sidebar-width)"},u=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"}),e[4]=d,e[5]=u):(d=e[4],u=e[5]);let m;return e[6]!==r||e[7]!==s||e[8]!==l||e[9]!==c?(m=n.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":l,title:c,onPointerDown:s,onDoubleClick:r,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:d,children:u}),e[6]=r,e[7]=s,e[8]=l,e[9]=c,e[10]=m):m=e[10],m}const xt=240,ho=400,bo="sidebar.width";function _e(t){return Math.max(xt,Math.min(ho,t))}function jo(){const t=y.c(11),[e,s]=It(bo,vo),r=A.useRef(null);let o;t[0]!==s||t[1]!==e?(o=u=>{u.preventDefault();const m=u.clientX,f=_e(e),p=r.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),g=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of g)x.style.transition="none";const h=x=>{const j=_e(f+(x.clientX-m));p?.style.setProperty("--sidebar-width",`${j}px`)},b=x=>{const j=_e(f+(x.clientX-m));s(j);for(const v of g)v.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",b),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",b)},t[0]=s,t[1]=e,t[2]=o):o=t[2];const i=o;let a;t[3]!==s?(a=()=>{s(xt)},t[3]=s,t[4]=a):a=t[4];const l=a;let c;t[5]!==e?(c=_e(e),t[5]=e,t[6]=c):c=t[6];let d;return t[7]!==i||t[8]!==l||t[9]!==c?(d={width:c,wrapperRef:r,onStartResize:i,resetWidth:l},t[7]=i,t[8]=l,t[9]=c,t[10]=d):d=t[10],d}function vo(t){return typeof t=="number"?_e(t):xt}const Xt=A.createContext(null);function Yt(){const t=A.use(Xt);if(!t)throw new Error("Layout regions require a Layout");return t}function yo({children:t,notice:e,expandedSidebar:s=!1}){const r=ot(),[o,i]=It(xs.sidebarOpen(),!0),a=jo();return n.jsx(Xt,{value:{isMobile:r,resize:a},children:n.jsx(Rs,{open:s||o,onOpenChange:i,children:n.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,n.jsx(Ds,{ref:a.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${a.width}px`,"--sidebar-width-icon":"3.125rem"},children:t})]})})})}function So(t){const e=y.c(22),{children:s,renderMobile:r}=t,o=T(),{isMobile:i,resize:a}=Yt(),{openMobile:l,setOpenMobile:c}=Ce();if(!i){let h;e[0]!==a.onStartResize||e[1]!==a.resetWidth?(h=n.jsx(go,{onPointerDown:a.onStartResize,onDoubleClick:a.resetWidth}),e[0]=a.onStartResize,e[1]=a.resetWidth,e[2]=h):h=e[2];let b;return e[3]!==s||e[4]!==h?(b=n.jsxs(n.Fragment,{children:[s,h]}),e[3]=s,e[4]=h,e[5]=b):b=e[5],b}let d;e[6]!==o?(d=o("layouts.shellControls.navigationTitle"),e[6]=o,e[7]=d):d=e[7];let u;e[8]!==d?(u=n.jsx(Fs,{className:"sr-only",children:d}),e[8]=d,e[9]=u):u=e[9];let m;e[10]!==c?(m=()=>c(!1),e[10]=c,e[11]=m):m=e[11];let f;e[12]!==r||e[13]!==m?(f=r({onClose:m}),e[12]=r,e[13]=m,e[14]=f):f=e[14];let p;e[15]!==u||e[16]!==f?(p=n.jsxs(qs,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",children:[u,f]}),e[15]=u,e[16]=f,e[17]=p):p=e[17];let g;return e[18]!==l||e[19]!==c||e[20]!==p?(g=n.jsx(Vs,{open:l,onOpenChange:c,children:p}),e[18]=l,e[19]=c,e[20]=p,e[21]=g):g=e[21],g}function ko(t){const e=y.c(10),{children:s}=t,r=T(),{isMobile:o}=Yt(),{toggleSidebar:i}=Ce();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={background:"transparent",containerType:"inline-size"},e[0]=a):a=e[0];let l;e[1]!==o||e[2]!==r||e[3]!==i?(l=o&&n.jsxs(Ne.Topbar,{className:"px-1 bg-sidebar",children:[n.jsx(Ne.Topbar.Left,{className:"shrink-0",children:n.jsx(rt,{onClick:i,"aria-label":r("layouts.shellControls.toggleSidebar"),children:n.jsx(it,{size:16})})}),n.jsx(Ne.Topbar.Center,{className:"justify-start",children:n.jsx(Ne.Topbar.Center.Target,{})})]}),e[1]=o,e[2]=r,e[3]=i,e[4]=l):l=e[4];let c;e[5]!==s?(c=n.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s}),e[5]=s,e[6]=c):c=e[6];let d;return e[7]!==l||e[8]!==c?(d=n.jsx(Ms,{className:"flex flex-col min-h-0",style:a,children:n.jsxs(Ne,{variant:"plain",className:"bg-sidebar",children:[l,c]})}),e[7]=l,e[8]=c,e[9]=d):d=e[9],d}const Je=Object.assign(yo,{Sidebar:So,Content:ko});function No(){const t=y.c(19),{org:e}=E(),{data:s}=Hs(e.slug);if(!s)return null;const r=s.severity==="block",o=r?"border-destructive/25 bg-destructive/5 text-destructive":"border-warning/40 bg-warning/10 text-foreground";let i;t[0]!==o?(i=z("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 a=r?void 0:"text-warning";let l;t[2]!==a?(l=z("size-4 shrink-0",a),t[2]=a,t[3]=l):l=t[3];let c;t[4]!==l?(c=n.jsx(gs,{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 u;t[8]!==s.message?(u=n.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:s.message}),t[8]=s.message,t[9]=u):u=t[9];let m;t[10]!==s.ctaLabel||t[11]!==s.ctaUrl?(m=s.ctaUrl&&s.ctaLabel?n.jsx(Le,{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]=m):m=t[12];let f;return t[13]!==i||t[14]!==c||t[15]!==d||t[16]!==u||t[17]!==m?(f=n.jsxs("div",{role:"alert",className:i,children:[c,d,u,m]}),t[13]=i,t[14]=c,t[15]=d,t[16]=u,t[17]=m,t[18]=f):f=t[18],f}function _o(){const t=y.c(4),{setScope:e}=Se(),s=Ks(),r=we();let o;return t[0]!==r||t[1]!==s||t[2]!==e?(o=()=>{const i=s!==void 0?"route_resolves_scope":Xe(r,null)?null:"route_needs_scope";F("scope_cleared",{relocated:i!==null,reason:i}),e(null)},t[0]=r,t[1]=s,t[2]=e,t[3]=o):o=t[3],o}function We(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings",shouldThrow:!1},t[0]=e):e=t[0],!!Pt(e)}const Be="size-4 shrink-0";function gt(t){const e=y.c(5),{children:s,className:r}=t;let o;e[0]!==r?(o=z("flex w-4 shrink-0 items-center justify-center",r),e[0]=r,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 ye(t){const e=y.c(26),{item:s,onClose:r}=t;let o;e[0]!==s.className?(o=z("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 u=s.external?"_blank":void 0,m=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 g;return e[6]!==i||e[7]!==s.href||e[8]!==r||e[9]!==u||e[10]!==m||e[11]!==f||e[12]!==p?(g=n.jsxs("a",{href:s.href,target:u,rel:m,className:i,onClick:r,children:[f,p]}),e[6]=i,e[7]=s.href,e[8]=r,e[9]=u,e[10]=m,e[11]=f,e[12]=p,e[13]=g):g=e[13],g}let a;e[14]!==s||e[15]!==r?(a=()=>{s.onClick?.(),r()},e[14]=s,e[15]=r,e[16]=a):a=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]!==a||e[23]!==l||e[24]!==c?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[l,c]}),e[21]=i,e[22]=a,e[23]=l,e[24]=c,e[25]=d):d=e[25],d}function wo(){const t=y.c(4),e=T();let s;t[0]!==e?(s=e("common.accountPopover.impersonating"),t[0]=e,t[1]=s):s=t[1];let r;return t[2]!==s?(r=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]=r):r=t[3],r}function St(t){const e=y.c(38),{user:s,userImage:r,isImpersonating:o,isMobile:i}=t,a=T(),l=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let c;e[0]!==l?(c=z("flex items-center gap-3 px-4",l),e[0]=l,e[1]=c):c=e[1];const d=s?.name??"U";let u;e[2]!==d||e[3]!==r?(u=n.jsx(Fe,{url:r,fallback:d,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=d,e[3]=r,e[4]=u):u=e[4];let m;e[5]!==a||e[6]!==s?.name?(m=s?.name??a("common.accountPopover.defaultUserName"),e[5]=a,e[6]=s?.name,e[7]=m):m=e[7];let f;e[8]!==m?(f=n.jsx("p",{className:"text-sm font-medium truncate",children:m}),e[8]=m,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&n.jsx(wo,{}),e[10]=o,e[11]=p):p=e[11];let g;e[12]!==f||e[13]!==p?(g=n.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=g):g=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 x;e[17]!==b||e[18]!==g?(x=n.jsxs("div",{className:"flex-1 min-w-0",children:[g,b]}),e[17]=b,e[18]=g,e[19]=x):x=e[19];let j;e[20]!==a||e[21]!==s?(j=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(()=>{re.success(a("common.accountPopover.userIdCopied"))})},e[20]=a,e[21]=s,e[22]=j):j=e[22];let v;e[23]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(Qs,{size:14}),e[23]=v):v=e[23];let S;e[24]!==j?(S=n.jsx(ct,{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]=S):S=e[25];let k;e[26]!==a?(k=a("common.accountPopover.copyUserId"),e[26]=a,e[27]=k):k=e[27];let N;e[28]!==k?(N=n.jsx(dt,{side:"right",children:n.jsx("p",{className:"text-xs",children:k})}),e[28]=k,e[29]=N):N=e[29];let _;e[30]!==S||e[31]!==N?(_=n.jsx(Gs,{delayDuration:300,children:n.jsxs(ut,{children:[S,N]})}),e[30]=S,e[31]=N,e[32]=_):_=e[32];let $;return e[33]!==x||e[34]!==_||e[35]!==c||e[36]!==u?($=n.jsxs("div",{className:c,children:[u,x,_]}),e[33]=x,e[34]=_,e[35]=c,e[36]=u,e[37]=$):$=e[37],$}function kt(t){const e=y.c(35),{themeOptions:s,preferences:r,setPreferences:o,isMobile:i}=t,a=T(),l=i?"size-8":"size-7",c=i?"px-3 py-3":"px-2 py-1.5";let d;e[0]!==c?(d=z("flex items-center justify-between border-t border-border/50",c),e[0]=c,e[1]=d):d=e[1];let u;if(e[2]!==l||e[3]!==r.theme||e[4]!==o||e[5]!==s){let k;e[7]!==l||e[8]!==r.theme||e[9]!==o?(k=N=>{const{value:_,icon:$,label:w}=N;return n.jsx("button",{type:"button","aria-label":w,onClick:()=>o(C=>({...C,theme:_})),className:z(l,"rounded-md flex items-center justify-center transition-colors",r.theme===_?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:$},_)},e[7]=l,e[8]=r.theme,e[9]=o,e[10]=k):k=e[10],u=s.map(k),e[2]=l,e[3]=r.theme,e[4]=o,e[5]=s,e[6]=u}else u=e[6];let m;e[11]!==u?(m=n.jsx("div",{className:"flex items-center gap-0.5",children:u}),e[11]=u,e[12]=m):m=e[12];let f;e[13]!==r.enableSounds||e[14]!==a?(f=r.enableSounds?a("common.accountPopover.disableSounds"):a("common.accountPopover.enableSounds"),e[13]=r.enableSounds,e[14]=a,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o($o),e[16]=o,e[17]=p):p=e[17];const g=r.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]!==g?(h=z(l,"rounded-md flex items-center justify-center transition-colors",g),e[18]=l,e[19]=g,e[20]=h):h=e[20];let b;e[21]!==r.enableSounds?(b=r.enableSounds?n.jsx(nn,{size:14}):n.jsx(on,{size:14}),e[21]=r.enableSounds,e[22]=b):b=e[22];let x;e[23]!==f||e[24]!==p||e[25]!==h||e[26]!==b?(x=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]=x):x=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.367.7"]}),e[28]=j):j=e[28];let v;e[29]!==x?(v=n.jsxs("div",{className:"flex items-center gap-2",children:[x,j]}),e[29]=x,e[30]=v):v=e[30];let S;return e[31]!==v||e[32]!==d||e[33]!==m?(S=n.jsxs("div",{className:d,children:[m,v]}),e[31]=v,e[32]=d,e[33]=m,e[34]=S):S=e[34],S}function $o(t){return{...t,enableSounds:!t.enableSounds}}function Nt(t){const e=y.c(54),{user:s,userImage:r,menuItems:o,signOutItem:i,stopImpersonatingItem:a,isImpersonating:l,themeOptions:c,preferences:d,setPreferences:u,close:m,isMobile:f}=t;if(f){let S;e[0]!==l||e[1]!==s||e[2]!==r?(S=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!0}),e[0]=l,e[1]=s,e[2]=r,e[3]=S):S=e[3];let k;if(e[4]!==m||e[5]!==o){let P;e[7]!==m?(P=O=>n.jsx(ye,{item:O,onClose:m},O.key),e[7]=m,e[8]=P):P=e[8],k=o.map(P),e[4]=m,e[5]=o,e[6]=k}else k=e[6];let N;e[9]!==m||e[10]!==a?(N=a&&n.jsx(ye,{item:a,onClose:m}),e[9]=m,e[10]=a,e[11]=N):N=e[11];let _;e[12]!==m||e[13]!==i?(_=n.jsx(ye,{item:i,onClose:m}),e[12]=m,e[13]=i,e[14]=_):_=e[14];let $;e[15]!==k||e[16]!==N||e[17]!==_?($=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,_]})}),e[15]=k,e[16]=N,e[17]=_,e[18]=$):$=e[18];let w;e[19]!==d||e[20]!==u||e[21]!==c?(w=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!0}),e[19]=d,e[20]=u,e[21]=c,e[22]=w):w=e[22];let C;return e[23]!==S||e[24]!==$||e[25]!==w?(C=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[S,$,w]}),e[23]=S,e[24]=$,e[25]=w,e[26]=C):C=e[26],C}let p;e[27]!==l||e[28]!==s||e[29]!==r?(p=n.jsx(St,{user:s,userImage:r,isImpersonating:l,isMobile:!1}),e[27]=l,e[28]=s,e[29]=r,e[30]=p):p=e[30];let g;if(e[31]!==m||e[32]!==o){let S;e[34]!==m?(S=k=>n.jsx(ye,{item:k,onClose:m},k.key),e[34]=m,e[35]=S):S=e[35],g=o.map(S),e[31]=m,e[32]=o,e[33]=g}else g=e[33];let h;e[36]!==m||e[37]!==a?(h=a&&n.jsx(ye,{item:a,onClose:m}),e[36]=m,e[37]=a,e[38]=h):h=e[38];let b;e[39]!==m||e[40]!==i?(b=n.jsx(ye,{item:i,onClose:m}),e[39]=m,e[40]=i,e[41]=b):b=e[41];let x;e[42]!==g||e[43]!==h||e[44]!==b?(x=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[g,h,b]}),e[42]=g,e[43]=h,e[44]=b,e[45]=x):x=e[45];let j;e[46]!==d||e[47]!==u||e[48]!==c?(j=n.jsx(kt,{themeOptions:c,preferences:d,setPreferences:u,isMobile:!1}),e[46]=d,e[47]=u,e[48]=c,e[49]=j):j=e[49];let v;return e[50]!==p||e[51]!==x||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,x,j]})}),e[50]=p,e[51]=x,e[52]=j,e[53]=v):v=e[53],v}function tt(){const t=y.c(107),e=T(),{data:s}=Y.useSession(),{org:r}=E(),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=Pt(i)?.params.org,[c,d]=Tt(),u=ot(),{isAdmin:m}=gn(),f=hn(),[p,g]=A.useState(!1),[h,b]=A.useState(!1),x=s?.user,j=x?.image,v=!!s?.session?.impersonatedBy;let S;t[1]===Symbol.for("react.memo_cache_sentinel")?(S=()=>g(!1),t[1]=S):S=t[1];const k=S;let N;t[2]!==e?(N=e("common.accountPopover.preferences"),t[2]=e,t[3]=N):N=t[3];let _;t[4]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(Bt,{size:16}),t[4]=_):_=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 w;t[8]!==N||t[9]!==$?(w={key:"preferences",label:N,icon:_,onClick:$},t[8]=N,t[9]=$,t[10]=w):w=t[10];let C;t[11]!==r||t[12]!==o?(C=r?[{key:"connect-clients",label:"Connect to Agents",icon:n.jsx(qt,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:r.slug}})}}]:[],t[11]=r,t[12]=o,t[13]=C):C=t[13];let P;t[14]!==f||t[15]!==e?(P=(bn()||vt())&&!f?[{key:"install-desktop-app",label:vt()?e("downloadApp.installOnLinux"):e("downloadApp.installOnMac"),icon:n.jsx(Js,{size:16}),onClick:()=>b(!0)}]:[],t[14]=f,t[15]=e,t[16]=P):P=t[16];let O;t[17]!==e?(O=e("common.accountPopover.termsOfUse"),t[17]=e,t[18]=O):O=t[18];let ne;t[19]===Symbol.for("react.memo_cache_sentinel")?(ne=n.jsx(Bs,{size:16}),t[19]=ne):ne=t[19];let K;t[20]!==O?(K={key:"terms",label:O,icon:ne,href:"https://www.decocms.com/terms-of-use",external:!0},t[20]=O,t[21]=K):K=t[21];let W;t[22]!==e?(W=e("common.accountPopover.privacyPolicy"),t[22]=e,t[23]=W):W=t[23];let oe;t[24]===Symbol.for("react.memo_cache_sentinel")?(oe=n.jsx(tn,{size:16}),t[24]=oe):oe=t[24];let q;t[25]!==W?(q={key:"privacy",label:W,icon:oe,href:"https://www.decocms.com/privacy-policy",external:!0},t[25]=W,t[26]=q):q=t[26];let G;t[27]!==e?(G=e("common.accountPopover.githubRepo"),t[27]=e,t[28]=G):G=t[28];let V;t[29]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx(hs,{className:"w-4 h-4"}),t[29]=V):V=t[29];let B;t[30]!==G?(B={key:"github",label:G,icon:V,href:"https://github.com/decocms/studio",external:!0},t[30]=G,t[31]=B):B=t[31];let Q;t[32]!==e?(Q=e("common.accountPopover.community"),t[32]=e,t[33]=Q):Q=t[33];let ee;t[34]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(et,{size:16}),t[34]=ee):ee=t[34];let J;t[35]!==Q?(J={key:"community",label:Q,icon:ee,href:"https://decocms.com/discord",external:!0},t[35]=Q,t[36]=J):J=t[36];let U;t[37]!==e?(U=e("common.accountPopover.homepage"),t[37]=e,t[38]=U):U=t[38];let me;t[39]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Xs,{size:16}),t[39]=me):me=t[39];let D;t[40]!==U?(D={key:"homepage",label:U,icon:me,href:"https://decocms.com",external:!0},t[40]=U,t[41]=D):D=t[41];let H;t[42]!==m||t[43]!==o||t[44]!==e?(H=m?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:n.jsx(sn,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[42]=m,t[43]=o,t[44]=e,t[45]=H):H=t[45];let ie;t[46]!==K||t[47]!==q||t[48]!==B||t[49]!==J||t[50]!==D||t[51]!==H||t[52]!==w||t[53]!==C||t[54]!==P?(ie=[w,...C,...P,K,q,B,J,D,...H],t[46]=K,t[47]=q,t[48]=B,t[49]=J,t[50]=D,t[51]=H,t[52]=w,t[53]=C,t[54]=P,t[55]=ie):ie=t[55];const ke=ie;let X;t[56]!==e?(X=e("common.accountPopover.signOut"),t[56]=e,t[57]=X):X=t[57];let te;t[58]===Symbol.for("react.memo_cache_sentinel")?(te=n.jsx(Ze,{size:16}),t[58]=te):te=t[58];let I;t[59]!==X?(I={key:"logout",label:X,icon:te,onClick:Io},t[59]=X,t[60]=I):I=t[60];const R=I;let Ie;t[61]!==v||t[62]!==e?(Ie=v?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:n.jsx(Ze,{size:16}),onClick:async()=>{const{error:bt}=await Y.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]=Ie):Ie=t[63];const Ge=Ie;let Pe;t[64]===Symbol.for("react.memo_cache_sentinel")?(Pe=n.jsx(Zs,{size:14}),t[64]=Pe):Pe=t[64];let fe;t[65]!==e?(fe=e("common.accountPopover.lightTheme"),t[65]=e,t[66]=fe):fe=t[66];let pe;t[67]!==fe?(pe={value:"light",icon:Pe,label:fe},t[67]=fe,t[68]=pe):pe=t[68];let Te;t[69]===Symbol.for("react.memo_cache_sentinel")?(Te=n.jsx(en,{size:14}),t[69]=Te):Te=t[69];let xe;t[70]!==e?(xe=e("common.accountPopover.darkTheme"),t[70]=e,t[71]=xe):xe=t[71];let ge;t[72]!==xe?(ge={value:"dark",icon:Te,label:xe},t[72]=xe,t[73]=ge):ge=t[73];let ze;t[74]===Symbol.for("react.memo_cache_sentinel")?(ze=n.jsx(Vt,{size:14}),t[74]=ze):ze=t[74];let he;t[75]!==e?(he=e("common.accountPopover.systemTheme"),t[75]=e,t[76]=he):he=t[76];let be;t[77]!==he?(be={value:"system",icon:ze,label:he},t[77]=he,t[78]=be):be=t[78];let Ae;t[79]!==pe||t[80]!==ge||t[81]!==be?(Ae=[pe,ge,be],t[79]=pe,t[80]=ge,t[81]=be,t[82]=Ae):Ae=t[82];const Qe=Ae;let Oe;t[83]!==v||t[84]!==u||t[85]!==ke||t[86]!==c||t[87]!==d||t[88]!==R||t[89]!==Ge||t[90]!==Qe||t[91]!==x||t[92]!==j?(Oe={user:x,userImage:j,menuItems:ke,signOutItem:R,stopImpersonatingItem:Ge,isImpersonating:v,themeOptions:Qe,preferences:c,setPreferences:d,close:k,isMobile:u},t[83]=v,t[84]=u,t[85]=ke,t[86]=c,t[87]=d,t[88]=R,t[89]=Ge,t[90]=Qe,t[91]=x,t[92]=j,t[93]=Oe):Oe=t[93];const Re=Oe;let je;t[94]!==v||t[95]!==u||t[96]!==p||t[97]!==Re||t[98]!==e||t[99]!==x?.name||t[100]!==j?(je=u?n.jsxs(Lt,{open:p,onOpenChange:g,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>g(!0),className:z("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(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]}),n.jsxs(Et,{className:"h-[80dvh] p-0",children:[n.jsx(Ft,{className:"sr-only",children:e("common.accountPopover.account")}),n.jsx(Nt,{...Re})]})]}):n.jsxs(at,{open:p,onOpenChange:g,children:[n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{"data-tour":Z.account,tooltip:x?.name??e("common.accountPopover.defaultAccountLabel"),className:z("rounded-md",v&&"border-2 border-dashed border-warning"),children:[n.jsx(gt,{children:n.jsx(Fe,{url:j,fallback:x?.name??"U",shape:"circle",size:"2xs",className:"size-[18px] shrink-0"})}),n.jsx("span",{className:"truncate",children:x?.name??e("common.accountPopover.defaultAccountLabel")})]})}),n.jsx(lt,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Co,children:n.jsx(Nt,{...Re})})]}),t[94]=v,t[95]=u,t[96]=p,t[97]=Re,t[98]=e,t[99]=x?.name,t[100]=j,t[101]=je):je=t[101];let ve;t[102]!==h?(ve=n.jsx(jn,{open:h,onOpenChange:b}),t[102]=h,t[103]=ve):ve=t[103];let De;return t[104]!==je||t[105]!==ve?(De=n.jsxs(n.Fragment,{children:[je,ve]}),t[104]=je,t[105]=ve,t[106]=De):De=t[106],De}function Co(t){return t.preventDefault()}function Io(){F("signed_out",{source:"account_popover"}),zt(),Y.signOut()}class Po extends A.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 To(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function zo(){const t=y.c(17),e=$e(),{org:s}=E(),{hasDecoKey:r,balanceDollars:o}=Sn();if(!r)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 a;t[2]!==o?(a=z(o!=null&&To(o)),t[2]=o,t[3]=a):a=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(rn,{}),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 u;t[10]!==d?(u=n.jsx("span",{children:d}),t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==i||t[13]!==a||t[14]!==l||t[15]!==u?(m=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:i,className:a,onClick:l,children:[c,u]})})}),t[12]=i,t[13]=a,t[14]=l,t[15]=u,t[16]=m):m=t[16],m}const Ao={ok:"stroke-brand-purple",warn:"stroke-warning",exhausted:"stroke-destructive"},Oo={ok:"bg-brand-purple",warn:"bg-warning",exhausted:"bg-destructive"};function Ro(){const t=y.c(40),e=T(),s=le(),r=$e(),{org:o}=E(),{data:i}=Wt();if(!i?.usage||!i.features.chat)return null;let a,l;if(t[0]!==i.usage.percent?(a=Math.round(i.usage.percent*100),l=Number.isFinite(a),t[0]=i.usage.percent,t[1]=a,t[2]=l):(a=t[1],l=t[2]),!l)return null;const c=Math.min(100,Math.max(0,a)),d=i.plan.name;let u;t[3]!==e?(u=e("settings.planUsage.aiUsage"),t[3]=e,t[4]=u):u=t[4];const m=`${d} · ${u} ${c}%`;let f;t[5]!==r||t[6]!==o.slug?(f=()=>r({to:"/$org/settings/ai-providers",params:{org:o.slug}}),t[5]=r,t[6]=o.slug,t[7]=f):f=t[7];const p=!s&&"-ml-px";let g;t[8]!==p?(g=z(p),t[8]=p,t[9]=g):g=t[9];let h;t[10]!==i.plan.id||t[11]!==i.usage.state||t[12]!==s||t[13]!==c?(h=s?n.jsx(Mo,{percent:c,state:i.usage.state}):n.jsx(Do,{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]!==g||t[16]!==h?(b=n.jsx(gt,{className:g,children:h}),t[15]=g,t[16]=h,t[17]=b):b=t[17];let x;t[18]!==i.plan.name?(x=n.jsx("span",{className:"truncate font-medium",children:i.plan.name}),t[18]=i.plan.name,t[19]=x):x=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]!==x?(v=n.jsxs("span",{className:"flex items-baseline justify-between gap-2",children:[x,j]}),t[22]=j,t[23]=x,t[24]=v):v=t[24];const S=Oo[i.usage.state];let k;t[25]!==S?(k=z("block h-full rounded-full",S),t[25]=S,t[26]=k):k=t[26];const N=`${c}%`;let _;t[27]!==N?(_={width:N},t[27]=N,t[28]=_):_=t[28];let $;t[29]!==k||t[30]!==_?($=n.jsx("span",{className:"block h-1 overflow-hidden rounded-full bg-muted",children:n.jsx("span",{className:k,style:_})}),t[29]=k,t[30]=_,t[31]=$):$=t[31];let w;t[32]!==v||t[33]!==$?(w=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[v,$]}),t[32]=v,t[33]=$,t[34]=w):w=t[34];let C;return t[35]!==w||t[36]!==m||t[37]!==f||t[38]!==b?(C=n.jsx(L,{children:n.jsx(se,{children:n.jsxs(ae,{tooltip:m,className:"h-auto! rounded-lg border border-border bg-card px-2 py-2 [&_svg]:opacity-100!",onClick:f,children:[b,w]})})}),t[35]=w,t[36]=m,t[37]=f,t[38]=b,t[39]=C):C=t[39],C}function Do(t){const e=y.c(6),{planId:s}=t,{data:r}=Nn();let o;e[0]!==s||e[1]!==r?(o=r?.findIndex(l=>l.id===s)??-1,e[0]=s,e[1]=r,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(Ut,{className:Be}),e[3]=l):l=e[3],l}let a;return e[4]!==i?(a=n.jsx(_n,{index:i,className:Be}),e[4]=i,e[5]=a):a=e[5],a}function Mo(t){const e=y.c(5),{percent:s,state:r}=t,o=2*Math.PI*8;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=z("-rotate-90",Be),e[0]=i):i=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("circle",{cx:"10",cy:"10",r:8,fill:"none",strokeWidth:"3",className:"stroke-muted"}),e[1]=a):a=e[1];const l=Ao[r],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:[a,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 Lo(){return kn()?n.jsx(Ro,{}):n.jsx(zo,{})}function _t(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Po,{children:n.jsx(A.Suspense,{fallback:null,children:n.jsx(Lo,{})})}),t[0]=e):e=t[0],e}const Eo=6e4;function Fo(t,e){return t.call("NOTIFICATION_LIST",e?{cursor:e}:{})}function qo(t,e){if(!t)return t;const s=e?new Set(e):null;let r=0;const o=t.pages.map(a=>{const l=a.notifications.filter(c=>s&&!s.has(c.id)?!0:(r++,!1));return{...a,notifications:l}}),i=s?Math.max(0,(t.pages[0]?.unreadCount??0)-r):0;return{...t,pages:o.map(a=>({...a,unreadCount:i}))}}function Vo(t,e){const s=y.c(4),{data:r}=Y.useSession(),o=r?.user?.id;let i;s[0]!==e||s[1]!==t||s[2]!==o?(i=a=>!t||!o?Ho:In.subscribe(t,c=>{try{if(JSON.parse(c.data).subject!==o)return}catch{return}e(),a()},e),s[0]=e,s[1]=t,s[2]=o,s[3]=i):i=s[3],A.useSyncExternalStore(i,Uo,Bo)}function Bo(){return 0}function Uo(){return 0}function Ho(){}function Zt(){const t=y.c(37),{locator:e,org:s}=E(),r=At(),o=Ot();let i;t[0]!==e?(i=Ee.notifications(e),t[0]=e,t[1]=i):i=t[1];const a=i;let l;t[2]!==r?(l=$=>{const{pageParam:w}=$;return Fo(r,w)},t[2]=r,t[3]=l):l=t[3];let c;t[4]!==a||t[5]!==l?(c={queryKey:a,queryFn:l,initialPageParam:void 0,getNextPageParam:Go,refetchInterval:Eo},t[4]=a,t[5]=l,t[6]=c):c=t[6];const d=Cn(c);let u;t[7]!==o||t[8]!==a?(u=()=>o.invalidateQueries({queryKey:a,refetchType:"active"}),t[7]=o,t[8]=a,t[9]=u):u=t[9],Vo(s.slug,u);let m;t[10]!==r?(m=$=>r.call("NOTIFICATION_MARK_READ",$?{ids:$}:{}),t[10]=r,t[11]=m):m=t[11];let f,p;t[12]!==o||t[13]!==a?(f=async $=>{await o.cancelQueries({queryKey:a}),o.setQueryData(a,w=>qo(w,$))},p=()=>o.invalidateQueries({queryKey:a}),t[12]=o,t[13]=a,t[14]=f,t[15]=p):(f=t[14],p=t[15]);let g;t[16]!==m||t[17]!==f||t[18]!==p?(g={mutationFn:m,onMutate:f,onSettled:p},t[16]=m,t[17]=f,t[18]=p,t[19]=g):g=t[19];const h=bs(g);let b;t[20]!==d.data?.pages?(b=d.data?.pages??[],t[20]=d.data?.pages,t[21]=b):b=t[21];const x=b;let j;t[22]!==x?(j=x.flatMap(Ko),t[22]=x,t[23]=j):j=t[23];const v=x[0]?.unreadCount??0;let S;t[24]!==d?(S=()=>{d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},t[24]=d,t[25]=S):S=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 _;return t[29]!==d.hasNextPage||t[30]!==d.isFetchingNextPage||t[31]!==v||t[32]!==S||t[33]!==k||t[34]!==N||t[35]!==j?(_={updates:j,redDotCount:v,hasMore:d.hasNextPage,isFetchingMore:d.isFetchingNextPage,fetchMore:S,markAllRead:k,markRead:N},t[29]=d.hasNextPage,t[30]=d.isFetchingNextPage,t[31]=v,t[32]=S,t[33]=k,t[34]=N,t[35]=j,t[36]=_):_=t[36],_}function Ko(t){return t.notifications.map(Wo)}function Wo(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 Go(t){return t.nextCursor??void 0}function Qo(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 Jo(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 Xo(t){const e=y.c(36),{update:s,orgSlug:r,onSelect:o}=t,i=T();let a;e[0]!==r||e[1]!==s.taskKeySeq?(a=Gt(r,s.taskKeySeq),e[0]=r,e[1]=s.taskKeySeq,e[2]=a):a=e[2];const l=a,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(Pn,{size:24}):n.jsx(Fe,{url:s.actorImage??void 0,fallback:Mn(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 u;e[7]!==s.taskTitle?(u=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]=u):u=e[8];let m;e[9]!==s.occurredAt?(m=Ln(new Date(s.occurredAt)),e[9]=s.occurredAt,e[10]=m):m=e[10];let f;e[11]!==m?(f=n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground/70",children:m}),e[11]=m,e[12]=f):f=e[12];let p;e[13]!==u||e[14]!==f?(p=n.jsxs("div",{className:"flex items-baseline gap-2",children:[u,f]}),e[13]=u,e[14]=f,e[15]=p):p=e[15];let g;e[16]!==l?(g=l&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"font-medium",children:l})," · "]}),e[16]=l,e[17]=g):g=e[17];let h;e[18]!==s.action?(h=z(Qo(s.action)),e[18]=s.action,e[19]=h):h=e[19];let b;e[20]!==i||e[21]!==s?(b=Jo(s,i),e[20]=i,e[21]=s,e[22]=b):b=e[22];let x;e[23]!==h||e[24]!==b?(x=n.jsx("span",{className:h,children:b}),e[23]=h,e[24]=b,e[25]=x):x=e[25];let j;e[26]!==x||e[27]!==g?(j=n.jsxs("p",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:[g,x]}),e[26]=x,e[27]=g,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 S;return e[32]!==o||e[33]!==v||e[34]!==d?(S=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]=S):S=e[35],S}function Yo(t){const e=y.c(2),{onReach:s}=t;let r;return e[0]!==s?(r=n.jsx("div",{className:"h-8 shrink-0",ref:o=>{if(!o)return;const i=new IntersectionObserver(a=>{a.some(Zo)&&s()});return i.observe(o),()=>i.disconnect()}}),e[0]=s,e[1]=r):r=e[1],r}function Zo(t){return t.isIntersecting}function ei(t){const e=y.c(23),{onClose:s}=t,r=T(),o=$e(),{org:i}=E(),{updates:a,markAllRead:l,markRead:c,hasMore:d,fetchMore:u}=Zt();let m;e[0]!==r?(m=r("sidebar.inbox.title"),e[0]=r,e[1]=m):m=e[1];let f;e[2]!==m?(f=n.jsx("h3",{className:"text-sm font-medium",children:m}),e[2]=m,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==r||e[6]!==a.length?(p=a.length>0&&n.jsx(Le,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs text-muted-foreground",onClick:l,children:r("sidebar.inbox.markAllRead")}),e[4]=l,e[5]=r,e[6]=a.length,e[7]=p):p=e[7];let g;e[8]!==f||e[9]!==p?(g=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]=g):g=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==c||e[14]!==o||e[15]!==s||e[16]!==i||e[17]!==r||e[18]!==a?(h=a.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(mt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:r("sidebar.inbox.emptyTitle")}),n.jsx("p",{className:"text-xs text-muted-foreground",children:r("sidebar.inbox.emptyBody")})]}):n.jsxs($n,{className:"min-h-0 flex-1",children:[a.map(x=>{const j=Gt(i.slug,x.taskKeySeq);return n.jsx(Xo,{update:x,orgSlug:i.slug,onSelect:()=>{c(x.id),s(),j&&o({to:"/$org/tasks/{-$taskKey}",params:{org:i.slug,taskKey:j}})}},x.id)}),d&&n.jsx(Yo,{onReach:u})]}),e[11]=u,e[12]=d,e[13]=c,e[14]=o,e[15]=s,e[16]=i,e[17]=r,e[18]=a,e[19]=h):h=e[19];let b;return e[20]!==g||e[21]!==h?(b=n.jsxs(n.Fragment,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=b):b=e[22],b}function es(){const t=y.c(1),{redDotCount:e}=Zt();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 ts(t){const e=y.c(10),{open:s,onOpenChange:r,children:o}=t;let i;e[0]!==r||e[1]!==s?(i=s&&n.jsx(ei,{onClose:()=>r(!1)}),e[0]=r,e[1]=s,e[2]=i):i=e[2];let a;e[3]!==i?(a=n.jsx(lt,{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]=a):a=e[4];let l;return e[5]!==o||e[6]!==r||e[7]!==s||e[8]!==a?(l=n.jsxs(at,{open:s,onOpenChange:r,children:[o,a]}),e[5]=o,e[6]=r,e[7]=s,e[8]=a,e[9]=l):l=e[9],l}function ss(){const t=y.c(9),e=T(),[s,r]=A.useState(!1);let o;t[0]!==e?(o=e("sidebar.inbox.title"),t[0]=e,t[1]=o):o=t[1];let i,a;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(mt,{size:15}),a=n.jsx(es,{}),t[2]=i,t[3]=a):(i=t[2],a=t[3]);let l;t[4]!==o?(l=n.jsx(Ke,{asChild:!0,children:n.jsxs("button",{type:"button","aria-label":o,className:"relative flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 transition-colors hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[i,a]})}),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==s||t[7]!==l?(c=n.jsx(ts,{open:s,onOpenChange:r,children:l}),t[6]=s,t[7]=l,t[8]=c):c=t[8],c}function ti(){const t=y.c(15),e=T(),[s,r]=A.useState(!1),o=le();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 a,l;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(mt,{}),l=n.jsx(es,{}),t[3]=a,t[4]=l):(a=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 u;t[9]!==i||t[10]!==d?(u=n.jsx(Ke,{asChild:!0,children:n.jsxs(ae,{tooltip:i,className:"relative",children:[a,l,d]})}),t[9]=i,t[10]=d,t[11]=u):u=t[11];let m;return t[12]!==s||t[13]!==u?(m=n.jsx(ts,{open:s,onOpenChange:r,children:u}),t[12]=s,t[13]=u,t[14]=m):m=t[14],m}function wt(){const t=y.c(10),e=T();let s;t[0]!==e?(s=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(gt,{children:n.jsx(an,{className:Be})}),t[2]=r):r=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 a;return t[7]!==s||t[8]!==i?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsx(vn,{trigger:n.jsxs(ae,{tooltip:s,children:[r,i]})})})}),t[7]=s,t[8]=i,t[9]=a):a=t[9],a}function si(){const t=y.c(13),e=le(),r=!wn();if(e){let c;t[0]!==r?(c=r&&n.jsx(_t,{}),t[0]=r,t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(wt,{}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{children:n.jsx(ti,{})}),t[3]=u):u=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsxs(L,{children:[u,n.jsx(se,{children:n.jsx(tt,{})})]}),t[4]=m):m=t[4];let f;return t[5]!==c?(f=n.jsxs(Ye,{className:"px-2 pb-3 gap-1",children:[c,d,m]}),t[5]=c,t[6]=f):f=t[6],f}let o;t[7]!==r?(o=r&&n.jsx(_t,{}),t[7]=r,t[8]=o):o=t[8];let i;t[9]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(wt,{}),t[9]=i):i=t[9];let a;t[10]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(L,{className:"gap-0.5",children:n.jsx(se,{children:n.jsxs("div",{className:"flex items-center gap-1",children:[n.jsx("div",{className:"flex-1 min-w-0",children:n.jsx(tt,{})}),n.jsx(ss,{})]})})}),t[10]=a):a=t[10];let l;return t[11]!==o?(l=n.jsxs(Ye,{className:"px-2 pb-3 gap-0.5",children:[o,i,a]}),t[11]=o,t[12]=l):l=t[12],l}function ni(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ye,{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(L,{children:n.jsx(se,{children:n.jsx(tt,{})})})}),n.jsx(ss,{})]})}),t[0]=e):e=t[0],e}function oi(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((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=y.c(13),{org:s,size:r}=t,o=r===void 0?"sm":r,i=o==="xs"?"size-5":"size-6",a=o==="xs"?"text-[9px]":"text-xs";let l;e[0]!==i?(l=z(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:oi(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]!==a?(d=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:z("font-semibold leading-none",a),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=a,e[8]=d):d=e[8];let u;return e[9]!==l||e[10]!==c||e[11]!==d?(u=n.jsx("div",{className:l,style:c,children:d}),e[9]=l,e[10]=c,e[11]=d,e[12]=u):u=e[12],u}function ii({invitation:t,onChanged:e}){const s=T(),[r,o]=A.useState(!1),i=t.organizationName??s("header.orgSwitcher.unknownOrganization"),a=async()=>{o(!0);try{const d=await Y.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})),js();let c;try{c=(await Y.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},l=async()=>{o(!0);try{const c=await Y.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(Le,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:a,disabled:r,children:s("header.orgSwitcher.accept")}),n.jsx(Le,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:l,disabled:r,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:i}),children:n.jsx(Hn,{size:14})})]})]})}function ns(){const t=A.useContext(vs),{data:e,refetch:s}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>s?.()}}function ri(t){const e=y.c(13),s=t.trim(),{data:r}=Y.useSession(),o=r?.user?.id??"",i=s.length>0&&!!o,a=Ee.projectSearch(o,s);let l;e[0]!==s?(l=async x=>{const{signal:j}=x,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]!==a||e[4]!==l?(c={queryKey:a,queryFn:l,enabled:i,placeholderData:ys,staleTime:3e4,retry:!1},e[2]=i,e[3]=a,e[4]=l,e[5]=c):c=e[5];const{data:d,isFetching:u,isPlaceholderData:m,isError:f}=st(c);let p;e[6]!==d?.items?(p=d?.items??[],e[6]=d?.items,e[7]=p):p=e[7];const g=i&&u,h=i&&m;let b;return e[8]!==f||e[9]!==p||e[10]!==g||e[11]!==h?(b={hits:p,isSearching:g,isStale:h,isError:f},e[8]=f,e[9]=p,e[10]=g,e[11]=h,e[12]=b):b=e[12],b}function $t(t){const e=y.c(15),{id:s,label:r,createLabel:o,onCreate:i}=t;let a;e[0]!==s||e[1]!==r?(a=n.jsx("span",{id:s,className:"truncate",children:r}),e[0]=s,e[1]=r,e[2]=a):a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Fn,{size:14}),e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==i?(c=n.jsx(ct,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":o,className:"-my-1 shrink-0 cursor-pointer rounded-md 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(dt,{side:"right",children:o}),e[7]=o,e[8]=d):d=e[8];let u;e[9]!==c||e[10]!==d?(u=n.jsxs(ut,{children:[c,d]}),e[9]=c,e[10]=d,e[11]=u):u=e[11];let m;return e[12]!==a||e[13]!==u?(m=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:[a,u]}),e[12]=a,e[13]=u,e[14]=m):m=e[14],m}const Ue="min-h-9 items-center",de={allProjects:"scope:__all__",project:t=>`scope:${t}`,org:t=>`org:${t}`,foreignProject:(t,e)=>`travel:${t}:${e}`};function ai(t){const e=y.c(9),{active:s,rows:r}=t,o=T();let i,a,l;if(e[0]!==s||e[1]!==r||e[2]!==o){l=Symbol.for("react.early_return_sentinel");e:{const d=r.get(s);if(d?.kind!=="travel"){l=null;break e}i="border-t border-border px-3 py-2 text-xs text-warning",a=o("sidebar.picker.verbTravel",{name:d.label})}e[0]=s,e[1]=r,e[2]=o,e[3]=i,e[4]=a,e[5]=l}else i=e[3],a=e[4],l=e[5];if(l!==Symbol.for("react.early_return_sentinel"))return l;let c;return e[6]!==i||e[7]!==a?(c=n.jsx("div",{className:i,children:a}),e[6]=i,e[7]=a,e[8]=c):c=e[8],c}function li(t){const e=y.c(25),{onClose:s,onCreateOrg:r,className:o}=t,i=T(),a=A.useId(),l=A.useId(),c=$e(),{org:d}=E(),{scopeId:u,projects:m,setScope:f}=Se(),{hasMore:p}=Kn(),[g,h]=A.useState(""),[b,x]=A.useState(de.allProjects),j=A.useDeferredValue(g);let v;e[0]!==j?(v=j.trim(),e[0]=j,e[1]=v):v=e[1];const S=v,k=S.length>0,{data:N}=Ss(),{invitations:_,refetch:$}=ns();let w;e[2]!==d.slug?(w=(I,R)=>I.slug===d.slug?-1:R.slug===d.slug?1:0,e[2]=d.slug,e[3]=w):w=e[3];const C=(N??[]).slice().sort(w),{hits:P,isSearching:O,isStale:ne,isError:K}=ri(k?S:""),W=k?C.filter(I=>{const R=S.toLowerCase();return I.name.toLowerCase().includes(R)||I.slug.toLowerCase().includes(R)}):[],oe=we();let q;e[4]!==oe?(q=oe.startsWith("/$org/settings"),e[4]=oe,e[5]=q):q=e[5];const G=q,V=new Map;let B;e[6]!==G||e[7]!==s||e[8]!==f?(B=I=>{F("scope_set",{scoped:I!==null,fromSettings:G}),f(I),s()},e[6]=G,e[7]=s,e[8]=f,e[9]=B):B=e[9];const Q=B;let ee;e[10]!==c||e[11]!==s?(ee=(I,R)=>{F("org_project_travel",{scoped:!!R}),c(R?{to:"/$org/projects/$agentId",params:{org:I,agentId:R}}:{to:"/$org/home",params:{org:I}}),s()},e[10]=c,e[11]=s,e[12]=ee):ee=e[12];const J=ee;let U;e[13]!==c||e[14]!==s||e[15]!==d.slug?(U=()=>{F("picker_new_project"),c({to:"/$org/home",params:{org:d.slug}}),s()},e[13]=c,e[14]=s,e[15]=d.slug,e[16]=U):U=e[16];const me=U;V.set(de.allProjects,{kind:"scope",label:i("sidebar.scope.allProjects")});let D;e[17]!==i?(D=i("sidebar.picker.searchPlaceholder"),e[17]=i,e[18]=D):D=e[18];let H;e[19]!==g||e[20]!==D?(H=n.jsx(Bn,{value:g,onValueChange:h,placeholder:D}),e[19]=g,e[20]=D,e[21]=H):H=e[21];const ie=qn,ke="max-h-none min-h-0 flex-1",X=k?n.jsxs(n.Fragment,{children:[K&&n.jsx(yt,{children:i("sidebar.picker.searchFailed")}),!K&&!O&&P.length===0&&W.length===0&&n.jsx(yt,{children:i("sidebar.picker.noMatches",{query:S})}),!K&&P.length>0&&n.jsx(Me,{heading:i("sidebar.picker.projectsHeading"),className:z(ne&&"opacity-50"),children:P.map(I=>n.jsx(ci,{hit:I,currentOrgSlug:d.slug,scopeId:u,rows:V,onScope:Q,onTravel:J},`${I.orgSlug}:${I.id}`))}),W.length>0&&n.jsx(Me,{heading:i("sidebar.picker.orgsHeading"),children:W.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))})]}):n.jsxs(n.Fragment,{children:[n.jsx($t,{id:a,label:i("sidebar.picker.projectsHeading"),createLabel:i("sidebar.picker.newProject"),onCreate:me}),n.jsxs(Me,{"aria-labelledby":a,children:[n.jsxs(Ve,{value:de.allProjects,className:Ue,onSelect:()=>Q(null),children:[n.jsx("span",{className:"min-w-0 flex-1 truncate",children:i("sidebar.scope.allProjects")}),u===null&&n.jsx(qe,{size:14})]}),m.map(I=>{const R=de.project(I.id);return V.set(R,{kind:"scope",label:I.title}),n.jsxs(Ve,{value:R,className:Ue,onSelect:()=>Q(I.id),children:[n.jsx(ft,{icon:I.icon,name:I.title}),n.jsx("span",{className:"min-w-0 flex-1 truncate",children:I.title}),u===I.id&&n.jsx(qe,{size:14})]},I.id)}),p&&n.jsx("p",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:i("sidebar.picker.moreExist")})]}),n.jsx($t,{id:l,label:i("sidebar.picker.orgsHeading"),createLabel:i("sidebar.picker.newOrganization"),onCreate:r}),n.jsxs(Me,{"aria-labelledby":l,children:[_.map(I=>n.jsx(ii,{invitation:I,onChanged:$},I.id)),C.map(I=>n.jsx(Ct,{candidate:I,currentOrgSlug:d.slug,rows:V,onTravel:J,onClose:s},I.id))]})]});let te;return e[22]!==ie||e[23]!==X?(te=n.jsx(ie,{className:ke,children:X}),e[22]=ie,e[23]=X,e[24]=te):te=e[24],n.jsxs(Vn,{shouldFilter:!1,value:b,onValueChange:x,className:o,children:[H,te,n.jsx(ai,{active:b,rows:V})]})}function Ct(t){const e=y.c(22),{candidate:s,currentOrgSlug:r,rows:o,onTravel:i,onClose:a}=t,l=s.slug===r;let c;e[0]!==s.name||e[1]!==s.slug||e[2]!==l||e[3]!==o?(c=de.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]!==a||e[8]!==i?(d=()=>l?a():i(s.slug),e[5]=s.slug,e[6]=l,e[7]=a,e[8]=i,e[9]=d):d=e[9];let u;e[10]!==s?(u=n.jsx(ht,{org:s,size:"xs"}),e[10]=s,e[11]=u):u=e[11];let m;e[12]!==s.name?(m=n.jsx("span",{className:"min-w-0 flex-1 truncate",children:s.name}),e[12]=s.name,e[13]=m):m=e[13];let f;e[14]!==l?(f=l&&n.jsx(qe,{size:14}),e[14]=l,e[15]=f):f=e[15];let p;return e[16]!==d||e[17]!==u||e[18]!==m||e[19]!==f||e[20]!==c?(p=n.jsxs(Ve,{value:c,className:Ue,onSelect:d,children:[u,m,f]}),e[16]=d,e[17]=u,e[18]=m,e[19]=f,e[20]=c,e[21]=p):p=e[21],p}function ci(t){const e=y.c(30),{hit:s,currentOrgSlug:r,scopeId:o,rows:i,onScope:a,onTravel:l}=t,c=s.orgSlug===r;let d;e[0]!==s.id||e[1]!==s.orgSlug||e[2]!==s.title||e[3]!==c||e[4]!==i?(d=c?de.project(s.id):de.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 u;e[6]!==s.id||e[7]!==s.orgSlug||e[8]!==c||e[9]!==a||e[10]!==l?(u=()=>c?a(s.id):l(s.orgSlug,s.id),e[6]=s.id,e[7]=s.orgSlug,e[8]=c,e[9]=a,e[10]=l,e[11]=u):u=e[11];let m;e[12]!==s.icon||e[13]!==s.title?(m=n.jsx(ft,{icon:s.icon,name:s.title}),e[12]=s.icon,e[13]=s.title,e[14]=m):m=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 g;e[19]!==s.id||e[20]!==c||e[21]!==o?(g=c&&o===s.id&&n.jsx(qe,{size:14}),e[19]=s.id,e[20]=c,e[21]=o,e[22]=g):g=e[22];let h;return e[23]!==u||e[24]!==m||e[25]!==f||e[26]!==p||e[27]!==g||e[28]!==d?(h=n.jsxs(Ve,{value:d,className:Ue,onSelect:u,children:[m,f,p,g]}),e[23]=u,e[24]=m,e[25]=f,e[26]=p,e[27]=g,e[28]=d,e[29]=h):h=e[29],h}function os(t){const e=y.c(32),{collapsed:s,onNavigate:r}=t,o=s===void 0?!1:s,i=T(),{org:a}=E(),{project:l}=Se(),{invitations:c}=ns(),[d,u]=A.useState(!1),[m,f]=A.useState(!1),p=ot();let g;if(e[0]!==o||e[1]!==c.length||e[2]!==a||e[3]!==l||e[4]!==i){const $=l?i("sidebar.picker.projectInOrg",{project:l.title,org:a.name}):a.name;let w;e[6]!==a||e[7]!==l?(w=l?n.jsx(ln,{icon:l.icon,name:l.title,size:"xs",className:"shrink-0"}):n.jsx(ht,{org:a,size:"sm"}),e[6]=a,e[7]=l,e[8]=w):w=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 P;e[11]!==w||e[12]!==C?(P=n.jsxs("div",{className:"relative inline-flex shrink-0",children:[w,C]}),e[11]=w,e[12]=C,e[13]=P):P=e[13];const O=P;g=o?n.jsx(ae,{tooltip:$,"data-tour":Z.switcher,children:O}):n.jsxs("button",{type:"button","data-tour":Z.switcher,"aria-label":i("sidebar.picker.ariaLabel",{name:$}),className:z("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",Us),children:[O,n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:l?l.title:a.name}),n.jsx(En,{size:14,className:"shrink-0 text-muted-foreground"})]}),e[0]=o,e[1]=c.length,e[2]=a,e[3]=l,e[4]=i,e[5]=g}else g=e[5];const h=g,b=p?"min-h-0 flex-1":"max-h-[min(560px,70dvh,var(--radix-popover-content-available-height,70dvh))]";let x;e[14]!==r?(x=()=>{u(!1),r?.()},e[14]=r,e[15]=x):x=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{u(!1),f(!0)},e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==x?(v=n.jsx(li,{onClose:x,onCreateOrg:j,className:b}),e[17]=b,e[18]=x,e[19]=v):v=e[19];const S=v;let k;e[20]!==o||e[21]!==S||e[22]!==p||e[23]!==d||e[24]!==i||e[25]!==h?(k=p?n.jsxs(Lt,{open:d,onOpenChange:u,direction:"bottom",children:[n.jsx(Ws,{asChild:!0,children:h}),n.jsxs(Et,{className:"flex max-h-[85dvh] flex-col p-0",children:[n.jsx(Ft,{className:"sr-only",children:i("sidebar.picker.title")}),S]})]}):n.jsxs(at,{open:d,onOpenChange:u,children:[n.jsx(Ke,{asChild:!0,children:h}),n.jsx(lt,{side:o?"right":"bottom",align:"start",className:"w-[min(340px,calc(100vw-2rem))] p-0",children:S})]}),e[20]=o,e[21]=S,e[22]=p,e[23]=d,e[24]=i,e[25]=h,e[26]=k):k=e[26];let N;e[27]!==m?(N=n.jsx(Un,{open:m,onOpenChange:f}),e[27]=m,e[28]=N):N=e[28];let _;return e[29]!==k||e[30]!==N?(_=n.jsxs(n.Fragment,{children:[k,N]}),e[29]=k,e[30]=N,e[31]=_):_=e[31],_}const is=16;function di(){const t=y.c(7),e=le(),s=We();let r;t[0]!==e?(r=n.jsx(os,{collapsed:e}),t[0]=e,t[1]=r):r=t[1];let o;t[2]!==s?(o=!s&&n.jsx(mi,{}),t[2]=s,t[3]=o):o=t[3];let i;return t[4]!==r||t[5]!==o?(i=n.jsxs(n.Fragment,{children:[r,o]}),t[4]=r,t[5]=o,t[6]=i):i=t[6],i}function ui(t){const e=y.c(12),{onClose:s}=t,r=T();let o;e[0]!==s?(o=n.jsx(os,{onNavigate:s}),e[0]=s,e[1]=o):o=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"flex-1"}),e[2]=i):i=e[2];let a;e[3]!==r?(a=r("sidebar.header.closeSidebar"),e[3]=r,e[4]=a):a=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(it,{size:is}),e[5]=l):l=e[5];let c;e[6]!==s||e[7]!==a?(c=n.jsx(rt,{onClick:s,"aria-label":a,children:l}),e[6]=s,e[7]=a,e[8]=c):c=e[8];let d;return e[9]!==o||e[10]!==c?(d=n.jsxs(n.Fragment,{children:[o,i,c]}),e[9]=o,e[10]=c,e[11]=d):d=e[11],d}function mi(){const t=y.c(12),e=T(),s=le(),{toggleSidebar:r}=Ce();let o;t[0]!==e?(o=e("sidebar.header.toggleSidebar"),t[0]=e,t[1]=o):o=t[1];const i=o;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(it,{size:is}),t[2]=a):a=t[2];let l;t[3]!==i||t[4]!==r?(l=n.jsx(ct,{asChild:!0,children:n.jsx(rt,{"aria-label":i,onClick:r,className:"shrink-0 rounded-lg md:size-[34px] group-data-[state=collapsed]/sidebar:mx-auto",children:a})}),t[3]=i,t[4]=r,t[5]=l):l=t[5];const c=!s;let d;t[6]!==i||t[7]!==c?(d=n.jsx(dt,{side:"right",hidden:c,children:i}),t[6]=i,t[7]=c,t[8]=d):d=t[8];let u;return t[9]!==l||t[10]!==d?(u=n.jsxs(ut,{children:[l,d]}),t[9]=l,t[10]=d,t[11]=u):u=t[11],u}function ue(t){const e=y.c(33),{icon:s,label:r,isActive:o,link:i,onSelect:a,ariaLabel:l,className:c,dataTour:d,children:u,trailing:m}=t,f=o===void 0?!1:o,p=le(),g=l??r,h=p?g: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 x=b;let j;e[5]!==m?(j=m&&n.jsx("span",{className:"order-last ml-auto flex shrink-0 items-center group-data-[state=collapsed]/sidebar:hidden",children:m}),e[5]=m,e[6]=j):j=e[6];let v;e[7]!==r?(v=n.jsx("span",{className:"truncate",children:r}),e[7]=r,e[8]=v):v=e[8];let S;e[9]!==s||e[10]!==j||e[11]!==v?(S=n.jsxs(n.Fragment,{children:[s,j,v]}),e[9]=s,e[10]=j,e[11]=v,e[12]=S):S=e[12];const k=S;if(i){const $=f?"page":void 0;let w;e[13]!==k||e[14]!==i||e[15]!==g||e[16]!==a||e[17]!==$?(w=n.jsx(Rt,{...i,"aria-label":g,"aria-current":$,onClick:a,children:k}),e[13]=k,e[14]=i,e[15]=g,e[16]=a,e[17]=$,e[18]=w):w=e[18];let C;e[19]!==x||e[20]!==w?(C=n.jsx(ae,{asChild:!0,...x,children:w}),e[19]=x,e[20]=w,e[21]=C):C=e[21];let P;return e[22]!==u||e[23]!==C?(P=n.jsxs(se,{children:[C,u]}),e[22]=u,e[23]=C,e[24]=P):P=e[24],P}let N;e[25]!==k||e[26]!==g||e[27]!==a||e[28]!==x?(N=n.jsx(ae,{...x,"aria-label":g,onClick:a,children:k}),e[25]=k,e[26]=g,e[27]=a,e[28]=x,e[29]=N):N=e[29];let _;return e[30]!==u||e[31]!==N?(_=n.jsxs(se,{children:[N,u]}),e[30]=u,e[31]=N,e[32]=_):_=e[32],_}function rs(t){const e=y.c(5),{label:s,link:r,onSelect:o}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Gn,{size:16}),e[0]=i):i=e[0];let a;return e[1]!==s||e[2]!==r||e[3]!==o?(a=n.jsx("div",{className:"-mx-2 border-b border-sidebar-border px-2 py-2",children:n.jsx(L,{className:"shrink-0",children:n.jsx(ue,{icon:i,label:s,className:"text-sidebar-foreground/70",link:r,onSelect:o})})}),e[1]=s,e[2]=r,e[3]=o,e[4]=a):a=e[4],a}function fi(t){return t==="board"?"kanban":t==="cdn"?"monitoring":Dt(t)?"cms":null}function as(){const t=y.c(2),{data:e}=Wt();let s;return t[0]!==e?(s=r=>{const o=fi(r);return!o||!e?!1:e.features[o]!==!0},t[0]=e,t[1]=s):s=t[1],s}const pi="settings",xi=["overview","reports","board","files"];function gi(t,e){return!t||!e?!1:!Mt(e.metadata)}function hi(t,e,s,r){if(!t||!e)return!0;const o=r!==void 0;return Qn(o?r:Qt(e.metadata),o?1:e.metadata?.sidebarViewsVersion).includes(s)}function bi(){const t=y.c(16),e=T(),{org:s}=E(),r=we(),o=He(),{project:i,repo:a}=Se(),l=Jt(i?.id);let c;t[0]!==i||t[1]!==o?(c=gi(o,i),t[0]=i,t[1]=o,t[2]=c):c=t[2];const d=c;let u;t[3]!==l||t[4]!==i||t[5]!==o?(u=p=>hi(o,i,p,l),t[3]=l,t[4]=i,t[5]=o,t[6]=u):u=t[6];const m=u;let f;if(t[7]!==m||t[8]!==d||t[9]!==r||t[10]!==s||t[11]!==i?.id||t[12]!==a||t[13]!==o||t[14]!==e){const p={overview:d||!m("overview")?null:{key:"overview",label:e("sidebar.navDestinations.home"),icon:n.jsx(cn,{size:16}),isActive:r===M.home||r===M.orgIndex||r===ce.root||r===`${ce.root}/`,trackAs:"overview",link:o?{to:ce.root,params:{org:s.slug,agentId:o}}:{to:M.home,params:{org:s.slug}}},reports:Xe(M.reports,o)&&!d&&m("reports")?{key:"reports",label:e("sidebar.navDestinations.reports"),icon:n.jsx(Kt,{size:16}),isActive:r===M.reports||r===ce.reports,trackAs:"reports",link:o?{to:ce.reports,params:{org:s.slug,agentId:o}}:{to:M.reports,params:{org:s.slug}}}:null,board:d||!m("board")?null:{key:"board",label:e("sidebar.navDestinations.tasks"),icon:n.jsx(Ht,{size:16}),isActive:r===M.tasks||r===ce.tasks,trackAs:"board",dataTour:Z.tasks,link:{to:o?ce.tasks:M.tasks,params:{org:s.slug,agentId:o??void 0,taskKey:void 0},search:g=>{const h=a??i?.id;return h?{...g,repo:h}:g}}},files:Xe(M.library,o)?{key:"files",label:e("sidebar.navDestinations.library"),icon:n.jsx(Wn,{size:16}),isActive:r===M.library,trackAs:"files",link:{to:M.library,params:{org:s.slug}}}:null};f=xi.map(g=>p[g]).filter(ji),t[7]=m,t[8]=d,t[9]=r,t[10]=s,t[11]=i?.id,t[12]=a,t[13]=o,t[14]=e,t[15]=f}else f=t[15];return f}function ji(t){return t!==null}function vi(t){const e=y.c(9),{onNavigate:s}=t,r=bi(),o=as();let i;if(e[0]!==r||e[1]!==o||e[2]!==s){let l;e[4]!==o||e[5]!==s?(l=c=>n.jsx(ue,{icon:c.icon,label:c.label,dataTour:c.dataTour,isActive:c.isActive,link:c.link,trailing:o(c.key)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("nav_destination_clicked",{destination:c.trackAs}),s?.()}},c.key),e[4]=o,e[5]=s,e[6]=l):l=e[6],i=r.map(l),e[0]=r,e[1]=o,e[2]=s,e[3]=i}else i=e[3];let a;return e[7]!==i?(a=n.jsx(L,{className:"gap-1",children:i}),e[7]=i,e[8]=a):a=e[8],a}function yi(t){const e=y.c(18),{onNavigate:s}=t,r=T(),{org:o}=E(),i=He(),a=pt(),l=we(),c=ks();let d;e[0]!==c||e[1]!==l?(d=l.startsWith("/$org/settings")||l.startsWith(M.projects)&&c==="settings",e[0]=c,e[1]=l,e[2]=d):d=e[2];const u=d;let m;e[3]!==r?(m=r("sidebar.navDestinations.settings"),e[3]=r,e[4]=m):m=e[4];const f=m;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 g=p;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(Bt,{size:16}),e[8]=h):h=e[8];let b;e[9]!==a||e[10]!==s||e[11]!==i?(b=()=>{F("nav_destination_clicked",{destination:pi,target:i?"project":"org"}),i&&a(i,{panel:"settings"}),s?.()},e[9]=a,e[10]=s,e[11]=i,e[12]=b):b=e[12];let x;return e[13]!==u||e[14]!==f||e[15]!==g||e[16]!==b?(x=n.jsx(L,{className:"gap-1",children:n.jsx(ue,{dataTour:Z.settings,icon:h,label:f,isActive:u,link:g,onSelect:b})}),e[13]=u,e[14]=f,e[15]=g,e[16]=b,e[17]=x):x=e[17],x}function Si(t,e){const s=new Set(e);return s.size===0?t:t.filter(r=>s.has(r.connectionId))}function ki(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 Ni(t){const e=y.c(13),{onNavigate:s}=t,r=T(),{project:o}=Se(),i=pt(),a=we(),l=so(),c=Jn(o),d=as(),u=Jt(o?.id);if(!o)return null;let m;if(e[0]!==c.presence||e[1]!==u||e[2]!==o.metadata){const g=Mt(o.metadata),h=u??Qt(o.metadata);m=new Set(Xn(h,Yn(g,c.presence),u!==void 0?1:o.metadata.sidebarViewsVersion)),e[0]=c.presence,e[1]=u,e[2]=o.metadata,e[3]=m}else m=e[3];const f=m;let p;if(e[4]!==l||e[5]!==d||e[6]!==a||e[7]!==i||e[8]!==s||e[9]!==o||e[10]!==f||e[11]!==r){const g=[];f.has("site-editor")&&g.push({key:"site-editor",label:r("sidebar.projectNav.siteEditor"),icon:n.jsx(Vt,{size:16}),panel:"site-editor",isActive:$i,dataTour:Z.siteEditor});const h={assets:{label:r("common.mainPanelTabs.assets"),icon:n.jsx(to,{size:16})},hosting:{label:r("common.mainPanelTabs.hosting"),icon:n.jsx(un,{size:16})},e2e:{label:r("common.mainPanelTabs.e2e"),icon:n.jsx(Ys,{size:16})},analytics:{label:r("common.mainPanelTabs.analytics"),icon:n.jsx(Kt,{size:16})},cdn:{label:r("common.mainPanelTabs.cdn"),icon:n.jsx(dn,{size:16})}};for(const x of Zn){if(!f.has(x))continue;const j=h[x];g.push({key:x,label:j.label,icon:j.icon,panel:x,isActive:v=>v===x})}for(const x of Si(ki(o),(o.connections??[]).map(wi)))x.toolName!=="fetch_assets"&&g.push({key:`pinned:${x.connectionId}:${x.toolName}`,label:x.label||x.toolName,icon:x.icon?n.jsx("img",{src:x.icon,alt:"",className:"size-4 rounded-[3px]"}):n.jsx(eo,{size:16}),panel:jt(x.connectionId,x.toolName),isActive:j=>j===jt(x.connectionId,x.toolName)});f.has("automations")&&g.push({key:"automations",label:r("sidebar.projectNav.automations"),icon:n.jsx(Ut,{size:16}),panel:"automations",isActive:_i,dataTour:Z.automations});const b=a.startsWith(M.projects);p=n.jsx(L,{className:"gap-1",children:g.map(x=>n.jsx(ue,{icon:x.icon,label:x.label,dataTour:x.dataTour,isActive:b&&x.isActive(l),trailing:d(x.panel)?n.jsx(nt,{size:14,className:"text-muted-foreground"}):void 0,onSelect:()=>{F("project_nav_clicked",{surface:x.key}),i(o.id,{panel:x.panel}),s?.()}},x.key))}),e[4]=l,e[5]=d,e[6]=a,e[7]=i,e[8]=s,e[9]=o,e[10]=f,e[11]=r,e[12]=p}else p=e[12];return p}function _i(t){return t==="automations"||Ns(t)!==null}function wi(t){return t.connection_id}function $i(t){return!!t&&Dt(t)}const Ci=3;function Ii(t,e){return t.status==="archived"||t.status==="done"?!1:e&&t.assigneeId===e?!0:On(t)||Rn(t)}function Pi(t,e,s){const r=new Map;for(const i of e){if(!Ii(i,s))continue;const a=zn(i,t);for(const l of a){const c=r.get(l.id)??[];c.push({task:i,only:a.length===1}),r.set(l.id,c)}}const o=new Map;for(const[i,a]of r)a.sort((l,c)=>Number(c.only)-Number(l.only)||(c.task.updatedAt??"").localeCompare(l.task.updatedAt??"")),o.set(i,a.slice(0,Ci).map(l=>l.task));return o}function Ti(t){const e=y.c(21),{task:s,orgSlug:r,isLast:o,onNavigate:i}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=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]=a):a=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]!==r||e[4]!==s?(c=An(r,s),e[3]=r,e[4]=s,e[5]=c):c=e[5];let d;e[6]!==r||e[7]!==c?(d={org:r,taskKey:c},e[6]=r,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==i||e[10]!==s.status?(u=()=>{F("sidebar_attention_task_clicked",{status:s.status}),i?.()},e[9]=i,e[10]=s.status,e[11]=u):u=e[11];let m;e[12]!==s.title?(m=n.jsx("span",{className:"truncate",children:s.title}),e[12]=s.title,e[13]=m):m=e[13];let f;e[14]!==d||e[15]!==u||e[16]!==m?(f=n.jsx(Rt,{to:"/$org/tasks/{-$taskKey}",params:d,onClick:u,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:m}),e[14]=d,e[15]=u,e[16]=m,e[17]=f):f=e[17];let p;return e[18]!==l||e[19]!==f?(p=n.jsxs("li",{className:"relative",children:[a,l,f]}),e[18]=l,e[19]=f,e[20]=p):p=e[20],p}function zi(t){const e=y.c(35),{onNavigate:s}=t,r=T(),o=le(),{org:i,locator:a}=E(),l=At(),{projects:c}=Se(),d=He(),u=pt(),{data:m}=Y.useSession();let f;e[0]!==a||e[1]!==l?(f=Dn(a,l),e[0]=a,e[1]=l,e[2]=f):f=e[2];const p=!o&&!d;let g;e[3]!==f||e[4]!==p?(g={...f,enabled:p},e[3]=f,e[4]=p,e[5]=g):g=e[5];const{data:h}=st(g);if(d||c.length===0)return null;let b,x,j,v,S,k;if(e[6]!==o||e[7]!==h?.items||e[8]!==u||e[9]!==s||e[10]!==i||e[11]!==c||e[12]!==d||e[13]!==m?.user?.id||e[14]!==r){const $=Pi(Tn(c),h?.items??[],m?.user?.id),w=o&&"pt-3";e[21]!==w?(v=z("flex flex-col gap-1",w),e[21]=w,e[22]=v):v=e[22],S=Z.projects,e[23]!==o||e[24]!==r?(k=!o&&n.jsx("p",{className:"px-2 pt-5 pb-0.5 text-xs font-medium text-muted-foreground/60",children:r("sidebar.projects.heading")}),e[23]=o,e[24]=r,e[25]=k):k=e[25],b=L,x="gap-1",j=c.map(C=>{const P=$.get(C.id)??[];return n.jsx(ue,{icon:n.jsx(ft,{icon:C.icon,name:C.title}),label:C.title,isActive:C.id===d,onSelect:()=>{F("sidebar_project_clicked"),u(C.id,{panel:_s(C.metadata?.ui?.layout)}),s?.()},children:!o&&P.length>0&&n.jsx("ul",{className:"flex flex-col",children:P.map((O,ne)=>n.jsx(Ti,{task:O,orgSlug:i.slug,isLast:ne===P.length-1,onNavigate:s},O.id))})},C.id)}),e[6]=o,e[7]=h?.items,e[8]=u,e[9]=s,e[10]=i,e[11]=c,e[12]=d,e[13]=m?.user?.id,e[14]=r,e[15]=b,e[16]=x,e[17]=j,e[18]=v,e[19]=S,e[20]=k}else b=e[15],x=e[16],j=e[17],v=e[18],S=e[19],k=e[20];let N;e[26]!==b||e[27]!==x||e[28]!==j?(N=n.jsx(b,{className:x,children:j}),e[26]=b,e[27]=x,e[28]=j,e[29]=N):N=e[29];let _;return e[30]!==v||e[31]!==S||e[32]!==k||e[33]!==N?(_=n.jsxs("div",{className:v,"data-tour":S,children:[k,N]}),e[30]=v,e[31]=S,e[32]=k,e[33]=N,e[34]=_):_=e[34],_}function Ai(){const t=y.c(8),e=T(),{capabilities:s,isPrivileged:r,loading:o,error:i}=ws(),a=yn().length,l=$s();let c;return t[0]!==s||t[1]!==i||t[2]!==r||t[3]!==a||t[4]!==o||t[5]!==e||t[6]!==l?(c=[{key:"account",label:"",items:[{key:"profile",label:e("settings.nav.profile"),icon:n.jsx(uo,{size:14}),to:"/$org/settings/profile"}]},{key:"organization",label:e("settings.nav.organization"),items:[{key:"general",label:e("settings.nav.general"),icon:n.jsx(xn,{size:14}),to:"/$org/settings/general",requires:"org:manage"},{key:"billing",label:e("settings.nav.billing"),icon:n.jsx(io,{size:14}),to:"/$org/settings/ai-providers",group:"billing"},{key:"connect",label:e("settings.nav.connect"),icon:n.jsx(qt,{size:14}),to:"/$org/settings/connect",group:"connect"},{key:"tasks",label:e("settings.nav.tasks"),icon:n.jsx(Ht,{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(ro,{size:14}),to:"/$org/settings/repositories",requires:"file-configs:manage"},{key:"connections",label:e("settings.nav.connections"),icon:n.jsx(mn,{size:14}),to:"/$org/settings/connections"},{key:"agents",label:e("settings.nav.agents"),icon:n.jsx(et,{size:14}),to:"/$org/settings/agents"},{key:"automations",label:e("settings.nav.automations"),icon:n.jsx(mo,{size:14}),to:"/$org/settings/automations",requires:"automations:manage"},{key:"skills",label:e("settings.nav.skills"),icon:n.jsx(co,{size:14}),to:"/$org/settings/skills"}]},{key:"manage",label:e("settings.nav.manage"),items:[{key:"monitor",label:e("settings.nav.monitor"),icon:n.jsx(fn,{size:14}),to:"/$org/settings/monitor",requires:"monitoring:view"},{key:"members",label:e("settings.nav.members"),icon:n.jsx(et,{size:14}),to:"/$org/settings/members",group:"members",badge:a}]},{key:"advanced",label:e("settings.nav.advanced"),collapsible:!0,items:[{key:"secrets",label:e("settings.nav.secrets"),icon:n.jsx(lo,{size:14}),to:"/$org/settings/secrets",requires:"secrets:manage"},{key:"storage",label:e("settings.nav.storage"),icon:n.jsx(ao,{size:14}),to:"/$org/settings/buckets",group:"storage"},{key:"store",label:e("settings.nav.store"),icon:n.jsx(pn,{size:14}),to:"/$org/settings/store",requires:"registry:manage"},{key:"sso",label:e("settings.nav.security"),icon:n.jsx(nt,{size:14}),to:"/$org/settings/sso",requires:"org:manage"}]}].map(u=>({...u,items:u.items.flatMap(m=>{if(m.group){const[f]=l[m.group];return f?[{...m,to:f.to}]:Cs(m.group)?[]:[m]}return o||i?[m]:m.privilegedOnly?r?[m]:[]:m.requires?r||s[m.requires]?[m]:[]:[m]})})).filter(Oi),t[0]=s,t[1]=i,t[2]=r,t[3]=a,t[4]=o,t[5]=e,t[6]=l,t[7]=c):c=t[7],c}function Oi(t){return t.items.length>0}function ls(){const t=y.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}=Is(e);let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:Ri},t[1]=r):r=t[1];const o=Ps(r);let i;if(t[2]!==s||t[3]!==o){const c=d=>{const u=d.replace("$org",s);return o===u||o.startsWith(`${u}/`)};i=d=>[d.to,...d.group?Ts(d.group):[]].some(c),t[2]=s,t[3]=o,t[4]=i}else i=t[4];const a=i;let l;return t[5]!==a||t[6]!==s?(l={org:s,isActive:a},t[5]=a,t[6]=s,t[7]=l):l=t[7],l}function Ri(t){return t.location.pathname}function Di(){const t=y.c(9),{isActive:e}=ls();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={},t[0]=s):s=t[0];const[r,o]=A.useState(s);let i;t[1]!==e||t[2]!==r?(i=u=>r[u.key]??(!u.collapsible||u.items.some(e)),t[1]=e,t[2]=r,t[3]=i):i=t[3];const a=i;let l;t[4]!==a?(l=u=>o(m=>({...m,[u.key]:!a(u)})),t[4]=a,t[5]=l):l=t[5];const c=l;let d;return t[6]!==a||t[7]!==c?(d={isOpen:a,toggle:c},t[6]=a,t[7]=c,t[8]=d):d=t[8],d}function Mi(t){const e=y.c(21),{group:s,open:r,onToggle:o,className:i}=t;let a,l,c,d,u;if(e[0]!==i||e[1]!==s.collapsible||e[2]!==s.label||e[3]!==o||e[4]!==r){u=Symbol.for("react.early_return_sentinel");e:{const g=z("text-xs font-medium text-muted-foreground/60 truncate",i);if(!s.collapsible){u=n.jsx("p",{className:g,children:s.label});break e}a="button",l=o,c=r,d=z("flex w-full items-center gap-1 rounded-md hover:text-muted-foreground",g)}e[0]=i,e[1]=s.collapsible,e[2]=s.label,e[3]=o,e[4]=r,e[5]=a,e[6]=l,e[7]=c,e[8]=d,e[9]=u}else a=e[5],l=e[6],c=e[7],d=e[8],u=e[9];if(u!==Symbol.for("react.early_return_sentinel"))return u;let m;e[10]!==r?(m=r?n.jsx(no,{size:12}):n.jsx(oo,{size:12}),e[10]=r,e[11]=m):m=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]!==a||e[15]!==l||e[16]!==c||e[17]!==d||e[18]!==m||e[19]!==f?(p=n.jsxs("button",{type:a,onClick:l,"aria-expanded":c,className:d,children:[m,f]}),e[14]=a,e[15]=l,e[16]=c,e[17]=d,e[18]=m,e[19]=f,e[20]=p):p=e[20],p}function Li(t){const e=y.c(5),{icon:s,badge:r}=t;let o;e[0]!==r?(o=r?n.jsx("span",{className:"absolute -right-1 -top-1 size-2 rounded-full bg-destructive pointer-events-none"}):null,e[0]=r,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 cs(t){const e=y.c(22),{onNavigate:s}=t,r=T(),o=Ai(),{org:i,isActive:a}=ls(),{isOpen:l,toggle:c}=Di();let d;if(e[0]!==o||e[1]!==a||e[2]!==l||e[3]!==s||e[4]!==i||e[5]!==c){let h;e[7]!==a||e[8]!==l||e[9]!==s||e[10]!==i||e[11]!==c?(h=(b,x)=>n.jsxs("div",{className:"flex flex-col",children:[b.label&&n.jsx(Mi,{group:b,open:l(b),onToggle:()=>c(b),className:z("px-2 pt-1.5 pb-0.5",x>0&&"mt-3")}),l(b)&&n.jsx(L,{className:"gap-0.5",children:b.items.map(j=>n.jsx(ue,{icon:n.jsx(Li,{icon:j.icon,badge:j.badge}),label:j.label,isActive:a(j),link:{to:j.to,params:{org:i}},className:"gap-2.5",onSelect:()=>{F("settings_nav_clicked",{section_key:j.key,group_key:b.key}),s?.()}},j.key))})]},b.key),e[7]=a,e[8]=l,e[9]=s,e[10]=i,e[11]=c,e[12]=h):h=e[12],d=o.map(h),e[0]=o,e[1]=a,e[2]=l,e[3]=s,e[4]=i,e[5]=c,e[6]=d}else d=e[6];let u;e[13]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[13]=u):u=e[13];let m;e[14]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx("span",{className:"shrink-0",children:n.jsx(Ze,{size:14})}),e[14]=m):m=e[14];let f;e[15]!==r?(f=r("settings.nav.signOut"),e[15]=r,e[16]=f):f=e[16];let p;e[17]!==f?(p=n.jsxs("div",{className:"mt-auto flex flex-col",children:[u,n.jsx(L,{className:"gap-0.5",children:n.jsx(ue,{icon:m,label:f,className:"gap-2.5",onSelect:Ei})})]}),e[17]=f,e[18]=p):p=e[18];let g;return e[19]!==d||e[20]!==p?(g=n.jsxs(n.Fragment,{children:[d,p]}),e[19]=d,e[20]=p,e[21]=g):g=e[21],g}function Ei(){F("signed_out",{source:"settings_sidebar"}),zt(),Y.signOut()}function ds(t){const e=y.c(8),{onNavigate:s}=t,r=T(),{org:o}=E();let i;e[0]!==r?(i=r("settings.nav.backToHome"),e[0]=r,e[1]=i):i=e[1];let a;e[2]!==o.slug?(a={to:"/$org/home",params:{org:o.slug}},e[2]=o.slug,e[3]=a):a=e[3];let l;return e[4]!==s||e[5]!==i||e[6]!==a?(l=n.jsx(rs,{label:i,link:a,onSelect:s}),e[4]=s,e[5]=i,e[6]=a,e[7]=l):l=e[7],l}function us(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"px-4 pb-1",children:n.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","4.367.7"]})}),t[0]=e):e=t[0],e}const Fi="pt-1.5";function ms(t){const e=y.c(15),{header:s,back:r,body:o,footer:i,sheet:a}=t;let l;e[0]!==s?(l=s&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"flex h-12 shrink-0 flex-row items-center gap-2 px-2 group-data-[state=collapsed]/sidebar:h-auto group-data-[state=collapsed]/sidebar:flex-col group-data-[state=collapsed]/sidebar:py-2",children:s}),n.jsx("div",{className:"mt-1.5 h-px shrink-0 bg-sidebar-border"})]}),e[0]=s,e[1]=l):l=e[1];let c;e[2]!==r?(c=r&&n.jsx("div",{className:"shrink-0 px-2",children:r}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==o?(d=n.jsx(Ls,{className:"gap-0 overflow-y-auto px-2 pt-2 pb-2 group-data-[state=collapsed]/sidebar:[scrollbar-width:none] group-data-[state=collapsed]/sidebar:[&::-webkit-scrollbar]:hidden",children:o}),e[4]=o,e[5]=d):d=e[5];let u;e[6]!==i||e[7]!==l||e[8]!==c||e[9]!==d?(u=n.jsxs(n.Fragment,{children:[l,c,d,i]}),e[6]=i,e[7]=l,e[8]=c,e[9]=d,e[10]=u):u=e[10];const m=u;if(a){let p;return e[11]!==m?(p=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":Z.nav,children:m}),e[11]=m,e[12]=p):p=e[12],p}let f;return e[13]!==m?(f=n.jsx(Es,{className:Fi,"data-tour":Z.nav,children:m}),e[13]=m,e[14]=f):f=e[14],f}function fs(t){const e=y.c(8),{onNavigate:s}=t,r=T(),o=He(),i=_o();if(!o)return null;let a;e[0]!==r?(a=r("sidebar.scope.allProjects"),e[0]=r,e[1]=a):a=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]!==a||e[6]!==l?(c=n.jsx(rs,{label:a,onSelect:l}),e[5]=a,e[6]=l,e[7]=c):c=e[7],c}function ps(t){const e=y.c(2),{onNavigate:s}=t;let r;return e[0]!==s?(r=n.jsx(zs,{children:n.jsxs("div",{className:"flex flex-col gap-1",children:[n.jsx(vi,{onNavigate:s}),n.jsx(Ni,{onNavigate:s}),n.jsx(yi,{onNavigate:s}),n.jsx(zi,{onNavigate:s})]})}),e[0]=s,e[1]=r):r=e[1],r}function qi(){const t=y.c(3),e=We();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(di,{}),t[0]=s):s=t[0];let r;return t[1]!==e?(r=n.jsx(ms,{header:s,back:e?n.jsx(ds,{}):n.jsx(fs,{}),body:e?n.jsx(cs,{}):n.jsx(ps,{}),footer:e?n.jsx(us,{}):n.jsx(si,{})}),t[1]=e,t[2]=r):r=t[2],r}function Vi(t){const e=y.c(13),{onClose:s}=t,r=We();let o;e[0]!==s?(o=n.jsx(ui,{onClose:s}),e[0]=s,e[1]=o):o=e[1];let i,a;e[2]!==r||e[3]!==s?(i=r?n.jsx(ds,{onNavigate:s}):n.jsx(fs,{onNavigate:s}),a=r?n.jsx(cs,{onNavigate:s}):n.jsx(ps,{onNavigate:s}),e[2]=r,e[3]=s,e[4]=i,e[5]=a):(i=e[4],a=e[5]);let l;e[6]!==r?(l=r?n.jsx(us,{}):n.jsx(ni,{}),e[6]=r,e[7]=l):l=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==a||e[11]!==l?(c=n.jsx(ms,{sheet:!0,header:o,back:i,body:a,footer:l}),e[8]=o,e[9]=i,e[10]=a,e[11]=l,e[12]=c):c=e[12],c}const Bi=new Set(["completed","failed","requires_action"]);function Ui(t){const e=y.c(5),[s]=Tt();let r;e[0]!==s?(r=i=>{s.enableSounds&&Bi.has(i.data.status)&&fo(po.dataUri).catch(Hi)},e[0]=s,e[1]=r):r=e[1];let o;e[2]!==t||e[3]!==r?(o={orgSlug:t,onTaskStatus:r},e[2]=t,e[3]=r,e[4]=o):o=e[4],xo(o)}function Hi(t){console.warn("[status-sounds] playback failed:",t)}const Ki=2e3,Wi=4e4;function Gi(t){return t==="success"||t==="updated"}function Qi(t){const e=y.c(15);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[0]=s):s=e[0];const r=As(s),o=Ot();let i;e[1]!==r.checkout?(i=Gi(r.checkout),e[1]=r.checkout,e[2]=i):i=e[2];const a=i,[l]=A.useState(Ji);let c;e[3]!==t?(c=Ee.checkoutReturnPoll(t),e[3]=t,e[4]=c):c=e[4];let d;e[5]!==l?(d=()=>Date.now()<l?Ki:!1,e[5]=l,e[6]=d):d=e[6];let u;e[7]!==t||e[8]!==o?(u=async()=>(await o.invalidateQueries({queryKey:Ee.aiPlanEntitlements(t)}),Date.now()),e[7]=t,e[8]=o,e[9]=u):u=e[9];let m;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==u?(m={queryKey:c,enabled:a,gcTime:0,staleTime:0,refetchInterval:d,queryFn:u},e[10]=a,e[11]=c,e[12]=d,e[13]=u,e[14]=m):m=e[14],st(m)}function Ji(){return Date.now()+Wi}function al(){const t=y.c(5),e=We(),{org:s}=E();Ui(s.slug),Qi(s.id);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(No,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Je.Sidebar,{renderMobile:Xi,children:n.jsx(qi,{})}),t[1]=o):o=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Je.Content,{children:n.jsx(Os,{})}),t[2]=i):i=t[2];let a;return t[3]!==e?(a=n.jsxs(Je,{expandedSidebar:e,notice:r,children:[o,i]}),t[3]=e,t[4]=a):a=t[4],a}function Xi(t){const{onClose:e}=t;return n.jsx(Vi,{onClose:e})}export{al as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as m,l as f,j as n,af as d,O as p}from"./index-
|
|
1
|
+
import{c as m,l as f,j as n,af as d,O as p}from"./index-C9jQATHx.js";import{u}from"./use-mobile-CpN-x3jP.js";import{P as c}from"./index-D3hBrAe3.js";function b(){const e=m.c(8),r=u(),a=!r&&"p-1.5";let t;e[0]!==a?(t=f("flex-1 min-h-0",a),e[0]=a,e[1]=t):t=e[1];const o=r?"plain":"card";let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(c.Content,{children:n.jsx(d,{children:n.jsx(p,{})})}),e[2]=i):i=e[2];let s;e[3]!==o?(s=n.jsx(c,{"data-testid":"settings-panel",variant:o,children:i}),e[3]=o,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("div",{className:t,children:s}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}export{b as default};
|