decocms 4.28.0 → 4.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-bPFs3KEL.js → AlertCircle-Ix48cuhr.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Cr-8XVVD.js → ArrowUpRight-CXbhOFnS.js} +1 -1
- package/dist/client/assets/{Check-DgZ3In7m.js → Check-KOuUgZpl.js} +1 -1
- package/dist/client/assets/{CheckCircle-C3XWnj4j.js → CheckCircle-D-y1jrnz.js} +1 -1
- package/dist/client/assets/{ChevronDown--CNgLcjC.js → ChevronDown-C-LFsTot.js} +1 -1
- package/dist/client/assets/{ChevronRight-BWbK6ynD.js → ChevronRight-CMRG2Mrw.js} +1 -1
- package/dist/client/assets/{ChevronUp-Kv_LvrHV.js → ChevronUp-Do62lvyJ.js} +1 -1
- package/dist/client/assets/{Circle-qJ5BBlYd.js → Circle-DvpNcVfO.js} +1 -1
- package/dist/client/assets/{Copy01-3GtjKY1N.js → Copy01-BUiSHYCq.js} +1 -1
- package/dist/client/assets/{DotsVertical-DtK63shY.js → DotsVertical-Dt_Mft5K.js} +1 -1
- package/dist/client/assets/{Eye-DF9e8dvr.js → Eye-jR9Zg5z5.js} +1 -1
- package/dist/client/assets/{FilterLines-B3UlQwDc.js → FilterLines-BwYarGOr.js} +1 -1
- package/dist/client/assets/{Globe01-B13h8XtZ.js → Globe01-CLEqh0jN.js} +1 -1
- package/dist/client/assets/{Globe04-1GZz65ia.js → Globe04-BbxCUGSa.js} +1 -1
- package/dist/client/assets/{HardDrive-4yC-BESY.js → HardDrive-C2xD3Bmj.js} +1 -1
- package/dist/client/assets/{Key01-CI7N-3nc.js → Key01-D4W6oMPT.js} +1 -1
- package/dist/client/assets/{LayoutLeft-9np6COHp.js → LayoutLeft-DHIL03--.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BPLWMKpP.js → LinkExternal01-92HTSmz9.js} +1 -1
- package/dist/client/assets/{List-DuUlr1m8.js → List-Dl4LEOwl.js} +1 -1
- package/dist/client/assets/{Loading02-D0nMaQOZ.js → Loading02-a6STvmGU.js} +1 -1
- package/dist/client/assets/{Monitor01-CoHtWm_B.js → Monitor01-BWtutl7x.js} +1 -1
- package/dist/client/assets/{Palette-it9tTFZx.js → Palette-BGy6oXoM.js} +1 -1
- package/dist/client/assets/{Play-DGqQSguj.js → Play-BblOVQrg.js} +1 -1
- package/dist/client/assets/{Plus-C4Q0OOCY.js → Plus-DfCkUDAU.js} +1 -1
- package/dist/client/assets/{SearchLg-DbFjcinT.js → SearchLg-DNeOVX02.js} +1 -1
- package/dist/client/assets/{SearchMd-f7WdVWzc.js → SearchMd-DcUy3tZG.js} +1 -1
- package/dist/client/assets/{Settings02-C4rR2BwH.js → Settings02-Do4Jg01P.js} +1 -1
- package/dist/client/assets/{Shield01-CpnoHxN2.js → Shield01-C6KAwjuJ.js} +1 -1
- package/dist/client/assets/{Star01-Jt5Q2gfx.js → Star01-vopgIfvF.js} +1 -1
- package/dist/client/assets/{Stars01-DkYIpw1N.js → Stars01-5YrKBfZE.js} +1 -1
- package/dist/client/assets/{Stars02-BP1hwbuc.js → Stars02-XQxaeqbQ.js} +1 -1
- package/dist/client/assets/{Sun-BZVZjrLl.js → Sun-B7ftuIIX.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BDG7IOK2.js → SwitchHorizontal01-cutLTNbW.js} +1 -1
- package/dist/client/assets/{Tool01-BL4kQBIR.js → Tool01-BvpZAFbv.js} +1 -1
- package/dist/client/assets/{Trash01-DquY3ri8.js → Trash01-CMKdBCcn.js} +1 -1
- package/dist/client/assets/{Upload01-Bkj-e8t-.js → Upload01-qruYHtRZ.js} +1 -1
- package/dist/client/assets/{User01-Cob64tHg.js → User01-BQzTGoKV.js} +1 -1
- package/dist/client/assets/{Users01-kXte77jT.js → Users01-BGJnrzuD.js} +1 -1
- package/dist/client/assets/{Users03-DPHNxMCn.js → Users03-DdN_R_96.js} +1 -1
- package/dist/client/assets/{X-D42jewIw.js → X-5_6S4cTa.js} +1 -1
- package/dist/client/assets/{XCircle-d4Mj_55a.js → XCircle-B0LLGt09.js} +1 -1
- package/dist/client/assets/{XClose-D_lTdEDj.js → XClose-Kd3JhRs6.js} +1 -1
- package/dist/client/assets/{Zap-II5jDxLp.js → Zap-WWmt76Cj.js} +1 -1
- package/dist/client/assets/{ZapSquare-Cb2ZjSQ9.js → ZapSquare-B8w8Kigu.js} +1 -1
- package/dist/client/assets/{ZoomOut-CrZXH-lO.js → ZoomOut-BN8enLeN.js} +1 -1
- package/dist/client/assets/{access-gate-Dt-CGoo9.js → access-gate-DZCZwHRE.js} +1 -1
- package/dist/client/assets/{add-section-modal-mGWtRMIQ.js → add-section-modal-D_44tUGm.js} +1 -1
- package/dist/client/assets/{agent-capabilities-C8-S9cdW.js → agent-capabilities-CbZdf8yp.js} +1 -1
- package/dist/client/assets/{agent-icon-Da9Da6_T.js → agent-icon-BcBxeMvp.js} +1 -1
- package/dist/client/assets/{agents-list-By-aOoP1.js → agents-list-CU3r02dc.js} +1 -1
- package/dist/client/assets/{ai-providers-B46vBH0h.js → ai-providers-DoEqBz5H.js} +1 -1
- package/dist/client/assets/{alert-B6evt6kR.js → alert-Dih2SIkz.js} +1 -1
- package/dist/client/assets/{alert-dialog-gasitoEq.js → alert-dialog-B0Bw-oIS.js} +1 -1
- package/dist/client/assets/{app-editor-DtBYyVbS.js → app-editor-Dh7i3tDU.js} +1 -1
- package/dist/client/assets/{auth-C47SGxHt.js → auth-DN4c5q1R.js} +1 -1
- package/dist/client/assets/{auth-catchall-BUB8_LkD.js → auth-catchall-D_9FbiWb.js} +1 -1
- package/dist/client/assets/{auth-entry-DarNDBpq.js → auth-entry-B-ZF-ciz.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B5r53A4Z.js → auth-split-layout-Cr6444lH.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CEA-zfJw.js → authenticate-and-persist-oauth-DdKvrQEr.js} +1 -1
- package/dist/client/assets/{automation-list-row-jGOxjJIf.js → automation-list-row-BOIXVMIT.js} +1 -1
- package/dist/client/assets/{automation-runs-BYvq5zLj.js → automation-runs-BodMFbin.js} +1 -1
- package/dist/client/assets/{automations-UAn8KJMc.js → automations-CGElgBM7.js} +1 -1
- package/dist/client/assets/{avatar-G4lfZ1rm.js → avatar-HaXLmirn.js} +1 -1
- package/dist/client/assets/{badge-D16FSQ-g.js → badge-CqRObYKH.js} +1 -1
- package/dist/client/assets/{block-document-Bah6aLt6.js → block-document-DyjzyU2F.js} +1 -1
- package/dist/client/assets/{brand-context-Bw4dr7_r.js → brand-context-8UKMAI4i.js} +1 -1
- package/dist/client/assets/{breadcrumb-BL6L_bSQ.js → breadcrumb-B5OQr9WC.js} +1 -1
- package/dist/client/assets/{buckets-CBm9y2mr.js → buckets-CcKs25bx.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D7jmb1c_.js → bulk-category-panel-D7iwURo4.js} +1 -1
- package/dist/client/assets/{capability-load-error-B7Sh2GnA.js → capability-load-error-DwMuZztu.js} +1 -1
- package/dist/client/assets/{card-B-n7RZj8.js → card-5aKPBj7H.js} +1 -1
- package/dist/client/assets/{category-editor-B5mnC1KL.js → category-editor-Bj0CTMYS.js} +1 -1
- package/dist/client/assets/{chat-context-BYfzrjSg.js → chat-context-D7GP06Zt.js} +1 -1
- package/dist/client/assets/{checkbox-DYEeIzJL.js → checkbox-DEYwFl8k.js} +1 -1
- package/dist/client/assets/{cli-auth-success-D3PcSR2u.js → cli-auth-success-CLScdiWU.js} +1 -1
- package/dist/client/assets/{collection-detail-6V-m6EfP.js → collection-detail-CxIElSHV.js} +1 -1
- package/dist/client/assets/{collection-display-button-2lIAjdeE.js → collection-display-button-DyPvL1w_.js} +1 -1
- package/dist/client/assets/{collection-search-iqB-Cu-3.js → collection-search-CzAS7CiD.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-rtLc_zsT.js → collection-table-wrapper-D-ssgOn8.js} +1 -1
- package/dist/client/assets/{collection-tabs-rhGvUIlm.js → collection-tabs-bZbxe_7m.js} +1 -1
- package/dist/client/assets/{command-CR6OgyqM.js → command-Dkfm4s2k.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BoTve4Dl.js → commerce-onboarding-Cao_L-Ng.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-Bvweozcg.js → connect-desktop-dialog-DKL_vE45.js} +1 -1
- package/dist/client/assets/{connection-card-NnU7ECW4.js → connection-card-BmXpylIP.js} +1 -1
- package/dist/client/assets/{connection-detail-DJ-upi_E.js → connection-detail-DNd1ZQGj.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Bm9nknv3.js → connection-form-helpers-i8kc8g_h.js} +1 -1
- package/dist/client/assets/{connections-CcFwx0aH.js → connections-DwE0OmTn.js} +1 -1
- package/dist/client/assets/{decopilot-lLmAldte.js → decopilot-DVVdoab1.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-By8dFwPK.js → decopilot-sse-pool-C9B6d0V3.js} +1 -1
- package/dist/client/assets/{dialog-Bnj4VVJm.js → dialog-BK7FdLgQ.js} +1 -1
- package/dist/client/assets/{domain-settings-DYfKBPl1.js → domain-settings-KIfFg8Uv.js} +1 -1
- package/dist/client/assets/{drawer-D3mld3mJ.js → drawer-BOKmZjhb.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BKlRxK5y.js → dropdown-menu-BXvp7Poa.js} +1 -1
- package/dist/client/assets/{empty-state-BtpcAucy.js → empty-state-BWk4kN3I.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Dr0kvEkl.js → extract-connection-data-BTJ9Fhn2.js} +1 -1
- package/dist/client/assets/{file-explorer-FHGq6O73.js → file-explorer-DSO0lPQW.js} +1 -1
- package/dist/client/assets/{file-type-icon-4oZPbqxn.js → file-type-icon-DIDUV08q.js} +1 -1
- package/dist/client/assets/{files-BwJ_5Wub.js → files-l2i7bDIR.js} +1 -1
- package/dist/client/assets/{form-OsKubpwl.js → form-BOG3rRkz.js} +1 -1
- package/dist/client/assets/{general-B8ohPBsh.js → general-Be0ufkZZ.js} +1 -1
- package/dist/client/assets/{github-repo-picker-QqiEg-YG.js → github-repo-picker-H6UyRgqq.js} +1 -1
- package/dist/client/assets/{hooks-DRWd8r4q.js → hooks-DqvpUbqo.js} +1 -1
- package/dist/client/assets/index-4pivgrAI.js +1 -0
- package/dist/client/assets/{index-C0nCgkZu.js → index-BBkrDtkj.js} +1 -1
- package/dist/client/assets/{index-Bcf0MN_M.js → index-BHw_x3xk.js} +1 -1
- package/dist/client/assets/{index-Bd3CUq96.js → index-B_-q_4P-.js} +1 -1
- package/dist/client/assets/{index-DiQHdGZM.js → index-CQjAk6qZ.js} +1 -1
- package/dist/client/assets/{index-DSDpj2Bj.js → index-CRsyoh0P.js} +3 -3
- package/dist/client/assets/index-DHIsTpg5.css +1 -0
- package/dist/client/assets/{index-DTTOpJGs.js → index-DhnegOZA.js} +1 -1
- package/dist/client/assets/{index-cVPtQiun.js → index-DjZqnBm_.js} +1 -1
- package/dist/client/assets/{index-CbUHywdj.js → index-YdFZmyaZ.js} +5 -5
- package/dist/client/assets/{index-oFz8diCg.js → index-l6GBFngc.js} +1 -1
- package/dist/client/assets/{index-Byfr_hzz.js → index-mmZ00Fht.js} +1 -1
- package/dist/client/assets/{index-redirect-UdzAJwbB.js → index-redirect-fs7Qf7zZ.js} +1 -1
- package/dist/client/assets/{index-D-kcgxq7.js → index-t4CdgAvZ.js} +1 -1
- package/dist/client/assets/{index-Dn1z4pS9.js → index-wSalJ4yv.js} +1 -1
- package/dist/client/assets/{index-BFfodvon.js → index-xVNEye3o.js} +1 -1
- package/dist/client/assets/{input-CYkPya5x.js → input-CnXP5aMo.js} +1 -1
- package/dist/client/assets/{integration-icon-CBUlZi7o.js → integration-icon-CUX4W9Hv.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-B3es0Bdg.js → invite-member-dialog-cpX923sH.js} +1 -1
- package/dist/client/assets/{label-DCDEQbHw.js → label-DhJnRZgA.js} +1 -1
- package/dist/client/assets/{library-tab-D9496yS1.js → library-tab-CvVa-OqV.js} +1 -1
- package/dist/client/assets/{login-BNlqngk5.js → login-Bs3s6Rkf.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DxV8k1O8.js → mcp-oauth-nWdzDozN.js} +1 -1
- package/dist/client/assets/{members-CZq1R1o9.js → members-DD1QFtZt.js} +1 -1
- package/dist/client/assets/{monaco-editor-SCx_7ctH.js → monaco-editor-BpQyL38Q.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DkMxLdzC.js → monitoring-stats-row-Ccix4lOH.js} +1 -1
- package/dist/client/assets/{oauth-callback-CniVqnjW.js → oauth-callback-CO68L6oV.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DDC9J3b6.js → oauth-callback-ai-provider-B0TtqeXM.js} +1 -1
- package/dist/client/assets/{onboarding-ygZy_Yb0.js → onboarding-QhVNhFdk.js} +1 -1
- package/dist/client/assets/{org-install-8oqVUWxa.js → org-install-ErmVLHvW.js} +1 -1
- package/dist/client/assets/{org-layout-CXeR-1D7.js → org-layout-D38ef99_.js} +1 -1
- package/dist/client/assets/{organization-choice-Cd8lWVie.js → organization-choice-Tf5NJHeh.js} +1 -1
- package/dist/client/assets/{page-seo-form-YFt2GhsQ.js → page-seo-form-CTcVALHG.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CwjWwa1t.js +1 -0
- package/dist/client/assets/{popover-B9JWOHOx.js → popover-CfzedSO-.js} +1 -1
- package/dist/client/assets/{post-editor-BQT3B_Am.js → post-editor-JbLYx6RR.js} +1 -1
- package/dist/client/assets/{primitives-hQK8LPXl.js → primitives-CXb4fn8s.js} +1 -1
- package/dist/client/assets/{profile-BTquh82V.js → profile-BaF8zbuW.js} +1 -1
- package/dist/client/assets/project-app-view-Bj0jS6e7.js +1 -0
- package/dist/client/assets/record-editor-pQn6L-Pz.js +1 -0
- package/dist/client/assets/registry-WN0IM34L.js +2 -0
- package/dist/client/assets/{registry-layout-Z991cNGF.js → registry-layout-CSGY5xYu.js} +1 -1
- package/dist/client/assets/{require-capability-BRuEsaxF.js → require-capability-eWa58zjU.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BsMqxbKV.js → required-auth-layout-D9x1NXiE.js} +1 -1
- package/dist/client/assets/{reset-password-Lgsn-eRn.js → reset-password-GNJpFe_P.js} +1 -1
- package/dist/client/assets/{roles-C1qQ_TV2.js → roles-CqFcCBV9.js} +1 -1
- package/dist/client/assets/{scroll-area-CpSDQ9B3.js → scroll-area-CYqq0nPW.js} +1 -1
- package/dist/client/assets/{search-input-BDUV4YsP.js → search-input-r5iP5iuB.js} +1 -1
- package/dist/client/assets/{secrets-teGvKFHL.js → secrets-Bu6Z8OBg.js} +1 -1
- package/dist/client/assets/{sections-editor-Br_A2NRm.js → sections-editor-B2SxZ1cU.js} +1 -1
- package/dist/client/assets/{select-B0TGwXjH.js → select-izZ6sucn.js} +1 -1
- package/dist/client/assets/{select-model-0sL3XNAt.js → select-model-DX9C2tgo.js} +1 -1
- package/dist/client/assets/{seo-editor-CT59S1WW.js → seo-editor-xIQkOSof.js} +1 -1
- package/dist/client/assets/{settings-layout-2ZApea8Z.js → settings-layout-g3sRccmN.js} +1 -1
- package/dist/client/assets/{settings-section-B6aXXKek.js → settings-section-BMwcZuRK.js} +1 -1
- package/dist/client/assets/{sheet-CD0P6dVG.js → sheet-DiKbGOCj.js} +1 -1
- package/dist/client/assets/{shell-controls-DLvJrQg7.js → shell-controls-C9tCTQdE.js} +1 -1
- package/dist/client/assets/{shell-layout-B9LP1BkH.js → shell-layout-CEHTO6uu.js} +1 -1
- package/dist/client/assets/{sidebar-CA0rQ0cI.js → sidebar-CV5tOntB.js} +1 -1
- package/dist/client/assets/{skeleton-C1UGwqR5.js → skeleton-Iq-zR2Ew.js} +1 -1
- package/dist/client/assets/{sso-DycskOy5.js → sso-h3VWd7Vh.js} +1 -1
- package/dist/client/assets/{store-CcrTz5mI.js → store-C6fQuWSN.js} +1 -1
- package/dist/client/assets/store-registry-BS3Rr6_C.js +2 -0
- package/dist/client/assets/{studio-tools-Ch4cqriC.js → studio-tools-0oP05Vmo.js} +1 -1
- package/dist/client/assets/{switch-wI_LPvG9.js → switch-CHXTZ9dZ.js} +1 -1
- package/dist/client/assets/{table-CPM3_Orl.js → table-Ded64YC3.js} +1 -1
- package/dist/client/assets/{tabs-0xOggEmc.js → tabs-CXI9rQJI.js} +1 -1
- package/dist/client/assets/{task-row-BX3vL-j_.js → task-row-CCSwtZau.js} +1 -1
- package/dist/client/assets/{task-status-C0114PFB.js → task-status-BcVBGHoc.js} +1 -1
- package/dist/client/assets/{textarea-DN29sT4P.js → textarea-CjEBrlku.js} +1 -1
- package/dist/client/assets/{toggle-group-DYIGEIay.js → toggle-group-ChDolbV_.js} +1 -1
- package/dist/client/assets/{toolbar-B6-9TSIO.js → toolbar-COQJG38H.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bh253N_9.js → toolbar-icon-button-BoklVZLA.js} +1 -1
- package/dist/client/assets/{tools-list-jzSJNAE9.js → tools-list-CRIV7Qot.js} +1 -1
- package/dist/client/assets/{tooltip-DA3ZHoTy.js → tooltip-UK4TH3io.js} +1 -1
- package/dist/client/assets/{types-J4fUU_hs.js → types-DKCRVv18.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BYWkMeHm.js → use-ai-providers-CaRQPTIl.js} +1 -1
- package/dist/client/assets/{use-automations-BL1tQ5os.js → use-automations-CSpNEw7t.js} +1 -1
- package/dist/client/assets/{use-capability-DoRFc3sU.js → use-capability-DhsEVexh.js} +1 -1
- package/dist/client/assets/{use-clock-tick-xNvYo8xf.js → use-clock-tick-CVEnk_fR.js} +1 -1
- package/dist/client/assets/{use-collections-82SPyTpX.js → use-collections-DK_l6F0N.js} +1 -1
- package/dist/client/assets/{use-connection-F0pDuIZV.js → use-connection-B7bWiRqI.js} +1 -1
- package/dist/client/assets/{use-copy-DQL5kiDG.js → use-copy-v85ZDhBk.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DYf3GVLW.js → use-create-virtual-mcp-B9P7c8fS.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BS89kWU2.js → use-debounced-autosave-BRe10INx.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BD2t0Sm8.js → use-debounced-value--LReIEFy.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Cu0CbLk2.js → use-decopilot-events-OQXlP2AG.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BbG-3tJm.js → use-delete-connection-D4TpwuJR.js} +1 -1
- package/dist/client/assets/{use-file-configs-Bp7cInfo.js → use-file-configs-EVrNclQN.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BjUfY6Ak.js → use-infinite-scroll-CGcVMh5N.js} +1 -1
- package/dist/client/assets/{use-join-requests-DeAr9xsU.js → use-join-requests-DLjSpEvk.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cq1PuVy-.js → use-mcp-client-Cw-KQdjY.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-hylROZ-T.js → use-mcp-prompts-DEcLTxCu.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DRaDUnOy.js → use-mcp-tools-BWeF-o2W.js} +1 -1
- package/dist/client/assets/{use-members-CRaQbprX.js → use-members-B8OfJnCF.js} +1 -1
- package/dist/client/assets/{use-mobile-BJypeB5n.js → use-mobile-4NErBPoD.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BsICAYua.js → use-navigate-to-agent-k1osJofZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-D8NgRY-r.js → use-org-auth-client-CKi9OpAo.js} +1 -1
- package/dist/client/assets/{use-org-sso-BRC0WSR6.js → use-org-sso-2304w9oC.js} +1 -1
- package/dist/client/assets/{use-organization-roles-GI8K_qR8.js → use-organization-roles-CARycmhE.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C6Az1O42.js → use-organization-settings-5ui-nRxh.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BUnPYArH.js → use-registry-connections-Bxjl5Lj_.js} +1 -1
- package/dist/client/assets/{use-secrets-CfQzgPZW.js → use-secrets-8J07E3fR.js} +1 -1
- package/dist/client/assets/{use-status-sounds-aW26IA9a.js → use-status-sounds-iNOj7q7H.js} +1 -1
- package/dist/client/assets/{use-view-mode-DzFDMVFs.js → use-view-mode-B4Vk6db7.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-FbrEFCoK.js → use-virtual-mcp-B-AR1TD8.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Bt6QE1yD.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-Dds483du.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-BLmcLcIz.js → useSuspenseQueries-uvbGhRAk.js} +1 -1
- package/dist/client/assets/{variant-calendar-BWQ1mpDd.js → variant-calendar-B0s-BmZ7.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DbZluR-r.js → view-mode-toggle-BNwnnQw6.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +140 -140
- package/package.json +1 -1
- package/dist/client/assets/index-AMl_RbKx.js +0 -1
- package/dist/client/assets/index-Bzy6RQIz.css +0 -1
- package/dist/client/assets/page-seo-sheet-S2dX_fhd.js +0 -1
- package/dist/client/assets/project-app-view-CdQilt4g.js +0 -1
- package/dist/client/assets/record-editor-DbbIvft0.js +0 -1
- package/dist/client/assets/registry-CRc6N9jx.js +0 -2
- package/dist/client/assets/store-registry-CPxdSm7c.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CKxr4Gfg.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DgBHsP0y.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as k,j as s,C as We,r as D,D as se,b as ae,l as H,v as ue,F as $s,G as zs,a as he,H as Ts,I as Ms,t as te,J as Os,M as Ds,m as qt,u as Ve,P as vt,B as ze,y as Ps,R as Es,K as Rs,k as Fs,i as Wt,e as at,E as Vt,o as Ls,s as Bs,n as Hs,p as Us,d as Gs,x as qs,T as Kt,O as Ws,U as Vs}from"./index-CRsyoh0P.js";import{u as xe,S as ct,a as dt,b as ne,c as X,d as G,e as Xt,f as Qt,g as Ks,h as Xs,i as et,j as Qs,k as Ys,l as Js}from"./sidebar-CV5tOntB.js";import{u as mt}from"./use-mobile-4NErBPoD.js";import{n as Zs}from"./Loading02-a6STvmGU.js";import{u as en}from"./use-organization-settings-5ui-nRxh.js";import{S as oe}from"./skeleton-Iq-zR2Ew.js";import{i as Yt}from"./LayoutLeft-DHIL03--.js";import{T as be}from"./toolbar-icon-button-BoklVZLA.js";import{P as De,a as ge,b as Pe}from"./popover-CfzedSO-.js";import{D as Jt,a as Zt,b as es}from"./drawer-BOKmZjhb.js";import{A as Oe}from"./avatar-HaXLmirn.js";import{a as je,b as ve,c as tt,T as ye}from"./tooltip-UK4TH3io.js";import{a as yt}from"./Copy01-BUiSHYCq.js";import{n as tn,i as sn}from"./Globe01-CLEqh0jN.js";import{i as nn}from"./ZoomOut-BN8enLeN.js";import{i as ln,a as rn}from"./ZapSquare-B8w8Kigu.js";import{i as st}from"./Monitor01-BWtutl7x.js";import{n as on,a as an}from"./Sun-B7ftuIIX.js";import{a as ut,b as cn}from"./Settings02-Do4Jg01P.js";import{i as dn}from"./Shield01-C6KAwjuJ.js";import{a as mn}from"./Users03-DdN_R_96.js";import{a as St,b as Nt,c as un,d as fn,A as Te,e as _t,i as hn,s as xn,f as pn}from"./agent-icon-BcBxeMvp.js";import"./index-xVNEye3o.js";import{n as ft}from"./Stars02-XQxaeqbQ.js";import{D as gn,a as bn,b as jn,c as wt,d as vn}from"./dropdown-menu-BXvp7Poa.js";import{i as Ee}from"./Check-KOuUgZpl.js";import{s as $e}from"./Plus-DfCkUDAU.js";import{u as yn}from"./use-connection-B7bWiRqI.js";import{u as ts}from"./use-mcp-client-Cw-KQdjY.js";import{u as ht,a as xt}from"./use-virtual-mcp-B-AR1TD8.js";import{i as ss,S as ns,a as Ge,b as Sn}from"./constants-nH3qQ_1f.js";import{G as Nn,g as nt,i as _n,a as lt}from"./github-repo-picker-H6UyRgqq.js";import{u as wn,S as ls,a as Cn,g as kn,b as In,c as An}from"./use-navigate-to-agent-k1osJofZ.js";import{I as $n}from"./invite-member-dialog-cpX923sH.js";import{u as zn,A as Tn,g as Mn}from"./agent-capabilities-CbZdf8yp.js";import{u as On,v as Dn,C as Ct}from"./connect-desktop-dialog-DKL_vE45.js";import{s as rs}from"./XClose-Kd3JhRs6.js";import{u as Pn,a as En}from"./use-join-requests-DLjSpEvk.js";import{i as is}from"./ChevronRight-CMRG2Mrw.js";import{u as Rn,R as Fn,a as Ln,b as pt,r as Bn}from"./shell-layout-CEHTO6uu.js";import{i as Hn}from"./FilterLines-BwYarGOr.js";import{T as Un,a as Gn}from"./toggle-group-ChDolbV_.js";import{u as qn,a as gt,b as os,T as Wn}from"./hooks-DqvpUbqo.js";import{c as Vn,a as Kn,b as Xn,d as Qn,e as Yn}from"./dialog-BK7FdLgQ.js";import{C as Jn,a as Zn,b as el,c as tl,d as sl}from"./command-Dkfm4s2k.js";import{u as as}from"./studio-tools-0oP05Vmo.js";import{i as nl}from"./Zap-WWmt76Cj.js";import{S as cs,M as ll}from"./shell-controls-C9tCTQdE.js";import{T as ds}from"./task-row-CCSwtZau.js";import{t as bt}from"./ChevronDown-C-LFsTot.js";import{S as rl}from"./task-status-BcVBGHoc.js";import{S as il,C as ol}from"./chat-context-D7GP06Zt.js";import{B as kt,a as al,b as cl}from"./breadcrumb-B5OQr9WC.js";import{T as Z}from"./toolbar-COQJG38H.js";import{i as ms}from"./SearchMd-DcUy3tZG.js";import{A as dl,a as ml,b as ul,c as fl,d as hl,e as xl,f as pl}from"./alert-dialog-B0Bw-oIS.js";import{F as gl,a as bl,b as jl,c as vl,d as yl,f as Sl,e as Nl}from"./form-BOG3rRkz.js";import{I as _l}from"./input-CnXP5aMo.js";import"./sheet-DiKbGOCj.js";import"./X-5_6S4cTa.js";import"./User01-BQzTGoKV.js";import"./AlertCircle-Ix48cuhr.js";import"./Tool01-BvpZAFbv.js";import"./SwitchHorizontal01-cutLTNbW.js";import"./XCircle-B0LLGt09.js";import"./ArrowUpRight-CXbhOFnS.js";import"./CheckCircle-D-y1jrnz.js";import"./ChevronUp-Do62lvyJ.js";import"./Circle-DvpNcVfO.js";import"./DotsVertical-Dt_Mft5K.js";import"./Eye-jR9Zg5z5.js";import"./Star01-vopgIfvF.js";import"./Globe04-BbxCUGSa.js";import"./HardDrive-C2xD3Bmj.js";import"./Key01-D4W6oMPT.js";import"./LinkExternal01-92HTSmz9.js";import"./List-Dl4LEOwl.js";import"./Palette-BGy6oXoM.js";import"./Play-BblOVQrg.js";import"./SearchLg-DNeOVX02.js";import"./Stars01-5YrKBfZE.js";import"./Trash01-CMKdBCcn.js";import"./Upload01-qruYHtRZ.js";import"./Users01-BGJnrzuD.js";import"./use-collections-DK_l6F0N.js";import"./auth-DN4c5q1R.js";import"./checkbox-DEYwFl8k.js";import"./collection-search-CzAS7CiD.js";import"./use-debounced-value--LReIEFy.js";import"./authenticate-and-persist-oauth-DdKvrQEr.js";import"./mcp-oauth-nWdzDozN.js";import"./use-mcp-tools-BWeF-o2W.js";import"./extract-connection-data-BTJ9Fhn2.js";import"./github-installations-DzN1UQ4x.js";import"./select-izZ6sucn.js";import"./textarea-CjEBrlku.js";import"./use-org-auth-client-CKi9OpAo.js";import"./use-organization-roles-CARycmhE.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BmXpylIP.js";import"./use-registry-connections-Bxjl5Lj_.js";import"./useInfiniteQuery-Bt6QE1yD.js";import"./use-infinite-scroll-CGcVMh5N.js";import"./card-5aKPBj7H.js";import"./integration-icon-CUX4W9Hv.js";import"./collection-tabs-bZbxe_7m.js";import"./badge-CqRObYKH.js";import"./connection-form-helpers-i8kc8g_h.js";import"./useSuspenseInfiniteQuery-Dds483du.js";import"./use-ai-providers-CaRQPTIl.js";import"./use-capability-DhsEVexh.js";import"./required-auth-layout-D9x1NXiE.js";import"./tab-id-Bgchl1bv.js";import"./use-org-sso-2304w9oC.js";import"./decopilot-sse-pool-C9B6d0V3.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./index-BHw_x3xk.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-clock-tick-CVEnk_fR.js";import"./use-decopilot-events-OQXlP2AG.js";import"./label-DhJnRZgA.js";function wl(t){const e=k.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:r,isMobile:i}=xe();if(i||r==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=s.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[0]=o,e[1]=a):(o=e[0],a=e[1]);let d;return e[2]!==l||e[3]!==n?(d=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=d):d=e[4],d}const jt=240,Cl=400,kl="sidebar.width";function Me(t){return Math.max(jt,Math.min(Cl,t))}function Il(){const t=k.c(11),[e,n]=We(kl,Al),l=D.useRef(null);let r;t[0]!==n||t[1]!==e?(r=m=>{m.preventDefault();const u=m.clientX,f=Me(e),x=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),p=x?Array.from(x.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of p)b.style.transition="none";const h=b=>{const j=Me(f+(b.clientX-u));x?.style.setProperty("--sidebar-width",`${j}px`)},g=b=>{const j=Me(f+(b.clientX-u));n(j);for(const v of p)v.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",g),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",g)},t[0]=n,t[1]=e,t[2]=r):r=t[2];const i=r;let o;t[3]!==n?(o=()=>{n(jt)},t[3]=n,t[4]=o):o=t[4];const a=o;let d;t[5]!==e?(d=Me(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function Al(t){return typeof t=="number"?Me(t):jt}function us(){const t=k.c(8),{org:e}=se(),n=ae(),l=en();let r;if(t[0]!==n||t[1]!==e||t[2]!==l){if(r=[],l){let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Zs,{className:"size-4!"}),t[4]=i):i=t[4];let o;t[5]!==n||t[6]!==e?(o={type:"items",items:[{key:"board",label:"Board",icon:i,onClick:()=>n({to:"/$org/board",params:{org:e.slug}})}]},t[5]=n,t[6]=e,t[7]=o):o=t[7],r.push(o)}t[0]=n,t[1]=e,t[2]=l,t[3]=r}else r=t[3];return r}function fs(t){const e=k.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let r;return e[1]!==n?(r=s.jsxs(ct,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(dt,{children:s.jsx(ne,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=r):r=e[2],r}function hs(t){const e=k.c(18),{item:n}=t,{isMobile:l,setOpenMobile:r}=xe();let i;e[0]!==l||e[1]!==n||e[2]!==r?(i=()=>{ue("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&r(!1)},e[0]=l,e[1]=n,e[2]=r,e[3]=i):i=e[3];const o=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=H(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(X,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(G,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function $l(t){const e=k.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Xt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,r=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(Tl),e[2]=n.group.items,e[3]=i):i=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(o=s.jsx(fs,{label:l,defaultExpanded:r,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(zl),e[8]=n.items,e[9]=l):l=e[9];let r;return e[10]!==l?(r=s.jsx(ct,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(dt,{children:s.jsx(ne,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=r):r=e[11],r}case"custom":return n.content}}function zl(t){return s.jsx(hs,{item:t},t.key)}function Tl(t){return s.jsx(hs,{item:t},t.key)}function Ml(t){const e=k.c(14),{sections:n,footer:l,additionalContent:r,variant:i,contentClassName:o}=t,a=i===void 0?"sidebar":i;let d;e[0]!==o?(d=H("flex flex-col flex-1 px-2 py-2 gap-0.5",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==n?(c=n.map(Ol),e[2]=n,e[3]=c):c=e[3];let m;e[4]!==r?(m=r&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:r}),e[4]=r,e[5]=m):m=e[5];let u;e[6]!==d||e[7]!==c||e[8]!==m?(u=s.jsxs(Qt,{className:d,children:[c,m]}),e[6]=d,e[7]=c,e[8]=m,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Ks,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ol(t,e){return s.jsx($l,{section:t},e)}function xs(t){const e=k.c(2);let n;return e[0]!==t?(n=s.jsx(Ml,{...t}),e[0]=t,e[1]=n):n=e[1],n}xs.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(oe,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Dl(t){const e=k.c(16),{onToggle:n,className:l}=t,i=$s().logo??zs,o=typeof i=="string"?i:i.light,a=typeof i=="string"?i:i.dark;let d;e[0]!==l?(d=H("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=d):d=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let m;e[4]!==a?(m=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,m]})}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Yt,{size:16}),e[9]=f):f=e[9];let x;e[10]!==n?(x=s.jsx(be,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=x):x=e[11];let p;return e[12]!==d||e[13]!==u||e[14]!==x?(p=s.jsxs(Xs,{className:d,children:[u,x]}),e[12]=d,e[13]=u,e[14]=x,e[15]=p):p=e[15],p}function It(t){const e=k.c(18),{item:n,onClose:l}=t,r=n.isActive&&"z-10";let i;e[0]!==r?(i=H(r),e[0]=r,e[1]=i):i=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==d?(c=s.jsxs(X,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==i||e[16]!==c?(m=s.jsx(G,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=m):m=e[17],m}function Pl(t){const e=k.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Xt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,i=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(It,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],o=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(fs,{label:r,defaultExpanded:i,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let r;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(It,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],r=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=r}else r=e[13];let i;return e[16]!==r?(i=s.jsx(ct,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(dt,{children:s.jsx(ne,{className:"gap-1.5",children:r})})}),e[16]=r,e[17]=i):i=e[17],i}case"custom":return n.content}}function El(t){const e=k.c(17),{sections:n,onClose:l,footer:r,additionalContent:i}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(D.Suspense,{fallback:o,children:s.jsx(Dl,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let d;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(x,p)=>s.jsx(Pl,{section:x,onClose:l},p),e[6]=l,e[7]=f):f=e[7],d=n.map(f),e[3]=l,e[4]=n,e[5]=d}else d=e[5];let c;e[8]!==i?(c=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[8]=i,e[9]=c):c=e[9];let m;e[10]!==d||e[11]!==c?(m=s.jsxs(Qt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[d,c]}),e[10]=d,e[11]=c,e[12]=m):m=e[12];let u;return e[13]!==r||e[14]!==a||e[15]!==m?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,m,r]}),e[13]=r,e[14]=a,e[15]=m,e[16]=u):u=e[16],u}function Be(t){const e=k.c(22),{item:n,onClose:l}=t;if(n.href){const d=n.external?"_blank":void 0,c=n.external?"noopener noreferrer":void 0;let m;e[0]!==n.icon?(m=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[0]=n.icon,e[1]=m):m=e[1];let u;e[2]!==n.label?(u=s.jsx("span",{className:"flex-1",children:n.label}),e[2]=n.label,e[3]=u):u=e[3];let f;return e[4]!==n.href||e[5]!==l||e[6]!==d||e[7]!==c||e[8]!==m||e[9]!==u?(f=s.jsxs("a",{href:n.href,target:d,rel:c,className:"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",onClick:l,children:[m,u]}),e[4]=n.href,e[5]=l,e[6]=d,e[7]=c,e[8]=m,e[9]=u,e[10]=f):f=e[10],f}let r;e[11]!==n||e[12]!==l?(r=()=>{n.onClick?.(),l()},e[11]=n,e[12]=l,e[13]=r):r=e[13];let i;e[14]!==n.icon?(i=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[14]=n.icon,e[15]=i):i=e[15];let o;e[16]!==n.label?(o=s.jsx("span",{className:"flex-1",children:n.label}),e[16]=n.label,e[17]=o):o=e[17];let a;return e[18]!==r||e[19]!==i||e[20]!==o?(a=s.jsxs("button",{type:"button",onClick:r,className:"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",children:[i,o]}),e[18]=r,e[19]=i,e[20]=o,e[21]=a):a=e[21],a}function At(t){const e=k.c(126),{user:n,userImage:l,menuItems:r,signOutItem:i,themeOptions:o,preferences:a,setPreferences:d,close:c,isMobile:m}=t;if(m){const M=n?.name??"U";let O;e[0]!==M||e[1]!==l?(O=s.jsx(Oe,{url:l,fallback:M,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=M,e[1]=l,e[2]=O):O=e[2];const J=n?.name??"User";let W;e[3]!==J?(W=s.jsx("p",{className:"text-sm font-medium truncate",children:J}),e[3]=J,e[4]=W):W=e[4];const le=n?.email;let V;e[5]!==le?(V=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:le}),e[5]=le,e[6]=V):V=e[6];let re;e[7]!==W||e[8]!==V?(re=s.jsxs("div",{className:"flex-1 min-w-0",children:[W,V]}),e[7]=W,e[8]=V,e[9]=re):re=e[9];let ie;e[10]!==n?(ie=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Bl)},e[10]=n,e[11]=ie):ie=e[11];let ce;e[12]===Symbol.for("react.memo_cache_sentinel")?(ce=s.jsx(yt,{size:14}),e[12]=ce):ce=e[12];let fe;e[13]!==ie?(fe=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:ie,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:ce})}),e[13]=ie,e[14]=fe):fe=e[14];let pe;e[15]===Symbol.for("react.memo_cache_sentinel")?(pe=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=pe):pe=e[15];let A;e[16]!==fe?(A=s.jsx(tt,{delayDuration:300,children:s.jsxs(ye,{children:[fe,pe]})}),e[16]=fe,e[17]=A):A=e[17];let B;e[18]!==A||e[19]!==O||e[20]!==re?(B=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[O,re,A]}),e[18]=A,e[19]=O,e[20]=re,e[21]=B):B=e[21];let K;if(e[22]!==c||e[23]!==r){let me;e[25]!==c?(me=Le=>s.jsx(Be,{item:Le,onClose:c},Le.key),e[25]=c,e[26]=me):me=e[26],K=r.map(me),e[22]=c,e[23]=r,e[24]=K}else K=e[24];let U;e[27]!==c||e[28]!==i?(U=s.jsx(Be,{item:i,onClose:c}),e[27]=c,e[28]=i,e[29]=U):U=e[29];let de;e[30]!==K||e[31]!==U?(de=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[K,U]})}),e[30]=K,e[31]=U,e[32]=de):de=e[32];let Se;if(e[33]!==a.theme||e[34]!==d||e[35]!==o){let me;e[37]!==a.theme||e[38]!==d?(me=Le=>{const{value:Ye,icon:ks,label:Is}=Le;return s.jsx("button",{type:"button","aria-label":Is,onClick:()=>d(As=>({...As,theme:Ye})),className:H("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Ye?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:ks},Ye)},e[37]=a.theme,e[38]=d,e[39]=me):me=e[39],Se=o.map(me),e[33]=a.theme,e[34]=d,e[35]=o,e[36]=Se}else Se=e[36];let Ne;e[40]!==Se?(Ne=s.jsx("div",{className:"flex items-center gap-0.5",children:Se}),e[40]=Se,e[41]=Ne):Ne=e[41];const Xe=a.enableSounds?"Disable sounds":"Enable sounds";let _e;e[42]!==d?(_e=()=>d(Ll),e[42]=d,e[43]=_e):_e=e[43];const Qe=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let we;e[44]!==Qe?(we=H("size-8 rounded-md flex items-center justify-center transition-colors",Qe),e[44]=Qe,e[45]=we):we=e[45];let Ce;e[46]!==a.enableSounds?(Ce=a.enableSounds?s.jsx(St,{size:14}):s.jsx(Nt,{size:14}),e[46]=a.enableSounds,e[47]=Ce):Ce=e[47];let ke;e[48]!==Xe||e[49]!==_e||e[50]!==we||e[51]!==Ce?(ke=s.jsx("button",{type:"button","aria-label":Xe,onClick:_e,className:we,children:Ce}),e[48]=Xe,e[49]=_e,e[50]=we,e[51]=Ce,e[52]=ke):ke=e[52];let Re;e[53]===Symbol.for("react.memo_cache_sentinel")?(Re=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.28.1"]}),e[53]=Re):Re=e[53];let Ie;e[54]!==ke?(Ie=s.jsxs("div",{className:"flex items-center gap-2",children:[ke,Re]}),e[54]=ke,e[55]=Ie):Ie=e[55];let Ae;e[56]!==Ne||e[57]!==Ie?(Ae=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[Ne,Ie]}),e[56]=Ne,e[57]=Ie,e[58]=Ae):Ae=e[58];let Fe;return e[59]!==B||e[60]!==de||e[61]!==Ae?(Fe=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[B,de,Ae]}),e[59]=B,e[60]=de,e[61]=Ae,e[62]=Fe):Fe=e[62],Fe}const u=n?.name??"U";let f;e[63]!==u||e[64]!==l?(f=s.jsx(Oe,{url:l,fallback:u,shape:"circle",size:"sm",className:"shrink-0"}),e[63]=u,e[64]=l,e[65]=f):f=e[65];const x=n?.name??"User";let p;e[66]!==x?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:x}),e[66]=x,e[67]=p):p=e[67];const h=n?.email;let g;e[68]!==h?(g=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[68]=h,e[69]=g):g=e[69];let b;e[70]!==p||e[71]!==g?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,g]}),e[70]=p,e[71]=g,e[72]=b):b=e[72];let j;e[73]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fl)},e[73]=n,e[74]=j):j=e[74];let v;e[75]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(yt,{size:14}),e[75]=v):v=e[75];let y;e[76]!==j?(y=s.jsx(je,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:v})}),e[76]=j,e[77]=y):y=e[77];let _;e[78]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(ve,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[78]=_):_=e[78];let C;e[79]!==y?(C=s.jsx(tt,{delayDuration:300,children:s.jsxs(ye,{children:[y,_]})}),e[79]=y,e[80]=C):C=e[80];let N;e[81]!==C||e[82]!==f||e[83]!==b?(N=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[f,b,C]}),e[81]=C,e[82]=f,e[83]=b,e[84]=N):N=e[84];let w;if(e[85]!==c||e[86]!==r){let M;e[88]!==c?(M=O=>s.jsx(Be,{item:O,onClose:c},O.key),e[88]=c,e[89]=M):M=e[89],w=r.map(M),e[85]=c,e[86]=r,e[87]=w}else w=e[87];let S;e[90]!==c||e[91]!==i?(S=s.jsx(Be,{item:i,onClose:c}),e[90]=c,e[91]=i,e[92]=S):S=e[92];let I;e[93]!==w||e[94]!==S?(I=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[w,S]}),e[93]=w,e[94]=S,e[95]=I):I=e[95];let z;if(e[96]!==a.theme||e[97]!==d||e[98]!==o){let M;e[100]!==a.theme||e[101]!==d?(M=O=>{const{value:J,icon:W,label:le}=O;return s.jsx("button",{type:"button","aria-label":le,onClick:()=>d(V=>({...V,theme:J})),className:H("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===J?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:W},J)},e[100]=a.theme,e[101]=d,e[102]=M):M=e[102],z=o.map(M),e[96]=a.theme,e[97]=d,e[98]=o,e[99]=z}else z=e[99];let $;e[103]!==z?($=s.jsx("div",{className:"flex items-center gap-0.5",children:z}),e[103]=z,e[104]=$):$=e[104];const T=a.enableSounds?"Disable sounds":"Enable sounds";let F;e[105]!==d?(F=()=>d(Rl),e[105]=d,e[106]=F):F=e[106];const q=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let E;e[107]!==q?(E=H("size-7 rounded-md flex items-center justify-center transition-colors",q),e[107]=q,e[108]=E):E=e[108];let L;e[109]!==a.enableSounds?(L=a.enableSounds?s.jsx(St,{size:14}):s.jsx(Nt,{size:14}),e[109]=a.enableSounds,e[110]=L):L=e[110];let R;e[111]!==T||e[112]!==F||e[113]!==E||e[114]!==L?(R=s.jsx("button",{type:"button","aria-label":T,onClick:F,className:E,children:L}),e[111]=T,e[112]=F,e[113]=E,e[114]=L,e[115]=R):R=e[115];let P;e[116]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.28.1"]}),e[116]=P):P=e[116];let Q;e[117]!==R?(Q=s.jsxs("div",{className:"flex items-center gap-2",children:[R,P]}),e[117]=R,e[118]=Q):Q=e[118];let Y;e[119]!==$||e[120]!==Q?(Y=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[$,Q]}),e[119]=$,e[120]=Q,e[121]=Y):Y=e[121];let ee;return e[122]!==N||e[123]!==I||e[124]!==Y?(ee=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[N,I,Y]})}),e[122]=N,e[123]=I,e[124]=Y,e[125]=ee):ee=e[125],ee}function Rl(t){return{...t,enableSounds:!t.enableSounds}}function Fl(){te.success("User ID copied")}function Ll(t){return{...t,enableSounds:!t.enableSounds}}function Bl(){te.success("User ID copied")}function rt(){const t=k.c(34),{data:e}=he.useSession(),{org:n}=se(),l=ae();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const o=Ts(r)?.params.org,[a,d]=Ms(),c=mt(),[m,u]=D.useState(!1),f=e?.user,x=f?.image;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>u(!1),t[1]=p):p=t[1];const h=p;let g;t[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ut,{size:16}),t[2]=g):g=t[2];let b;t[3]!==l||t[4]!==o?(b={key:"preferences",label:"Preferences",icon:g,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=b):b=t[5];let j;t[6]!==n||t[7]!==l?(j=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(tn,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=j):j=t[8];let v;t[9]===Symbol.for("react.memo_cache_sentinel")?(v={key:"terms",label:"Terms of Use",icon:s.jsx(nn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=v):v=t[9];let y;t[10]===Symbol.for("react.memo_cache_sentinel")?(y={key:"privacy",label:"Privacy Policy",icon:s.jsx(dn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=y):y=t[10];let _;t[11]===Symbol.for("react.memo_cache_sentinel")?(_={key:"github",label:"decocms/studio",icon:s.jsx(Os,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=_):_=t[11];let C;t[12]===Symbol.for("react.memo_cache_sentinel")?(C={key:"community",label:"Community",icon:s.jsx(mn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=C):C=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N={key:"homepage",label:"Homepage",icon:s.jsx(sn,{size:16}),href:"https://decocms.com",external:!0},t[13]=N):N=t[13];let w;t[14]!==b||t[15]!==j?(w=[b,...j,v,y,_,C,N],t[14]=b,t[15]=j,t[16]=w):w=t[16];const S=w;let I;t[17]===Symbol.for("react.memo_cache_sentinel")?(I={key:"logout",label:"Sign out",icon:s.jsx(ln,{size:16}),onClick:Ul},t[17]=I):I=t[17];const z=I;let $;t[18]===Symbol.for("react.memo_cache_sentinel")?($={value:"light",icon:s.jsx(on,{size:14}),label:"Light theme"},t[18]=$):$=t[18];let T;t[19]===Symbol.for("react.memo_cache_sentinel")?(T={value:"dark",icon:s.jsx(an,{size:14}),label:"Dark theme"},t[19]=T):T=t[19];let F;t[20]===Symbol.for("react.memo_cache_sentinel")?(F=[$,T,{value:"system",icon:s.jsx(st,{size:14}),label:"System theme"}],t[20]=F):F=t[20];const q=F;let E;t[21]!==c||t[22]!==S||t[23]!==a||t[24]!==d||t[25]!==f||t[26]!==x?(E={user:f,userImage:x,menuItems:S,signOutItem:z,themeOptions:q,preferences:a,setPreferences:d,close:h,isMobile:c},t[21]=c,t[22]=S,t[23]=a,t[24]=d,t[25]=f,t[26]=x,t[27]=E):E=t[27];const L=E;let R;return t[28]!==c||t[29]!==m||t[30]!==L||t[31]!==f?.name||t[32]!==x?(R=s.jsx(s.Fragment,{children:c?s.jsxs(Jt,{open:m,onOpenChange:u,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>u(!0),className:"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",children:[s.jsx(Oe,{url:x,fallback:f?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]}),s.jsxs(Zt,{className:"h-[80dvh] p-0",children:[s.jsx(es,{className:"sr-only",children:"Account"}),s.jsx(At,{...L})]})]}):s.jsxs(De,{open:m,onOpenChange:u,children:[s.jsx(ge,{asChild:!0,children:s.jsxs(X,{tooltip:f?.name??"Account",className:"rounded-md",children:[s.jsx(Oe,{url:x,fallback:f?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:f?.name??"Account"})]})}),s.jsx(Pe,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Hl,children:s.jsx(At,{...L})})]})}),t[28]=c,t[29]=m,t[30]=L,t[31]=f?.name,t[32]=x,t[33]=R):R=t[33],R}function Hl(t){return t.preventDefault()}function Ul(){ue("signed_out",{source:"account_popover"}),Ds(),he.signOut()}const $t=["requires_action","in_progress","failed","expired","completed"];function Gl(t){const e=new Map($t.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return $t.map(n=>({status:n,threads:e.get(n)}))}function ps(t){const e=k.c(4),{onClick:n}=t;let l,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(lt,{}),r=s.jsx("span",{children:"Add repo"}),e[0]=l,e[1]=r):(l=e[0],r=e[1]);let i;return e[2]!==n?(i=s.jsxs(X,{tooltip:"Add repo",onClick:n,children:[l,r]}),e[2]=n,e[3]=i):i=e[3],i}function ql(t){const e=k.c(41),{onAddNew:n}=t,{org:l}=se(),r=qt(),i=ae(),o=wn();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[0]=a):a=e[0];const c=Ve(a).virtualmcpid??null;let m;e[1]!==c?(m=!!c&&!ss(c),e[1]=c,e[2]=m):m=e[2];const u=m;let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f={slug:"mcp-github"},e[3]=f):f=e[3];const p=yn(f).filter(Vl),h=ht(),b=xt(u?c:null)?.metadata?.githubRepo?.connectionId??null;let j;e[4]!==l.id||e[5]!==l.slug?(j={connectionId:ns,orgId:l.id,orgSlug:l.slug},e[4]=l.id,e[5]=l.slug,e[6]=j):j=e[6];const v=ts(j);if(p.length===0){let M;return e[7]!==n?(M=s.jsx(ps,{onClick:n}),e[7]=n,e[8]=M):M=e[8],M}let y;e[9]!==c||e[10]!==i||e[11]!==l.id||e[12]!==r||e[13]!==v?(y=async(M,O)=>{await v.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:c,data:{metadata:{githubRepo:M}}}}),vt(r,l.id),te.success(`Previewing ${O}`),i({to:".",search:Wl,replace:!0})},e[9]=c,e[10]=i,e[11]=l.id,e[12]=r,e[13]=v,e[14]=y):y=e[14];const _=y;let C;e[15]!==h||e[16]!==o||e[17]!==l.id||e[18]!==r||e[19]!==v?(C=async(M,O,J)=>{const W=h.find(re=>{const ie=re.metadata?.githubRepo;return ie?.owner?.toLowerCase()===M.owner.toLowerCase()&&ie?.name?.toLowerCase()===M.name.toLowerCase()});if(W){o(W.id,{search:{main:"preview"}});return}const V=(await v.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:M.name,description:`Imported from ${J}`,status:"active",pinned:!1,icon:null,connections:[{connection_id:O}],metadata:{githubRepo:M,instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}}}}})).structuredContent?.item?.id;if(vt(r,l.id),!V)throw new Error("Failed to create the repo agent");te.success(`Created ${J}`),o(V,{search:{main:"preview"}})},e[15]=h,e[16]=o,e[17]=l.id,e[18]=r,e[19]=v,e[20]=C):C=e[20];const N=C;let w;e[21]!==_||e[22]!==u||e[23]!==N?(w=async M=>{const O=nt(M);if(!O)return;const J=`${O.owner}/${O.repo}`,W={owner:O.owner,name:O.repo,url:`https://github.com/${O.owner}/${O.repo}`,installationId:O.installationId,connectionId:M.id};try{u?await _(W,J):await N(W,M.id,J)}catch(le){const V=le;te.error("Failed to set preview repo: "+(V instanceof Error?V.message:"Unknown error"))}},e[21]=_,e[22]=u,e[23]=N,e[24]=w):w=e[24];const S=w,I=bn;let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(jn,{asChild:!0,children:s.jsxs(X,{tooltip:"Add repo",children:[s.jsx(lt,{}),s.jsx("span",{children:"Add repo"})]})}),e[25]=z):z=e[25];const $=gn,T="start",F="right",q="w-56";let E;e[26]!==b||e[27]!==S?(E=M=>{const O=nt(M);return O?s.jsxs(wt,{onSelect:()=>S(M),children:[s.jsx(lt,{className:"size-4 text-muted-foreground"}),s.jsxs("span",{className:"flex-1 truncate",children:[O.owner,"/",O.repo]}),M.id===b&&s.jsx(Ee,{className:"size-4"})]},M.id):null},e[26]=b,e[27]=S,e[28]=E):E=e[28];const L=p.map(E);let R;e[29]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(vn,{}),e[29]=R):R=e[29];let P;e[30]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx($e,{className:"size-4"}),e[30]=P):P=e[30];let Q;e[31]!==n?(Q=s.jsxs(wt,{onSelect:n,children:[P,"Add new repo…"]}),e[31]=n,e[32]=Q):Q=e[32];let Y;e[33]!==$||e[34]!==L||e[35]!==Q?(Y=s.jsxs($,{align:T,side:F,className:q,children:[L,R,Q]}),e[33]=$,e[34]=L,e[35]=Q,e[36]=Y):Y=e[36];let ee;return e[37]!==I||e[38]!==Y||e[39]!==z?(ee=s.jsxs(I,{children:[z,Y]}),e[37]=I,e[38]=Y,e[39]=z,e[40]=ee):ee=e[40],ee}function Wl(t){return{...t,main:"preview"}}function Vl(t){return nt(t)!==null&&_n(t)}function Kl(){const t=k.c(4),[e,n]=D.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ps,{onClick:()=>n(!0)}),t[0]=l):l=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(D.Suspense,{fallback:l,children:s.jsx(ql,{onAddNew:()=>n(!0)})}),t[1]=r):r=t[1];let i;return t[2]!==e?(i=s.jsxs(s.Fragment,{children:[r,s.jsx(Nn,{open:e,onOpenChange:n,mode:"connection"})]}),t[2]=e,t[3]=i):i=t[3],i}function it(t){const e=k.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,r=On(),[i,o]=D.useState(!1);let a,d;if(e[0]!==r.capabilities||e[1]!==r.hostname||e[2]!==r.machineId||e[3]!==r.online){const v=Dn(r.capabilities);a=r.online?"Desktop linked":"Connect desktop",d=r.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:r.hostname??r.machineId??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:v.length>0?`Available: ${v.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=r.capabilities,e[1]=r.hostname,e[2]=r.machineId,e[3]=r.online,e[4]=a,e[5]=d}else a=e[4],d=e[5];const c=d;if(l==="full"){let v,y;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=()=>o(!0),y=s.jsx(st,{}),e[6]=v,e[7]=y):(v=e[6],y=e[7]);let _;e[8]!==a?(_=s.jsx("span",{children:a}),e[8]=a,e[9]=_):_=e[9];let C;e[10]!==r.online?(C=r.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=r.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==_||e[14]!==C?(N=s.jsx(je,{asChild:!0,children:s.jsxs(X,{tooltip:a,onClick:v,children:[y,_,C]})}),e[12]=a,e[13]=_,e[14]=C,e[15]=N):N=e[15];let w;e[16]!==c?(w=s.jsx(ve,{side:"right",children:c}),e[16]=c,e[17]=w):w=e[17];let S;e[18]!==N||e[19]!==w?(S=s.jsxs(ye,{children:[N,w]}),e[18]=N,e[19]=w,e[20]=S):S=e[20];let I;e[21]!==i?(I=s.jsx(Ct,{open:i,onOpenChange:o}),e[21]=i,e[22]=I):I=e[22];let z;return e[23]!==I||e[24]!==S?(z=s.jsxs(s.Fragment,{children:[S,I]}),e[23]=I,e[24]=S,e[25]=z):z=e[25],z}let m;e[26]===Symbol.for("react.memo_cache_sentinel")?(m=()=>o(!0),e[26]=m):m=e[26];const u=r.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(st,{size:16}),e[27]=f):f=e[27];let x;e[28]!==r.online?(x=r.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[28]=r.online,e[29]=x):x=e[29];let p;e[30]!==u||e[31]!==x?(p=s.jsx(je,{asChild:!0,children:s.jsxs(be,{onClick:m,"aria-label":u,children:[f,x]})}),e[30]=u,e[31]=x,e[32]=p):p=e[32];let h;e[33]!==c?(h=s.jsx(ve,{side:"bottom",children:c}),e[33]=c,e[34]=h):h=e[34];let g;e[35]!==p||e[36]!==h?(g=s.jsxs(ye,{children:[p,h]}),e[35]=p,e[36]=h,e[37]=g):g=e[37];let b;e[38]!==i?(b=s.jsx(Ct,{open:i,onOpenChange:o}),e[38]=i,e[39]=b):b=e[39];let j;return e[40]!==b||e[41]!==g?(j=s.jsxs(s.Fragment,{children:[g,b]}),e[40]=b,e[41]=g,e[42]=j):j=e[42],j}function Xl({invitation:t}){const[e,n]=D.useState(!1),[l,r]=D.useState(!1),i=qt(),o=async()=>{n(!0);try{const c=await he.organization.acceptInvitation({invitationId:t.id});if(c.error){te.error(c.error.message),n(!1);return}}catch{te.error("Failed to accept invitation"),n(!1);return}te.success("Invitation accepted!"),Ps();let d;try{d=(await he.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=d?`/${d}`:"/"},a=async()=>{r(!0);try{const d=await he.organization.rejectInvitation({invitationId:t.id});d.error?(te.error(d.error.message),r(!1)):(te.success("Invitation declined"),i.invalidateQueries())}catch{te.error("Failed to decline invitation"),r(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:o,disabled:e||l,"aria-label":"Accept invitation",children:s.jsx(Ee,{size:14})}),s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||l,"aria-label":"Decline invitation",children:s.jsx(rs,{size:14})})]})]})}function Ql(t){const e=k.c(29),{request:n}=t,{approve:l,deny:r}=Pn(),i=l.isPending||r.isPending,o=n.user?.name??n.user?.email??n.userId,a=n.user?.image??void 0;let d;e[0]!==o?(d=o.charAt(0).toUpperCase(),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==a||e[3]!==d?(c=s.jsx(Oe,{url:a,fallback:d,shape:"circle",size:"sm"}),e[2]=a,e[3]=d,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Requested to join"}),e[5]=m):m=e[5];let u;e[6]!==o?(u=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,s.jsx("p",{className:"text-sm font-medium truncate",children:o})]}),e[6]=o,e[7]=u):u=e[7];let f;e[8]!==l||e[9]!==n.id?(f=()=>l.mutate(n.id),e[8]=l,e[9]=n.id,e[10]=f):f=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ee,{size:14}),e[11]=x):x=e[11];let p;e[12]!==i||e[13]!==f?(p=s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:f,disabled:i,"aria-label":"Approve join request",children:x}),e[12]=i,e[13]=f,e[14]=p):p=e[14];let h;e[15]!==r||e[16]!==n.id?(h=()=>r.mutate(n.id),e[15]=r,e[16]=n.id,e[17]=h):h=e[17];let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(rs,{size:14}),e[18]=g):g=e[18];let b;e[19]!==i||e[20]!==h?(b=s.jsx(ze,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:h,disabled:i,"aria-label":"Deny join request",children:g}),e[19]=i,e[20]=h,e[21]=b):b=e[21];let j;e[22]!==b||e[23]!==p?(j=s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[p,b]}),e[22]=b,e[23]=p,e[24]=j):j=e[24];let v;return e[25]!==j||e[26]!==c||e[27]!==u?(v=s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[c,u,j]}),e[25]=j,e[26]=c,e[27]=u,e[28]=v):v=e[28],v}function Yl(t){const e=k.c(14),{release:n,isSeen:l,onSelect:r}=t;let i;e[0]!==l?(i=!l&&s.jsx("span",{"aria-label":"New release",className:"absolute left-2 top-1/2 -translate-y-1/2 size-1.5 rounded-full bg-primary"}),e[0]=l,e[1]=i):i=e[1];let o;e[2]!==n.eyebrow?(o=n.eyebrow&&s.jsx("p",{className:"text-xs text-muted-foreground",children:n.eyebrow}),e[2]=n.eyebrow,e[3]=o):o=e[3];let a;e[4]!==n.title?(a=s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:n.title}),e[4]=n.title,e[5]=a):a=e[5];let d;e[6]!==o||e[7]!==a?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[o,a]}),e[6]=o,e[7]=a,e[8]=d):d=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(is,{size:16,className:"text-muted-foreground shrink-0"}),e[9]=c):c=e[9];let m;return e[10]!==r||e[11]!==i||e[12]!==d?(m=s.jsxs("button",{type:"button",onClick:r,className:"relative w-full flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors text-left",children:[i,d,c]}),e[10]=r,e[11]=i,e[12]=d,e[13]=m):m=e[13],m}function Jl(){const t=D.useContext(Es),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(l=>l.status==="pending"&&new Date(l.expiresAt)>new Date)}function gs(){const t=k.c(11),{isSeen:e,markSeen:n,unseenCount:l}=Rn(),r=Jl(),i=En();let o;if(t[0]!==e||t[1]!==r||t[2]!==i){const c=[...i].sort(nr).map(sr),m=[...r].sort(tr).map(er);let u;t[4]!==e?(u=x=>({type:"release",release:x,isSeen:e(x.id)}),t[4]=e,t[5]=u):u=t[5];const f=[...Fn].sort(Zl).map(u);o=[...c,...m,...f],t[0]=e,t[1]=r,t[2]=i,t[3]=o}else o=t[3];const a=l+r.length+i.length;let d;return t[6]!==n||t[7]!==r||t[8]!==o||t[9]!==a?(d={items:o,pendingInvitations:r,redDotCount:a,markReleaseSeen:n},t[6]=n,t[7]=r,t[8]=o,t[9]=a,t[10]=d):d=t[10],d}function Zl(t,e){return new Date(e.date).getTime()-new Date(t.date).getTime()}function er(t){return{type:"invitation",invitation:t}}function tr(t,e){return new Date(t.expiresAt).getTime()-new Date(e.expiresAt).getTime()}function sr(t){return{type:"join-request",request:t}}function nr(t,e){return new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()}class lr extends D.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function rr(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function ir(){const t=k.c(17),e=ae(),{org:n}=se(),{hasDecoKey:l,balanceDollars:r}=zn();if(!l)return null;let i;t[0]!==r?(i=r!=null?`Credits: $${r.toFixed(2)}`:"Credits",t[0]=r,t[1]=i):i=t[1];let o;t[2]!==r?(o=H(r!=null&&rr(r)),t[2]=r,t[3]=o):o=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(un,{}),t[7]=d):d=t[7];let c;t[8]!==r?(c=r!=null?`$${r.toFixed(2)}`:"Credits",t[8]=r,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==o||t[14]!==a||t[15]!==m?(u=s.jsx(ne,{children:s.jsx(G,{children:s.jsxs(X,{tooltip:i,className:o,onClick:a,children:[d,m]})})}),t[12]=i,t[13]=o,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function zt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(lr,{children:s.jsx(D.Suspense,{fallback:null,children:s.jsx(ir,{})})}),t[0]=e):e=t[0],e}function or(t){const e=k.c(15),{children:n}=t,{items:l,markReleaseSeen:r}=gs(),[i,o]=D.useState(null);let a;if(e[0]!==l||e[1]!==i){let h;e[3]!==i?(h=g=>g.type==="release"&&g.release.id===i,e[3]=i,e[4]=h):h=e[4],a=l.find(h),e[0]=l,e[1]=i,e[2]=a}else a=e[2];const d=a,c=d?.type==="release"?d.release:null;let m;e[5]!==r?(m=h=>{o(h),r(h)},e[5]=r,e[6]=m):m=e[6];const u=m;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=h=>{h||o(null)},e[7]=f):f=e[7];let x;e[8]!==u||e[9]!==l||e[10]!==c?(x=s.jsx(Pe,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:c?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 border-b border-border shrink-0",children:[s.jsx(ze,{size:"icon",variant:"ghost","aria-label":"Back to inbox",className:"size-7 text-muted-foreground",onClick:()=>o(null),children:s.jsx(cn,{size:16})}),s.jsx("h3",{className:"text-sm font-medium truncate",children:c.title})]}),s.jsx("div",{className:"overflow-y-auto flex-1 p-5",children:s.jsx(Ln,{release:c})})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),l.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(ft,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Nothing here yet"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Invitations, join requests, and release updates will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:l.map(h=>h.type==="join-request"?s.jsx(Ql,{request:h.request},`req-${h.request.id}`):h.type==="invitation"?s.jsx(Xl,{invitation:h.invitation},`inv-${h.invitation.id}`):s.jsx(Yl,{release:h.release,isSeen:h.isSeen,onSelect:()=>u(h.release.id)},`rel-${h.release.id}`))})]})}),e[8]=u,e[9]=l,e[10]=c,e[11]=x):x=e[11];let p;return e[12]!==n||e[13]!==x?(p=s.jsxs(De,{onOpenChange:f,children:[n,x]}),e[12]=n,e[13]=x,e[14]=p):p=e[14],p}function ar(){const{redDotCount:t}=gs();return t>0}function Tt(){const t=k.c(6),e=ar();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ft,{}),t[0]=n):n=t[0];let l;t[1]!==e?(l=e&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e,t[2]=l):l=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("span",{children:"Inbox"}),t[3]=r):r=t[3];let i;return t[4]!==l?(i=s.jsx(or,{children:s.jsx(ge,{asChild:!0,children:s.jsxs(X,{tooltip:"Inbox",className:"relative",children:[n,l,r]})})}),t[4]=l,t[5]=i):i=t[5],i}function Mt(){const t=k.c(7),e=ae(),{org:n}=se();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let r,i;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ut,{}),i=s.jsx("span",{children:"Settings"}),t[3]=r,t[4]=i):(r=t[3],i=t[4]);let o;return t[5]!==l?(o=s.jsxs(X,{tooltip:"Settings",onClick:l,children:[r,i]}),t[5]=l,t[6]=o):o=t[6],o}function Ot(){const t=k.c(5),[e,n]=D.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(G,{children:s.jsx($n,{trigger:s.jsxs(X,{tooltip:"Invite members",children:[s.jsx(fn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(G,{children:s.jsx(Kl,{})}),t[1]=r):r=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(ne,{className:"gap-0.5",children:[l,r,s.jsx(G,{children:s.jsxs(X,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(rn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[2]=i):i=t[2];let o;return t[3]!==e?(o=s.jsxs(s.Fragment,{children:[i,s.jsx(Tn,{open:e,onOpenChange:n,mode:"browse"})]}),t[3]=e,t[4]=o):o=t[4],o}function cr(){const t=k.c(12),{state:e}=xe();if(e==="collapsed"){let c,m,u;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ne,{children:s.jsx(G,{children:s.jsx(Tt,{})})}),m=s.jsx(Ot,{}),u=s.jsx(zt,{}),t[0]=c,t[1]=m,t[2]=u):(c=t[0],m=t[1],u=t[2]);let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(G,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(it,{})})}),t[3]=f):f=t[3];let x;t[4]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(G,{children:s.jsx(Mt,{})}),t[4]=x):x=t[4];let p;return t[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(et,{className:"px-2 pb-3 gap-1",children:[c,m,u,s.jsxs(ne,{children:[f,x,s.jsx(G,{children:s.jsx(rt,{})})]})]}),t[5]=p):p=t[5],p}let l,r,i;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ne,{className:"gap-0.5",children:s.jsx(G,{children:s.jsx(Tt,{})})}),r=s.jsx(Ot,{}),i=s.jsx(zt,{}),t[6]=l,t[7]=r,t[8]=i):(l=t[6],r=t[7],i=t[8]);let o;t[9]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(G,{children:s.jsx(it,{variant:"full"})}),t[9]=o):o=t[9];let a;t[10]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(G,{children:s.jsx(Mt,{})}),t[10]=a):a=t[10];let d;return t[11]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(et,{className:"px-2 pb-3 gap-0.5",children:[l,r,i,s.jsxs(ne,{className:"gap-0.5",children:[o,a,s.jsx(G,{children:s.jsx(rt,{})})]})]}),t[11]=d):d=t[11],d}function dr(){const t=k.c(8),e=ae(),{org:n}=se(),{setOpenMobile:l}=xe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ne,{children:s.jsx(G,{children:s.jsx(rt,{})})})}),t[0]=r):r=t[0];let i;t[1]!==e||t[2]!==n.slug||t[3]!==l?(i=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=i):i=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ut,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==i?(a=s.jsx(et,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[r,s.jsx(be,{"aria-label":"Settings",onClick:i,children:o})]})}),t[6]=i,t[7]=a):a=t[7],a}function Dt(t){const e=k.c(15),{className:n,wrapperClassName:l,children:r}=t,[i,o]=D.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&o(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=H("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==r||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:r}),e[4]=r,e[5]=n,e[6]=f):f=e[6];const x=i?"opacity-100":"opacity-0";let p;e[7]!==x?(p=H("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",x),e[7]=x,e[8]=p):p=e[8];let h;e[9]!==p?(h=s.jsx("div",{"aria-hidden":!0,className:p}),e[9]=p,e[10]=h):h=e[10];let g;return e[11]!==u||e[12]!==f||e[13]!==h?(g=s.jsxs("div",{className:u,children:[f,h]}),e[11]=u,e[12]=f,e[13]=h,e[14]=g):g=e[14],g}function mr(t){const e=k.c(8),{virtualMcpId:n,size:l,showAutomationBadge:r}=t,i=l===void 0?"sm":l;let o;e[0]!==i||e[1]!==n?(o=n?s.jsx(ur,{virtualMcpId:n,size:i}):s.jsx(Te,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==r?(a=r&&s.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(nl,{size:10,className:"text-white"})}),e[3]=r,e[4]=a):a=e[4];let d;return e[5]!==o||e[6]!==a?(d=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=d):d=e[7],d}function ur(t){const e=k.c(6),{virtualMcpId:n,size:l}=t,r=xt(n);if(!r){let a;return e[0]!==l?(a=s.jsx(Te,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=r.icon??null;let o;return e[2]!==r.title||e[3]!==l||e[4]!==i?(o=s.jsx(Te,{icon:i,name:r.title,size:l}),e[2]=r.title,e[3]=l,e[4]=i,e[5]=o):o=e[5],o}function Pt(t){const e=k.c(36),{open:n,onOpenChange:l}=t,[r,i]=D.useState(""),{org:o}=se(),{setTaskId:a}=pt(),d=as();let c,m,u;e[0]!==o.id||e[1]!==r?(u=r.trim(),m=Fs,c=Rs.globalSearch(o.id,u),e[0]=o.id,e[1]=r,e[2]=c,e[3]=m,e[4]=u):(c=e[2],m=e[3],u=e[4]);const f=n&&u.length>0;let x;e[5]!==d||e[6]!==u?(x=async()=>await d.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=d,e[6]=u,e[7]=x):x=e[7];let p;e[8]!==c||e[9]!==f||e[10]!==x?(p={queryKey:c,enabled:f,queryFn:x,staleTime:1e4},e[8]=c,e[9]=f,e[10]=x,e[11]=p):p=e[11];const{data:h,isFetching:g}=m(p);let b;e[12]!==h?.items?(b=h?.items??[],e[12]=h?.items,e[13]=b):b=e[13];const j=b;let v;e[14]!==l?(v=T=>{T||i(""),l(T)},e[14]=l,e[15]=v):v=e[15];const y=v;let _;e[16]!==y||e[17]!==a?(_=T=>{y(!1),a(T.id,T.virtual_mcp_id??void 0)},e[16]=y,e[17]=a,e[18]=_):_=e[18];const C=_;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Vn,{className:"sr-only",children:[s.jsx(Kn,{children:"Search"}),s.jsx(Xn,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let w;e[20]!==r?(w=s.jsx(el,{value:r,onValueChange:i,placeholder:"Search..."}),e[20]=r,e[21]=w):w=e[21];let S;e[22]!==C||e[23]!==g||e[24]!==j||e[25]!==u?(S=u?g&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Jn,{children:"No results."}):j.map(T=>T.type==="thread"?s.jsxs(Zn,{value:`thread:${T.id}:${T.title}`,onSelect:()=>C(T),className:"gap-2.5",children:[s.jsx(mr,{virtualMcpId:T.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:T.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(T.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${T.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=g,e[24]=j,e[25]=u,e[26]=S):S=e[26];let I;e[27]!==S?(I=s.jsx(tl,{children:S}),e[27]=S,e[28]=I):I=e[28];let z;e[29]!==w||e[30]!==I?(z=s.jsxs(Qn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(sl,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[w,I]})]}),e[29]=w,e[30]=I,e[31]=z):z=e[31];let $;return e[32]!==y||e[33]!==n||e[34]!==z?($=s.jsx(Yn,{open:n,onOpenChange:y,children:z}),e[32]=y,e[33]=n,e[34]=z,e[35]=$):$=e[35],$}const fr="sidebar.group.expanded.";function hr(t,e){const n=k.c(3),[l,r]=We(`${fr}${t}`,e);let i;return n[0]!==l||n[1]!==r?(i=[l,r],n[0]=l,n[1]=r,n[2]=i):i=n[2],i}function bs(t){const e=k.c(12),{onClick:n,isFetching:l,indented:r}=t,i=r?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==i?(o=H("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",i,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Wt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const d=l?"Loading…":"Show more";let c;e[4]!==d?(c=s.jsx("span",{children:d}),e[4]=d,e[5]=c):c=e[5];let m;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(m=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=m):m=e[11],m}function xr(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function pr(t){return t.member==="mine"&&!t.currentUserId}const js=4;let Ue=0;const ot=[];function gr(){for(;Ue<js&&ot.length>0;){const t=ot.shift();t&&t()}}function vs(t){return new Promise((e,n)=>{const l=()=>{Ue++,t().then(e,n).finally(()=>{Ue--,gr()})};Ue<js?l():ot.push(l)})}const Ke=10;function Et(t,e,n,l,r){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const o={where:i,limit:r,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function br(t,e,n,l){let r=0;for(const i of t)ys(i,e,n,l)&&r++;return r}function Je(t,e,n,l){return br(t,e,n,l)}function jr(t,e){return!!(t>=Ke||t===0&&e)}function Rt(t,e){return t<e}function vr(t,e){return e===!1?!1:e===!0?!0:t}function ys(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const qe=new Map,He=new Map;function yr(t,e){return e?t>=Ke?!0:null:!1}function Ft(t){return qe.get(t)}function Sr(t,e){qe.set(t,e)}function Nr(t,e,n){const l=qe.get(t);if(l!==void 0){n(l);return}let r=He.get(t);r||(r=vs(e).then(i=>(qe.set(t,i),He.delete(t),i)).catch(()=>(He.delete(t),Promise.reject(new Error("group probe failed")))),He.set(t,r)),r.then(n,()=>n(!1))}function Lt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ke,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function _r(t,e,n,l,r){let i=0;for(const o of t)e.has(o.id)||ys(o,n,l,r)&&i++;return i}function wr(t,e,n,l){const r=k.c(8),{org:i}=se(),o=xr(i.id,t,e,n);let a;r[0]!==n?(a=pr(n),r[0]=n,r[1]=a):a=r[1];const d=a,[c,m]=D.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=qn(),{threads:f,hasMore:x}=gt(),p=Je(f,t,e,n),h=jr(p,x),g=yr(p,x),b=as();if(c.identity===o&&c.serverHasMore===null){const N=g??Ft(o);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===o&&c.serverHasMore===null&&g===null&&Ft(o)===void 0&&c.probeSubscribedIdentity!==o&&(m(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),Nr(o,async()=>{const N=Et(t,e,0,n,1),w=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:S}=Lt(w),I=Je(u.threads.get(),t,e,n);return S===void 0?!1:Rt(I,S)},N=>{m(w=>w.identity!==o?w:{...w,isProbing:!1,serverHasMore:N})}));const v=async function(){if(c.isFetching||c.isProbing||d)return;const w=o;m(S=>S.identity===w?{...S,isFetching:!0}:S);try{const S=Je(f,t,e,n),I=Et(t,e,S,n,Ke),z=await vs(()=>b.call("COLLECTION_THREADS_LIST",I)),{items:$,hasMore:T,totalCount:F}=Lt(z),q=new Set(f.map(Cr)),E=_r($,q,t,e,n),L=S;u.mergeThreads($),m(R=>{if(R.identity!==w)return R;let P;return F!==void 0?P=Rt(L+E,F):P=$.length===0||E===0?!1:T,Sr(w,P),{...R,isFetching:!1,serverHasMore:P}})}catch(S){const I=S,z=I instanceof Error?I.message:String(I);te.error(`Could not load more tasks: ${z}`),m($=>$.identity===w?{...$,isFetching:!1}:$)}},y=c.isFetching||c.isProbing,_=!d&&!y&&vr(h,c.serverHasMore);let C;return r[2]!==y||r[3]!==v||r[4]!==_||r[5]!==c.isProbing||r[6]!==c.serverHasMore?(C={hasMore:_,isFetching:y,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:v},r[2]=y,r[3]=v,r[4]=_,r[5]=c.isProbing,r[6]=c.serverHasMore,r[7]=C):C=r[7],C}function Cr(t){return t.id}function kr(t){const e=k.c(18),{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a}=t,{isFetching:d,isProbing:c,loadMore:m,hasMore:u,serverHasMore:f}=wr("status",n,a),[x,p]=D.useState(!1);!x&&l.length===0&&f===!0&&!d&&!c&&(p(!0),queueMicrotask(()=>{m()}));let h;if(e[0]!==r||e[1]!==a||e[2]!==o||e[3]!==i||e[4]!==l){let j;e[6]!==r||e[7]!==a||e[8]!==o||e[9]!==i?(j=v=>s.jsx(ds,{task:v,isActive:r===v.id,onClick:()=>i(v),onArchive:v.created_by===a.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[6]=r,e[7]=a,e[8]=o,e[9]=i,e[10]=j):j=e[10],h=l.map(j),e[0]=r,e[1]=a,e[2]=o,e[3]=i,e[4]=l,e[5]=h}else h=e[5];let g;e[11]!==u||e[12]!==d||e[13]!==m?(g=(u||d)&&s.jsx(bs,{onClick:()=>{m()},isFetching:d,indented:!0}),e[11]=u,e[12]=d,e[13]=m,e[14]=g):g=e[14];let b;return e[15]!==h||e[16]!==g?(b=s.jsxs(s.Fragment,{children:[h,g]}),e[15]=h,e[16]=g,e[17]=b):b=e[17],b}function Ir(t){const e=k.c(35),{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a}=t,d=rl[n],c=d.icon,[m,u]=hr(`status-${n}`,!1);let f;e[0]!==m||e[1]!==u?(f=function(){u(!m)},e[0]=m,e[1]=u,e[2]=f):f=e[2];const x=f;let p;e[3]!==x?(p=N=>{N.target===N.currentTarget&&(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),x())},e[3]=x,e[4]=p):p=e[4];let h;e[5]!==c||e[6]!==d.iconClassName?(h=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(c,{size:12,className:d.iconClassName})}),e[5]=c,e[6]=d.iconClassName,e[7]=h):h=e[7];let g;e[8]!==m?(g=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:m?s.jsx(bt,{size:14}):s.jsx(is,{size:14})}),e[8]=m,e[9]=g):g=e[9];let b;e[10]!==h||e[11]!==g?(b=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[h,g]}),e[10]=h,e[11]=g,e[12]=b):b=e[12];let j;e[13]!==d.label?(j=s.jsx("span",{className:"flex-1 truncate",children:d.label}),e[13]=d.label,e[14]=j):j=e[14];let v;e[15]!==l.length?(v=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=v):v=e[16];let y;e[17]!==m||e[18]!==x||e[19]!==p||e[20]!==b||e[21]!==j||e[22]!==v?(y=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,onClick:x,onKeyDown:p,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[b,j,v]}),e[17]=m,e[18]=x,e[19]=p,e[20]=b,e[21]=j,e[22]=v,e[23]=y):y=e[23];let _;e[24]!==r||e[25]!==m||e[26]!==a||e[27]!==o||e[28]!==i||e[29]!==n||e[30]!==l?(_=m&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(kr,{status:n,threads:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a})}),e[24]=r,e[25]=m,e[26]=a,e[27]=o,e[28]=i,e[29]=n,e[30]=l,e[31]=_):_=e[31];let C;return e[32]!==y||e[33]!==_?(C=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[y,_]}),e[32]=y,e[33]=_,e[34]=C):C=e[34],C}function Bt(t){const e=k.c(34),{threads:n,groupBy:l,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(ft,{className:"size-6 opacity-60"}),e[0]=h):h=e[0];const g=u?"No threads match your filters":"No threads yet";let b;return e[1]!==g?(b=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[h,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=b):b=e[2],b}if(l==="status"){let h;if(e[3]!==r||e[4]!==a||e[5]!==o||e[6]!==i||e[7]!==n){let b;e[9]!==r||e[10]!==a||e[11]!==o||e[12]!==i?(b=j=>s.jsx(Ir,{status:j.status,threads:j.threads,activeTaskId:r,onSelectTask:i,onArchiveTask:o,filters:a},j.status),e[9]=r,e[10]=a,e[11]=o,e[12]=i,e[13]=b):b=e[13],h=Gl(n).map(b),e[3]=r,e[4]=a,e[5]=o,e[6]=i,e[7]=n,e[8]=h}else h=e[8];let g;return e[14]!==h?(g=s.jsx(s.Fragment,{children:h}),e[14]=h,e[15]=g):g=e[15],g}let f;if(e[16]!==r||e[17]!==a||e[18]!==o||e[19]!==i||e[20]!==n){let h;e[22]!==r||e[23]!==a||e[24]!==o||e[25]!==i?(h=g=>s.jsx(ds,{task:g,isActive:r===g.id,onClick:()=>i(g),onArchive:g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[22]=r,e[23]=a,e[24]=o,e[25]=i,e[26]=h):h=e[26],f=n.map(h),e[16]=r,e[17]=a,e[18]=o,e[19]=i,e[20]=n,e[21]=f}else f=e[21];let x;e[27]!==d||e[28]!==c||e[29]!==m?(x=(d||c)&&s.jsx(bs,{onClick:m,isFetching:c}),e[27]=d,e[28]=c,e[29]=m,e[30]=x):x=e[30];let p;return e[31]!==f||e[32]!==x?(p=s.jsxs(s.Fragment,{children:[f,x]}),e[31]=f,e[32]=x,e[33]=p):p=e[33],p}function Ht(t){const e=k.c(17),{label:n,onClick:l,active:r,children:i}=t,[o,a]=D.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=r&&"bg-sidebar-accent text-foreground";let x;e[4]!==f?(x=H(f),e[4]=f,e[5]=x):x=e[5];let p;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==x?(p=s.jsx(je,{asChild:!0,children:s.jsx(be,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:x,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=x,e[10]=p):p=e[10];let h;e[11]!==n?(h=s.jsx(ve,{side:"bottom",children:n}),e[11]=n,e[12]=h):h=e[12];let g;return e[13]!==o||e[14]!==p||e[15]!==h?(g=s.jsxs(ye,{open:o,children:[p,h]}),e[13]=o,e[14]=p,e[15]=h,e[16]=g):g=e[16],g}function Ze(t){const e=k.c(13),{label:n,value:l,onChange:r,options:i}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==r?(a=u=>u&&r(u),e[2]=r,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(Ar),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(Gn,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==o||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=m):m=e[12],m}function Ar(t){return s.jsxs(Un,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function Ss({onNavigate:t}={}){const{data:e}=he.useSession(),n=e?.user?.id,{org:l}=se(),r=ts({connectionId:ns,orgId:l.id,orgSlug:l.slug}),i=Ge(l.id).id,o=ht(),{threads:a,hasMore:d,isFetchingMore:c,fetchNextPage:m}=gt(),u=a.filter(A=>!A.hidden),{hide:f}=os(),x=ae(),{setTaskId:p,createNewTask:h}=pt(),g=at({strict:!1}),b=Ve({strict:!1}),j=g.taskId??null,v=b.virtualmcpid??a.find(A=>A.id===j)?.virtual_mcp_id??null,y=()=>{t?.()},_=[...u].sort((A,B)=>(B.updated_at??"").localeCompare(A.updated_at??"")),[C,N]=D.useState("all"),[w,S]=D.useState("flat"),[I,z]=We("sidebar-threads-scope-all",!1),[$,T]=D.useState(!1),[F,q]=D.useState(!1),E={type:C,member:"mine",currentUserId:n??null},L=A=>n?A.filter(B=>B.created_by===n):[],R=A=>C==="automation"?A.filter(B=>!!B.trigger_id):C==="manual"?A.filter(B=>!B.trigger_id):A,P=L(_),Q=R(P),Y=R(_),ee=I?Y:Q,M=A=>{if(n&&A.created_by&&A.created_by!==n)return;const B=A.id===j;if(f(A.id),!B)return;const K=P.find(U=>U.id!==A.id&&U.virtual_mcp_id===A.virtual_mcp_id);y(),K?p(K.id,K.virtual_mcp_id):x({to:"/$org",params:{org:l.slug}})},O=A=>{y(),p(A.id,A.virtual_mcp_id)},J=async A=>{try{const B=await r.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:A,limit:1,offset:0}});return((B.structuredContent??B).items?.length??0)===0}catch{return!1}},W=async()=>{const A=v??i;ue("sidebar_new_thread_clicked",{virtual_mcp_id:A});const B=P.find(K=>K.virtual_mcp_id===A&&K.title==="New chat");if(B&&await J(B.id)){y(),p(B.id,A);return}y(),h(A)},{state:le,isMobile:V,toggleSidebar:re}=xe();if(le==="collapsed"&&!V){const A=Ge(l.id),B=new Map((o??[]).map(U=>[U.id,U])),K=U=>(U?B.get(U):void 0)??(U===i?A:void 0);return s.jsxs(ne,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(G,{children:s.jsx(X,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:re,children:s.jsx(Yt,{size:16})})}),s.jsx(G,{children:s.jsx(X,{tooltip:"New thread",onClick:()=>{W()},children:s.jsx(_t,{size:16})})}),ee.map(U=>{const de=K(U.virtual_mcp_id);return s.jsx(G,{children:s.jsx(X,{tooltip:U.title||"New chat",isActive:U.id===j,onClick:()=>O(U),children:s.jsx(Te,{icon:de?.icon??null,name:de?.title??"Agent",size:"2xs"})})},U.id)})]})}const ce=w!=="flat"||C!=="all"||I===!0,fe=s.jsxs(De,{children:[s.jsxs(ye,{children:[s.jsx(je,{asChild:!0,children:s.jsx(ge,{asChild:!0,children:s.jsxs(be,{"aria-label":"Filter threads",active:ce,children:[s.jsx(Hn,{size:16}),ce&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(ve,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Pe,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(Ze,{label:"View",value:w,onChange:A=>{ue("tasks_panel_group_by_changed",{to_value:A}),S(A)},options:[{value:"flat",label:"List",icon:s.jsx(xn,{size:13})},{value:"status",label:"Status",icon:s.jsx(pn,{size:13})}]}),s.jsx(Ze,{label:"Type",value:C,onChange:A=>{ue("tasks_panel_filter_changed",{to_value:A}),N(A)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(Ze,{label:"Scope",value:I?"team":"mine",onChange:A=>z(A==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),pe=A=>s.jsx(tt,{delayDuration:300,children:s.jsxs("div",{className:H("shrink-0 px-1 flex items-center justify-between",A?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!A&&s.jsx(cs,{}),fe]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Ht,{label:"Search threads",onClick:()=>{ue("tasks_panel_search_opened"),q(!0),T(!0)},children:s.jsx(hn,{size:16})}),s.jsx(Ht,{label:"New thread",onClick:()=>{W()},children:s.jsx(_t,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[pe(!0),s.jsx(Dt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Bt,{threads:ee,groupBy:w,activeTaskId:j,onSelectTask:O,onArchiveTask:M,filters:E,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ce})}),F&&s.jsx(Pt,{open:$,onOpenChange:T})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[pe(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Dt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Bt,{threads:ee,groupBy:w,activeTaskId:j,onSelectTask:O,onArchiveTask:M,filters:E,hasMore:d,isFetchingMore:c,onLoadMore:()=>{m()},filtersActive:ce})})}),F&&s.jsx(Pt,{open:$,onOpenChange:T})]})}const $r=5,zr=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function Ns(){const t=k.c(3),{state:e}=xe();if(e==="collapsed"){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:$r}).map(Or)}),t[0]=r):r=t[0],r}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"}),s.jsx(oe,{className:"size-6 rounded-md"})]}),s.jsx(oe,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:zr.map(Tr)})]}),t[2]=l):l=t[2],l}function Tr(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(oe,{className:"size-5 rounded-full shrink-0"}),s.jsx(oe,{className:H("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(Mr)})]},e)}function Mr(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(oe,{className:"h-3 flex-1 rounded-sm"})},e)}function Or(t,e){return s.jsx(oe,{className:"size-10 rounded-lg mx-auto"},e)}function Dr(){const t=k.c(4),e=us();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(cr,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Vt,{children:s.jsx(D.Suspense,{fallback:s.jsx(Ns,{}),children:s.jsx(Ss,{})})}),t[1]=l):l=t[1];let r;return t[2]!==e?(r=s.jsx(ls,{children:s.jsx(xs,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=r):r=t[3],r}function Pr(t){const e=k.c(8),{onClose:n}=t,l=us();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(dr,{}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ns,{}),e[1]=i):i=e[1];let o;e[2]!==n?(o=s.jsx(Vt,{children:s.jsx(D.Suspense,{fallback:i,children:s.jsx(Ss,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(ls,{children:s.jsx(El,{sections:l,onClose:n,footer:r,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function _s(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Er=Ls({name:Bs().min(2,"Organization name is required")});function Rr(t){const e=k.c(41),{open:n,onOpenChange:l}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:Hs(Er),defaultValues:{name:""}},e[0]=r):r=e[0];const i=Us(r);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:Lr,onSuccess:Fr},e[1]=o):o=e[1];const a=Gs(o),d=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ul,{children:[s.jsx(fl,{children:"Create a new organization"}),s.jsx(hl,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let m;if(e[3]!==a||e[4]!==i){let N;e[6]!==a?(N=w=>a.mutateAsync(w),e[6]=a,e[7]=N):N=e[7],m=i.handleSubmit(N),e[3]=a,e[4]=i,e[5]=m}else m=e[5];let u;e[8]!==i.formState.isSubmitting?(u=N=>{const{field:w}=N;return s.jsxs(jl,{children:[s.jsx(vl,{children:"Organization Name"}),s.jsx(yl,{children:s.jsx(_l,{...w,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),s.jsx(Sl,{children:"The name of your company or organization"}),w.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",_s(w.value)]})]}),s.jsx(Nl,{})]})},e[8]=i.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==i.control||e[11]!==u?(f=s.jsx(gl,{control:i.control,name:"name",render:u}),e[10]=i.control,e[11]=u,e[12]=f):f=e[12];let x;e[13]!==d?(x=d&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:d}),e[13]=d,e[14]=x):x=e[14];let p;e[15]!==a||e[16]!==i?(p=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=p):p=e[17];let h;e[18]!==i.formState.isSubmitting||e[19]!==p?(h=s.jsx(dl,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=h):h=e[20];const g=!i.formState.isValid||i.formState.isSubmitting;let b;e[21]!==i.formState.isSubmitting?(b=i.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(il,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=b):b=e[22];let j;e[23]!==g||e[24]!==b?(j=s.jsx(ze,{type:"submit",variant:"default",disabled:g,children:b}),e[23]=g,e[24]=b,e[25]=j):j=e[25];let v;e[26]!==j||e[27]!==h?(v=s.jsxs(xl,{children:[h,j]}),e[26]=j,e[27]=h,e[28]=v):v=e[28];let y;e[29]!==v||e[30]!==m||e[31]!==f||e[32]!==x?(y=s.jsxs("form",{className:"space-y-6",onSubmit:m,autoComplete:"off",children:[f,x,v]}),e[29]=v,e[30]=m,e[31]=f,e[32]=x,e[33]=y):y=e[33];let _;e[34]!==i||e[35]!==y?(_=s.jsxs(ml,{children:[c,s.jsx(bl,{...i,children:y})]}),e[34]=i,e[35]=y,e[36]=_):_=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==_?(C=s.jsx(pl,{open:n,onOpenChange:l,children:_}),e[37]=l,e[38]=n,e[39]=_,e[40]=C):C=e[40],C}function Fr(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Lr(t){const e=_s(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await he.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function Br(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function ws(t){const e=k.c(13),{org:n,size:l}=t,r=l===void 0?"sm":l,i=r==="xs"?"size-5":"size-6",o=r==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=H(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:Br(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:H("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let m;return e[9]!==a||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:a,style:d,children:c}),e[9]=a,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function Hr(t){const e=k.c(24),{orgParam:n,onSelectOrg:l,onCreateOrg:r}=t,{data:i}=qs();let o;e[0]!==n?(o=(S,I)=>S.slug===n?-1:I.slug===n?1:S.name.localeCompare(I.name),e[0]=n,e[1]=o):o=e[1];const a=[...i??[]].sort(o),[d,c]=D.useState(""),m=d.toLowerCase(),u=m?a.filter(S=>S.name.toLowerCase().includes(m)||S.slug.toLowerCase().includes(m)):a;let f;e[2]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ms,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=f):f=e[2];let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=S=>c(S.target.value),e[3]=x):x=e[3];let p;e[4]!==d?(p=S=>S.key==="Escape"&&d&&c(""),e[4]=d,e[5]=p):p=e[5];let h;e[6]!==d||e[7]!==p?(h=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:x,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=h):h=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx($e,{size:16}),e[9]=g):g=e[9];let b;e[10]!==r?(b=s.jsx("button",{type:"button",onClick:r,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:g}),e[10]=r,e[11]=b):b=e[11];let j;e[12]!==h||e[13]!==b?(j=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[f,h,b]}),e[12]=h,e[13]=b,e[14]=j):j=e[14];const v="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",y=u.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let _;e[15]!==l||e[16]!==n?(_=S=>s.jsxs("button",{type:"button",onClick:()=>l(S.slug),className:H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",S.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(ws,{org:S,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:S.slug})]}),S.slug===n&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},S.id),e[15]=l,e[16]=n,e[17]=_):_=e[17];const C=u.map(_);let N;e[18]!==y||e[19]!==C?(N=s.jsxs("div",{className:v,children:[y,C]}),e[18]=y,e[19]=C,e[20]=N):N=e[20];let w;return e[21]!==N||e[22]!==j?(w=s.jsxs(s.Fragment,{children:[j,N]}),e[21]=N,e[22]=j,e[23]=w):w=e[23],w}function Ur(t){const e=k.c(22),{trigger:n,orgParam:l,align:r,side:i}=t,o=r===void 0?"start":r,a=i===void 0?"bottom":i,d=ae(),[c,m]=D.useState(!1),[u,f]=D.useState(!1);let x;e[0]!==n?(x=s.jsx(ge,{asChild:!0,children:n}),e[0]=n,e[1]=x):x=e[1];const p=String(c);let h;e[2]!==d?(h=C=>{m(!1),d({to:"/$org",params:{org:C}})},e[2]=d,e[3]=h):h=e[3];let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{m(!1),f(!0)},e[4]=g):g=e[4];let b;e[5]!==l||e[6]!==p||e[7]!==h?(b=s.jsx(Hr,{orgParam:l,onSelectOrg:h,onCreateOrg:g},p),e[5]=l,e[6]=p,e[7]=h,e[8]=b):b=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==b?(j=s.jsx(Pe,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:qr,onCloseAutoFocus:Gr,children:b}),e[9]=o,e[10]=a,e[11]=b,e[12]=j):j=e[12];let v;e[13]!==c||e[14]!==x||e[15]!==j?(v=s.jsxs(De,{open:c,onOpenChange:m,children:[x,j]}),e[13]=c,e[14]=x,e[15]=j,e[16]=v):v=e[16];let y;e[17]!==u?(y=s.jsx(Rr,{open:u,onOpenChange:f}),e[17]=u,e[18]=y):y=e[18];let _;return e[19]!==y||e[20]!==v?(_=s.jsxs(s.Fragment,{children:[v,y]}),e[19]=y,e[20]=v,e[21]=_):_=e[21],_}function Gr(t){return t.preventDefault()}function qr(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Wr(t){const e=k.c(21),{value:n,onChange:l,placeholder:r,onKeyDown:i,className:o,isSearching:a,disabled:d}=t,c=r===void 0?"Search...":r;let m;e[0]!==o?(m=H("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=H("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let x;e[4]!==a?(x=a?s.jsx(Wt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ms,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=x):x=e[5];let p;e[6]!==l?(p=j=>l(j.target.value),e[6]=l,e[7]=p):p=e[7];let h;e[8]!==d||e[9]!==i||e[10]!==c||e[11]!==p||e[12]!==n?(h=s.jsx("input",{type:"text",value:n,onChange:p,onKeyDown:i,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=i,e[10]=c,e[11]=p,e[12]=n,e[13]=h):h=e[13];let g;e[14]!==f||e[15]!==x||e[16]!==h?(g=s.jsxs("label",{className:f,children:[x,h]}),e[14]=f,e[15]=x,e[16]=h,e[17]=g):g=e[17];let b;return e[18]!==m||e[19]!==g?(b=s.jsx("div",{className:m,children:g}),e[18]=m,e[19]=g,e[20]=b):b=e[20],b}const Vr="Select an existing agent";function Kr(t){const e=k.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(je,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ve,{side:"right",sideOffset:8,children:Vr}),e[2]=r):r=e[2];let i;return e[3]!==l?(i=s.jsxs(ye,{defaultOpen:!0,delayDuration:0,children:[l,r]}),e[3]=l,e[4]=i):i=e[4],i}function Xr(t){const e=ae(),{create:n}=os(),{locator:l}=se(),r=at({strict:!1}),i=Ve({strict:!1});return async o=>{const a=crypto.randomUUID(),d=o===i.virtualmcpid?Bn(t,l,r.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function Ut(t){const e=k.c(20),{agent:n,selected:l,onClick:r}=t,i=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==i?(o=H("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(Te,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==l?(u=l&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==r||e[15]!==o||e[16]!==a||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:r,className:o,children:[a,m,u]}),e[14]=r,e[15]=o,e[16]=a,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function Qr(t){const e=k.c(24),{onClose:n,onSelectAgent:l,selectedAgentId:r}=t,[i,o]=D.useState(""),a=ht(),d=a??[],{org:c}=se(),{data:m}=he.useSession(),u=m?.user?.id??"anon",f=kn(a),x=In(),p=Xr(c.slug),h=Mn(a),g=i.toLowerCase(),b=d.filter(Jr).filter(P=>!h.has(P.id)).filter(Yr).filter(P=>!i||P.title.toLowerCase().includes(g)),j=Ge(c.id),v=!i||j.title.toLowerCase().includes(g),y=!!(l&&v);let _;e[0]!==n||e[1]!==l?(_=()=>{l?.(null),n(),o("")},e[0]=n,e[1]=l,e[2]=_):_=e[2];const C=_,N=P=>{if(l){l(P.id),n(),o("");return}An({orgId:c.id,userId:u},P.id,f),x(),n(),o(""),p(P.id)},w="flex flex-col max-h-[min(640px,80dvh)]";let S;e[3]!==i?(S=s.jsx(Wr,{value:i,onChange:o,placeholder:"Search agents..."}),e[3]=i,e[4]=S):S=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-1",z=l&&v&&j&&s.jsx(Ut,{agent:j,selected:!r||r===j.id,onClick:C}),$=b.map(P=>s.jsx(Ut,{agent:P,selected:l?r===P.id:void 0,onClick:()=>N(P)},P.id));let T;e[5]!==y||e[6]!==i||e[7]!==b.length?(T=b.length===0&&!y&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:i?"No agents found":"No agents yet"}),e[5]=y,e[6]=i,e[7]=b.length,e[8]=T):T=e[8];let F;e[9]!==z||e[10]!==$||e[11]!==T?(F=s.jsxs("div",{className:I,children:[z,$,T]}),e[9]=z,e[10]=$,e[11]=T,e[12]=F):F=e[12];let q;e[13]!==c.slug?(q={org:c.slug},e[13]=c.slug,e[14]=q):q=e[14];let E;e[15]!==n?(E=()=>n(),e[15]=n,e[16]=E):E=e[16];let L;e[17]!==E||e[18]!==q?(L=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Kt,{to:"/$org/settings/agents",params:q,onClick:E,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[17]=E,e[18]=q,e[19]=L):L=e[19];let R;return e[20]!==L||e[21]!==S||e[22]!==F?(R=s.jsxs("div",{className:w,children:[S,F,L]}),e[20]=L,e[21]=S,e[22]=F,e[23]=R):R=e[23],R}function Yr(t){return!Sn(t.id)}function Jr(t){return!ss(t.id)}function Zr(t){const e=k.c(23);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:r,onSelectAgent:i,selectedAgentId:o,side:a,align:d}=n,c=l===void 0?!1:l,m=a===void 0?"right":a,u=d===void 0?"start":d,[f,x]=D.useState(!1),p=mt(),{setOpenMobile:h}=xe(),g=Cn(),b=g?"border border-border":void 0;let j;e[2]!==g?(j=S=>g?s.jsx(Kr,{children:S}):S,e[2]=g,e[3]=j):j=e[3];const v=j;let y;e[4]!==p||e[5]!==h?(y=()=>{x(!1),p&&h(!1)},e[4]=p,e[5]=h,e[6]=y):y=e[6];const _=y;let C;e[7]!==_||e[8]!==i||e[9]!==f||e[10]!==o?(C=f&&s.jsx(D.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(oe,{className:"h-4 w-24"})}),children:s.jsx(Qr,{onClose:_,onSelectAgent:i,selectedAgentId:o})}),e[7]=_,e[8]=i,e[9]=f,e[10]=o,e[11]=C):C=e[11];const N=C;let w;return e[12]!==u||e[13]!==c||e[14]!==b||e[15]!==g||e[16]!==p||e[17]!==f||e[18]!==N||e[19]!==m||e[20]!==r||e[21]!==v?(w=s.jsx(s.Fragment,{children:p?s.jsxs(s.Fragment,{children:[r?s.jsx("button",{type:"button",onClick:()=>x(!0),className:"contents",children:r}):c?v(s.jsx(be,{"aria-label":"Browse agents",className:H(b),onClick:()=>{ue("agent_browser_opened",{surface:"mobile_drawer"}),x(!0)},children:s.jsx($e,{className:"size-4"})})):s.jsx(G,{children:v(s.jsxs(X,{tooltip:g?void 0:"Browse agents",className:H(b),onClick:()=>{ue("agent_browser_opened",{surface:"mobile_drawer"}),x(!0)},children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(Jt,{open:f,onOpenChange:x,direction:"bottom",children:s.jsxs(Zt,{className:"max-h-[85dvh] p-0",children:[s.jsx(es,{className:"sr-only",children:"Browse agents"}),N]})})]}):s.jsxs(De,{open:f,onOpenChange:S=>{S&&!f&&ue("agent_browser_opened",{surface:"desktop_popover"}),x(S)},children:[r?s.jsx(ge,{asChild:!0,children:r}):c?v(s.jsx(ge,{asChild:!0,children:s.jsx(be,{"aria-label":"Browse agents",className:H(b),children:s.jsx($e,{className:"size-4"})})})):s.jsx(G,{children:v(s.jsx(ge,{asChild:!0,children:s.jsxs(X,{tooltip:g?void 0:"Browse agents",className:H(b),children:[s.jsx($e,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Pe,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:N})]})}),e[12]=u,e[13]=c,e[14]=b,e[15]=g,e[16]=p,e[17]=f,e[18]=N,e[19]=m,e[20]=r,e[21]=v,e[22]=w):w=e[22],w}const Cs="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-1.5 py-1 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function ei(t){const e=k.c(19),{agentId:n,onOpenHome:l,onPick:r}=t,i=xt(n),o=i?.title??"Decopilot",a=`Open ${o} home`,d=i?.icon??null;let c;e[0]!==d||e[1]!==o?(c=s.jsx(Te,{icon:d,name:o,size:"2xs"}),e[0]=d,e[1]=o,e[2]=c):c=e[2];let m;e[3]!==l||e[4]!==a||e[5]!==c?(m=s.jsx("button",{type:"button",onClick:l,"aria-label":a,className:"wco-no-drag flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:c}),e[3]=l,e[4]=a,e[5]=c,e[6]=m):m=e[6];let u;e[7]!==o?(u=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:o}),e[7]=o,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(bt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=f):f=e[9];let x;e[10]!==u?(x=s.jsxs("button",{type:"button",className:Cs,children:[u,f]}),e[10]=u,e[11]=x):x=e[11];let p;e[12]!==n||e[13]!==r||e[14]!==x?(p=s.jsx(Zr,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=p):p=e[15];let h;return e[16]!==m||e[17]!==p?(h=s.jsxs("div",{className:"flex items-center gap-0.5",children:[m,p]}),e[16]=m,e[17]=p,e[18]=h):h=e[18],h}function Gt(){const t=k.c(33),{org:e}=se(),{state:n}=xe(),l=n==="collapsed",r=ae();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},t[0]=i):i=t[0];const o=at(i);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const d=Ve(a),{threads:c}=gt(),{setTaskId:m,createNewTask:u}=pt();let f;t[2]!==e.id?(f=Ge(e.id),t[2]=e.id,t[3]=f):f=t[3];const x=f.id,p=o.taskId?d.virtualmcpid??x:x;let h;t[4]!==u||t[5]!==x||t[6]!==r||t[7]!==e.slug||t[8]!==m||t[9]!==c?(h=I=>{if(!I||I===x){r({to:"/$org",params:{org:e.slug}});return}const z=c.find($=>!$.hidden&&$.virtual_mcp_id===I&&$.title==="New chat"&&(!$.status||$.status==="in_progress"));z?m(z.id,I):u(I)},t[4]=u,t[5]=x,t[6]=r,t[7]=e.slug,t[8]=m,t[9]=c,t[10]=h):h=t[10];const g=h;let b;t[11]!==e.slug?(b={org:e.slug},t[11]=e.slug,t[12]=b):b=t[12];let j;t[13]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Z.Logo,{}),t[13]=j):j=t[13];let v;t[14]!==b?(v=s.jsx(Kt,{to:"/$org",params:b,"aria-label":"Organization home",title:"Home",className:"wco-no-drag flex items-center shrink-0 cursor-pointer rounded-md px-1 hover:bg-accent/60 transition-colors",children:j}),t[14]=b,t[15]=v):v=t[15];let y;t[16]!==e||t[17]!==l?(y=!l&&s.jsx(Ur,{orgParam:e.slug,trigger:s.jsxs("button",{type:"button",className:Cs,children:[s.jsx(ws,{org:e,size:"xs"}),s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:e.name}),s.jsx(bt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"})]})}),t[16]=e,t[17]=l,t[18]=y):y=t[18];let _;t[19]!==v||t[20]!==y?(_=s.jsxs(kt,{className:"gap-0.5",children:[v,y]}),t[19]=v,t[20]=y,t[21]=_):_=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("span",{className:"h-4 w-24 rounded bg-muted animate-pulse"}),t[22]=C):C=t[22];let N;t[23]!==p||t[24]!==g?(N=()=>g(p),t[23]=p,t[24]=g,t[25]=N):N=t[25];let w;t[26]!==p||t[27]!==g||t[28]!==N?(w=s.jsx(kt,{children:s.jsx(D.Suspense,{fallback:C,children:s.jsx(ei,{agentId:p,onOpenHome:N,onPick:g})})}),t[26]=p,t[27]=g,t[28]=N,t[29]=w):w=t[29];let S;return t[30]!==w||t[31]!==_?(S=s.jsx(al,{className:"wco-no-drag",children:s.jsxs(cl,{className:"flex-nowrap",children:[_,w]})}),t[30]=w,t[31]=_,t[32]=S):S=t[32],S}const ti="sidebar.open";function si(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Vs,{}),t[0]=e):e=t[0],e}function va(){const t=k.c(24),e=mt(),[n,l]=We(ti,!1),{width:r,wrapperRef:i,onStartResize:o,resetWidth:a}=Il();let d;t[0]!==e?(d=e?s.jsxs(Z.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[s.jsx(cs,{}),s.jsx(Gt,{}),s.jsx(it,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(Z.TogglesSlot,{}),s.jsx(Z.TabsSlot,{className:"min-w-0 justify-self-end"})]}),s.jsx(Z.CenterSlot,{}),s.jsx(Z.RightSlot,{})]}):s.jsxs(Z.Header,{children:[s.jsx(Z.LeftColumn,{children:s.jsx(Gt,{})}),s.jsx(Z.CenterSlot,{}),s.jsxs(Z.RightColumn,{children:[s.jsxs("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:[s.jsx(Z.TogglesSlot,{}),s.jsx(Z.TabsSlot,{})]}),s.jsx(Z.RightSlot,{})]})]}),t[0]=e,t[1]=d):d=t[1];const c=`${r}px`;let m;t[2]!==c?(m={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},t[2]=c,t[3]=m):m=t[3];const u=m;let f;t[4]!==e||t[5]!==o||t[6]!==a?(f=!e&&s.jsxs(s.Fragment,{children:[s.jsx(Dr,{}),s.jsx(wl,{onPointerDown:o,onDoubleClick:a})]}),t[4]=e,t[5]=o,t[6]=a,t[7]=f):f=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[8]=x):x=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Qs,{className:"flex flex-col",style:x,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(D.Suspense,{fallback:s.jsx(si,{}),children:s.jsx(Ws,{})})})})}),t[9]=p):p=t[9];let h;t[10]!==u||t[11]!==f||t[12]!==i?(h=s.jsxs(Ys,{ref:i,className:"flex-1 bg-sidebar relative min-h-0",style:u,children:[f,p]}),t[10]=u,t[11]=f,t[12]=i,t[13]=h):h=t[13];let g;t[14]!==e?(g=e&&s.jsx(ll,{renderSidebar:ni}),t[14]=e,t[15]=g):g=t[15];let b;t[16]!==d||t[17]!==h||t[18]!==g?(b=s.jsx(ol,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[d,h,g]})}),t[16]=d,t[17]=h,t[18]=g,t[19]=b):b=t[19];let j;return t[20]!==l||t[21]!==n||t[22]!==b?(j=s.jsx(Wn,{children:s.jsx(Z.Provider,{children:s.jsx(Js,{open:n,onOpenChange:l,children:b})})}),t[20]=l,t[21]=n,t[22]=b,t[23]=j):j=t[23],j}function ni(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(Pr,{onClose:e})})})}export{va as default};
|