decocms 4.138.2 → 4.138.4
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-WA_QPWsK.js → AlertCircle-BBllTrHe.js} +1 -1
- package/dist/client/assets/{AreaChart-Byrj_i-c.js → AreaChart-DHK0rjk8.js} +1 -1
- package/dist/client/assets/{ArrowUp-DCbwO8JD.js → ArrowUp-BUEVb5I_.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-BQDBh7Ff.js → ArrowUpRight-IHIgdfCZ.js} +1 -1
- package/dist/client/assets/{Check-BA4woPGX.js → Check-Ct_NChVn.js} +1 -1
- package/dist/client/assets/{CheckCircle-CXrIThfj.js → CheckCircle-Cy9BRXiR.js} +1 -1
- package/dist/client/assets/{ChevronDown-CBaUlfZV.js → ChevronDown-CR3wfhWO.js} +1 -1
- package/dist/client/assets/{ChevronRight-K8rB4H3M.js → ChevronRight-C2RSvtLS.js} +1 -1
- package/dist/client/assets/{ChevronUp-V2cJh30A.js → ChevronUp-C-7bgvVR.js} +1 -1
- package/dist/client/assets/{Copy01-C8kg6rKb.js → Copy01-CdDTr3uw.js} +1 -1
- package/dist/client/assets/{DotsVertical-DFe7UmmP.js → DotsVertical-U1FbyAzw.js} +1 -1
- package/dist/client/assets/{Eye-B9yPfvFW.js → Eye-CcVZxcnG.js} +1 -1
- package/dist/client/assets/{FilterLines-Ys59iosV.js → FilterLines-BxnZ1KzH.js} +1 -1
- package/dist/client/assets/{HardDrive-doLLdIdz.js → HardDrive-upWxzmGu.js} +1 -1
- package/dist/client/assets/{Key01-CqEmKljb.js → Key01-BoW9uT2J.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DKH6XJao.js → LayoutLeft-BiN9-fho.js} +1 -1
- package/dist/client/assets/{LinkExternal01-JfkCugVU.js → LinkExternal01-CqnVPS77.js} +1 -1
- package/dist/client/assets/{LogOut01-BqCNY6bW.js → LogOut01-ClnJyXhu.js} +1 -1
- package/dist/client/assets/{Monitor01-CciDjlcp.js → Monitor01-CdDOg_uj.js} +1 -1
- package/dist/client/assets/{Palette-DmVJqf86.js → Palette-Wku1qvlz.js} +1 -1
- package/dist/client/assets/{Play-BdfpNe18.js → Play-DUwBMiXI.js} +1 -1
- package/dist/client/assets/{Plus-B6RgoGgu.js → Plus-DPfvFAkj.js} +1 -1
- package/dist/client/assets/{SearchLg-BaebpvKI.js → SearchLg-B3YNb2nf.js} +1 -1
- package/dist/client/assets/{SearchMd-Tflpro6A.js → SearchMd-CuzgEwBl.js} +1 -1
- package/dist/client/assets/{Settings02-BDvKUljA.js → Settings02-B6VIaOlc.js} +1 -1
- package/dist/client/assets/{Shield01-kOsMD7Fr.js → Shield01-DwY_U8R4.js} +1 -1
- package/dist/client/assets/{Star01-B11D2TqU.js → Star01-BPhG10GY.js} +1 -1
- package/dist/client/assets/{Stars01-DfWb5ncU.js → Stars01-DJgX_oic.js} +1 -1
- package/dist/client/assets/{Stars02-BrL2GX9d.js → Stars02-ByLe0u4w.js} +1 -1
- package/dist/client/assets/{Sun-DUqv_KS8.js → Sun-64VgpyGr.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CtG7ZPO9.js → SwitchHorizontal01-Cof-ZB-k.js} +1 -1
- package/dist/client/assets/{Tool01-DNCBoiA0.js → Tool01-C1XKNeuo.js} +1 -1
- package/dist/client/assets/{Tool02-C5VJtKqh.js → Tool02-v-2epT0P.js} +1 -1
- package/dist/client/assets/{Trash01-B_oyI8X6.js → Trash01-B0deCLr8.js} +1 -1
- package/dist/client/assets/{TrendUp01-a_IQVh94.js → TrendUp01-u1H2VBmD.js} +1 -1
- package/dist/client/assets/{Upload01-Buwo0VZX.js → Upload01-DibTmn4_.js} +1 -1
- package/dist/client/assets/{User01-DHc0sJcJ.js → User01-B8J_nAGm.js} +1 -1
- package/dist/client/assets/{Users01-DXBi3gCi.js → Users01-Zqk_6Owa.js} +1 -1
- package/dist/client/assets/{Users03-D20Fpa89.js → Users03-CfBavZ2E.js} +1 -1
- package/dist/client/assets/{X-seiS6qu9.js → X-CV5ZV-eV.js} +1 -1
- package/dist/client/assets/{XCircle-QAJ9m3Pn.js → XCircle-DSKG2tcD.js} +1 -1
- package/dist/client/assets/{XClose-CH93pLi0.js → XClose-DRKh38fQ.js} +1 -1
- package/dist/client/assets/{Zap-B0pQDAS4.js → Zap-DS3KtkRB.js} +1 -1
- package/dist/client/assets/{ZapSquare-Yhg62NiL.js → ZapSquare-ios7lu4-.js} +1 -1
- package/dist/client/assets/{access-gate-De8JidHO.js → access-gate-040WEDtH.js} +1 -1
- package/dist/client/assets/{add-section-modal-CXT8QoUM.js → add-section-modal-DNJ_PmVz.js} +1 -1
- package/dist/client/assets/{agent-icon-DaEkSwM4.js → agent-icon-CzuxtOUI.js} +1 -1
- package/dist/client/assets/{agents-list-CKlfSu_H.js → agents-list-CmMPzCNJ.js} +1 -1
- package/dist/client/assets/{ai-providers-CZel0bSJ.js → ai-providers-Bsnhujf4.js} +1 -1
- package/dist/client/assets/{alert-DbAmXNF_.js → alert-YZISy85u.js} +1 -1
- package/dist/client/assets/{alert-dialog-D_zXbEOj.js → alert-dialog-B8xgKIeA.js} +1 -1
- package/dist/client/assets/{app-editor-BSsv1x3K.js → app-editor-VaeO4OR6.js} +1 -1
- package/dist/client/assets/{auth-DPMTPKsa.js → auth-D1q79xXr.js} +1 -1
- package/dist/client/assets/{auth-catchall-DTGYckKy.js → auth-catchall-DJMNGe2L.js} +1 -1
- package/dist/client/assets/{auth-entry-B90O2uwt.js → auth-entry-BJ1Yo5kJ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-0THcTSrs.js → auth-split-layout-D6YdQ6wX.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BcHi9Lpg.js → authenticate-and-persist-oauth-CZOWMXxQ.js} +1 -1
- package/dist/client/assets/{automation-list-row-gFP8Kvn4.js → automation-list-row-B3h59H4q.js} +1 -1
- package/dist/client/assets/{automation-runs-fAOh5arl.js → automation-runs-BECS2yGU.js} +1 -1
- package/dist/client/assets/{automations-vKPHzbIr.js → automations-COqU3VEB.js} +1 -1
- package/dist/client/assets/{avatar-D9T5dDHP.js → avatar-DpuE-1CD.js} +1 -1
- package/dist/client/assets/{badge-BV0oVP9T.js → badge-B2uKUDRn.js} +1 -1
- package/dist/client/assets/{block-document-DUF-qO6v.js → block-document-OcBrpG8G.js} +1 -1
- package/dist/client/assets/{brand-context-Ch7yMPZ0.js → brand-context-D3Tq-3Gl.js} +1 -1
- package/dist/client/assets/{buckets-QRGeywXg.js → buckets-DxD6FfMn.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-D12M2Wx_.js → bulk-category-panel-9wn3qpv6.js} +1 -1
- package/dist/client/assets/{calendar-BCtkk2PF.js → calendar-BsD3FqfR.js} +1 -1
- package/dist/client/assets/{capability-load-error-DOK9LPUr.js → capability-load-error-ZS-gY1MI.js} +1 -1
- package/dist/client/assets/{card-BfVg8xHZ.js → card-1vQZoBny.js} +1 -1
- package/dist/client/assets/{category-editor-BJReQus8.js → category-editor-Dv6pQXQN.js} +1 -1
- package/dist/client/assets/{chat-context-DgliKNg4.js → chat-context-DM2rtZVy.js} +1 -1
- package/dist/client/assets/{checkbox-BIIXOd5y.js → checkbox-BNzBw1Hh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BruJYlUc.js → cli-auth-success-D2_ZVvYC.js} +1 -1
- package/dist/client/assets/{collection-detail-YTHHLn_-.js → collection-detail-BWrfkxnv.js} +1 -1
- package/dist/client/assets/{collection-display-button-CbKDX6K7.js → collection-display-button-_OcKrMbN.js} +1 -1
- package/dist/client/assets/{collection-search-CfVuPGVA.js → collection-search-CNNeJoiH.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CzICnBT5.js → collection-table-wrapper-B7hhMGIH.js} +1 -1
- package/dist/client/assets/{collection-tabs-BXUJTY9k.js → collection-tabs-CfndR0Se.js} +1 -1
- package/dist/client/assets/{command-D3W3Lf3Y.js → command-Be_dMqEu.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-B8WLRNH6.js → commerce-onboarding-y2Vj_tZx.js} +1 -1
- package/dist/client/assets/{companions-core-ChGkwUDQ.js → companions-core-DVqpw8qz.js} +1 -1
- package/dist/client/assets/{connect-B8w1OidZ.js → connect-DbHalrNB.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-YRn8ACQW.js → connect-desktop-dialog-BCoToX8Q.js} +1 -1
- package/dist/client/assets/{connection-DmR-DVty.js → connection-BYimDEcb.js} +1 -1
- package/dist/client/assets/{connection-card-Di9u0v_-.js → connection-card-BEJW1rwe.js} +1 -1
- package/dist/client/assets/{connection-detail-CjBQ6Djr.js → connection-detail-BlOpFB4N.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-GYelocJ4.js → connection-form-helpers-CgyODQxP.js} +1 -1
- package/dist/client/assets/{connections-Vx8So-O-.js → connections-C9Jk8Z9J.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-uJckdjtc.js → decopilot-sse-pool-7pMr15n7.js} +1 -1
- package/dist/client/assets/{dialog-plvp42Da.js → dialog-BJx9sPYv.js} +1 -1
- package/dist/client/assets/{domain-settings-C3NOaFLB.js → domain-settings-DigEHmeW.js} +1 -1
- package/dist/client/assets/{drawer-B-nDmC0A.js → drawer-CVrBSnER.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BjUn4OUh.js → dropdown-menu-Bop5mZjh.js} +1 -1
- package/dist/client/assets/{empty-state-CwiIRuxk.js → empty-state-BKaQ7F-l.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CM2ISh7r.js → extract-connection-data-Dzhx2Mql.js} +1 -1
- package/dist/client/assets/{file-explorer-MeON5H08.js → file-explorer-Bvij82hb.js} +1 -1
- package/dist/client/assets/{form-BxoJZ5LT.js → form-CGPVzkNR.js} +1 -1
- package/dist/client/assets/{general-CHm9lMnd.js → general-BpL4lWry.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Czlt_w3i.js → github-repo-picker-JLhorU9Z.js} +1 -1
- package/dist/client/assets/{hooks-BJWPttlr.js → hooks-135eRjNt.js} +1 -1
- package/dist/client/assets/{index-BwUmwQ38.js → index--AoAhzMY.js} +1 -1
- package/dist/client/assets/{index-DXo7FPIY.js → index-2BGUnqaX.js} +1 -1
- package/dist/client/assets/{index-Cj3ADKiL.js → index-B95rHUNh.js} +1 -1
- package/dist/client/assets/{index-p9tU4XKa.js → index-BHjuNivc.js} +1 -1
- package/dist/client/assets/{index-CsFFX4oj.js → index-BNKyw93_.js} +1 -1
- package/dist/client/assets/{index-DEohtFix.js → index-BSOYeGGV.js} +5 -5
- package/dist/client/assets/{index-Dyz2p3Cr.js → index-ChXlA0Iu.js} +5 -5
- package/dist/client/assets/{index-CStqsJ65.js → index-DLad0I0E.js} +1 -1
- package/dist/client/assets/index-DuoaxOEx.js +8 -0
- package/dist/client/assets/{index-DUt7LhbD.js → index-gNBOz7Li.js} +1 -1
- package/dist/client/assets/{index-B8axWqPZ.js → index-qzy4XRmv.js} +1 -1
- package/dist/client/assets/{index-redirect-DEVVD5BU.js → index-redirect-zcEdSmyz.js} +1 -1
- package/dist/client/assets/{input-7PXnbAAh.js → input-BTXqaCNp.js} +1 -1
- package/dist/client/assets/{integration-icon-DFmq7sHm.js → integration-icon-CK0Sg0Nk.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-RdEhv9i1.js → invite-member-dialog-BGzH27oW.js} +1 -1
- package/dist/client/assets/{label-Bqr4BUzi.js → label-DGZN_wrN.js} +1 -1
- package/dist/client/assets/{layout-BwzeNJYT.js → layout-D1MRvddH.js} +1 -1
- package/dist/client/assets/{login-B6D1sj-w.js → login-BR9ihn_z.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BFxv50xm.js → mcp-oauth-Bnvg01NW.js} +1 -1
- package/dist/client/assets/{members-CiQOd3uM.js → members-CoNCd7gC.js} +1 -1
- package/dist/client/assets/{monaco-editor-DXRATeHL.js → monaco-editor-D4lQAPvr.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BRoqEKAO.js → monitoring-stats-row-BV37wWyw.js} +1 -1
- package/dist/client/assets/{multi-select-B4jyc4IN.js → multi-select-e9vu0z4z.js} +1 -1
- package/dist/client/assets/{oauth-callback-ZqiNeOsQ.js → oauth-callback-BBw6egUN.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BXu5YVYc.js → oauth-callback-ai-provider-DGMGxRAt.js} +1 -1
- package/dist/client/assets/{onboarding-Jo1B0Bun.js → onboarding-B1rTvMaI.js} +1 -1
- package/dist/client/assets/{org-install-DZfOOYW6.js → org-install-DoiKnPZ0.js} +1 -1
- package/dist/client/assets/{org-layout-Cqu4FrUW.js → org-layout-BGaQjyZI.js} +1 -1
- package/dist/client/assets/{organization-choice-CZ1Rj98f.js → organization-choice-CvelUHYA.js} +1 -1
- package/dist/client/assets/{orgs-DrfNY_qW.js → orgs-BfCFtK0d.js} +1 -1
- package/dist/client/assets/{page-seo-form-LA2ttZgO.js → page-seo-form-Cu2vbduF.js} +1 -1
- package/dist/client/assets/{popover-Bq1Pw8YU.js → popover-Dwt8f7g1.js} +1 -1
- package/dist/client/assets/{post-editor-B9MsDDRR.js → post-editor-CDeUDgkU.js} +1 -1
- package/dist/client/assets/{primitives-BPV9WZzR.js → primitives-D7Dy-Oy5.js} +1 -1
- package/dist/client/assets/{profile-CEECGBqo.js → profile-SKlSbr8-.js} +1 -1
- package/dist/client/assets/project-app-view-CvugXSG-.js +1 -0
- package/dist/client/assets/record-editor-Bsqm8cDC.js +1 -0
- package/dist/client/assets/{redirect-editor-QnOv-o3P.js → redirect-editor-CwFkEjT4.js} +1 -1
- package/dist/client/assets/registry-h5f1UQIA.js +2 -0
- package/dist/client/assets/{registry-layout-BnjqmPwD.js → registry-layout-BpVgqO4D.js} +1 -1
- package/dist/client/assets/{reports-CDJKAaps.js → reports-Cc0tUaRQ.js} +1 -1
- package/dist/client/assets/{require-capability-9Ny3lSYN.js → require-capability-CCvB4O3U.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C8W70F8o.js → required-auth-layout-UEM1qsCw.js} +1 -1
- package/dist/client/assets/{reset-password-oCBjoIjP.js → reset-password-BBu-MWHI.js} +1 -1
- package/dist/client/assets/{roles-D4OySsm6.js → roles-CDE_4dyo.js} +1 -1
- package/dist/client/assets/{search-input-x2WAiYBM.js → search-input-CzcTlJPx.js} +1 -1
- package/dist/client/assets/{secrets-D1BmKjtd.js → secrets-CSijxgFX.js} +1 -1
- package/dist/client/assets/{sections-editor-B2WlMdcT.js → sections-editor-ChFAvsUD.js} +1 -1
- package/dist/client/assets/{select-BNWH83Nl.js → select-CKYgLfAy.js} +1 -1
- package/dist/client/assets/{select-model-CB-cz81z.js → select-model-Bi55gDsM.js} +1 -1
- package/dist/client/assets/{self-tool-result-yeZkFYJt.js → self-tool-result-BDh5-zrr.js} +1 -1
- package/dist/client/assets/{seo-editor-Dv3WV5OL.js → seo-editor-aqs-dYr7.js} +1 -1
- package/dist/client/assets/{settings-layout-DwoY8X8Q.js → settings-layout-rnkZ2jNo.js} +1 -1
- package/dist/client/assets/{settings-section-BtKVQlE5.js → settings-section-CC91eNGa.js} +1 -1
- package/dist/client/assets/{shell-controls-Dsiendjo.js → shell-controls-Ced1mCfA.js} +1 -1
- package/dist/client/assets/{shell-layout-DauV9Fpz.js → shell-layout-W8J_qXai.js} +1 -1
- package/dist/client/assets/{sidebar-D0PhTSZr.js → sidebar-DIZLQbFD.js} +1 -1
- package/dist/client/assets/{skeleton-CXnjiWJf.js → skeleton-DwrkkCJE.js} +1 -1
- package/dist/client/assets/{sso-PBQCmwiS.js → sso-BK5grnxf.js} +1 -1
- package/dist/client/assets/{store-BLjsb3Sl.js → store-DMNJqXqB.js} +1 -1
- package/dist/client/assets/store-registry-CQg3tgBj.js +2 -0
- package/dist/client/assets/{studio-tools-Cw5xjEzL.js → studio-tools-CipjBiIV.js} +1 -1
- package/dist/client/assets/{switch-w9ObaaZI.js → switch-BkSh8L7_.js} +1 -1
- package/dist/client/assets/{tab-id-g3zrWObq.js → tab-id-C2nsOpbV.js} +1 -1
- package/dist/client/assets/{table-ndRCEoiP.js → table-BJpdnHpF.js} +1 -1
- package/dist/client/assets/{tabs-DPqttUiF.js → tabs-CMEvtetG.js} +1 -1
- package/dist/client/assets/{textarea-BtWh1EgY.js → textarea-B70gC_95.js} +1 -1
- package/dist/client/assets/{toggle-group-CLMfOH5_.js → toggle-group-CP74cK_y.js} +1 -1
- package/dist/client/assets/{toolbar-BIr_P5og.js → toolbar-Bus0rNeb.js} +1 -1
- package/dist/client/assets/{tooltip-BHWtFL93.js → tooltip-D5EW7gd_.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DahOLE-X.js → use-ai-providers-Dsp-LfPy.js} +1 -1
- package/dist/client/assets/{use-api-keys-DlWNhjSd.js → use-api-keys-BysFIxdG.js} +1 -1
- package/dist/client/assets/{use-automations-DemQmKI_.js → use-automations-Bn6aJhLB.js} +1 -1
- package/dist/client/assets/{use-autosave-U55d8eYW.js → use-autosave-BXx94QSz.js} +1 -1
- package/dist/client/assets/{use-capability-CunLOvW0.js → use-capability-CMVnJJjO.js} +1 -1
- package/dist/client/assets/{use-clock-tick-ljYvSj51.js → use-clock-tick-Br5amqLh.js} +1 -1
- package/dist/client/assets/{use-connection-BQ-kW5DV.js → use-connection-Douma6Mr.js} +1 -1
- package/dist/client/assets/{use-copy-DpQdKm8L.js → use-copy-UGxYBnPf.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-D1ChkcQZ.js → use-create-virtual-mcp-DanfhdbT.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DlG6ZU9a.js → use-debounced-autosave-uGSNqF1G.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C9PP1Rm3.js → use-debounced-value-OUuNFvqh.js} +1 -1
- package/dist/client/assets/use-deco-credits-Dz4iv8Ut.js +1 -0
- package/dist/client/assets/{use-decopilot-events-Bcy_VyX3.js → use-decopilot-events-DNxbMVCK.js} +1 -1
- package/dist/client/assets/{use-delete-connection-o-kUkfE1.js → use-delete-connection-DidmNY8O.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DZQVOkh7.js → use-deployment-admin-CSl3s9TZ.js} +1 -1
- package/dist/client/assets/{use-file-configs-BXoPqHBK.js → use-file-configs-5BbfV0Gh.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CZwqTscI.js → use-infinite-scroll-D74ddxHL.js} +1 -1
- package/dist/client/assets/{use-join-requests-BUDuWPLk.js → use-join-requests-BJ8fY9pT.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DAUnUEht.js → use-mcp-auth-status-C3ARB9cR.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BV3k-RTW.js → use-mcp-client-BIGi53DE.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CcSkqujQ.js → use-mcp-tools-D85ErEK8.js} +1 -1
- package/dist/client/assets/{use-members-CirDo50L.js → use-members-COCUX69q.js} +1 -1
- package/dist/client/assets/{use-mobile-BIU-83NO.js → use-mobile-BF041Jk3.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-UedncRA1.js → use-navigate-to-agent-gdIH5sbn.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-sisbRYqk.js → use-org-auth-client-Bda61gMH.js} +1 -1
- package/dist/client/assets/{use-org-sso-BBPHvQPC.js → use-org-sso-2aySVQ22.js} +1 -1
- package/dist/client/assets/{use-organization-roles-Ds3CxcoK.js → use-organization-roles-BOTlDkqD.js} +1 -1
- package/dist/client/assets/{use-organization-settings-OiqDtFqS.js → use-organization-settings-C6OoYz8K.js} +1 -1
- package/dist/client/assets/{use-registry-app-WYZ8nQ6U.js → use-registry-app-HaN8MQXZ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-PXknb-ki.js → use-registry-connections-CtAZt_GA.js} +1 -1
- package/dist/client/assets/{use-secrets-WCM8V-ST.js → use-secrets-29wWvPab.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CzclLlkS.js → use-status-sounds-CPnzamho.js} +1 -1
- package/dist/client/assets/{use-view-mode-DJyWZCWx.js → use-view-mode-DwwFmhrj.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-PtzzNKLp.js → use-virtual-mcp-BJJPsaH-.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DcabqBqW.js +1 -0
- package/dist/client/assets/{useQueries-D4f63cZj.js → useQueries-C7Nn7087.js} +1 -1
- package/dist/client/assets/{useRouterState-BppQsDj_.js → useRouterState-DsRmHS6O.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-EB0d5jug.js +1 -0
- package/dist/client/assets/{users-CBorRntj.js → users-yIqK9q3Z.js} +1 -1
- package/dist/client/assets/{variant-calendar-B4G9LyYG.js → variant-calendar-Ofx5NV6p.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-tV_lYF7W.js → view-mode-toggle-Do26MAHL.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +254 -254
- package/package.json +1 -1
- package/dist/client/assets/index-D3r1KwlT.js +0 -8
- package/dist/client/assets/project-app-view-gsYT-WSm.js +0 -1
- package/dist/client/assets/record-editor-B8LsYs7w.js +0 -1
- package/dist/client/assets/registry-D-a7SP8v.js +0 -2
- package/dist/client/assets/store-registry-CyL_3aHY.js +0 -2
- package/dist/client/assets/use-deco-credits-BZj7NJ8W.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DbIec81r.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D_mHbwQw.js +0 -1
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dyz2p3Cr.js","assets/index-DEohtFix.js","assets/index-BtYfp9ST.css","assets/ArrowUp-DCbwO8JD.js","assets/chat-context-DgliKNg4.js","assets/tab-id-g3zrWObq.js","assets/hooks-BJWPttlr.js","assets/use-mcp-client-BV3k-RTW.js","assets/auth-DPMTPKsa.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/decopilot-sse-pool-uJckdjtc.js","assets/studio-tools-Cw5xjEzL.js","assets/use-virtual-mcp-PtzzNKLp.js","assets/use-ai-providers-DahOLE-X.js","assets/use-decopilot-events-Bcy_VyX3.js","assets/use-organization-settings-OiqDtFqS.js","assets/automation-runs-fAOh5arl.js","assets/select-BNWH83Nl.js","assets/tooltip-BHWtFL93.js","assets/Check-BA4woPGX.js","assets/ChevronDown-CBaUlfZV.js","assets/ChevronUp-V2cJh30A.js","assets/useInfiniteQuery-DbIec81r.js","assets/use-infinite-scroll-CZwqTscI.js","assets/use-connection-BQ-kW5DV.js","assets/card-BfVg8xHZ.js","assets/sidebar-D0PhTSZr.js","assets/LayoutLeft-DKH6XJao.js","assets/use-mobile-BIU-83NO.js","assets/X-seiS6qu9.js","assets/table-ndRCEoiP.js","assets/empty-state-CwiIRuxk.js","assets/use-members-CirDo50L.js","assets/use-org-auth-client-sisbRYqk.js","assets/use-clock-tick-ljYvSj51.js","assets/AlertCircle-WA_QPWsK.js","assets/CheckCircle-CXrIThfj.js","assets/DotsVertical-DFe7UmmP.js","assets/agent-icon-DaEkSwM4.js","assets/Tool01-DNCBoiA0.js","assets/Settings02-BDvKUljA.js","assets/Tool02-C5VJtKqh.js","assets/XCircle-QAJ9m3Pn.js","assets/ArrowUpRight-BQDBh7Ff.js","assets/TrendUp01-a_IQVh94.js","assets/ZapSquare-Yhg62NiL.js","assets/Users03-D20Fpa89.js","assets/ChevronRight-K8rB4H3M.js","assets/Stars02-BrL2GX9d.js","assets/Copy01-C8kg6rKb.js","assets/Eye-B9yPfvFW.js","assets/FilterLines-Ys59iosV.js","assets/Star01-B11D2TqU.js","assets/Palette-DmVJqf86.js","assets/SwitchHorizontal01-CtG7ZPO9.js","assets/HardDrive-doLLdIdz.js","assets/Key01-CqEmKljb.js","assets/LinkExternal01-JfkCugVU.js","assets/LogOut01-BqCNY6bW.js","assets/Monitor01-CciDjlcp.js","assets/Sun-DUqv_KS8.js","assets/Play-BdfpNe18.js","assets/Plus-B6RgoGgu.js","assets/SearchLg-BaebpvKI.js","assets/SearchMd-Tflpro6A.js","assets/Shield01-kOsMD7Fr.js","assets/Stars01-DfWb5ncU.js","assets/Trash01-B_oyI8X6.js","assets/Upload01-Buwo0VZX.js","assets/User01-DHc0sJcJ.js","assets/Users01-DXBi3gCi.js","assets/XClose-CH93pLi0.js","assets/Zap-B0pQDAS4.js","assets/use-automations-DemQmKI_.js","assets/useSuspenseInfiniteQuery-D_mHbwQw.js","assets/avatar-D9T5dDHP.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-DpQdKm8L.js","assets/dialog-plvp42Da.js","assets/monaco-editor-DXRATeHL.js","assets/index-DUt7LhbD.js","assets/calendar-BCtkk2PF.js","assets/shell-layout-DauV9Fpz.js","assets/required-auth-layout-C8W70F8o.js","assets/use-org-sso-BBPHvQPC.js","assets/integration-icon-DFmq7sHm.js","assets/use-navigate-to-agent-UedncRA1.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-Byrj_i-c.js","assets/form-BxoJZ5LT.js","assets/label-Bqr4BUzi.js","assets/input-7PXnbAAh.js","assets/drawer-B-nDmC0A.js","assets/collection-search-CfVuPGVA.js","assets/tabs-DPqttUiF.js","assets/toggle-group-CLMfOH5_.js","assets/use-deco-credits-BZj7NJ8W.js","assets/popover-Bq1Pw8YU.js","assets/alert-dialog-D_zXbEOj.js","assets/toolbar-BIr_P5og.js","assets/skeleton-CXnjiWJf.js","assets/use-registry-app-WYZ8nQ6U.js","assets/use-mcp-tools-CcSkqujQ.js","assets/github-repo-picker-Czlt_w3i.js","assets/use-debounced-value-C9PP1Rm3.js","assets/authenticate-and-persist-oauth-BcHi9Lpg.js","assets/mcp-oauth-BFxv50xm.js","assets/extract-connection-data-CM2ISh7r.js","assets/metadata-dUsYcpuu.js","assets/provision-repo-scoped-github-connection-Dp638N7g.js","assets/github-repo-scope-CKSTLD3W.js","assets/agent-capabilities-cXfbMfjV.js","assets/connection-card-Di9u0v_-.js","assets/use-registry-connections-PXknb-ki.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-BtWh1EgY.js","assets/connection-form-helpers-GYelocJ4.js","assets/collection-tabs-BXUJTY9k.js","assets/badge-BV0oVP9T.js","assets/connect-desktop-dialog-YRn8ACQW.js","assets/select-model-CB-cz81z.js","assets/checkbox-BIIXOd5y.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-BtKVQlE5.js","assets/dropdown-menu-BjUn4OUh.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-CzclLlkS.js","assets/deco-site-production-url-CaKZ7xBn.js","assets/use-capability-CunLOvW0.js","assets/pt-BR-CLy76QW2.js","assets/use-mcp-auth-status-DAUnUEht.js","assets/use-debounced-autosave-DlG6ZU9a.js","assets/index-BwUmwQ38.js","assets/search-input-x2WAiYBM.js","assets/switch-w9ObaaZI.js","assets/use-secrets-WCM8V-ST.js","assets/command-D3W3Lf3Y.js","assets/index-p9tU4XKa.js","assets/useQueries-D4f63cZj.js","assets/use-file-configs-BXoPqHBK.js","assets/automation-list-row-gFP8Kvn4.js","assets/get-initials-D-f_fDFw.js","assets/index-CiP0VfIv.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{G as Js,r as T,c as q,x as Xs,K as Nt,F as He,n as vt,a as Zs,o as es,t as Dt,_ as en,m as Q,j as s,e as Tt,b as te,B as ke,E as tn,d as vs,p as us,k as ts,u as sn,aG as nn}from"./index-DEohtFix.js";import{g as Re}from"./get-initials-D-f_fDFw.js";import{A as Pe}from"./avatar-D9T5dDHP.js";import{aH as Ns,$ as an,g as Ss,aI as ln,l as Ds,aJ as rn,aG as Yt,ax as ws,aK as on,a2 as Ct,q as Cs,aE as cn}from"./agent-icon-DaEkSwM4.js";import{i as dn}from"./SwitchHorizontal01-CtG7ZPO9.js";import{s as ss}from"./Plus-B6RgoGgu.js";import{a as Et,P as At,b as Ot}from"./popover-Bq1Pw8YU.js";import{W as un,m as fs,S as _s,C as Is,g as fn,u as mn,h as gn,a as xn}from"./use-mcp-client-BV3k-RTW.js";import{u as pn,G as Bs}from"./use-registry-app-WYZ8nQ6U.js";import{d as ns,e as as,b as ls,h as hn,a as yn,c as bn}from"./dialog-plvp42Da.js";import{b as jn,u as kn}from"./use-connection-BQ-kW5DV.js";import{g as vn}from"./github-repo-scope-CKSTLD3W.js";import{a as Nn}from"./authenticate-and-persist-oauth-BcHi9Lpg.js";import{e as Sn}from"./extract-connection-data-CM2ISh7r.js";import{u as Ts}from"./use-members-CirDo50L.js";import{u as Lt}from"./studio-tools-Cw5xjEzL.js";import{t as Dn,T as wn,S as Le}from"./decopilot-sse-pool-uJckdjtc.js";import{u as Cn}from"./use-decopilot-events-Bcy_VyX3.js";import{a as _n}from"./format-time-BnbuEtat.js";import{i as Es}from"./AlertCircle-WA_QPWsK.js";import{i as rs}from"./CheckCircle-CXrIThfj.js";import{i as In}from"./DotsVertical-DFe7UmmP.js";import{s as Bn}from"./Eye-B9yPfvFW.js";import{a as St,D as $t,b as zt,c as Ft}from"./dropdown-menu-BjUn4OUh.js";import{P as Ht,a as Tn,D as En,j as An,k as On,C as $n,c as zn}from"./calendar-BCtkk2PF.js";import{u as Fn}from"./use-copy-DpQdKm8L.js";import{i as Rn}from"./Check-BA4woPGX.js";import{i as Pn}from"./ChevronRight-K8rB4H3M.js";import{a as Ln}from"./Copy01-C8kg6rKb.js";import{i as Mn}from"./Tool02-C5VJtKqh.js";import{n as As}from"./LinkExternal01-JfkCugVU.js";import{i as ms}from"./X-seiS6qu9.js";import{b as Os,C as $s,a as Ve,e as Rt,d as zs,c as Fs}from"./command-D3W3Lf3Y.js";import{s as Wt}from"./User01-DHc0sJcJ.js";import{d as qn,b as Kn,f as Un,g as Gn,a as Qn,D as Yn}from"./drawer-B-nDmC0A.js";import{t as os}from"./ChevronDown-CBaUlfZV.js";import{i as Rs}from"./FilterLines-Ys59iosV.js";import{s as Vn}from"./TrendUp01-a_IQVh94.js";import{u as Hn}from"./shell-layout-DauV9Fpz.js";import{b as Wn}from"./hooks-BJWPttlr.js";import{a as Jn}from"./use-organization-settings-OiqDtFqS.js";import{i as Ps}from"./XCircle-QAJ9m3Pn.js";import{f as Xn}from"./tab-id-g3zrWObq.js";import{u as Jt}from"./companions-core-ChGkwUDQ.js";function Zn(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(a=>a.type==="hardBreak"||a.type==="text"&&(!a.text||a.text.trim()==="")):!1)}const lr="__home__";function is(t,e){return Js.chatDraft(t,e)}function ea(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const a=e.tiptapDoc;return!a||typeof a!="object"||a.type!=="doc"||!Array.isArray(a.content)?null:a}function ta(t,e,a,i,n){const l=is(e,a);if(Zn(i)){t.removeItem(l);return}const r={tiptapDoc:i,updatedAt:Date.now()},c=JSON.stringify(r);try{t.setItem(l,c)}catch(d){if(sa(d)){const m=new TextEncoder().encode(c).byteLength;n?.onQuotaExceeded?.({docSizeBytes:m});return}throw d}}function rr(t,e,a){const i=is(e,a),n=t.getItem(i),l=ea(n);return n!==null&&l===null&&t.removeItem(i),l}function or(t,e,a){t.removeItem(is(e,a))}function sa(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}function na(t){var e;const{char:a,allowSpaces:i,allowToIncludeChar:n,allowedPrefixes:l,startOfLine:r,$position:c}=t,d=i&&!n,m=On(a),p=new RegExp(`\\s${m}$`),o=r?"^":"",y=n?"":m,g=d?new RegExp(`${o}${m}.*?(?=\\s${y}|$)`,"gm"):new RegExp(`${o}(?:^)?${m}[^\\s${y}]*`,"gm"),x=((e=c.nodeBefore)==null?void 0:e.isText)&&c.nodeBefore.text;if(!x)return null;const f=c.pos-x.length,h=Array.from(x.matchAll(g)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const b=h.input.slice(Math.max(0,h.index-1),h.index),u=new RegExp(`^[${l?.join("")}\0]?$`).test(b);if(l!==null&&!u)return null;const v=f+h.index;let j=v+h[0].length;return d&&p.test(x.slice(j-1,j+1))&&(h[0]+=" ",j+=1),v<c.pos&&j>=c.pos?{range:{from:v,to:j},query:h[0].slice(a.length),text:h[0]}:null}var aa=new Ht("suggestion");function la({pluginKey:t=aa,editor:e,char:a="@",allowSpaces:i=!1,allowToIncludeChar:n=!1,allowedPrefixes:l=[" "],startOfLine:r=!1,decorationTag:c="span",decorationClass:d="suggestion",decorationContent:m="",decorationEmptyClass:p="is-empty",command:o=()=>null,items:y=()=>[],render:g=()=>({}),allow:x=()=>!0,findSuggestionMatch:f=na,shouldShow:h}){let b;const u=g?.(),v=()=>{const N=e.state.selection.$anchor.pos,k=e.view.coordsAtPos(N),{top:D,right:B,bottom:_,left:C}=k;try{return new DOMRect(C,D,B-C,_-D)}catch{return null}},j=(N,k)=>k?()=>{const D=t.getState(e.state),B=D?.decorationId,_=N.dom.querySelector(`[data-decoration-id="${B}"]`);return _?.getBoundingClientRect()||null}:v;function w(N,k){var D;try{const _=t.getState(N.state),C=_?.decorationId?N.dom.querySelector(`[data-decoration-id="${_.decorationId}"]`):null,$={editor:e,range:_?.range||{from:0,to:0},query:_?.query||null,text:_?.text||null,items:[],command:U=>o({editor:e,range:_?.range||{from:0,to:0},props:U}),decorationNode:C,clientRect:j(N,C)};(D=u?.onExit)==null||D.call(u,$)}catch{}const B=N.state.tr.setMeta(k,{exit:!0});N.dispatch(B)}const S=new Tn({key:t,view(){return{update:async(N,k)=>{var D,B,_,C,$,U,K;const I=(D=this.key)==null?void 0:D.getState(k),E=(B=this.key)==null?void 0:B.getState(N.state),A=I.active&&E.active&&I.range.from!==E.range.from,G=!I.active&&E.active,V=I.active&&!E.active,R=!G&&!V&&I.query!==E.query,H=G||A&&R,J=R||A,X=V||A&&R;if(!H&&!J&&!X)return;const W=X&&!H?I:E,P=N.dom.querySelector(`[data-decoration-id="${W.decorationId}"]`);b={editor:e,range:W.range,query:W.query,text:W.text,items:[],command:F=>o({editor:e,range:W.range,props:F}),decorationNode:P,clientRect:j(N,P)},H&&((_=u?.onBeforeStart)==null||_.call(u,b)),J&&((C=u?.onBeforeUpdate)==null||C.call(u,b)),(J||H)&&(b.items=await y({editor:e,query:W.query})),X&&(($=u?.onExit)==null||$.call(u,b)),J&&((U=u?.onUpdate)==null||U.call(u,b)),H&&((K=u?.onStart)==null||K.call(u,b))},destroy:()=>{var N;b&&((N=u?.onExit)==null||N.call(u,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(N,k,D,B){const{isEditable:_}=e,{composing:C}=e.view,{selection:$}=N,{empty:U,from:K}=$,I={...k},E=N.getMeta(t);if(E&&E.exit)return I.active=!1,I.decorationId=null,I.range={from:0,to:0},I.query=null,I.text=null,I;if(I.composing=C,_&&(U||e.view.composing)){(K<k.range.from||K>k.range.to)&&!C&&!k.composing&&(I.active=!1);const A=f({char:a,allowSpaces:i,allowToIncludeChar:n,allowedPrefixes:l,startOfLine:r,$position:$.$from}),G=`id_${Math.floor(Math.random()*4294967295)}`;A&&x({editor:e,state:B,range:A.range,isActive:k.active})&&(!h||h({editor:e,range:A.range,query:A.query,text:A.text,transaction:N}))?(I.active=!0,I.decorationId=k.decorationId?k.decorationId:G,I.range=A.range,I.query=A.query,I.text=A.text):I.active=!1}else I.active=!1;return I.active||(I.decorationId=null,I.range={from:0,to:0},I.query=null,I.text=null),I}},props:{handleKeyDown(N,k){var D,B,_,C;const{active:$,range:U}=S.getState(N.state);if(!$)return!1;if(k.key==="Escape"||k.key==="Esc"){const I=S.getState(N.state),E=(D=b?.decorationNode)!=null?D:null,A=E??(I?.decorationId?N.dom.querySelector(`[data-decoration-id="${I.decorationId}"]`):null);if(((B=u?.onKeyDown)==null?void 0:B.call(u,{view:N,event:k,range:I.range}))||!1)return!0;const V={editor:e,range:I.range,query:I.query,text:I.text,items:[],command:R=>o({editor:e,range:I.range,props:R}),decorationNode:A,clientRect:A?()=>A.getBoundingClientRect()||null:null};return(_=u?.onExit)==null||_.call(u,V),w(N,t),!0}return((C=u?.onKeyDown)==null?void 0:C.call(u,{view:N,event:k,range:U}))||!1},decorations(N){const{active:k,range:D,decorationId:B,query:_}=S.getState(N);if(!k)return null;const C=!_?.length,$=[d];return C&&$.push(p),En.create(N.doc,[An.inline(D.from,D.to,{nodeName:c,class:$.join(" "),"data-decoration-id":B,"data-decoration-content":m})])}}});return S}function ra(t){const e=q.c(24),{editor:a,query:i,items:n,onSelect:l,onClose:r}=t,[c,d]=T.useState(0),m=T.useRef(n),p=T.useRef(c),o=T.useRef(l),y=T.useRef(r),g=T.useDeferredValue(i);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{d(0)},e[0]=x):x=e[0];let f;e[1]!==g?(f=[g],e[1]=g,e[2]=f):f=e[2],T.useEffect(x,f);let h,b;e[3]!==n.length||e[4]!==c?(h=()=>{c>=n.length&&n.length>0&&d(0)},b=[n.length,c],e[3]=n.length,e[4]=c,e[5]=h,e[6]=b):(h=e[5],b=e[6]),T.useEffect(h,b);let u,v;e[7]!==n?(u=()=>{m.current=n},v=[n],e[7]=n,e[8]=u,e[9]=v):(u=e[8],v=e[9]),T.useEffect(u,v);let j,w;e[10]!==c?(j=()=>{p.current=c},w=[c],e[10]=c,e[11]=j,e[12]=w):(j=e[11],w=e[12]),T.useEffect(j,w);let S,N;e[13]!==l?(N=()=>{o.current=l},S=[l],e[13]=l,e[14]=S,e[15]=N):(S=e[14],N=e[15]),T.useEffect(N,S);let k,D;e[16]!==r?(k=()=>{y.current=r},D=[r],e[16]=r,e[17]=k,e[18]=D):(k=e[17],D=e[18]),T.useEffect(k,D);let B,_;e[19]!==a?(B=()=>{if(a?.isDestroyed)return;let U;try{U=a.view.dom}catch{return}if(!U)return;const K=E=>{const A=m.current;if(!A.length)return!1;const G=()=>d(R=>(R+1)%A.length),V=()=>d(R=>(R-1+A.length)%A.length);switch(E.key){case"ArrowUp":return E.preventDefault(),V(),!0;case"ArrowDown":return E.preventDefault(),G(),!0;case"Tab":return E.preventDefault(),E.shiftKey?V():G(),!0;case"Home":return E.preventDefault(),d(0),!0;case"End":return E.preventDefault(),d(A.length-1),!0;case"Enter":{if(E.isComposing)return!1;E.preventDefault();const R=p.current;return R!==-1&&A[R]&&o.current?.(A[R],R),!0}case"Escape":return E.preventDefault(),y.current?.(),!0;default:return!1}},I=E=>{K(E)};return U.addEventListener("keydown",I,!0),()=>{U?.removeEventListener("keydown",I,!0)}},_=[a],e[19]=a,e[20]=B,e[21]=_):(B=e[20],_=e[21]),T.useEffect(B,_);const C=n.length?c:void 0;let $;return e[22]!==C?($={selectedIndex:C,setSelectedIndex:d},e[22]=C,e[23]=$):$=e[23],$}function oa(t,e){switch(e.type){case"SET_SELECTED_ITEM":return{...t,selectedItem:e.payload};case"ON_START":return{...t,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...t,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return t}}const ia=T.createContext(void 0);function ca(){const t=T.useContext(ia);if(!t)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return t}function ir(t){const e=q.c(16),{editor:a,char:i,pluginKey:n,allow:l,onOpenChange:r}=t;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=c):c=e[0];const[d,m]=T.useReducer(oa,c);let p;e[1]!==r?(p=f=>{r?.(f)},e[1]=r,e[2]=p):p=e[2];const o=T.useEffectEvent(p);let y;e[3]!==i||e[4]!==l||e[5]!==a||e[6]!==o||e[7]!==n?(y=()=>{if(a?.isDestroyed)return;const f=n instanceof Ht?n:new Ht(n);a.state.plugins.find(u=>u.spec.key===f)&&a.unregisterPlugin(f);const b=la({pluginKey:f,editor:a,char:i,allow(u){const v=a.state.doc.resolve(u.range.from);for(let j=v.depth;j>0;j--)if(v.node(j).type.name==="image")return!1;return!(l&&!l(u))},command(){},render:()=>({onStart:u=>{m({type:"ON_START",payload:{element:u.decorationNode??null,query:u.query,range:u.range}}),o(!0)},onUpdate:u=>{m({type:"ON_UPDATE",payload:{element:u.decorationNode??null,query:u.query,range:u.range}})},onKeyDown:u=>u.event.key==="Escape"?(m({type:"ON_EXIT"}),!0):!1,onExit:()=>{m({type:"ON_EXIT"}),o(!1)}}),items:da});return a.registerPlugin(b),()=>{a?.isDestroyed||a.unregisterPlugin(f)}},e[3]=i,e[4]=l,e[5]=a,e[6]=o,e[7]=n,e[8]=y):y=e[8];let g;e[9]!==i||e[10]!==l||e[11]!==a||e[12]!==n?(g=[a,n,i,m,l],e[9]=i,e[10]=l,e[11]=a,e[12]=n,e[13]=g):g=e[13],T.useEffect(y,g);let x;return e[14]!==d?(x={state:d,dispatch:m},e[14]=d,e[15]=x):x=e[15],x}function da(){return[]}function cr({editor:t,queryKey:e,queryFn:a,onSelect:i}){const{state:n,dispatch:l}=ca(),r=T.useDeferredValue(n.query),{data:c}=Xs({queryKey:Nt.suggestionItems(e,n.open,r),queryFn:()=>n.open?a({query:r}):[]}),d=()=>{l({type:"ON_EXIT"})},m=async(o,y)=>{if(!(n.selectedItem!==null||!n.range)){l({type:"SET_SELECTED_ITEM",payload:o});try{const{view:g}=t,f=g.state.selection.$to.nodeAfter?.text?.startsWith(" "),h=n.range?{...n.range}:{from:0,to:0};f&&n.range&&(h.to+=1),await i({range:h,item:o})===!1?l({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:p}=ra({editor:t,query:r,items:c,onSelect:m,onClose:d});return{selectedItem:n.selectedItem,items:c,selectedIndex:p,close:d,onSelect:m}}function ua(t){return t?t.run_in_progress?"generating":t.scanned_at?"ready":"none":"none"}const fa=2e4;function ma(t){if(typeof t!="string"||!t)return null;try{return new URL(t).hostname||null}catch{return null}}function ga(){const t=q.c(17),{org:e}=He(),a=un.COMMERCE_DISCOVERY(e.id);let i;t[0]!==e.id||t[1]!==e.slug?(i=fs({connectionId:_s,orgId:e.id,orgSlug:e.slug}),t[0]=e.id,t[1]=e.slug,t[2]=i):i=t[2];const{data:n}=vt(i),r=vt({queryKey:Nt.commerceDiscoveryConnection(e.id,a),enabled:!!n,retry:!1,staleTime:6e4,queryFn:async()=>{if(!n)throw new Error("selfClient not ready");const v=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:a}});return Jt(v)}}).data?.item??null,{data:c}=vt({...fs({connectionId:a,orgId:e.id,orgSlug:e.slug}),enabled:!!r}),d=Nt.commerceDiscoveryDiagnostic(e.id,a),m=!!c;let p;t[3]!==c?(p=async()=>{if(!c)throw new Error("cdClient not ready");const v=await c.callTool({name:Is,arguments:{}});return Jt(v).diagnostic??null},t[3]=c,t[4]=p):p=t[4];let o;t[5]!==d||t[6]!==m||t[7]!==p?(o={queryKey:d,enabled:m,retry:1,refetchInterval:xa,queryFn:p},t[5]=d,t[6]=m,t[7]=p,t[8]=o):o=t[8];const y=vt(o),g=y.data??null,x=y.isSuccess,f=r?.metadata?.siteUrl;let h;t[9]!==f?(h=ma(f),t[9]=f,t[10]=h):h=t[10];const b=c??null;let u;return t[11]!==a||t[12]!==y.isSuccess||t[13]!==g||t[14]!==h||t[15]!==b?(u={diagnostic:g,isSuccess:x,host:h,connectionId:a,cdClient:b},t[11]=a,t[12]=y.isSuccess,t[13]=g,t[14]=h,t[15]=b,t[16]=u):u=t[16],u}function xa(t){return t.state.status!=="error"&&ua(t.state.data)==="generating"?fa:!1}function pa(t,e){return{to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:fn(t.id),main:Xn(e,Is)}}}function ha(t){const{org:e}=He(),{data:a}=Zs.useSession(),i=jn(),n=es(),l=mn({connectionId:_s,orgId:e.id,orgSlug:e.slug}),[r,c]=T.useState(!1),d=pn(t,{enabled:!1});return{connect:async()=>{if(!(r||!a?.user?.id||!e)){c(!0);try{const p=d.data??(await d.refetch()).data;if(!p){Dt.error("Could not find this integration in the registry");return}const o=Sn(p,e.id,a.user.id,{remoteIndex:0});if(!o.connection_url){Dt.error("This integration has no connection method available");return}const y=o.app_name?await ya(l,o.app_name):null,g=!y,x=y?.id??(await i.create.mutateAsync(o)).id,f=await Nn({connectionId:x,orgId:e.id,orgSlug:e.slug,persistFallback:h=>i.update.mutateAsync({id:x,data:{connection_token:h}}).then(()=>{})});if(f.ran&&!f.ok){if(g)try{await i.delete.mutateAsync(x)}catch{}Dt.error(`Authentication failed: ${f.error??"no token"}`);return}en(n,e.id),Dt.success(g?"Connected successfully":"Already connected")}catch(p){Dt.error(`Failed to connect: ${p instanceof Error?p.message:String(p)}`)}finally{c(!1)}}},isConnecting:r}}async function ya(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Qe(t){const e=q.c(8),{size:a,className:i}=t,n=a===void 0?16:a;let l;e[0]!==n?(l={width:n,height:n},e[0]=n,e[1]=l):l=e[1];let r;e[2]!==i?(r=Q("shrink-0 rounded-full object-cover",i),e[2]=i,e[3]=r):r=e[3];let c;return e[4]!==n||e[5]!==l||e[6]!==r?(c=s.jsx("img",{src:gn,alt:"Super Agent",width:n,height:n,style:l,className:r}),e[4]=n,e[5]=l,e[6]=r,e[7]=c):c=e[7],c}const gs=()=>0;function ba(t){const{orgSlug:e,enabled:a=!0,onUpdate:i,onDelete:n}=t,l=T.useRef(i);l.current=i;const r=T.useRef(n);r.current=n;const c=T.useRef(null),d=T.useRef(a),m=T.useRef(e);(!c.current||d.current!==a||m.current!==e)&&(d.current=a,m.current=e,c.current=o=>{if(!a||!e)return()=>{};const y=g=>{let x;try{x=JSON.parse(g.data)}catch{return}x.data&&(g.type===wn?r.current?.(x.data.id):l.current(x.data)),o()};return Dn.subscribe(e,y)}),T.useSyncExternalStore(c.current,gs,gs)}function ja(){const t=q.c(27),{org:e,locator:a}=He(),i=Lt(),n=es();let l;t[0]!==a?(l=Nt.taskBoardItems(a),t[0]=a,t[1]=l):l=t[1];const r=l;let c;t[2]!==i?(c=async()=>(await i.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=i,t[3]=c):c=t[3];let d;t[4]!==r||t[5]!==c?(d={queryKey:r,queryFn:c},t[4]=r,t[5]=c,t[6]=d):d=t[6];const m=vt(d);let p,o;t[7]!==n||t[8]!==r?(p=b=>{n.setQueryData(r,u=>{const v=u??[],j=b;return v.some(w=>w.id===j.id)?v.map(w=>w.id===j.id?j:w):[j,...v]})},o=b=>{n.setQueryData(r,u=>u?.filter(v=>v.id!==b))},t[7]=n,t[8]=r,t[9]=p,t[10]=o):(p=t[9],o=t[10]);let y;t[11]!==e.slug||t[12]!==p||t[13]!==o?(y={orgSlug:e.slug,onUpdate:p,onDelete:o},t[11]=e.slug,t[12]=p,t[13]=o,t[14]=y):y=t[14],ba(y);let g;t[15]!==n||t[16]!==r?(g=b=>{const u=b.subject,v=b.data.status;n.setQueryData(r,j=>j?.map(w=>w.threads.some(S=>S.threadId===u)?{...w,threads:w.threads.map(S=>S.threadId===u?{...S,status:v}:S)}:w))},t[15]=n,t[16]=r,t[17]=g):g=t[17];let x;t[18]!==e.slug||t[19]!==g?(x={orgSlug:e.slug,onTaskStatus:g},t[18]=e.slug,t[19]=g,t[20]=x):x=t[20],Cn(x);let f;t[21]!==m.data?(f=m.data??[],t[21]=m.data,t[22]=f):f=t[22];let h;return t[23]!==m.error||t[24]!==m.isLoading||t[25]!==f?(h={items:f,isLoading:m.isLoading,error:m.error},t[23]=m.error,t[24]=m.isLoading,t[25]=f,t[26]=h):h=t[26],h}function ka(){const t=q.c(36),{locator:e}=He(),a=Lt(),i=es();let n;t[0]!==e?(n=Nt.taskBoardItems(e),t[0]=e,t[1]=n):n=t[1];const l=n;let r;t[2]!==i||t[3]!==l?(r=()=>i.invalidateQueries({queryKey:l}),t[2]=i,t[3]=l,t[4]=r):r=t[4];const c=r;let d;t[5]!==a?(d=N=>a.call("TASK_BOARD_ITEM_CREATE",N),t[5]=a,t[6]=d):d=t[6];let m;t[7]!==c||t[8]!==d?(m={mutationFn:d,onSuccess:c},t[7]=c,t[8]=d,t[9]=m):m=t[9];const p=Tt(m);let o;t[10]!==a?(o=N=>a.call("TASK_BOARD_ITEM_UPDATE",N),t[10]=a,t[11]=o):o=t[11];let y,g;t[12]!==i||t[13]!==l?(y=async N=>{await i.cancelQueries({queryKey:l});const k=i.getQueryData(l);return i.setQueryData(l,D=>D?.map(B=>B.id===N.id?{...B,...N}:B)),{previous:k}},g=(N,k,D)=>{D?.previous&&i.setQueryData(l,D.previous)},t[12]=i,t[13]=l,t[14]=y,t[15]=g):(y=t[14],g=t[15]);let x;t[16]!==c||t[17]!==o||t[18]!==y||t[19]!==g?(x={mutationFn:o,onMutate:y,onError:g,onSettled:c},t[16]=c,t[17]=o,t[18]=y,t[19]=g,t[20]=x):x=t[20];const f=Tt(x);let h;t[21]!==a?(h=N=>a.call("TASK_BOARD_ITEM_DELETE",{id:N}),t[21]=a,t[22]=h):h=t[22];let b;t[23]!==c||t[24]!==h?(b={mutationFn:h,onSuccess:c},t[23]=c,t[24]=h,t[25]=b):b=t[25];const u=Tt(b);let v;t[26]!==a?(v=N=>a.call("TASK_BOARD_ITEM_UPDATE",N),t[26]=a,t[27]=v):v=t[27];let j;t[28]!==c||t[29]!==v?(j={mutationFn:v,onSuccess:c},t[28]=c,t[29]=v,t[30]=j):j=t[30];const w=Tt(j);let S;return t[31]!==p||t[32]!==w||t[33]!==u||t[34]!==f?(S={create:p,update:f,remove:u,link:w},t[31]=p,t[32]=w,t[33]=u,t[34]=f,t[35]=S):S=t[35],S}function Xt(t){return t.threads.some(e=>e.status==="requires_action")}function va(t){return t.threads[0]}const Ls=["triage","todo","in_progress","in_review","done"],ze={triage:{labelKey:"taskBoard.config.statusBacklog",icon:Es,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:In,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Ns,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Bn,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:rs,iconClassName:"text-success"}},Ms=["none","low","medium","high","urgent"],Fe={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function Na(t){const e=q.c(10),{locator:a}=He(),i=Lt();let n;e[0]!==t||e[1]!==a?(n=Nt.taskBoardItemPrs(a,t??""),e[0]=t,e[1]=a,e[2]=n):n=e[2];const l=!!t;let r;e[3]!==t||e[4]!==i?(r=async()=>(await i.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=i,e[5]=r):r=e[5];let c;return e[6]!==n||e[7]!==l||e[8]!==r?(c={queryKey:n,enabled:l,queryFn:r},e[6]=n,e[7]=l,e[8]=r,e[9]=c):c=e[9],vt(c)}function qs(t){const e=q.c(27),{members:a,onSelect:i}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Os,{placeholder:"Assign to…",className:"h-9"}),e[0]=n):n=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx($s,{children:"No members found."}),e[1]=l):l=e[1];let r;e[2]!==i?(r=()=>i(Le),e[2]=i,e[3]=r):r=e[3];let c,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qe,{size:16}),d=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[4]=c,e[5]=d):(c=e[4],d=e[5]);let m;e[6]!==r?(m=s.jsxs(Ve,{value:"Super Agent",onSelect:r,className:"gap-2",children:[c,d]}),e[6]=r,e[7]=m):m=e[7];let p;e[8]!==i?(p=()=>i(null),e[8]=i,e[9]=p):p=e[9];let o,y;e[10]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Wt,{size:16,className:"text-muted-foreground"}),y=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[10]=o,e[11]=y):(o=e[10],y=e[11]);let g;e[12]!==p?(g=s.jsxs(Ve,{value:"Unassigned",onSelect:p,className:"gap-2",children:[o,y]}),e[12]=p,e[13]=g):g=e[13];let x;e[14]!==g||e[15]!==m?(x=s.jsxs(Rt,{children:[m,g]}),e[14]=g,e[15]=m,e[16]=x):x=e[16];let f;if(e[17]!==a||e[18]!==i){let u;e[20]!==i?(u=v=>s.jsxs(Ve,{value:v.user?.name??v.userId,onSelect:()=>i(v.userId),className:"gap-2",children:[s.jsx(Pe,{url:v.user?.image??void 0,fallback:Re(v.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:v.user?.name??v.userId})]},v.userId),e[20]=i,e[21]=u):u=e[21],f=a.map(u),e[17]=a,e[18]=i,e[19]=f}else f=e[19];let h;e[22]!==f?(h=s.jsx(Rt,{heading:"Members",children:f}),e[22]=f,e[23]=h):h=e[23];let b;return e[24]!==x||e[25]!==h?(b=s.jsxs(zs,{children:[n,s.jsxs(Fs,{children:[l,x,h]})]}),e[24]=x,e[25]=h,e[26]=b):b=e[26],b}function Sa(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function xs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const Da=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),wt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent";function wa(t){const e=q.c(201),{open:a,onClose:i,item:n,defaultStatus:l,onSubmit:r,onDelete:c,onOpenThread:d,onNewChat:m,isSaving:p}=t,o=te(),{data:y}=Ts(),g=y?.data?.members??[],{handleCopy:x,copied:f}=Fn(),[h,b]=T.useState(n?.title??""),[u,v]=T.useState(n?.description??""),[j,w]=T.useState(n?.status??l??"triage"),[S,N]=T.useState(n?.priority??"medium"),[k,D]=T.useState(n?.assigneeId??null),B=n?.dueDate;let _;e[0]!==B?(_=xs(B),e[0]=B,e[1]=_):_=e[1];const[C,$]=T.useState(_),[U,K]=T.useState(!1),[I,E]=T.useState(!1);let A;e[2]!==l||e[3]!==n?.assigneeId||e[4]!==n?.description||e[5]!==n?.dueDate||e[6]!==n?.priority||e[7]!==n?.status||e[8]!==n?.title||e[9]!==D||e[10]!==$?(A=()=>{b(n?.title??""),v(n?.description??""),w(n?.status??l??"triage"),N(n?.priority??"medium"),D(n?.assigneeId??null),$(xs(n?.dueDate))},e[2]=l,e[3]=n?.assigneeId,e[4]=n?.description,e[5]=n?.dueDate,e[6]=n?.priority,e[7]=n?.status,e[8]=n?.title,e[9]=D,e[10]=$,e[11]=A):A=e[11];const G=A;let V;e[12]!==i||e[13]!==G?(V=()=>{i(),G()},e[12]=i,e[13]=G,e[14]=V):V=e[14];const R=V;let H;e[15]!==k||e[16]!==u||e[17]!==C||e[18]!==r||e[19]!==S||e[20]!==j||e[21]!==h?(H=()=>{const O=h.trim();O&&r({title:O,description:u.trim()||null,status:j,priority:S,assigneeId:k,dueDate:C?Sa(C):null})},e[15]=k,e[16]=u,e[17]=C,e[18]=r,e[19]=S,e[20]=j,e[21]=h,e[22]=H):H=e[22];const J=H,X=k===Le;let W;e[23]!==k?(W=O=>O.userId===k,e[23]=k,e[24]=W):W=e[24];const P=g.find(W),F=n?.assignedBy?g.find(O=>O.userId===n.assignedBy):void 0,Z=ze[j].icon,ee=as;let z;e[25]!==R?(z=O=>!O&&R(),e[25]=R,e[26]=z):z=e[26];const L=ns,se="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",ve="hidden";let ne;e[27]!==n||e[28]!==o?(ne=o(n?"taskBoard.taskDialog.editTaskTitle":"taskBoard.taskDialog.newTaskTitle"),e[27]=n,e[28]=o,e[29]=ne):ne=e[29];let ae;e[30]!==ne?(ae=s.jsx(ls,{className:"sr-only",children:ne}),e[30]=ne,e[31]=ae):ae=e[31];let le;e[32]!==o?(le=o("taskBoard.taskDialog.closeAriaLabel"),e[32]=o,e[33]=le):le=e[33];let ie;e[34]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ms,{size:16}),e[34]=ie):ie=e[34];let ce;e[35]!==R||e[36]!==le?(ce=s.jsx("button",{type:"button","aria-label":le,onClick:R,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:ie}),e[35]=R,e[36]=le,e[37]=ce):ce=e[37];const Me="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let Ne;e[38]===Symbol.for("react.memo_cache_sentinel")?(Ne=O=>{b(O.target.value),O.target.style.height="auto",O.target.style.height=`${O.target.scrollHeight}px`},e[38]=Ne):Ne=e[38];let de;e[39]!==o?(de=o("taskBoard.taskDialog.taskTitlePlaceholder"),e[39]=o,e[40]=de):de=e[40];let ue;e[41]!==de||e[42]!==h?(ue=s.jsx("textarea",{ref:_a,value:h,onChange:Ne,onKeyDown:Ca,placeholder:de,autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=de,e[42]=h,e[43]=ue):ue=e[43];let Oe;e[44]===Symbol.for("react.memo_cache_sentinel")?(Oe=O=>v(O.target.value),e[44]=Oe):Oe=e[44];let M;e[45]!==o?(M=o("taskBoard.taskDialog.descriptionPlaceholder"),e[45]=o,e[46]=M):M=e[46];let re;e[47]!==u||e[48]!==M?(re=s.jsx("textarea",{value:u,onChange:Oe,placeholder:M,className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[47]=u,e[48]=M,e[49]=re):re=e[49];let oe;e[50]!==f||e[51]!==u||e[52]!==x||e[53]!==o?(oe=u&&s.jsx(ke,{type:"button",variant:"ghost",size:"icon","aria-label":o("taskBoard.taskDialog.copyDescriptionAriaLabel"),className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>x(u),children:f?s.jsx(Rn,{size:14}):s.jsx(Ln,{size:14})}),e[50]=f,e[51]=u,e[52]=x,e[53]=o,e[54]=oe):oe=e[54];let _e;e[55]!==re||e[56]!==oe?(_e=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[re,oe]}),e[55]=re,e[56]=oe,e[57]=_e):_e=e[57];let fe;e[58]!==u||e[59]!==n||e[60]!==d?(fe=n?.id&&s.jsx(Aa,{item:n,description:u,onOpenThread:d}),e[58]=u,e[59]=n,e[60]=d,e[61]=fe):fe=e[61];const Ye=n&&n.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-3",children:n.threads.map(O=>s.jsx(Ba,{thread:O,startedBy:F??P,onOpen:d},O.threadId))});let Se;e[62]!==ue||e[63]!==_e||e[64]!==fe||e[65]!==Ye?(Se=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[ue,_e,fe,Ye]}),e[62]=ue,e[63]=_e,e[64]=fe,e[65]=Ye,e[66]=Se):Se=e[66];const ds="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let $e;e[67]!==o?($e=o("taskBoard.taskDialog.propertiesLabel"),e[67]=o,e[68]=$e):$e=e[68];let De;e[69]!==$e?(De=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:$e}),e[69]=$e,e[70]=De):De=e[70];const qe="flex flex-wrap gap-2 sm:flex-col",Ie=ze[j];let me;e[71]!==Z||e[72]!==Ie.iconClassName?(me=s.jsx(Z,{size:16,className:Ie.iconClassName}),e[71]=Z,e[72]=Ie.iconClassName,e[73]=me):me=e[73];const Be=ze[j];let Te;e[74]!==o||e[75]!==Be.labelKey?(Te=o(Be.labelKey),e[74]=o,e[75]=Be.labelKey,e[76]=Te):Te=e[76];let we;e[77]!==me||e[78]!==Te?(we=s.jsx($t,{asChild:!0,children:s.jsxs("button",{type:"button",className:wt,children:[me,Te]})}),e[77]=me,e[78]=Te,e[79]=we):we=e[79];let ge;e[80]!==o?(ge=Ls.map(O=>{const Ws=ze[O].icon;return s.jsxs(St,{onSelect:()=>w(O),className:"gap-2",children:[s.jsx(Ws,{size:16,className:ze[O].iconClassName}),o(ze[O].labelKey)]},O)}),e[80]=o,e[81]=ge):ge=e[81];let xe;e[82]!==ge?(xe=s.jsx(zt,{align:"start",className:"w-44",children:ge}),e[82]=ge,e[83]=xe):xe=e[83];let Ee;e[84]!==we||e[85]!==xe?(Ee=s.jsxs(Ft,{children:[we,xe]}),e[84]=we,e[85]=xe,e[86]=Ee):Ee=e[86];const Ke=S==="none"&&"text-muted-foreground";let pe;e[87]!==Ke?(pe=Q(wt,Ke),e[87]=Ke,e[88]=pe):pe=e[88];let he;e[89]!==S||e[90]!==o?(he=S==="none"?s.jsxs(s.Fragment,{children:[s.jsx(an,{size:16}),o("taskBoard.taskDialog.setPriorityButton")]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:Q("size-2 rounded-full",Fe[S].dotClassName)}),o(Fe[S].labelKey)]}),e[89]=S,e[90]=o,e[91]=he):he=e[91];let ye;e[92]!==pe||e[93]!==he?(ye=s.jsx($t,{asChild:!0,children:s.jsx("button",{type:"button",className:pe,children:he})}),e[92]=pe,e[93]=he,e[94]=ye):ye=e[94];let Ce;e[95]!==o?(Ce=Ms.map(O=>s.jsxs(St,{onSelect:()=>N(O),children:[s.jsx("span",{className:Q("size-2 rounded-full",Fe[O].dotClassName)}),o(Fe[O].labelKey)]},O)),e[95]=o,e[96]=Ce):Ce=e[96];let be;e[97]!==Ce?(be=s.jsx(zt,{align:"start",className:"w-40",children:Ce}),e[97]=Ce,e[98]=be):be=e[98];let je;e[99]!==ye||e[100]!==be?(je=s.jsxs(Ft,{children:[ye,be]}),e[99]=ye,e[100]=be,e[101]=je):je=e[101];const Ue="flex flex-col",Ae=At,Y=!0,Ge=Et,qt=!0,Hs="button",Kt=!k&&"text-muted-foreground";let We;e[102]!==Kt?(We=Q(wt,Kt),e[102]=Kt,e[103]=We):We=e[103];const Ut=X&&F?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(Pe,{url:F.user?.image??void 0,fallback:Re(F.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:F.user?.name??o("taskBoard.taskDialog.superAgentDefaultName")})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(Pe,{url:F.user?.image??void 0,fallback:Re(F.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Qe,{size:16,className:"ring-2 ring-background"})]}),o("taskBoard.taskDialog.superAgentLabel")]})]}):X?s.jsxs(s.Fragment,{children:[s.jsx(Qe,{size:16}),o("taskBoard.taskDialog.superAgentLabel")]}):P?s.jsxs(s.Fragment,{children:[s.jsx(Pe,{url:P.user?.image??void 0,fallback:Re(P.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:P.user?.name??o("taskBoard.taskDialog.unassignedLabel")})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ss,{size:16,className:"text-muted-foreground"}),o("taskBoard.taskDialog.assignButton")]});let Je;e[104]!==We||e[105]!==Ut?(Je=s.jsx("button",{type:Hs,className:We,children:Ut}),e[104]=We,e[105]=Ut,e[106]=Je):Je=e[106];let Xe;e[107]!==Ge||e[108]!==Je?(Xe=s.jsx(Ge,{asChild:qt,children:Je}),e[107]=Ge,e[108]=Je,e[109]=Xe):Xe=e[109];let Ze;e[110]!==D||e[111]!==E?(Ze=O=>{D(O),E(!1)},e[110]=D,e[111]=E,e[112]=Ze):Ze=e[112];let et;e[113]!==g||e[114]!==Ze?(et=s.jsx(Ot,{align:"start",className:"w-56 p-0",children:s.jsx(qs,{members:g,onSelect:Ze})}),e[113]=g,e[114]=Ze,e[115]=et):et=e[115];let tt;e[116]!==Ae||e[117]!==I||e[118]!==E||e[119]!==Xe||e[120]!==et?(tt=s.jsxs(Ae,{open:I,onOpenChange:E,modal:Y,children:[Xe,et]}),e[116]=Ae,e[117]=I,e[118]=E,e[119]=Xe,e[120]=et,e[121]=tt):tt=e[121];let st;e[122]!==F||e[123]!==X||e[124]!==o?(st=X&&F&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:Q(wt,"pointer-events-none"),children:[s.jsx(Qe,{size:16}),o("taskBoard.taskDialog.superAgentLabel")]})]}),e[122]=F,e[123]=X,e[124]=o,e[125]=st):st=e[125];let nt;e[126]!==tt||e[127]!==st?(nt=s.jsxs("div",{className:Ue,children:[tt,st]}),e[126]=tt,e[127]=st,e[128]=nt):nt=e[128];const Gt=!C&&"text-muted-foreground";let at;e[129]!==Gt?(at=Q(wt,Gt),e[129]=Gt,e[130]=at):at=e[130];let _t;e[131]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(Ct,{size:16,className:"text-muted-foreground"}),e[131]=_t):_t=e[131];let lt;e[132]!==C||e[133]!==o?(lt=C?Da.format(C):o("taskBoard.taskDialog.dueDateLabel"),e[132]=C,e[133]=o,e[134]=lt):lt=e[134];let rt;e[135]!==C||e[136]!==$||e[137]!==o?(rt=C&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":o("taskBoard.taskDialog.clearDueDateAriaLabel"),className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:O=>{O.stopPropagation(),$(null)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),$(null))},children:s.jsx(ms,{size:12})}),e[135]=C,e[136]=$,e[137]=o,e[138]=rt):rt=e[138];let ot;e[139]!==at||e[140]!==lt||e[141]!==rt?(ot=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:at,children:[_t,lt,rt]})}),e[139]=at,e[140]=lt,e[141]=rt,e[142]=ot):ot=e[142];const Qt=C??void 0;let it;e[143]!==$||e[144]!==K?(it=O=>{$(O??null),O&&K(!1)},e[143]=$,e[144]=K,e[145]=it):it=e[145];let ct;e[146]!==Qt||e[147]!==it?(ct=s.jsx(Ot,{className:"w-auto p-0",align:"start",children:s.jsx($n,{mode:"single",selected:Qt,onSelect:it,initialFocus:!0})}),e[146]=Qt,e[147]=it,e[148]=ct):ct=e[148];let dt;e[149]!==U||e[150]!==K||e[151]!==ot||e[152]!==ct?(dt=s.jsxs(At,{open:U,onOpenChange:K,children:[ot,ct]}),e[149]=U,e[150]=K,e[151]=ot,e[152]=ct,e[153]=dt):dt=e[153];let ut;e[154]!==Ee||e[155]!==je||e[156]!==nt||e[157]!==dt?(ut=s.jsxs("div",{className:qe,children:[Ee,je,nt,dt]}),e[154]=Ee,e[155]=je,e[156]=nt,e[157]=dt,e[158]=ut):ut=e[158];let ft;e[159]!==De||e[160]!==ut?(ft=s.jsxs("div",{className:ds,children:[De,ut]}),e[159]=De,e[160]=ut,e[161]=ft):ft=e[161];let mt;e[162]!==Se||e[163]!==ft?(mt=s.jsxs("div",{className:Me,children:[Se,ft]}),e[162]=Se,e[163]=ft,e[164]=mt):mt=e[164];let gt;e[165]!==n||e[166]!==c||e[167]!==o?(gt=n&&c?s.jsx(ke,{variant:"ghost",size:"icon","aria-label":o("taskBoard.taskDialog.deleteTaskAriaLabel"),className:"size-10 text-muted-foreground hover:text-destructive",onClick:c,children:s.jsx(ln,{size:16})}):s.jsx("span",{}),e[165]=n,e[166]=c,e[167]=o,e[168]=gt):gt=e[168];let xt;e[169]!==n||e[170]!==m||e[171]!==o?(xt=n&&m&&s.jsxs(ke,{variant:"outline",size:"sm",onClick:m,children:[s.jsx(Ds,{size:16}),o("taskBoard.taskDialog.newChatButton")]}),e[169]=n,e[170]=m,e[171]=o,e[172]=xt):xt=e[172];let pt;e[173]!==p||e[174]!==h?(pt=!h.trim()||p,e[173]=p,e[174]=h,e[175]=pt):pt=e[175];let It;e[176]===Symbol.for("react.memo_cache_sentinel")?(It=s.jsx(ss,{size:16}),e[176]=It):It=e[176];let ht;e[177]!==n||e[178]!==o?(ht=o(n?"taskBoard.taskDialog.saveButton":"taskBoard.taskDialog.createTaskButton"),e[177]=n,e[178]=o,e[179]=ht):ht=e[179];let yt;e[180]!==J||e[181]!==pt||e[182]!==ht?(yt=s.jsxs(ke,{size:"sm",disabled:pt,onClick:J,children:[It,ht]}),e[180]=J,e[181]=pt,e[182]=ht,e[183]=yt):yt=e[183];let bt;e[184]!==xt||e[185]!==yt?(bt=s.jsxs("div",{className:"flex items-center gap-2",children:[xt,yt]}),e[184]=xt,e[185]=yt,e[186]=bt):bt=e[186];let jt;e[187]!==gt||e[188]!==bt?(jt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[gt,bt]}),e[187]=gt,e[188]=bt,e[189]=jt):jt=e[189];let kt;e[190]!==L||e[191]!==ae||e[192]!==ce||e[193]!==mt||e[194]!==jt?(kt=s.jsxs(L,{className:se,closeButtonClassName:ve,children:[ae,ce,mt,jt]}),e[190]=L,e[191]=ae,e[192]=ce,e[193]=mt,e[194]=jt,e[195]=kt):kt=e[195];let Bt;return e[196]!==ee||e[197]!==a||e[198]!==z||e[199]!==kt?(Bt=s.jsx(ee,{open:a,onOpenChange:z,children:kt}),e[196]=ee,e[197]=a,e[198]=z,e[199]=kt,e[200]=Bt):Bt=e[200],Bt}function Ca(t){t.key==="Enter"&&t.preventDefault()}function _a(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Ia(t,e){switch(t){case"failed":return{label:e("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:on};case"requires_action":return{label:e("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:ws};case"in_progress":return{label:e("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:Ns,spin:!0};case"completed":return{label:e("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:rs};case"expired":return{label:e("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:Es};default:return t}}function Ba(t){const e=q.c(24),{thread:a,startedBy:i,onOpen:n}=t,l=te();let r;if(e[0]!==n||e[1]!==i||e[2]!==l||e[3]!==a){const c=a.status?Ia(a.status,l):null,d=a.lastMessage;let m;e[5]!==n||e[6]!==a?(m=()=>n?.(a),e[5]=n,e[6]=a,e[7]=m):m=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Qe,{size:16,className:"shrink-0"}),e[8]=p):p=e[8];let o;e[9]!==l||e[10]!==a.title?(o=a.title||l("taskBoard.taskDialog.superAgentDefaultName"),e[9]=l,e[10]=a.title,e[11]=o):o=e[11];let y;e[12]!==o?(y=s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:o}),e[12]=o,e[13]=y):y=e[13];let g;e[14]!==i||e[15]!==l?(g=i&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"shrink-0 text-sm text-muted-foreground/50",children:l("taskBoard.taskDialog.startedByLabel")}),s.jsx(Pe,{url:i.user?.image??void 0,fallback:Re(i.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:i.user?.name??l("taskBoard.taskDialog.someoneLabel")})]}),e[14]=i,e[15]=l,e[16]=g):g=e[16];let x;e[17]!==n||e[18]!==l?(x=n&&s.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-1 text-xs text-muted-foreground/60 group-hover:text-foreground",children:[l("taskBoard.taskDialog.openThreadHint"),s.jsx(Pn,{size:14})]}),e[17]=n,e[18]=l,e[19]=x):x=e[19];let f;e[20]!==y||e[21]!==g||e[22]!==x?(f=s.jsxs("div",{className:"flex items-center gap-2",children:[p,y,g,x]}),e[20]=y,e[21]=g,e[22]=x,e[23]=f):f=e[23],r=s.jsxs("button",{type:"button",disabled:!n,onClick:m,className:"group flex w-full flex-col gap-2 rounded-xl bg-card p-4 text-left card-shadow transition-colors enabled:hover:bg-muted/60 disabled:cursor-default",children:[f,c&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:Q("flex shrink-0 items-center gap-1.5",c.className),children:[s.jsx(c.icon,{size:15,className:Q(c.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:c.label})]}),d&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-muted-foreground",children:d})]})]}),e[0]=n,e[1]=i,e[2]=l,e[3]=a,e[4]=r}else r=e[4];return r}function Ta(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:rn}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:Yt}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:Yt}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:Yt}}function Ea(t){if(!t)return[];const e=[],a=new Set;for(const i of t.matchAll(/https?:\/\/[^\s)]+/g)){const n=i[0];a.has(n)||(a.add(n),e.push({url:n,label:n}))}return e}function Aa(t){const e=q.c(18),{item:a,description:i,onOpenThread:n}=t,l=te(),{data:r}=Na(a.id);let c,d;if(e[0]!==i||e[1]!==a.threads||e[2]!==n||e[3]!==r||e[4]!==l){d=Symbol.for("react.early_return_sentinel");e:{const m=Ea(i);if((!r||r.length===0)&&m.length===0){d=null;break e}let p,o,y;if(e[7]!==a.threads||e[8]!==n||e[9]!==r||e[10]!==l){const g=n?a.threads.find($a):void 0;p="flex flex-col gap-1 pb-2";let x;e[14]!==l?(x=l("taskBoard.taskDialog.linksLabel"),e[14]=l,e[15]=x):x=e[15],e[16]!==x?(o=s.jsx("span",{className:"mb-1 text-xs font-medium text-muted-foreground",children:x}),e[16]=x,e[17]=o):o=e[17],y=(r??[]).map(f=>{const h=Ta(f,l);return s.jsxs("div",{className:"flex items-center gap-3 rounded-xl bg-card p-3 card-shadow",children:[s.jsxs("a",{href:f.url,target:"_blank",rel:"noreferrer",className:"group flex min-w-0 flex-1 items-center gap-3",children:[s.jsx(Bs,{className:"size-4 shrink-0 text-foreground"}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:f.title??`${f.repoOwner}/${f.repoName}`}),s.jsxs("span",{className:Q("flex shrink-0 items-center gap-1 text-xs font-medium",h.className),children:[s.jsx(h.icon,{size:13}),h.label]}),s.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:["#",f.number]}),s.jsx(As,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]}),g&&s.jsxs(ke,{type:"button",variant:"outline",size:"sm",className:"h-7 shrink-0 gap-1.5 px-2",title:l("taskBoard.taskDialog.openPreviewTitle"),onClick:()=>n?.(g),children:[s.jsx(Ds,{size:13}),l("taskBoard.taskDialog.openPreviewButton")]})]},f.url)}),e[7]=a.threads,e[8]=n,e[9]=r,e[10]=l,e[11]=p,e[12]=o,e[13]=y}else p=e[11],o=e[12],y=e[13];c=s.jsxs("div",{className:p,children:[o,y,m.map(Oa)]})}e[0]=i,e[1]=a.threads,e[2]=n,e[3]=r,e[4]=l,e[5]=c,e[6]=d}else c=e[5],d=e[6];return d!==Symbol.for("react.early_return_sentinel")?d:c}function Oa(t){return s.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"group flex items-center gap-2 rounded-md px-1 py-1.5 transition-colors hover:bg-muted",children:[s.jsx(Mn,{size:15,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:t.label}),s.jsx(As,{size:13,className:"shrink-0 text-muted-foreground/50 group-hover:text-foreground"})]},t.url)}function $a(t){return t.hasPreview&&t.virtualMcpId}function za(t,e=[]){const a=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
|
|
3
|
-
|
|
4
|
-
`)];if(e.length>0){const i=e.map(n=>{const l=n.merged?"merged":n.state??(n.draft?"draft":"open"),r=n.title?.trim()||`${n.repoOwner}/${n.repoName}`;return`- #${n.number} ${r} [${l}] ${n.url}`});a.push(["## Linked pull requests",...i].join(`
|
|
5
|
-
`))}if(t.threads.length>0){const i=t.threads.map(n=>{const l=n.title?.trim()||"Untitled chat";return n.status?`- ${l} [${n.status}]`:`- ${l}`});a.push(["## Other chats on this task",...i].join(`
|
|
6
|
-
`))}return a.join(`
|
|
7
|
-
|
|
8
|
-
`)}const Zt="__unassigned__",Pt={assignee:null,priority:null,due:null};function Fa(t){return t.assignee!==null||t.priority!==null||t.due!==null}function Ra(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Pa=864e5;function La(t,e){const a=new Date(t),i=new Date(e);return a.getFullYear()===i.getFullYear()&&a.getMonth()===i.getMonth()&&a.getDate()===i.getDate()}function Ma(t,e){if(e.assignee!==null){if(e.assignee===Zt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const a=new Date(t.dueDate).getTime(),i=Date.now();if(e.due==="overdue"&&a>=i||e.due==="today"&&!La(a,i)||e.due==="week"&&(a<i||a>i+7*Pa))return!1}return!0}const ps={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function Mt(t,e=!1){return Q("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function qa(t){const e=q.c(95),{value:a,members:i,onChange:n,block:l}=t,r=te(),[c,d]=T.useState(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Wt,{size:14,className:"shrink-0"}),e[0]=m):m=e[0];let p=m,o;e[1]!==r?(o=r("taskBoard.taskFilters.assigneeLabel"),e[1]=r,e[2]=o):o=e[2];let y=o;if(a===Zt){let z;e[3]!==r?(z=r("taskBoard.taskFilters.assigneeUnassigned"),e[3]=r,e[4]=z):z=e[4],y=z}else if(a===Le){let z;e[5]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Qe,{size:14}),e[5]=z):z=e[5],p=z;let L;e[6]!==r?(L=r("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=r,e[7]=L):L=e[7],y=L}else if(a){let z,L,se,ve;if(e[8]!==i||e[9]!==a){let le;e[14]!==a?(le=ie=>ie.userId===a,e[14]=a,e[15]=le):le=e[15],L=i.find(le),z=Pe,se=L?.user?.image??void 0,ve=Re(L?.user?.name),e[8]=i,e[9]=a,e[10]=z,e[11]=L,e[12]=se,e[13]=ve}else z=e[10],L=e[11],se=e[12],ve=e[13];let ne;e[16]!==z||e[17]!==se||e[18]!==ve?(ne=s.jsx(z,{url:se,fallback:ve,shape:"circle",size:"2xs"}),e[16]=z,e[17]=se,e[18]=ve,e[19]=ne):ne=e[19],p=ne;let ae;e[20]!==L?.user?.name||e[21]!==r?(ae=L?.user?.name??r("taskBoard.taskFilters.assigneeMember"),e[20]=L?.user?.name,e[21]=r,e[22]=ae):ae=e[22],y=ae}let g;e[23]!==n?(g=z=>{n(z),d(!1)},e[23]=n,e[24]=g):g=e[24];const x=g,f=a!==null;let h;e[25]!==l||e[26]!==f?(h=Mt(f,l),e[25]=l,e[26]=f,e[27]=h):h=e[27];const b=h,u=l&&"ml-auto";let v;e[28]!==u?(v=Q("shrink-0 opacity-60",u),e[28]=u,e[29]=v):v=e[29];const j=v;let w;e[30]!==y?(w=s.jsx("span",{className:"max-w-[10rem] truncate",children:y}),e[30]=y,e[31]=w):w=e[31];let S;e[32]!==j?(S=s.jsx(os,{size:12,className:j}),e[32]=j,e[33]=S):S=e[33];let N;e[34]!==p||e[35]!==w||e[36]!==S||e[37]!==b?(N=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:b,children:[p,w,S]})}),e[34]=p,e[35]=w,e[36]=S,e[37]=b,e[38]=N):N=e[38];let k;e[39]!==r?(k=r("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=r,e[40]=k):k=e[40];let D;e[41]!==k?(D=s.jsx(Os,{placeholder:k,className:"h-9"}),e[41]=k,e[42]=D):D=e[42];let B;e[43]!==r?(B=r("taskBoard.taskFilters.assigneeNoMembersFound"),e[43]=r,e[44]=B):B=e[44];let _;e[45]!==B?(_=s.jsx($s,{children:B}),e[45]=B,e[46]=_):_=e[46];let C;e[47]!==x?(C=()=>x(null),e[47]=x,e[48]=C):C=e[48];let $;e[49]!==r?($=r("taskBoard.taskFilters.assigneeAnyone"),e[49]=r,e[50]=$):$=e[50];let U;e[51]!==C||e[52]!==$?(U=s.jsx(Ve,{value:"Anyone",onSelect:C,children:$}),e[51]=C,e[52]=$,e[53]=U):U=e[53];let K;e[54]!==x?(K=()=>x(Zt),e[54]=x,e[55]=K):K=e[55];let I;e[56]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(Wt,{size:16,className:"text-muted-foreground"}),e[56]=I):I=e[56];let E;e[57]!==r?(E=r("taskBoard.taskFilters.assigneeUnassigned"),e[57]=r,e[58]=E):E=e[58];let A;e[59]!==K||e[60]!==E?(A=s.jsxs(Ve,{value:"Unassigned",onSelect:K,className:"gap-2",children:[I,E]}),e[59]=K,e[60]=E,e[61]=A):A=e[61];let G;e[62]!==x?(G=()=>x(Le),e[62]=x,e[63]=G):G=e[63];let V;e[64]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Qe,{size:16}),e[64]=V):V=e[64];let R;e[65]!==r?(R=r("taskBoard.taskFilters.assigneeSuperAgent"),e[65]=r,e[66]=R):R=e[66];let H;e[67]!==G||e[68]!==R?(H=s.jsxs(Ve,{value:"Super Agent",onSelect:G,className:"gap-2",children:[V,R]}),e[67]=G,e[68]=R,e[69]=H):H=e[69];let J;e[70]!==U||e[71]!==A||e[72]!==H?(J=s.jsxs(Rt,{children:[U,A,H]}),e[70]=U,e[71]=A,e[72]=H,e[73]=J):J=e[73];let X;e[74]!==r?(X=r("taskBoard.taskFilters.assigneeGroupMembers"),e[74]=r,e[75]=X):X=e[75];let W;if(e[76]!==i||e[77]!==x){let z;e[79]!==x?(z=L=>s.jsxs(Ve,{value:L.user?.name??L.userId,onSelect:()=>x(L.userId),className:"gap-2",children:[s.jsx(Pe,{url:L.user?.image??void 0,fallback:Re(L.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:L.user?.name??L.userId})]},L.userId),e[79]=x,e[80]=z):z=e[80],W=i.map(z),e[76]=i,e[77]=x,e[78]=W}else W=e[78];let P;e[81]!==X||e[82]!==W?(P=s.jsx(Rt,{heading:X,children:W}),e[81]=X,e[82]=W,e[83]=P):P=e[83];let F;e[84]!==_||e[85]!==J||e[86]!==P?(F=s.jsxs(Fs,{children:[_,J,P]}),e[84]=_,e[85]=J,e[86]=P,e[87]=F):F=e[87];let Z;e[88]!==D||e[89]!==F?(Z=s.jsx(Ot,{align:"start",className:"w-56 p-0",children:s.jsxs(zs,{children:[D,F]})}),e[88]=D,e[89]=F,e[90]=Z):Z=e[90];let ee;return e[91]!==c||e[92]!==N||e[93]!==Z?(ee=s.jsxs(At,{open:c,onOpenChange:d,children:[N,Z]}),e[91]=c,e[92]=N,e[93]=Z,e[94]=ee):ee=e[94],ee}function Ka(t){const e=q.c(33),{value:a,onChange:i,block:n}=t,l=te(),r=a!==null;let c;e[0]!==n||e[1]!==r?(c=Mt(r,n),e[0]=n,e[1]=r,e[2]=c):c=e[2];const d=c,m=n&&"ml-auto";let p;e[3]!==m?(p=Q("shrink-0 opacity-60",m),e[3]=m,e[4]=p):p=e[4];const o=p;let y;e[5]!==a?(y=a?s.jsx("span",{className:Q("size-2 shrink-0 rounded-full",Fe[a].dotClassName)}):s.jsx(Vn,{size:14,className:"shrink-0"}),e[5]=a,e[6]=y):y=e[6];let g;e[7]!==l||e[8]!==a?(g=l(a?Fe[a].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=a,e[9]=g):g=e[9];let x;e[10]!==o?(x=s.jsx(os,{size:12,className:o}),e[10]=o,e[11]=x):x=e[11];let f;e[12]!==y||e[13]!==g||e[14]!==x||e[15]!==d?(f=s.jsx($t,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,children:[y,g,x]})}),e[12]=y,e[13]=g,e[14]=x,e[15]=d,e[16]=f):f=e[16];let h;e[17]!==i?(h=()=>i(null),e[17]=i,e[18]=h):h=e[18];let b;e[19]!==l?(b=l("taskBoard.taskFilters.priorityAnyPriority"),e[19]=l,e[20]=b):b=e[20];let u;e[21]!==b||e[22]!==h?(u=s.jsx(St,{onSelect:h,children:b}),e[21]=b,e[22]=h,e[23]=u):u=e[23];let v;e[24]!==i||e[25]!==l?(v=Ms.map(S=>s.jsxs(St,{onSelect:()=>i(S),className:"gap-2",children:[s.jsx("span",{className:Q("size-2 rounded-full",Fe[S].dotClassName)}),l(Fe[S].labelKey)]},S)),e[24]=i,e[25]=l,e[26]=v):v=e[26];let j;e[27]!==u||e[28]!==v?(j=s.jsxs(zt,{align:"start",className:"w-40",children:[u,v]}),e[27]=u,e[28]=v,e[29]=j):j=e[29];let w;return e[30]!==j||e[31]!==f?(w=s.jsxs(Ft,{children:[f,j]}),e[30]=j,e[31]=f,e[32]=w):w=e[32],w}function Ua(t){const e=q.c(35),{value:a,onChange:i,block:n}=t,l=te();let r;e[0]!==l||e[1]!==a?(r=a?l(ps[a]):void 0,e[0]=l,e[1]=a,e[2]=r):r=e[2];const c=r,d=a!==null;let m;e[3]!==n||e[4]!==d?(m=Mt(d,n),e[3]=n,e[4]=d,e[5]=m):m=e[5];const p=m,o=n&&"ml-auto";let y;e[6]!==o?(y=Q("shrink-0 opacity-60",o),e[6]=o,e[7]=y):y=e[7];const g=y;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ct,{size:14,className:"shrink-0"}),e[8]=x):x=e[8];let f;e[9]!==c||e[10]!==l?(f=c??l("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=l,e[11]=f):f=e[11];let h;e[12]!==g?(h=s.jsx(os,{size:12,className:g}),e[12]=g,e[13]=h):h=e[13];let b;e[14]!==f||e[15]!==h||e[16]!==p?(b=s.jsx($t,{asChild:!0,children:s.jsxs("button",{type:"button",className:p,children:[x,f,h]})}),e[14]=f,e[15]=h,e[16]=p,e[17]=b):b=e[17];let u;e[18]!==i?(u=()=>i(null),e[18]=i,e[19]=u):u=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ct,{size:16,className:"text-muted-foreground"}),e[20]=v):v=e[20];let j;e[21]!==l?(j=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=j):j=e[22];let w;e[23]!==u||e[24]!==j?(w=s.jsxs(St,{onSelect:u,className:"gap-2",children:[v,j]}),e[23]=u,e[24]=j,e[25]=w):w=e[25];let S;e[26]!==i||e[27]!==l?(S=Object.entries(ps).map(D=>{const[B,_]=D,C=B==="overdue";return s.jsxs(St,{onSelect:()=>i(B),className:Q("gap-2",C&&"text-destructive"),children:[s.jsx(Ct,{size:16,className:Q("shrink-0",C?"text-destructive":"text-muted-foreground")}),l(_)]},B)}),e[26]=i,e[27]=l,e[28]=S):S=e[28];let N;e[29]!==w||e[30]!==S?(N=s.jsxs(zt,{align:"start",className:"w-44",children:[w,S]}),e[29]=w,e[30]=S,e[31]=N):N=e[31];let k;return e[32]!==N||e[33]!==b?(k=s.jsxs(Ft,{children:[b,N]}),e[32]=N,e[33]=b,e[34]=k):k=e[34],k}function Ks(t){const e=q.c(26),{filters:a,members:i,onChange:n,block:l}=t;let r;e[0]!==a||e[1]!==n?(r=g=>n({...a,assignee:g}),e[0]=a,e[1]=n,e[2]=r):r=e[2];let c;e[3]!==l||e[4]!==a.assignee||e[5]!==i||e[6]!==r?(c=s.jsx(qa,{block:l,value:a.assignee,members:i,onChange:r}),e[3]=l,e[4]=a.assignee,e[5]=i,e[6]=r,e[7]=c):c=e[7];let d;e[8]!==a||e[9]!==n?(d=g=>n({...a,priority:g}),e[8]=a,e[9]=n,e[10]=d):d=e[10];let m;e[11]!==l||e[12]!==a.priority||e[13]!==d?(m=s.jsx(Ka,{block:l,value:a.priority,onChange:d}),e[11]=l,e[12]=a.priority,e[13]=d,e[14]=m):m=e[14];let p;e[15]!==a||e[16]!==n?(p=g=>n({...a,due:g}),e[15]=a,e[16]=n,e[17]=p):p=e[17];let o;e[18]!==l||e[19]!==a.due||e[20]!==p?(o=s.jsx(Ua,{block:l,value:a.due,onChange:p}),e[18]=l,e[19]=a.due,e[20]=p,e[21]=o):o=e[21];let y;return e[22]!==c||e[23]!==m||e[24]!==o?(y=s.jsxs(s.Fragment,{children:[c,m,o]}),e[22]=c,e[23]=m,e[24]=o,e[25]=y):y=e[25],y}function Ga(t){const e=q.c(12),{filters:a,members:i,onChange:n}=t,l=te();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Rs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let c;e[1]!==a||e[2]!==i||e[3]!==n?(c=s.jsx(Ks,{filters:a,members:i,onChange:n}),e[1]=a,e[2]=i,e[3]=n,e[4]=c):c=e[4];let d;e[5]!==a||e[6]!==n||e[7]!==l?(d=Fa(a)&&s.jsx("button",{type:"button",onClick:()=>n(Pt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[5]=a,e[6]=n,e[7]=l,e[8]=d):d=e[8];let m;return e[9]!==c||e[10]!==d?(m=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,c,d]}),e[9]=c,e[10]=d,e[11]=m):m=e[11],m}function Qa(t){const e=q.c(38),{filters:a,members:i,onChange:n}=t,l=te(),[r,c]=T.useState(!1),d=Ra(a),m=d>0;let p;e[0]!==m?(p=Mt(m),e[0]=m,e[1]=p):p=e[1];const o=p;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Rs,{size:14,className:"shrink-0"}),e[2]=y):y=e[2];let g;e[3]!==l?(g=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=g):g=e[4];let x;e[5]!==d?(x=d>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:d}),e[5]=d,e[6]=x):x=e[6];let f;e[7]!==g||e[8]!==x||e[9]!==o?(f=s.jsx(qn,{asChild:!0,children:s.jsxs("button",{type:"button",className:o,children:[y,g,x]})}),e[7]=g,e[8]=x,e[9]=o,e[10]=f):f=e[10];let h;e[11]!==l?(h=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=h):h=e[12];let b;e[13]!==h?(b=s.jsx(Kn,{className:"px-4 pt-4 text-base font-medium text-foreground",children:h}),e[13]=h,e[14]=b):b=e[14];let u;e[15]!==a||e[16]!==i||e[17]!==n?(u=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Ks,{block:!0,filters:a,members:i,onChange:n})}),e[15]=a,e[16]=i,e[17]=n,e[18]=u):u=e[18];let v;e[19]!==d||e[20]!==n||e[21]!==l?(v=d>0&&s.jsx(ke,{variant:"outline",className:"flex-1",onClick:()=>n(Pt),children:l("taskBoard.taskFilters.clearAllButton")}),e[19]=d,e[20]=n,e[21]=l,e[22]=v):v=e[22];let j;e[23]!==l?(j=l("taskBoard.taskFilters.doneButton"),e[23]=l,e[24]=j):j=e[24];let w;e[25]!==j?(w=s.jsx(Un,{asChild:!0,children:s.jsx(ke,{className:"flex-1",children:j})}),e[25]=j,e[26]=w):w=e[26];let S;e[27]!==v||e[28]!==w?(S=s.jsxs(Gn,{className:"flex-row gap-2",children:[v,w]}),e[27]=v,e[28]=w,e[29]=S):S=e[29];let N;e[30]!==S||e[31]!==b||e[32]!==u?(N=s.jsxs(Qn,{className:"p-0",children:[b,u,S]}),e[30]=S,e[31]=b,e[32]=u,e[33]=N):N=e[33];let k;return e[34]!==r||e[35]!==N||e[36]!==f?(k=s.jsxs(Yn,{open:r,onOpenChange:c,direction:"bottom",children:[f,N]}),e[34]=r,e[35]=N,e[36]=f,e[37]=k):k=e[37],k}const hs=380,Ya=90,ys=5,Va="cubic-bezier(0.22, 0.61, 0.36, 1)";function Ha(t,e){const a=T.useRef(new Map);T.useLayoutEffect(()=>{const i=t.current;if(!i)return;const n=i.querySelectorAll("[data-flip-id]"),l=new Map,r=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,c=[];for(const o of n){const y=o.dataset.flipId;if(!y)continue;const g=o.getBoundingClientRect(),x=o.dataset.flipLane;l.set(y,{rect:g,lane:x});const f=a.current.get(y);if(!f)continue;const h=f.rect.left-g.left,b=f.rect.top-g.top;(h||b)&&c.push({el:o,dx:h,dy:b,lane:f.lane!==x})}if(a.current=l,r||c.length===0)return;for(const o of c){const y=o.lane?` rotate(${o.dx>0?ys:-ys}deg)`:"";o.el.style.transition="none",o.el.style.transform=`translate(${o.dx}px, ${o.dy}px)${y}`,o.lane&&(o.el.style.zIndex="10")}let d=0;const m=[],p=requestAnimationFrame(()=>{for(const o of c){const y=o.lane?d++*Ya:0;o.el.style.transition=`transform ${hs}ms ${Va} ${y}ms`,o.el.style.transform="",m.push(window.setTimeout(()=>{o.el.style.transition="",o.el.style.transform="",o.el.style.zIndex=""},hs+y+30))}});return()=>{cancelAnimationFrame(p);for(const o of m)clearTimeout(o)}},[e,t])}const Wa="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover",Ja=["Todas as tarefas do diagnóstico, priorizadas no seu quadro","Um relatório recorrente do seu site, sempre atualizado","O agente resolve cada tarefa e deixa pronta para a sua revisão"],bs={price:"R$ 99",anchor:"R$ 499"};function Xa(t){const e=q.c(5),{onOpen:a}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-success/10",children:s.jsx(Cs,{size:16,className:"text-success"})}),e[0]=i):i=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[i,s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Seu plano de ação está a um clique"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Desbloqueie o diagnóstico completo e as tarefas entram aqui, da maior prioridade para a menor."})]})]}),e[1]=n):n=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ps,{size:16}),e[2]=l):l=e[2];let r;return e[3]!==a?(r=s.jsxs("div",{className:"flex flex-col gap-3 rounded-xl bg-card p-4 card-shadow sm:flex-row sm:items-center sm:gap-4",children:[n,s.jsxs(ke,{size:"sm",onClick:a,className:"w-full gap-2 sm:w-auto sm:shrink-0",children:["Desbloquear diagnóstico",l]})]}),e[3]=a,e[4]=r):r=e[4],r}function Za({open:t,onOpenChange:e,cdClient:a,onExpired:i}){const[n,l]=T.useState(!1),r=async()=>{if(!a){i();return}l(!0);try{const c=await a.callTool({name:"start_checkout",arguments:{}}),{url:d}=Jt(c);if(new URL(d).protocol!=="https:")throw new Error("unsafe checkout url");window.open(d,"_blank","noopener,noreferrer"),e(!1)}catch{i()}finally{l(!1)}};return s.jsx(as,{open:t,onOpenChange:e,children:s.jsxs(ns,{className:"gap-0 p-3 sm:max-w-[500px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[s.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:s.jsx("img",{src:Wa,alt:"Prévia do seu quadro de tarefas desbloqueado",className:"h-[208px] w-full object-cover object-left-top"})}),s.jsxs("div",{className:"flex flex-col gap-7 px-3 pb-3 pt-7",children:[s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ls,{className:"text-xl font-semibold text-foreground",children:"Desbloqueie seu plano de trabalho"}),s.jsx("ul",{className:"flex flex-col gap-3.5",children:Ja.map(c=>s.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[s.jsx(rs,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),s.jsx("span",{className:"leading-snug text-foreground",children:c})]},c))})]}),s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsx("span",{className:"text-2xl font-semibold text-foreground",children:bs.price}),s.jsx("span",{className:"text-sm text-muted-foreground line-through",children:bs.anchor})]}),s.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[s.jsx(ke,{variant:"ghost",onClick:()=>e(!1),disabled:n,className:"order-2 w-full sm:order-none sm:w-auto",children:"Explorar"}),s.jsxs(ke,{onClick:r,disabled:n,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[n?s.jsx(ts,{size:16,className:"animate-spin"}):null,"Desbloquear diagnóstico",!n&&s.jsx(Ps,{size:16})]})]})]})]})]})})}function Vt(t){return`board-paywall-seen:${t}`}function el(){const t=q.c(26),{org:e}=He(),a=vs(),{diagnostic:i,cdClient:n,connectionId:l}=ga();let r;t[0]!==e.id?(r=()=>({orgId:e.id,open:!sessionStorage.getItem(Vt(e.id))}),t[0]=e.id,t[1]=r):r=t[1];const[c,d]=T.useState(r);let m;t[2]!==c.open||t[3]!==c.orgId||t[4]!==e.id?(m=c.orgId===e.id?c.open:!sessionStorage.getItem(Vt(e.id)),t[2]=c.open,t[3]=c.orgId,t[4]=e.id,t[5]=m):m=t[5];const p=m;if(!i?.locked)return null;let o;t[6]!==e.id?(o=j=>d({orgId:e.id,open:j}),t[6]=e.id,t[7]=o):o=t[7];const y=o;let g;t[8]!==e.id||t[9]!==y?(g=j=>{y(j),j||sessionStorage.setItem(Vt(e.id),"1")},t[8]=e.id,t[9]=y,t[10]=g):g=t[10];const x=g;let f;t[11]!==l||t[12]!==a||t[13]!==e?(f=()=>{us("board_paywall_report_opened",{organization_id:e.id}),a(pa(e,l))},t[11]=l,t[12]=a,t[13]=e,t[14]=f):f=t[14];const h=f;let b;t[15]!==e.id||t[16]!==y?(b=s.jsx(Xa,{onOpen:()=>{us("board_paywall_banner_clicked",{organization_id:e.id}),y(!0)}}),t[15]=e.id,t[16]=y,t[17]=b):b=t[17];let u;t[18]!==n||t[19]!==x||t[20]!==p||t[21]!==h?(u=s.jsx(Za,{open:p,onOpenChange:x,cdClient:n,onExpired:h}),t[18]=n,t[19]=x,t[20]=p,t[21]=h,t[22]=u):u=t[22];let v;return t[23]!==b||t[24]!==u?(v=s.jsxs(s.Fragment,{children:[b,u]}),t[23]=b,t[24]=u,t[25]=v):v=t[25],v}function tl(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(tn,{fallback:null,children:s.jsx(el,{})}),t[0]=e):e=t[0],e}nn(()=>import("./index-Dyz2p3Cr.js").then(t=>t.bt),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145])).catch(()=>{});function sl(){const t=q.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(Vs,{})})})}),t[0]=e):e=t[0],e}const nl=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function al(t){const e=new Date(t),a=e.getTime()<Date.now();return{label:nl.format(e),overdue:a}}const cs="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function Us(){const t=q.c(9),e=te();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=Q(cs,"border-warning/30 text-warning"),t[0]=a):a=t[0];let i;t[1]!==e?(i=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=i):i=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ws,{size:14}),t[3]=n):n=t[3];let l;t[4]!==e?(l=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=l):l=t[5];let r;return t[6]!==i||t[7]!==l?(r=s.jsxs("span",{className:a,title:i,children:[n,l]}),t[6]=i,t[7]=l,t[8]=r):r=t[8],r}function Gs(t){const e=q.c(10),{priority:a}=t,i=te(),n=Fe[a];let l;e[0]!==n.dotClassName?(l=Q("size-2 rounded-full",n.dotClassName),e[0]=n.dotClassName,e[1]=l):l=e[1];let r;e[2]!==l?(r=s.jsx("span",{className:l}),e[2]=l,e[3]=r):r=e[3];let c;e[4]!==n.labelKey||e[5]!==i?(c=i(n.labelKey),e[4]=n.labelKey,e[5]=i,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==c?(d=s.jsxs("span",{className:cs,children:[r,c]}),e[7]=r,e[8]=c,e[9]=d):d=e[9],d}function Qs(t){const e=q.c(7),{iso:a}=t;let i,n;if(e[0]!==a){const{label:c,overdue:d}=al(a);i=c,n=Q(cs,d&&"border-destructive/30 text-destructive"),e[0]=a,e[1]=i,e[2]=n}else i=e[1],n=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ct,{size:14}),e[3]=l):l=e[3];let r;return e[4]!==i||e[5]!==n?(r=s.jsxs("span",{className:n,children:[l,i]}),e[4]=i,e[5]=n,e[6]=r):r=e[6],r}function Ys(t){const e=q.c(24),{item:a,assignee:i,assignedBy:n,members:l,onAssign:r}=t,c=te(),[d,m]=T.useState(!1);if(a.assigneeId===Le){let f;e[0]!==n||e[1]!==c?(f=n?.user?.name?c("taskBoard.taskBoard.assignedToSuperAgentBy",{name:n.user.name}):c("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=n,e[1]=c,e[2]=f):f=e[2];let h;e[3]!==n?(h=n&&s.jsx(Pe,{url:n.user?.image??void 0,fallback:Re(n.user?.name),shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[3]=n,e[4]=h):h=e[4];let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Qe,{size:20,className:"ring-2 ring-background"}),e[5]=b):b=e[5];let u;return e[6]!==f||e[7]!==h?(u=s.jsxs("span",{className:"inline-flex items-center",title:f,children:[h,b]}),e[6]=f,e[7]=h,e[8]=u):u=e[8],u}if(i){const f=i.user?.image??void 0,h=i.user?.name;let b;e[9]!==h?(b=Re(h),e[9]=h,e[10]=b):b=e[10];let u;return e[11]!==f||e[12]!==b?(u=s.jsx(Pe,{url:f,fallback:b,shape:"circle",size:"xs"}),e[11]=f,e[12]=b,e[13]=u):u=e[13],u}if(!r||!l?.length)return null;let p;e[14]===Symbol.for("react.memo_cache_sentinel")?(p=f=>{f.stopPropagation(),m(!0)},e[14]=p):p=e[14];let o;e[15]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Et,{asChild:!0,children:s.jsx("button",{type:"button",title:"Assign",onClick:p,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:s.jsx(Ss,{size:13})})}),e[15]=o):o=e[15];let y;e[16]!==r?(y=f=>{r(f),m(!1)},e[16]=r,e[17]=y):y=e[17];let g;e[18]!==l||e[19]!==y?(g=s.jsx(Ot,{className:"w-56 p-0",align:"end",side:"bottom",onClick:ll,children:s.jsx(qs,{members:l,onSelect:y})}),e[18]=l,e[19]=y,e[20]=g):g=e[20];let x;return e[21]!==d||e[22]!==g?(x=s.jsxs(At,{open:d,onOpenChange:m,children:[o,g]}),e[21]=d,e[22]=g,e[23]=x):x=e[23],x}function ll(t){return t.stopPropagation()}function Vs(){const t=q.c(127),e=te(),{items:a,isLoading:i}=ja(),n=ka(),l=Jn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const c=kn(r);let d;t[1]!==c?(d=vn(c),t[1]=c,t[2]=d):d=t[2];const m=d.length>0,[p,o]=T.useState(!1);let y;t[3]!==m?(y=M=>M===Le&&!m?(o(!0),!0):!1,t[3]=m,t[4]=y):y=t[4];const g=y,{data:x}=Ts();let f,h;t[5]!==x?.data?.members?(f=x?.data?.members??[],h=new Map(f.map(il)),t[5]=x?.data?.members,t[6]=f,t[7]=h):(f=t[6],h=t[7]);const b=h,[u,v]=T.useState("board"),[j,w]=T.useState(Pt),[S,N]=T.useState(!1),[k,D]=T.useState(null),[B,_]=T.useState(null),{setTaskId:C}=Hn(),{create:$}=Wn(),U=Lt(),{org:K,locator:I}=He(),E=vs();let A;t[8]===Symbol.for("react.memo_cache_sentinel")?(A={strict:!1},t[8]=A):A=t[8];const{task:G}=sn(A);let V;t[9]!==G||t[10]!==a?(V=G?a.find(M=>M.id===G)??null:null,t[9]=G,t[10]=a,t[11]=V):V=t[11];const R=V;let H;t[12]!==G||t[13]!==E||t[14]!==K?(H=()=>{G&&E({to:"/$org/board",params:{org:K.slug},search:{},replace:!0})},t[12]=G,t[13]=E,t[14]=K,t[15]=H):H=t[15];const J=H;let X;t[16]!==n||t[17]!==$||t[18]!==I||t[19]!==K||t[20]!==C||t[21]!==U?(X=async M=>{const re=crypto.randomUUID(),oe=xn(K.id).id,_e=await U.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:M.id}).then(ol).catch(rl),fe=za(M,_e),Ye={type:"doc",content:[{type:"paragraph",content:[zn({id:M.id,name:M.title,char:"@",kind:"task",metadata:{title:M.title,description:M.description,context:fe}}),{type:"text",text:" "}]}]};ta(sessionStorage,I,re,Ye),N(!1);try{await $({id:re,virtual_mcp_id:oe}),await n.link.mutateAsync({id:M.id,linkThreadId:re})}catch{}C(re,oe)},t[16]=n,t[17]=$,t[18]=I,t[19]=K,t[20]=C,t[21]=U,t[22]=X):X=t[22];const W=X;let P,F,Z,ee,z,L,se;if(t[23]!==n||t[24]!==g||t[25]!==J||t[26]!==R||t[27]!==S||t[28]!==k||t[29]!==j||t[30]!==i||t[31]!==a||t[32]!==u||t[33]!==b||t[34]!==f||t[35]!==l||t[36]!==e){L=Symbol.for("react.early_return_sentinel");e:{let M;t[44]!==j?(M=Y=>Ma(Y,j),t[44]=j,t[45]=M):M=t[45];const re=a.filter(M);let oe;t[46]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>{D(null),_(null),N(!0)},t[46]=oe):oe=t[46];const _e=oe;let fe;t[47]===Symbol.for("react.memo_cache_sentinel")?(fe=Y=>{D(null),_(Y),N(!0)},t[47]=fe):fe=t[47];const Ye=fe;let Se;t[48]===Symbol.for("react.memo_cache_sentinel")?(Se=Y=>{D(Y),N(!0)},t[48]=Se):Se=t[48];const $e=Se;P=k??R,Z=S||!!R;let De;if(t[49]!==J?(De=()=>{N(!1),D(null),_(null),J()},t[49]=J,t[50]=De):De=t[50],F=De,i&&a.length===0){let Y;t[51]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(ts,{size:20,className:"animate-spin text-muted-foreground"})}),t[51]=Y):Y=t[51],L=Y;break e}se="flex min-h-0 flex-1 flex-col";let qe;t[52]!==e?(qe=e("taskBoard.taskBoard.tasksTitle"),t[52]=e,t[53]=qe):qe=t[53];let Ie;t[54]!==qe?(Ie=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:qe}),t[54]=qe,t[55]=Ie):Ie=t[55];let me;t[56]!==l?(me=l&&s.jsx(tl,{}),t[56]=l,t[57]=me):me=t[57];let Be;t[58]!==j||t[59]!==a.length||t[60]!==f?(Be=a.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(Qa,{filters:j,members:f,onChange:w})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(Ga,{filters:j,members:f,onChange:w})})]}),t[58]=j,t[59]=a.length,t[60]=f,t[61]=Be):Be=t[61];const Te=u==="list";let we;t[62]===Symbol.for("react.memo_cache_sentinel")?(we=()=>v("list"),t[62]=we):we=t[62];let ge;t[63]!==e?(ge=e("common.taskBoard.listView"),t[63]=e,t[64]=ge):ge=t[64];let xe;t[65]!==Te||t[66]!==ge?(xe=s.jsx(js,{active:Te,onClick:we,icon:dn,label:ge}),t[65]=Te,t[66]=ge,t[67]=xe):xe=t[67];const Ee=u==="board";let Ke;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ke=()=>v("board"),t[68]=Ke):Ke=t[68];let pe;t[69]!==e?(pe=e("common.taskBoard.boardView"),t[69]=e,t[70]=pe):pe=t[70];let he;t[71]!==Ee||t[72]!==pe?(he=s.jsx(js,{active:Ee,onClick:Ke,icon:cn,label:pe}),t[71]=Ee,t[72]=pe,t[73]=he):he=t[73];let ye;t[74]!==xe||t[75]!==he?(ye=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[xe,he]}),t[74]=xe,t[75]=he,t[76]=ye):ye=t[76];let Ce;t[77]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(ss,{size:16}),t[77]=Ce):Ce=t[77];let be;t[78]!==e?(be=e("taskBoard.taskBoard.newTask"),t[78]=e,t[79]=be):be=t[79];let je;t[80]!==be?(je=s.jsxs(ke,{size:"sm",onClick:_e,children:[Ce,be]}),t[80]=be,t[81]=je):je=t[81];let Ue;t[82]!==ye||t[83]!==je?(Ue=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[ye,je]}),t[82]=ye,t[83]=je,t[84]=Ue):Ue=t[84];let Ae;t[85]!==Be||t[86]!==Ue?(Ae=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Be,Ue]}),t[85]=Be,t[86]=Ue,t[87]=Ae):Ae=t[87],t[88]!==Ie||t[89]!==me||t[90]!==Ae?(ee=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[Ie,me,Ae]}),t[88]=Ie,t[89]=me,t[90]=Ae,t[91]=ee):ee=t[91],z=a.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:e("taskBoard.taskBoard.noTasksYet")})}):re.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:[e("taskBoard.taskBoard.noTasksMatch"),s.jsx(ke,{variant:"outline",size:"sm",onClick:()=>w(Pt),children:e("taskBoard.taskBoard.clearFilters")})]})}):u==="board"?s.jsx(ul,{items:re,members:f,memberByUserId:b,onOpen:$e,onCreate:Ye,onMove:(Y,Ge,qt)=>n.update.mutate({id:Y,status:Ge,sortOrder:qt}),onAssign:(Y,Ge)=>{g(Ge)||n.update.mutate({id:Y,assigneeId:Ge??void 0})},onAutoFix:l?Y=>{g(Le)||n.update.mutate({id:Y.id,assigneeId:Le})}:void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:re.map(Y=>s.jsx(gl,{item:Y,assignee:Y.assigneeId?b.get(Y.assigneeId):void 0,assignedBy:Y.assignedBy?b.get(Y.assignedBy):void 0,onOpen:()=>$e(Y)},Y.id))})})}t[23]=n,t[24]=g,t[25]=J,t[26]=R,t[27]=S,t[28]=k,t[29]=j,t[30]=i,t[31]=a,t[32]=u,t[33]=b,t[34]=f,t[35]=l,t[36]=e,t[37]=P,t[38]=F,t[39]=Z,t[40]=ee,t[41]=z,t[42]=L,t[43]=se}else P=t[37],F=t[38],Z=t[39],ee=t[40],z=t[41],L=t[42],se=t[43];if(L!==Symbol.for("react.early_return_sentinel"))return L;const ve=Z?P?.id??`new-${B??"default"}`:"closed",ne=P??void 0,ae=B??void 0,le=n.create.isPending||n.update.isPending;let ie;t[92]!==n.create||t[93]!==n.update||t[94]!==P||t[95]!==g||t[96]!==F?(ie=M=>{if(g(M.assigneeId)){F();return}P?n.update.mutate({id:P.id,...M}):n.create.mutate(M),F()},t[92]=n.create,t[93]=n.update,t[94]=P,t[95]=g,t[96]=F,t[97]=ie):ie=t[97];let ce;t[98]!==n.remove||t[99]!==P||t[100]!==F?(ce=P?()=>{n.remove.mutate(P.id),F()}:void 0,t[98]=n.remove,t[99]=P,t[100]=F,t[101]=ce):ce=t[101];let Me;t[102]!==P||t[103]!==W?(Me=P?()=>{W(P)}:void 0,t[102]=P,t[103]=W,t[104]=Me):Me=t[104];let Ne;t[105]!==F||t[106]!==C?(Ne=M=>{M.virtualMcpId&&(F(),C(M.threadId,M.virtualMcpId,{main:M.hasPreview?"preview":"board"}))},t[105]=F,t[106]=C,t[107]=Ne):Ne=t[107];let de;t[108]!==F||t[109]!==Z||t[110]!==ve||t[111]!==ne||t[112]!==ae||t[113]!==le||t[114]!==ie||t[115]!==ce||t[116]!==Me||t[117]!==Ne?(de=s.jsx(wa,{open:Z,onClose:F,item:ne,defaultStatus:ae,isSaving:le,onSubmit:ie,onDelete:ce,onNewChat:Me,onOpenThread:Ne},ve),t[108]=F,t[109]=Z,t[110]=ve,t[111]=ne,t[112]=ae,t[113]=le,t[114]=ie,t[115]=ce,t[116]=Me,t[117]=Ne,t[118]=de):de=t[118];let ue;t[119]!==p?(ue=s.jsx(cl,{open:p,onOpenChange:o}),t[119]=p,t[120]=ue):ue=t[120];let Oe;return t[121]!==ee||t[122]!==z||t[123]!==de||t[124]!==ue||t[125]!==se?(Oe=s.jsxs("div",{className:se,children:[ee,z,de,ue]}),t[121]=ee,t[122]=z,t[123]=de,t[124]=ue,t[125]=se,t[126]=Oe):Oe=t[126],Oe}function rl(){return[]}function ol(t){return t.prs}function il(t){return[t.userId,t]}function cl(t){const e=q.c(30),{open:a,onOpenChange:i}=t,n=te(),{connect:l,isConnecting:r}=ha("deco/mcp-github");let c;e[0]!==n?(c=n("taskBoard.taskBoard.connectGithubTitle"),e[0]=n,e[1]=c):c=e[1];let d;e[2]!==c?(d=s.jsx(ls,{children:c}),e[2]=c,e[3]=d):d=e[3];let m;e[4]!==n?(m=n("taskBoard.taskBoard.connectGithubDescription"),e[4]=n,e[5]=m):m=e[5];let p;e[6]!==m?(p=s.jsx(hn,{children:m}),e[6]=m,e[7]=p):p=e[7];let o;e[8]!==d||e[9]!==p?(o=s.jsxs(yn,{children:[d,p]}),e[8]=d,e[9]=p,e[10]=o):o=e[10];let y;e[11]!==l||e[12]!==i?(y=async()=>{await l(),i(!1)},e[11]=l,e[12]=i,e[13]=y):y=e[13];let g;e[14]!==r?(g=r?s.jsx(ts,{size:16,className:"animate-spin"}):s.jsx(Bs,{className:"size-4"}),e[14]=r,e[15]=g):g=e[15];let x;e[16]!==n?(x=n("taskBoard.taskBoard.connectGithubButton"),e[16]=n,e[17]=x):x=e[17];let f;e[18]!==r||e[19]!==y||e[20]!==g||e[21]!==x?(f=s.jsx(bn,{children:s.jsxs(ke,{onClick:y,disabled:r,className:"gap-2",children:[g,x]})}),e[18]=r,e[19]=y,e[20]=g,e[21]=x,e[22]=f):f=e[22];let h;e[23]!==o||e[24]!==f?(h=s.jsxs(ns,{className:"sm:max-w-md",children:[o,f]}),e[23]=o,e[24]=f,e[25]=h):h=e[25];let b;return e[26]!==i||e[27]!==a||e[28]!==h?(b=s.jsx(as,{open:a,onOpenChange:i,children:h}),e[26]=i,e[27]=a,e[28]=h,e[29]=b):b=e[29],b}function js(t){const e=q.c(14),{active:a,onClick:i,icon:n,label:l}=t,r=te();let c;e[0]!==l||e[1]!==r?(c=r("taskBoard.taskBoard.layoutViewAriaLabel",{label:l}),e[0]=l,e[1]=r,e[2]=c):c=e[2];const d=a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let m;e[3]!==d?(m=Q("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",d),e[3]=d,e[4]=m):m=e[4];let p;e[5]!==n?(p=s.jsx(n,{size:14}),e[5]=n,e[6]=p):p=e[6];let o;return e[7]!==a||e[8]!==l||e[9]!==i||e[10]!==c||e[11]!==m||e[12]!==p?(o=s.jsxs("button",{type:"button",onClick:i,"aria-label":c,"aria-pressed":a,className:m,children:[p,l]}),e[7]=a,e[8]=l,e[9]=i,e[10]=c,e[11]=m,e[12]=p,e[13]=o):o=e[13],o}function dl(t,e,a){const i=t.filter(d=>d.id!==a),n=e?i.findIndex(d=>d.id===e):-1,l=n===-1?i.length:n,r=i[l-1],c=i[l];return r&&c?(r.sortOrder+c.sortOrder)/2:r?r.sortOrder+1:c?c.sortOrder-1:0}function ul(t){const e=q.c(16),{items:a,members:i,memberByUserId:n,onOpen:l,onCreate:r,onMove:c,onAutoFix:d,onAssign:m}=t,p=te(),[o,y]=T.useState(null),[g,x]=T.useState(null),f=T.useRef(null);let h;e[0]!==a?(h=a.map(fl).join(","),e[0]=a,e[1]=h):h=e[1],Ha(f,h);let u;e[2]!==g||e[3]!==a||e[4]!==n||e[5]!==i||e[6]!==m||e[7]!==d||e[8]!==r||e[9]!==c||e[10]!==l||e[11]!==o||e[12]!==p?(u=Ls.map(j=>{const w=a.filter(k=>k.status===j),S=ze[j],N=S.icon;return s.jsxs("div",{onDragOver:k=>{k.preventDefault(),y(j),x(null)},onDragLeave:k=>{k.currentTarget.contains(k.relatedTarget)||(y(null),x(null))},onDrop:k=>{k.preventDefault();const D=k.dataTransfer.getData("text/plain");D&&c(D,j,dl(w,g,D)),y(null),x(null)},className:Q("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",o===j&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(N,{size:15,className:Q("shrink-0",S.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:p(S.labelKey)}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:w.length}),s.jsx("button",{type:"button","aria-label":p("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:p(S.labelKey)}),title:p("taskBoard.taskBoard.newTaskInLaneTitle",{lane:p(S.labelKey)}),onClick:()=>r(j),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(ss,{size:15})})]}),s.jsxs("div",{className:"flex min-h-12 flex-col pt-1",children:[w.map(k=>s.jsxs(T.Fragment,{children:[s.jsx(ks,{show:o===j&&g===k.id}),s.jsx(ml,{item:k,assignee:k.assigneeId?n.get(k.assigneeId):void 0,assignedBy:k.assignedBy?n.get(k.assignedBy):void 0,members:i,onOpen:()=>l(k),onAutoFix:d?()=>d(k):void 0,onAssign:m?D=>m(k.id,D):void 0,onDragOverCard:D=>{D.preventDefault(),D.stopPropagation(),y(j);const B=D.currentTarget.getBoundingClientRect();if(D.clientY-B.top<B.height/2)x(k.id);else{const C=w.indexOf(k);x(w[C+1]?.id??null)}}})]},k.id)),s.jsx(ks,{show:o===j&&g===null})]})]},j)}),e[2]=g,e[3]=a,e[4]=n,e[5]=i,e[6]=m,e[7]=d,e[8]=r,e[9]=c,e[10]=l,e[11]=o,e[12]=p,e[13]=u):u=e[13];let v;return e[14]!==u?(v=s.jsx("div",{ref:f,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:u})}),e[14]=u,e[15]=v):v=e[15],v}function fl(t){return`${t.id}:${t.status}`}function ks(t){const e=q.c(4),{show:a}=t,i=a?"bg-primary/20":"bg-transparent";let n;e[0]!==i?(n=Q("h-0.5 w-full rounded-full transition-colors",i),e[0]=i,e[1]=n):n=e[1];let l;return e[2]!==n?(l=s.jsx("div",{className:"flex h-3 shrink-0 items-center px-1",children:s.jsx("div",{className:n})}),e[2]=n,e[3]=l):l=e[3],l}function ml(t){const e=q.c(38),{item:a,assignee:i,assignedBy:n,members:l,onOpen:r,onAutoFix:c,onAssign:d,onDragOverCard:m}=t,p=te(),o=ze[a.status],y=o.icon,g=va(a)?.lastMessage,x=c&&(a.status==="triage"||a.status==="todo")&&a.assigneeId!==Le,f=a.id,h=a.status;let b;e[0]!==a.id?(b=C=>{C.dataTransfer.setData("text/plain",a.id),C.dataTransfer.effectAllowed="move"},e[0]=a.id,e[1]=b):b=e[1];const u=a.title;let v;e[2]!==o.iconClassName?(v=Q("mt-px shrink-0",o.iconClassName),e[2]=o.iconClassName,e[3]=v):v=e[3];let j;e[4]!==y||e[5]!==v?(j=s.jsx(y,{size:16,className:v}),e[4]=y,e[5]=v,e[6]=j):j=e[6];let w;e[7]!==a.title?(w=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:a.title}),e[7]=a.title,e[8]=w):w=e[8];let S;e[9]!==n||e[10]!==i||e[11]!==a||e[12]!==l||e[13]!==d?(S=s.jsx(Ys,{item:a,assignee:i,assignedBy:n,members:l,onAssign:d}),e[9]=n,e[10]=i,e[11]=a,e[12]=l,e[13]=d,e[14]=S):S=e[14];let N;e[15]!==j||e[16]!==w||e[17]!==S?(N=s.jsxs("div",{className:"flex items-start gap-2",children:[j,w,S]}),e[15]=j,e[16]=w,e[17]=S,e[18]=N):N=e[18];let k;e[19]!==g?(k=g&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:g}),e[19]=g,e[20]=k):k=e[20];let D;e[21]!==a?(D=(Xt(a)||a.priority!=="none"||!!a.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Xt(a)&&s.jsx(Us,{}),a.priority!=="none"&&s.jsx(Gs,{priority:a.priority}),a.dueDate&&s.jsx(Qs,{iso:a.dueDate})]}),e[21]=a,e[22]=D):D=e[22];let B;e[23]!==c||e[24]!==x||e[25]!==p?(B=x&&s.jsxs("button",{type:"button",onClick:C=>{C.stopPropagation(),c()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(Cs,{size:12}),p("taskBoard.taskBoard.autoFix")]}),e[23]=c,e[24]=x,e[25]=p,e[26]=B):B=e[26];let _;return e[27]!==a.id||e[28]!==a.status||e[29]!==a.title||e[30]!==m||e[31]!==r||e[32]!==k||e[33]!==D||e[34]!==B||e[35]!==b||e[36]!==N?(_=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":f,"data-flip-lane":h,onDragStart:b,onDragOver:m,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:u,children:[N,k,D,B]}),e[27]=a.id,e[28]=a.status,e[29]=a.title,e[30]=m,e[31]=r,e[32]=k,e[33]=D,e[34]=B,e[35]=b,e[36]=N,e[37]=_):_=e[37],_}function gl(t){const e=q.c(30),{item:a,assignee:i,assignedBy:n,onOpen:l}=t,r=ze[a.status],c=r.icon;let d;e[0]!==r.iconClassName?(d=Q("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let m;e[2]!==c||e[3]!==d?(m=s.jsx(c,{size:16,className:d}),e[2]=c,e[3]=d,e[4]=m):m=e[4];let p;e[5]!==a.title?(p=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:a.title}),e[5]=a.title,e[6]=p):p=e[6];let o;e[7]!==a?(o=Xt(a)&&s.jsx(Us,{}),e[7]=a,e[8]=o):o=e[8];let y;e[9]!==a.priority?(y=a.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Gs,{priority:a.priority})}),e[9]=a.priority,e[10]=y):y=e[10];let g;e[11]!==a.dueDate?(g=a.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Qs,{iso:a.dueDate})}),e[11]=a.dueDate,e[12]=g):g=e[12];let x;e[13]!==n||e[14]!==i||e[15]!==a?(x=s.jsx(Ys,{item:a,assignee:i,assignedBy:n}),e[13]=n,e[14]=i,e[15]=a,e[16]=x):x=e[16];let f;e[17]!==a.createdAt?(f=_n(new Date(a.createdAt)),e[17]=a.createdAt,e[18]=f):f=e[18];let h;e[19]!==f?(h=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:f}),e[19]=f,e[20]=h):h=e[20];let b;return e[21]!==l||e[22]!==m||e[23]!==p||e[24]!==o||e[25]!==y||e[26]!==g||e[27]!==x||e[28]!==h?(b=s.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[m,p,o,y,g,x,h]}),e[21]=l,e[22]=m,e[23]=p,e[24]=o,e[25]=y,e[26]=g,e[27]=x,e[28]=h,e[29]=b):b=e[29],b}const dr=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:Vs,default:sl},Symbol.toStringTag,{value:"Module"}));export{lr as H,Fe as P,ia as S,wa as T,ca as a,cr as b,or as c,ga as d,ua as e,pa as f,ha as g,ja as h,Zn as i,ka as j,ze as k,Qe as l,Vs as m,dr as n,rr as r,ir as u,ta as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,F as H,j as U}from"./index-DEohtFix.js";import{a as O,g as $,s as E}from"./automation-runs-fAOh5arl.js";import{r as k,u as B}from"./use-mcp-client-BV3k-RTW.js";import{b as V,c as Y}from"./use-mcp-tools-CcSkqujQ.js";import{u as q}from"./index-Dyz2p3Cr.js";import{c as G}from"./monaco-editor-DXRATeHL.js";import{g as F,M as K,a as D}from"./index-DUt7LhbD.js";import{b as W,a as z}from"./chat-context-DgliKNg4.js";import{u as J}from"./shell-layout-DauV9Fpz.js";import{O as Q}from"./tab-id-g3zrWObq.js";import"./select-BNWH83Nl.js";import"./tooltip-BHWtFL93.js";import"./Check-BA4woPGX.js";import"./ChevronDown-CBaUlfZV.js";import"./ChevronUp-V2cJh30A.js";import"./useInfiniteQuery-DbIec81r.js";import"./use-infinite-scroll-CZwqTscI.js";import"./use-connection-BQ-kW5DV.js";import"./use-virtual-mcp-PtzzNKLp.js";import"./card-BfVg8xHZ.js";import"./sidebar-D0PhTSZr.js";import"./LayoutLeft-DKH6XJao.js";import"./use-mobile-BIU-83NO.js";import"./X-seiS6qu9.js";import"./table-ndRCEoiP.js";import"./empty-state-CwiIRuxk.js";import"./use-members-CirDo50L.js";import"./use-org-auth-client-sisbRYqk.js";import"./use-clock-tick-ljYvSj51.js";import"./AlertCircle-WA_QPWsK.js";import"./CheckCircle-CXrIThfj.js";import"./DotsVertical-DFe7UmmP.js";import"./agent-icon-DaEkSwM4.js";import"./Tool01-DNCBoiA0.js";import"./ArrowUp-DCbwO8JD.js";import"./Settings02-BDvKUljA.js";import"./Tool02-C5VJtKqh.js";import"./XCircle-QAJ9m3Pn.js";import"./ArrowUpRight-BQDBh7Ff.js";import"./TrendUp01-a_IQVh94.js";import"./ZapSquare-Yhg62NiL.js";import"./Users03-D20Fpa89.js";import"./ChevronRight-K8rB4H3M.js";import"./Stars02-BrL2GX9d.js";import"./Copy01-C8kg6rKb.js";import"./Eye-B9yPfvFW.js";import"./FilterLines-Ys59iosV.js";import"./Star01-B11D2TqU.js";import"./Palette-DmVJqf86.js";import"./SwitchHorizontal01-CtG7ZPO9.js";import"./HardDrive-doLLdIdz.js";import"./Key01-CqEmKljb.js";import"./LinkExternal01-JfkCugVU.js";import"./LogOut01-BqCNY6bW.js";import"./Monitor01-CciDjlcp.js";import"./Sun-DUqv_KS8.js";import"./Play-BdfpNe18.js";import"./Plus-B6RgoGgu.js";import"./SearchLg-BaebpvKI.js";import"./SearchMd-Tflpro6A.js";import"./Shield01-kOsMD7Fr.js";import"./Stars01-DfWb5ncU.js";import"./Trash01-B_oyI8X6.js";import"./Upload01-Buwo0VZX.js";import"./User01-DHc0sJcJ.js";import"./Users01-DXBi3gCi.js";import"./XClose-CH93pLi0.js";import"./Zap-B0pQDAS4.js";import"./use-automations-DemQmKI_.js";import"./studio-tools-Cw5xjEzL.js";import"./useSuspenseInfiniteQuery-D_mHbwQw.js";import"./avatar-D9T5dDHP.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DpQdKm8L.js";import"./dialog-plvp42Da.js";import"./hooks-BJWPttlr.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-uJckdjtc.js";import"./calendar-BCtkk2PF.js";import"./integration-icon-DFmq7sHm.js";import"./use-navigate-to-agent-UedncRA1.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Byrj_i-c.js";import"./form-BxoJZ5LT.js";import"./label-Bqr4BUzi.js";import"./input-7PXnbAAh.js";import"./auth-DPMTPKsa.js";import"./drawer-B-nDmC0A.js";import"./collection-search-CfVuPGVA.js";import"./index-D3r1KwlT.js";import"./get-initials-D-f_fDFw.js";import"./popover-Bq1Pw8YU.js";import"./use-registry-app-WYZ8nQ6U.js";import"./github-repo-scope-CKSTLD3W.js";import"./authenticate-and-persist-oauth-BcHi9Lpg.js";import"./mcp-oauth-BFxv50xm.js";import"./extract-connection-data-CM2ISh7r.js";import"./metadata-dUsYcpuu.js";import"./use-decopilot-events-Bcy_VyX3.js";import"./dropdown-menu-BjUn4OUh.js";import"./command-D3W3Lf3Y.js";import"./index-p9tU4XKa.js";import"./use-organization-settings-OiqDtFqS.js";import"./companions-core-ChGkwUDQ.js";import"./tabs-DPqttUiF.js";import"./toggle-group-CLMfOH5_.js";import"./use-deco-credits-BZj7NJ8W.js";import"./alert-dialog-D_zXbEOj.js";import"./toolbar-BIr_P5og.js";import"./skeleton-CXnjiWJf.js";import"./github-repo-picker-Czlt_w3i.js";import"./use-debounced-value-C9PP1Rm3.js";import"./provision-repo-scoped-github-connection-Dp638N7g.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-Di9u0v_-.js";import"./use-registry-connections-PXknb-ki.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-BtWh1EgY.js";import"./connection-form-helpers-GYelocJ4.js";import"./collection-tabs-BXUJTY9k.js";import"./badge-BV0oVP9T.js";import"./use-ai-providers-DahOLE-X.js";import"./connect-desktop-dialog-YRn8ACQW.js";import"./select-model-CB-cz81z.js";import"./checkbox-BIIXOd5y.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BtKVQlE5.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CzclLlkS.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CunLOvW0.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DAUnUEht.js";import"./use-debounced-autosave-DlG6ZU9a.js";import"./index-BwUmwQ38.js";import"./search-input-x2WAiYBM.js";import"./switch-w9ObaaZI.js";import"./use-secrets-WCM8V-ST.js";import"./useQueries-D4f63cZj.js";import"./use-file-configs-BXoPqHBK.js";import"./automation-list-row-gFP8Kvn4.js";import"./required-auth-layout-C8W70F8o.js";import"./use-org-sso-BBPHvQPC.js";const X="studio://navigate";function Z(M){const[t]=M;if(M.length!==1||t?.type!=="resource_link"||!t.uri.startsWith(X))return{isNavigate:!1};let o=null;try{o=new URL(t.uri).searchParams.get("main")}catch{}return{isNavigate:!0,tab:o&&Q.has(o)?o:null}}const tt={};function ot(M){const t=L.c(38),{client:o,resourceURI:I,tool:e,connectionId:p,orgId:a,args:v}=M,{sendMessage:C}=W(),{setAppContext:f,clearAppContext:l}=z(),{openSidePanel:g,openTab:s}=J(),i=`${p}:${e.name}`;let c;t[0]!==s?(c=x=>x==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=c):c=t[1];const m=c,n=v??tt;let u;t[2]!==o||t[3]!==e.name||t[4]!==n?(u={client:o,toolName:e.name,toolArguments:n},t[2]=o,t[3]=e.name,t[4]=n,t[5]=u):u=t[5];const{data:r}=Y(u);let h;if(t[6]!==e._meta||t[7]!==e.name){const x=$(e._meta);h=E(e.name,x),t[6]=e._meta,t[7]=e.name,t[8]=h}else h=t[8];const A=h;let d;t[9]!==e.inputSchema?(d=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=d):d=t[10];let R;t[11]!==A||t[12]!==d||t[13]!==e?(R={...e,name:A,inputSchema:d},t[11]=A,t[12]=d,t[13]=e,t[14]=R):R=t[14];const b=R;let _;t[15]!==g||t[16]!==s||t[17]!==C?(_=x=>{const j=Z(x.content);if(j.isNavigate){j.tab&&s(j.tab);return}const w=G(x.content);w.content.length>0&&(g("chat"),C({tiptapDoc:w}))},t[15]=g,t[16]=s,t[17]=C,t[18]=_):_=t[18];const y=_;let P;t[19]!==b?(P={tool:b},t[19]=b,t[20]=P):P=t[20];let N;t[21]!==f||t[22]!==i?(N=x=>f(i,x),t[21]=f,t[22]=i,t[23]=N):N=t[23];let T;t[24]!==l||t[25]!==i?(T=()=>l(i),t[24]=l,t[25]=i,t[26]=T):T=t[26];let S;return t[27]!==o||t[28]!==y||t[29]!==m||t[30]!==a||t[31]!==I||t[32]!==P||t[33]!==N||t[34]!==T||t[35]!==n||t[36]!==r?(S=U.jsx(K,{resourceURI:I,orgId:a,toolInfo:P,toolInput:n,toolResult:r,displayMode:"fullscreen",minHeight:D.fullscreen.minHeight,maxHeight:D.fullscreen.maxHeight,client:o,onMessage:y,onUpdateModelContext:N,onTeardown:T,onRequestDisplayMode:m,className:"h-full"}),t[27]=o,t[28]=y,t[29]=m,t[30]=a,t[31]=I,t[32]=P,t[33]=N,t[34]=T,t[35]=n,t[36]=r,t[37]=S):S=t[37],S}function Be(M){const t=L.c(24),{connectionId:o,toolName:I,args:e}=M,{org:p}=H(),a=q();let v;t[0]!==o||t[1]!==a?(v=k(o)&&a.vmEntry?.sandboxProviderKind==="user-desktop"&&a.previewUrl?`${a.previewUrl.replace(/\/+$/,"")}/api/mcp`:void 0,t[0]=o,t[1]=a,t[2]=v):v=t[2];const C=v;let f;t[3]!==o||t[4]!==C||t[5]!==p.id||t[6]!==p.slug?(f={connectionId:o,orgId:p.id,orgSlug:p.slug,mcpUrl:C},t[3]=o,t[4]=C,t[5]=p.id,t[6]=p.slug,t[7]=f):f=t[7];const l=B(f);let g;t[8]!==l?(g={client:l},t[8]=l,t[9]=g):g=t[9];const{data:s}=V(g);let i,c,m;t[10]!==I||t[11]!==s.tools?(i=O(decodeURIComponent(I)),m=s.tools.find(r=>r.name===i)??s.tools.find(r=>{const h=$(r._meta);if(!h)return!1;if(E(r.name,h)===i)return!0;const d=E(i,h);return d!==i&&r.name===d}),c=m?._meta?F(m._meta):void 0,t[10]=I,t[11]=s.tools,t[12]=i,t[13]=c,t[14]=m):(i=t[12],c=t[13],m=t[14]);const n=c;if(!m||!n){let r;return t[15]!==i?(r=U.jsx("div",{className:"flex items-center justify-center h-full w-full",children:U.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',i,'" not found or has no UI']})}),t[15]=i,t[16]=r):r=t[16],r}let u;return t[17]!==e||t[18]!==l||t[19]!==o||t[20]!==p.id||t[21]!==n||t[22]!==m?(u=U.jsx(ot,{client:l,resourceURI:n,tool:m,connectionId:o,orgId:p.id,args:e}),t[17]=e,t[18]=l,t[19]=o,t[20]=p.id,t[21]=n,t[22]=m,t[23]=u):u=t[23],u}export{Be as AppViewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,b as A,j as r}from"./index-DEohtFix.js";import{I as O}from"./input-7PXnbAAh.js";import{L as F}from"./label-Bqr4BUzi.js";import{S as R,a as z,b as V,c as D,d as J}from"./select-BNWH83Nl.js";import{T as M}from"./textarea-BtWh1EgY.js";import{O as Q,P as Y,Q as $,I as q,T as G,Y as H}from"./index-Dyz2p3Cr.js";import{s as I}from"./primitives-BPV9WZzR.js";import{u as U}from"./use-autosave-U55d8eYW.js";import"./tooltip-BHWtFL93.js";import"./Check-BA4woPGX.js";import"./ChevronDown-CBaUlfZV.js";import"./ChevronUp-V2cJh30A.js";import"./ArrowUp-DCbwO8JD.js";import"./chat-context-DgliKNg4.js";import"./tab-id-g3zrWObq.js";import"./hooks-BJWPttlr.js";import"./use-mcp-client-BV3k-RTW.js";import"./auth-DPMTPKsa.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-uJckdjtc.js";import"./studio-tools-Cw5xjEzL.js";import"./use-virtual-mcp-PtzzNKLp.js";import"./use-ai-providers-DahOLE-X.js";import"./use-decopilot-events-Bcy_VyX3.js";import"./use-organization-settings-OiqDtFqS.js";import"./automation-runs-fAOh5arl.js";import"./useInfiniteQuery-DbIec81r.js";import"./use-infinite-scroll-CZwqTscI.js";import"./use-connection-BQ-kW5DV.js";import"./card-BfVg8xHZ.js";import"./sidebar-D0PhTSZr.js";import"./LayoutLeft-DKH6XJao.js";import"./use-mobile-BIU-83NO.js";import"./X-seiS6qu9.js";import"./table-ndRCEoiP.js";import"./empty-state-CwiIRuxk.js";import"./use-members-CirDo50L.js";import"./use-org-auth-client-sisbRYqk.js";import"./use-clock-tick-ljYvSj51.js";import"./AlertCircle-WA_QPWsK.js";import"./CheckCircle-CXrIThfj.js";import"./DotsVertical-DFe7UmmP.js";import"./agent-icon-DaEkSwM4.js";import"./Tool01-DNCBoiA0.js";import"./Settings02-BDvKUljA.js";import"./Tool02-C5VJtKqh.js";import"./XCircle-QAJ9m3Pn.js";import"./ArrowUpRight-BQDBh7Ff.js";import"./TrendUp01-a_IQVh94.js";import"./ZapSquare-Yhg62NiL.js";import"./Users03-D20Fpa89.js";import"./ChevronRight-K8rB4H3M.js";import"./Stars02-BrL2GX9d.js";import"./Copy01-C8kg6rKb.js";import"./Eye-B9yPfvFW.js";import"./FilterLines-Ys59iosV.js";import"./Star01-B11D2TqU.js";import"./Palette-DmVJqf86.js";import"./SwitchHorizontal01-CtG7ZPO9.js";import"./HardDrive-doLLdIdz.js";import"./Key01-CqEmKljb.js";import"./LinkExternal01-JfkCugVU.js";import"./LogOut01-BqCNY6bW.js";import"./Monitor01-CciDjlcp.js";import"./Sun-DUqv_KS8.js";import"./Play-BdfpNe18.js";import"./Plus-B6RgoGgu.js";import"./SearchLg-BaebpvKI.js";import"./SearchMd-Tflpro6A.js";import"./Shield01-kOsMD7Fr.js";import"./Stars01-DfWb5ncU.js";import"./Trash01-B_oyI8X6.js";import"./Upload01-Buwo0VZX.js";import"./User01-DHc0sJcJ.js";import"./Users01-DXBi3gCi.js";import"./XClose-CH93pLi0.js";import"./Zap-B0pQDAS4.js";import"./use-automations-DemQmKI_.js";import"./useSuspenseInfiniteQuery-D_mHbwQw.js";import"./avatar-D9T5dDHP.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-DpQdKm8L.js";import"./dialog-plvp42Da.js";import"./monaco-editor-DXRATeHL.js";import"./index-DUt7LhbD.js";import"./calendar-BCtkk2PF.js";import"./shell-layout-DauV9Fpz.js";import"./required-auth-layout-C8W70F8o.js";import"./use-org-sso-BBPHvQPC.js";import"./integration-icon-DFmq7sHm.js";import"./use-navigate-to-agent-UedncRA1.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-Byrj_i-c.js";import"./form-BxoJZ5LT.js";import"./drawer-B-nDmC0A.js";import"./collection-search-CfVuPGVA.js";import"./index-D3r1KwlT.js";import"./get-initials-D-f_fDFw.js";import"./popover-Bq1Pw8YU.js";import"./use-registry-app-WYZ8nQ6U.js";import"./use-mcp-tools-CcSkqujQ.js";import"./github-repo-scope-CKSTLD3W.js";import"./authenticate-and-persist-oauth-BcHi9Lpg.js";import"./mcp-oauth-BFxv50xm.js";import"./extract-connection-data-CM2ISh7r.js";import"./metadata-dUsYcpuu.js";import"./dropdown-menu-BjUn4OUh.js";import"./command-D3W3Lf3Y.js";import"./index-p9tU4XKa.js";import"./companions-core-ChGkwUDQ.js";import"./tabs-DPqttUiF.js";import"./toggle-group-CLMfOH5_.js";import"./use-deco-credits-BZj7NJ8W.js";import"./alert-dialog-D_zXbEOj.js";import"./toolbar-BIr_P5og.js";import"./skeleton-CXnjiWJf.js";import"./github-repo-picker-Czlt_w3i.js";import"./use-debounced-value-C9PP1Rm3.js";import"./provision-repo-scoped-github-connection-Dp638N7g.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-Di9u0v_-.js";import"./use-registry-connections-PXknb-ki.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-GYelocJ4.js";import"./collection-tabs-BXUJTY9k.js";import"./badge-BV0oVP9T.js";import"./connect-desktop-dialog-YRn8ACQW.js";import"./select-model-CB-cz81z.js";import"./checkbox-BIIXOd5y.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BtKVQlE5.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CzclLlkS.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CunLOvW0.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-DAUnUEht.js";import"./use-debounced-autosave-DlG6ZU9a.js";import"./index-BwUmwQ38.js";import"./search-input-x2WAiYBM.js";import"./switch-w9ObaaZI.js";import"./use-secrets-WCM8V-ST.js";import"./useQueries-D4f63cZj.js";import"./use-file-configs-BXoPqHBK.js";import"./automation-list-row-gFP8Kvn4.js";const W={authors:[{key:"name",labelKey:"sandbox.recordEditor.fieldName",widget:"text"},{key:"type",labelKey:"sandbox.recordEditor.fieldType",widget:"select",options:[{value:"Person",labelKey:"sandbox.recordEditor.optionPerson"},{value:"Organization",labelKey:"sandbox.recordEditor.optionOrganization"}]},{key:"email",labelKey:"sandbox.recordEditor.fieldEmail",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderEmail"},{key:"jobTitle",labelKey:"sandbox.recordEditor.fieldJobTitle",widget:"text"},{key:"company",labelKey:"sandbox.recordEditor.fieldCompany",widget:"text"},{key:"avatar",labelKey:"sandbox.recordEditor.fieldAvatar",widget:"image"}]},X={authors:"sandbox.recordEditor.titleAuthor"};function Vr(C){const t=L.c(40),{orgSlug:K,virtualMcpId:h,branch:w,kind:a,blockKey:g,block:P}=C,i=A(),f=Q(h);let b;t[0]!==w||t[1]!==K||t[2]!==f||t[3]!==h?(b={orgSlug:K,virtualMcpId:h,branch:w,packagePath:f},t[0]=w,t[1]=K,t[2]=f,t[3]=h,t[4]=b):b=t[4];const p=Y(b);let k;t[5]!==P||t[6]!==a?(k=$(P,a),t[5]=P,t[6]=a,t[7]=k):k=t[7];const B=k;let v;t[8]!==g||t[9]!==a||t[10]!==p?(v=l=>{p.mutate({blockKey:g,data:G(g,a,l)})},t[8]=g,t[9]=a,t[10]=p,t[11]=v):v=t[11];const[e,S]=U(B,v);let j;t[12]!==e||t[13]!==S?(j=(l,o)=>S({...e,[l]:o}),t[12]=e,t[13]=S,t[14]=j):j=t[14];const s=j,T=X[a];let n;t[15]!==i||t[16]!==T?(n=i(T),t[15]=i,t[16]=T,t[17]=n):n=t[17];let c;t[18]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let d;t[20]!==p.isError||t[21]!==p.isPending?(d=r.jsx(q,{isPending:p.isPending,isError:p.isError}),t[20]=p.isError,t[21]=p.isPending,t[22]=d):d=t[22];let y;t[23]!==c||t[24]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[23]=c,t[24]=d,t[25]=y):y=t[25];const N=W[a];let x;if(t[26]!==e||t[27]!==s||t[28]!==i||t[29]!==N){let l;t[31]!==e||t[32]!==s||t[33]!==i?(l=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(H,{schema:{type:"string",format:"image-uri",title:i(o.labelKey)},value:e[o.key],onChange:m=>s(o.key,m),path:o.key,label:i(o.labelKey)}):o.widget==="select"?r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:i(o.labelKey)}),r.jsxs(R,{value:I(e[o.key])||o.options?.[0]?.value,onValueChange:m=>s(o.key,m),children:[r.jsx(z,{id:o.key,className:"h-10 w-full",children:r.jsx(V,{placeholder:i(o.labelKey)})}),r.jsx(D,{children:(o.options??[]).map(m=>r.jsx(J,{value:m.value,children:i(m.labelKey)},m.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsx(F,{htmlFor:o.key,children:i(o.labelKey)}),o.widget==="textarea"?r.jsx(M,{id:o.key,value:I(e[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(O,{id:o.key,value:I(e[o.key]),placeholder:o.placeholderKey?i(o.placeholderKey):void 0,onChange:m=>s(o.key,m.target.value),className:"h-10"})]})},o.key),t[31]=e,t[32]=s,t[33]=i,t[34]=l):l=t[34],x=N.map(l),t[26]=e,t[27]=s,t[28]=i,t[29]=N,t[30]=x}else x=t[30];let u;t[35]!==x?(u=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:x})}),t[35]=x,t[36]=u):u=t[36];let E;return t[37]!==y||t[38]!==u?(E=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[37]=y,t[38]=u,t[39]=E):E=t[39],E}export{Vr as RecordEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BnjqmPwD.js","assets/index-DEohtFix.js","assets/index-BtYfp9ST.css","assets/Tool02-C5VJtKqh.js","assets/CheckCircle-CXrIThfj.js","assets/Settings02-BDvKUljA.js","assets/use-mcp-client-BV3k-RTW.js","assets/auth-DPMTPKsa.js","assets/useInfiniteQuery-DbIec81r.js","assets/use-infinite-scroll-CZwqTscI.js","assets/studio-tools-Cw5xjEzL.js","assets/badge-BV0oVP9T.js","assets/input-7PXnbAAh.js","assets/dropdown-menu-BjUn4OUh.js","assets/Check-BA4woPGX.js","assets/ChevronRight-K8rB4H3M.js","assets/DotsVertical-DFe7UmmP.js","assets/table-ndRCEoiP.js","assets/toggle-group-CLMfOH5_.js","assets/use-view-mode-DJyWZCWx.js","assets/use-mobile-BIU-83NO.js","assets/FilterLines-Ys59iosV.js","assets/SearchMd-Tflpro6A.js","assets/dialog-plvp42Da.js","assets/X-seiS6qu9.js","assets/AlertCircle-WA_QPWsK.js","assets/Upload01-Buwo0VZX.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-D_zXbEOj.js","assets/card-BfVg8xHZ.js","assets/Trash01-B_oyI8X6.js","assets/label-Bqr4BUzi.js","assets/select-BNWH83Nl.js","assets/tooltip-BHWtFL93.js","assets/ChevronDown-CBaUlfZV.js","assets/ChevronUp-V2cJh30A.js","assets/switch-w9ObaaZI.js","assets/textarea-BtWh1EgY.js","assets/XCircle-QAJ9m3Pn.js","assets/checkbox-BIIXOd5y.js","assets/Eye-B9yPfvFW.js","assets/LinkExternal01-JfkCugVU.js","assets/use-copy-DpQdKm8L.js","assets/Copy01-C8kg6rKb.js","assets/Key01-CqEmKljb.js","assets/Plus-B6RgoGgu.js","assets/mcp-oauth-BFxv50xm.js","assets/Play-BdfpNe18.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as i,j as e,r as s,k as a,aG as o}from"./index-DEohtFix.js";import{R as m}from"./require-capability-9Ny3lSYN.js";import"./use-capability-CunLOvW0.js";import"./access-gate-De8JidHO.js";import"./capability-load-error-DOK9LPUr.js";const n=s.lazy(()=>o(()=>import("./registry-layout-BnjqmPwD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BnjqmPwD.js","assets/index-DEohtFix.js","assets/index-BtYfp9ST.css","assets/Tool02-C5VJtKqh.js","assets/CheckCircle-CXrIThfj.js","assets/Settings02-BDvKUljA.js","assets/use-mcp-client-BV3k-RTW.js","assets/auth-DPMTPKsa.js","assets/useInfiniteQuery-DbIec81r.js","assets/use-infinite-scroll-CZwqTscI.js","assets/studio-tools-Cw5xjEzL.js","assets/badge-BV0oVP9T.js","assets/input-7PXnbAAh.js","assets/dropdown-menu-BjUn4OUh.js","assets/Check-BA4woPGX.js","assets/ChevronRight-K8rB4H3M.js","assets/DotsVertical-DFe7UmmP.js","assets/table-ndRCEoiP.js","assets/toggle-group-CLMfOH5_.js","assets/use-view-mode-DJyWZCWx.js","assets/use-mobile-BIU-83NO.js","assets/FilterLines-Ys59iosV.js","assets/SearchMd-Tflpro6A.js","assets/dialog-plvp42Da.js","assets/X-seiS6qu9.js","assets/AlertCircle-WA_QPWsK.js","assets/Upload01-Buwo0VZX.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-D_zXbEOj.js","assets/card-BfVg8xHZ.js","assets/Trash01-B_oyI8X6.js","assets/label-Bqr4BUzi.js","assets/select-BNWH83Nl.js","assets/tooltip-BHWtFL93.js","assets/ChevronDown-CBaUlfZV.js","assets/ChevronUp-V2cJh30A.js","assets/switch-w9ObaaZI.js","assets/textarea-BtWh1EgY.js","assets/XCircle-QAJ9m3Pn.js","assets/checkbox-BIIXOd5y.js","assets/Eye-B9yPfvFW.js","assets/LinkExternal01-JfkCugVU.js","assets/use-copy-DpQdKm8L.js","assets/Copy01-C8kg6rKb.js","assets/Key01-CqEmKljb.js","assets/Plus-B6RgoGgu.js","assets/mcp-oauth-BFxv50xm.js","assets/Play-BdfpNe18.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as m,d as n,f as c,j as t,k as f,r as l,aG as p}from"./index-DEohtFix.js";import{R as u}from"./require-capability-9Ny3lSYN.js";import"./use-capability-CunLOvW0.js";import"./access-gate-De8JidHO.js";import"./capability-load-error-DOK9LPUr.js";const g=l.lazy(()=>p(()=>import("./registry-layout-BnjqmPwD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as Kt,X as Ut,c as F,b as V,Y as pt,Z as ht,e as Gt,j as t,a as ae,B as ne,r as H,aI as qt,d as st,s as Xt,m as X,t as K,w as Wt,k as ke,p as R,F as oe,f as ot,u as it,L as Qt,D as Yt,I as Jt,G as Zt,K as at,o as en,n as tn}from"./index-DEohtFix.js";import{t as xt}from"./ChevronDown-CBaUlfZV.js";import{A as jt,l as nn,d as sn}from"./agent-icon-DaEkSwM4.js";import{T as Ce,a as ye,c as Se}from"./tooltip-BHWtFL93.js";import{u as vt,d as bt,c as Ct}from"./sidebar-D0PhTSZr.js";import{a as rt,i as on,f as an,S as rn,u as cn}from"./use-mcp-client-BV3k-RTW.js";import{a as ln,u as dn}from"./use-virtual-mcp-PtzzNKLp.js";import{a as Be,b as yt,P as St}from"./popover-Bq1Pw8YU.js";import{i as Ee}from"./Check-BA4woPGX.js";import{s as we}from"./Plus-B6RgoGgu.js";import{i as wt}from"./SearchMd-Tflpro6A.js";import{s as Nt}from"./XClose-CH93pLi0.js";import{c as un,d as mn,b as fn,f as gn,e as pn,a as hn,A as xn}from"./alert-dialog-D_zXbEOj.js";import{F as Q,a as nt,b as Y,c as J,d as Z,f as jn,e as ee}from"./form-BxoJZ5LT.js";import{I as ie}from"./input-7PXnbAAh.js";import{S as vn}from"./chat-context-DgliKNg4.js";import{T as _t}from"./toolbar-BIr_P5og.js";import{S as bn}from"./skeleton-CXnjiWJf.js";import{D as Dt,a as kt,b as At,c as Cn,e as yn,f as Sn,g as wn}from"./drawer-B-nDmC0A.js";import{u as It}from"./use-mobile-BIU-83NO.js";import{G as Nn}from"./use-registry-app-WYZ8nQ6U.js";import{G as _n}from"./github-repo-picker-Czlt_w3i.js";import{g as Dn,b as kn,a as Pt}from"./hooks-BJWPttlr.js";import{u as An,g as In,a as Pn,b as Tn}from"./use-navigate-to-agent-UedncRA1.js";import{a as On,c as Tt}from"./agent-capabilities-cXfbMfjV.js";import{u as Ot}from"./shell-layout-DauV9Fpz.js";import{f as zn}from"./reusable-new-chat-CouMjkYR.js";import{C as Mn}from"./collection-search-CfVuPGVA.js";import{g as Fn,a as $n,b as Ln,e as Bn}from"./extract-connection-data-CM2ISh7r.js";import{u as zt,a as Mt,g as En,C as Ye}from"./connection-card-Di9u0v_-.js";import{e as Ft,d as $t,a as Lt,b as Bt,h as Vn,c as Rn}from"./dialog-plvp42Da.js";import{S as Hn,a as Kn,b as Un,c as Gn,d as De}from"./select-BNWH83Nl.js";import{T as qn}from"./textarea-BtWh1EgY.js";import{b as Et}from"./use-connection-BQ-kW5DV.js";import{a as Le,b as Je}from"./Tool02-C5VJtKqh.js";import{s as Ze}from"./Star01-B11D2TqU.js";import{c as Xn,i as Fe,a as ut,E as Wn,p as Qn,b as Yn,d as Jn}from"./connection-form-helpers-GYelocJ4.js";import{a as et}from"./authenticate-and-persist-oauth-BcHi9Lpg.js";import{g as Zn}from"./connection-slug-eyAPH6o3.js";import{C as es}from"./collection-tabs-BXUJTY9k.js";import{u as mt}from"./use-infinite-scroll-CZwqTscI.js";import{B as $e}from"./badge-BV0oVP9T.js";import{u as ts}from"./useSuspenseInfiniteQuery-D_mHbwQw.js";import{g as Ve}from"./metadata-dUsYcpuu.js";import{u as ns}from"./studio-tools-Cw5xjEzL.js";import{u as ss}from"./use-ai-providers-DahOLE-X.js";function ft(n){return n.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const os=Kt({name:Ut().min(2,"Organization name is required")});function is(n){const e=F.c(66),{open:s,onOpenChange:o}=n,i=V();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={resolver:pt(os),defaultValues:{name:""}},e[0]=a):a=e[0];const r=ht(a);let d;e[1]!==i?(d=async E=>{const M=ft(E.name);if(!M)throw new Error(i("common.createOrganizationDialog.invalidSlug"));const G=await ae.organization.create({name:E.name,slug:M});if(G?.error)throw new Error(G.error.message||i("common.createOrganizationDialog.failedToCreate"));const U=G?.data?.slug??M;if(!U)throw new Error(i("common.createOrganizationDialog.failedToCreate"));return{orgSlug:U}},e[1]=i,e[2]=d):d=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=as,e[3]=c):c=e[3];let u;e[4]!==d?(u={mutationFn:d,onSuccess:c},e[4]=d,e[5]=u):u=e[5];const m=Gt(u);let h;e[6]!==m.error||e[7]!==i?(h=m.error instanceof Error?m.error.message:m.error?i("common.createOrganizationDialog.failedToCreateGeneric"):null,e[6]=m.error,e[7]=i,e[8]=h):h=e[8];const l=h;let g;e[9]!==i?(g=i("common.createOrganizationDialog.title"),e[9]=i,e[10]=g):g=e[10];let S;e[11]!==g?(S=t.jsx(un,{children:g}),e[11]=g,e[12]=S):S=e[12];let x;e[13]!==i?(x=i("common.createOrganizationDialog.description"),e[13]=i,e[14]=x):x=e[14];let f;e[15]!==x?(f=t.jsx(mn,{children:x}),e[15]=x,e[16]=f):f=e[16];let j;e[17]!==S||e[18]!==f?(j=t.jsxs(fn,{children:[S,f]}),e[17]=S,e[18]=f,e[19]=j):j=e[19];let v;if(e[20]!==m||e[21]!==r){let E;e[23]!==m?(E=M=>m.mutateAsync(M),e[23]=m,e[24]=E):E=e[24],v=r.handleSubmit(E),e[20]=m,e[21]=r,e[22]=v}else v=e[22];let C;e[25]!==r.formState.isSubmitting||e[26]!==i?(C=E=>{const{field:M}=E;return t.jsxs(Y,{children:[t.jsx(J,{children:i("common.createOrganizationDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ie,{...M,placeholder:i("common.createOrganizationDialog.namePlaceholder"),disabled:r.formState.isSubmitting})}),t.jsx(jn,{children:i("common.createOrganizationDialog.nameDescription")}),M.value&&t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[i("common.createOrganizationDialog.urlLabel")," ",t.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",ft(M.value)]})]}),t.jsx(ee,{})]})},e[25]=r.formState.isSubmitting,e[26]=i,e[27]=C):C=e[27];let N;e[28]!==r.control||e[29]!==C?(N=t.jsx(Q,{control:r.control,name:"name",render:C}),e[28]=r.control,e[29]=C,e[30]=N):N=e[30];let w;e[31]!==l?(w=l&&t.jsx("div",{className:"text-destructive text-sm mt-2",children:l}),e[31]=l,e[32]=w):w=e[32];const P=r.formState.isSubmitting;let O;e[33]!==m||e[34]!==r?(O=()=>{m.reset(),r.reset()},e[33]=m,e[34]=r,e[35]=O):O=e[35];let p;e[36]!==i?(p=i("common.createOrganizationDialog.cancel"),e[36]=i,e[37]=p):p=e[37];let _;e[38]!==r.formState.isSubmitting||e[39]!==O||e[40]!==p?(_=t.jsx(gn,{disabled:P,onClick:O,children:p}),e[38]=r.formState.isSubmitting,e[39]=O,e[40]=p,e[41]=_):_=e[41];const T=!r.formState.isValid||r.formState.isSubmitting;let y;e[42]!==r.formState.isSubmitting||e[43]!==i?(y=r.formState.isSubmitting?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(vn,{size:"xs"})," ",i("common.createOrganizationDialog.creating")]}):i("common.createOrganizationDialog.createButton"),e[42]=r.formState.isSubmitting,e[43]=i,e[44]=y):y=e[44];let b;e[45]!==T||e[46]!==y?(b=t.jsx(ne,{type:"submit",variant:"default",disabled:T,children:y}),e[45]=T,e[46]=y,e[47]=b):b=e[47];let I;e[48]!==_||e[49]!==b?(I=t.jsxs(pn,{children:[_,b]}),e[48]=_,e[49]=b,e[50]=I):I=e[50];let k;e[51]!==v||e[52]!==N||e[53]!==w||e[54]!==I?(k=t.jsxs("form",{className:"space-y-6",onSubmit:v,autoComplete:"off",children:[N,w,I]}),e[51]=v,e[52]=N,e[53]=w,e[54]=I,e[55]=k):k=e[55];let A;e[56]!==r||e[57]!==k?(A=t.jsx(nt,{...r,children:k}),e[56]=r,e[57]=k,e[58]=A):A=e[58];let z;e[59]!==j||e[60]!==A?(z=t.jsxs(hn,{children:[j,A]}),e[59]=j,e[60]=A,e[61]=z):z=e[61];let B;return e[62]!==o||e[63]!==s||e[64]!==z?(B=t.jsx(xn,{open:s,onOpenChange:o,children:z}),e[62]=o,e[63]=s,e[64]=z,e[65]=B):B=e[65],B}function as(n){const{orgSlug:e}=n;window.location.href=`/${e}`}function Vt(){const n=H.useContext(qt),{data:e,refetch:s}=n.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>s?.()}}function rs(n){let e=0;for(let o=0;o<n.length;o++)e=n.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function ct(n){const e=F.c(13),{org:s,size:o}=n,i=o===void 0?"sm":o,a=i==="xs"?"size-5":"size-6",r=i==="xs"?"text-[9px]":"text-xs";let d;e[0]!==a?(d=X(a,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=a,e[1]=d):d=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:rs(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==r?(u=s.logo?t.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):t.jsx("span",{className:X("font-semibold leading-none",r),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=r,e[8]=u):u=e[8];let m;return e[9]!==d||e[10]!==c||e[11]!==u?(m=t.jsx("div",{className:d,style:c,children:u}),e[9]=d,e[10]=c,e[11]=u,e[12]=m):m=e[12],m}function cs({invitation:n,onChanged:e}){const s=V(),[o,i]=H.useState(!1),a=n.organizationName??s("header.orgSwitcher.unknownOrganization"),r=async()=>{i(!0);try{const u=await ae.organization.acceptInvitation({invitationId:n.id});if(u.error){K.error(u.error.message),i(!1);return}}catch{K.error(s("header.orgSwitcher.failedToAcceptInvitation")),i(!1);return}K.success(s("header.orgSwitcher.joined",{name:a})),Wt();let c;try{c=(await ae.organization.getFullOrganization({query:{organizationId:n.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},d=async()=>{i(!0);try{const c=await ae.organization.rejectInvitation({invitationId:n.id});if(c.error){K.error(c.error.message),i(!1);return}K.success(s("header.orgSwitcher.invitationDeclined")),i(!1),e()}catch{K.error(s("header.orgSwitcher.failedToDeclineInvitation")),i(!1)}};return t.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[t.jsx(ct,{org:{name:a},size:"sm"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"truncate text-sm font-medium",children:a}),t.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[t.jsx(ne,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:o,children:s("header.orgSwitcher.accept")}),t.jsx(ne,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:d,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:a}),children:t.jsx(Nt,{size:14})})]})]})}function ls(n){const e=F.c(32),{orgParam:s,onSelectOrg:o,onCreateOrg:i}=n,a=V(),{data:r}=Xt(),{invitations:d,refetch:c}=Vt();let u;e[0]!==s?(u=(k,A)=>k.slug===s?-1:A.slug===s?1:k.name.localeCompare(A.name),e[0]=s,e[1]=u):u=e[1];const m=[...r??[]].sort(u),[h,l]=H.useState(""),g=h.toLowerCase(),S=g?m.filter(k=>k.name.toLowerCase().includes(g)||k.slug.toLowerCase().includes(g)):m;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(wt,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=k=>l(k.target.value),e[3]=f):f=e[3];let j;e[4]!==h?(j=k=>k.key==="Escape"&&h&&l(""),e[4]=h,e[5]=j):j=e[5];let v;e[6]!==a?(v=a("header.orgSwitcher.searchOrganizations"),e[6]=a,e[7]=v):v=e[7];let C;e[8]!==h||e[9]!==j||e[10]!==v?(C=t.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:h,onChange:f,onKeyDown:j,placeholder:v,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=h,e[9]=j,e[10]=v,e[11]=C):C=e[11];let N;e[12]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(we,{size:16}),e[12]=N):N=e[12];let w;e[13]!==i?(w=t.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:N}),e[13]=i,e[14]=w):w=e[14];let P;e[15]!==C||e[16]!==w?(P=t.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,C,w]}),e[15]=C,e[16]=w,e[17]=P):P=e[17];const O="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let p;e[18]!==d||e[19]!==h||e[20]!==c?(p=!h&&d.map(k=>t.jsx(cs,{invitation:k,onChanged:c},k.id)),e[18]=d,e[19]=h,e[20]=c,e[21]=p):p=e[21];const _=S.length===0&&t.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:h?a("header.orgSwitcher.noOrganizationsMatch",{query:h}):a("header.orgSwitcher.noOrganizationsAvailable")});let T;e[22]!==o||e[23]!==s?(T=k=>t.jsxs("button",{type:"button",onClick:()=>o(k.slug),className:X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",k.slug===s?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[t.jsx(ct,{org:k,size:"sm"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:k.name}),t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:k.slug})]}),k.slug===s&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},k.id),e[22]=o,e[23]=s,e[24]=T):T=e[24];const y=S.map(T);let b;e[25]!==p||e[26]!==_||e[27]!==y?(b=t.jsxs("div",{className:O,children:[p,_,y]}),e[25]=p,e[26]=_,e[27]=y,e[28]=b):b=e[28];let I;return e[29]!==b||e[30]!==P?(I=t.jsxs(t.Fragment,{children:[P,b]}),e[29]=b,e[30]=P,e[31]=I):I=e[31],I}function ds(n){const e=F.c(22),{trigger:s,orgParam:o,align:i,side:a}=n,r=i===void 0?"start":i,d=a===void 0?"bottom":a,c=st(),[u,m]=H.useState(!1),[h,l]=H.useState(!1);let g;e[0]!==s?(g=t.jsx(Be,{asChild:!0,children:s}),e[0]=s,e[1]=g):g=e[1];const S=String(u);let x;e[2]!==c?(x=P=>{m(!1),c({to:"/$org",params:{org:P}})},e[2]=c,e[3]=x):x=e[3];let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{m(!1),l(!0)},e[4]=f):f=e[4];let j;e[5]!==o||e[6]!==S||e[7]!==x?(j=t.jsx(ls,{orgParam:o,onSelectOrg:x,onCreateOrg:f},S),e[5]=o,e[6]=S,e[7]=x,e[8]=j):j=e[8];let v;e[9]!==r||e[10]!==d||e[11]!==j?(v=t.jsx(yt,{side:d,align:r,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:ms,onCloseAutoFocus:us,children:j}),e[9]=r,e[10]=d,e[11]=j,e[12]=v):v=e[12];let C;e[13]!==u||e[14]!==g||e[15]!==v?(C=t.jsxs(St,{open:u,onOpenChange:m,children:[g,v]}),e[13]=u,e[14]=g,e[15]=v,e[16]=C):C=e[16];let N;e[17]!==h?(N=t.jsx(is,{open:h,onOpenChange:l}),e[17]=h,e[18]=N):N=e[18];let w;return e[19]!==N||e[20]!==C?(w=t.jsxs(t.Fragment,{children:[C,N]}),e[19]=N,e[20]=C,e[21]=w):w=e[21],w}function us(n){return n.preventDefault()}function ms(n){n.preventDefault(),n.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function fs(n){const e=F.c(21),{value:s,onChange:o,placeholder:i,onKeyDown:a,className:r,isSearching:d,disabled:c}=n,u=i===void 0?"Search...":i;let m;e[0]!==r?(m=X("shrink-0 w-full border-b border-border h-12",r),e[0]=r,e[1]=m):m=e[1];const h=c?"cursor-not-allowed opacity-50":"cursor-text";let l;e[2]!==h?(l=X("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=l):l=e[3];let g;e[4]!==d?(g=d?t.jsx(ke,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):t.jsx(wt,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=d,e[5]=g):g=e[5];let S;e[6]!==o?(S=v=>o(v.target.value),e[6]=o,e[7]=S):S=e[7];let x;e[8]!==c||e[9]!==a||e[10]!==u||e[11]!==S||e[12]!==s?(x=t.jsx("input",{type:"text",value:s,onChange:S,onKeyDown:a,placeholder:u,disabled:c,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=c,e[9]=a,e[10]=u,e[11]=S,e[12]=s,e[13]=x):x=e[13];let f;e[14]!==l||e[15]!==g||e[16]!==x?(f=t.jsxs("label",{className:l,children:[g,x]}),e[14]=l,e[15]=g,e[16]=x,e[17]=f):f=e[17];let j;return e[18]!==m||e[19]!==f?(j=t.jsx("div",{className:m,children:f}),e[18]=m,e[19]=f,e[20]=j):j=e[20],j}function gs(n,e,s){if(!s)return null;const o=Dn(n,e);return o?o.threads.get().find(a=>a.id===s)?.branch??null:null}function ps(n){const e=F.c(6),{value:s,onChange:o}=n,i=V();let a;e[0]!==i?(a=i("sidebar.agentsSection.searchAgents"),e[0]=i,e[1]=a):a=e[1];let r;return e[2]!==o||e[3]!==a||e[4]!==s?(r=t.jsx(fs,{value:s,onChange:o,placeholder:a}),e[2]=o,e[3]=a,e[4]=s,e[5]=r):r=e[5],r}function hs(){const n=F.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function xs(n){const e=F.c(10),{org:s,onClose:o}=n,i=V();let a;e[0]!==s.slug?(a={org:s.slug},e[0]=s.slug,e[1]=a):a=e[1];let r;e[2]!==o?(r=()=>o(),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==i?(d=i("sidebar.agentsSection.seeAllAgents"),e[4]=i,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==r||e[8]!==d?(c=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(Qt,{to:"/$org/settings/agents",params:a,onClick:r,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:d})}),e[6]=a,e[7]=r,e[8]=d,e[9]=c):c=e[9],c}function js(){const n=F.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Rt,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function vs(n){const e=F.c(11),{onImportFromGithub:s}=n,o=V();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Nn,{className:"size-3.5"}),e[0]=i):i=e[0];let a;e[1]!==o?(a=o("sidebar.agentsSection.import"),e[1]=o,e[2]=a):a=e[2];let r;e[3]!==s||e[4]!==a?(r=t.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[i,a]}),e[3]=s,e[4]=a,e[5]=r):r=e[5];let d;e[6]!==o?(d=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=d):d=e[7];let c;return e[8]!==r||e[9]!==d?(c=t.jsx(Rt,{action:r,children:d}),e[8]=r,e[9]=d,e[10]=c):c=e[10],c}function bs(n){const e=F.c(11),{setOpen:s,emptyCtaClass:o}=n,i=V();let a;e[0]!==i?(a=i("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=a):a=e[1];let r;e[2]!==o?(r=X(o),e[2]=o,e[3]=r):r=e[3];let d;e[4]!==s?(d=()=>{R("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=d):d=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{className:"size-4"}),e[6]=c):c=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==d?(u=t.jsx(_t,{"aria-label":a,className:r,onClick:d,children:c}),e[7]=a,e[8]=r,e[9]=d,e[10]=u):u=e[10],u}function Cs(n){const e=F.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:i}=n,a=V();let r;e[0]!==o||e[1]!==a?(r=o?void 0:a("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a,e[2]=r):r=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]!==s?(c=()=>{R("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(we,{}),e[7]=u):u=e[7];let m;e[8]!==a?(m=a("sidebar.agentsSection.newAgent"),e[8]=a,e[9]=m):m=e[9];let h;e[10]!==m?(h=t.jsx("span",{children:m}),e[10]=m,e[11]=h):h=e[11];let l;return e[12]!==r||e[13]!==d||e[14]!==c||e[15]!==h?(l=t.jsx(bt,{children:t.jsxs(Ct,{tooltip:r,className:d,onClick:c,children:[u,h]})}),e[12]=r,e[13]=d,e[14]=c,e[15]=h,e[16]=l):l=e[16],l}function ys(){const n=F.c(4),e=V();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(At,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function Ss(n){const e=F.c(8),{emptyCtaClass:s}=n,o=V();let i;e[0]!==o?(i=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s?(a=X(s),e[2]=s,e[3]=a):a=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(we,{className:"size-4"}),e[4]=r):r=e[4];let d;return e[5]!==i||e[6]!==a?(d=t.jsx(_t,{"aria-label":i,className:a,children:r}),e[5]=i,e[6]=a,e[7]=d):d=e[7],d}function ws(n){const e=F.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:i}=n,a=V();let r;e[0]!==o||e[1]!==a?(r=o?void 0:a("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a,e[2]=r):r=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(we,{}),e[5]=c):c=e[5];let u;e[6]!==a?(u=a("sidebar.agentsSection.newAgent"),e[6]=a,e[7]=u):u=e[7];let m;e[8]!==u?(m=t.jsx("span",{children:u}),e[8]=u,e[9]=m):m=e[9];let h;e[10]!==r||e[11]!==d||e[12]!==m?(h=t.jsx(Be,{asChild:!0,children:t.jsxs(Ct,{tooltip:r,className:d,children:[c,m]})}),e[10]=r,e[11]=d,e[12]=m,e[13]=h):h=e[13];let l;e[14]!==h||e[15]!==s?(l=s(h),e[14]=h,e[15]=s,e[16]=l):l=e[16];let g;return e[17]!==l?(g=t.jsx(bt,{children:l}),e[17]=l,e[18]=g):g=e[18],g}function Ns(n){const e=F.c(9),{children:s}=n,o=V();let i;e[0]!==s?(i=t.jsx(Ce,{asChild:!0,children:s}),e[0]=s,e[1]=i):i=e[1];let a;e[2]!==o?(a=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=a):a=e[3];let r;e[4]!==a?(r=t.jsx(ye,{side:"right",sideOffset:8,children:a}),e[4]=a,e[5]=r):r=e[5];let d;return e[6]!==i||e[7]!==r?(d=t.jsxs(Se,{defaultOpen:!0,delayDuration:0,children:[i,r]}),e[6]=i,e[7]=r,e[8]=d):d=e[8],d}function _s(n){const e=st(),{create:s}=kn(),{locator:o}=oe(),i=ot({strict:!1}),a=it({strict:!1});return async r=>{const d=crypto.randomUUID(),c=r===a.virtualmcpid?gs(n,o,i.taskId??""):null;try{await s({id:d,virtual_mcp_id:r,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:d},search:{virtualmcpid:r}})}}function tt(n){const e=F.c(20),{agent:s,selected:o,onClick:i}=n,a=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let r;e[0]!==a?(r=X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",a),e[0]=a,e[1]=r):r=e[1];let d;e[2]!==s.icon||e[3]!==s.title?(d=t.jsx(jt,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=d):d=e[4];let c;e[5]!==s.title?(c=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let u;e[7]!==s.description?(u=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=u):u=e[8];let m;e[9]!==c||e[10]!==u?(m=t.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[9]=c,e[10]=u,e[11]=m):m=e[11];let h;e[12]!==o?(h=o&&t.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=h):h=e[13];let l;return e[14]!==i||e[15]!==r||e[16]!==d||e[17]!==m||e[18]!==h?(l=t.jsxs("button",{type:"button",onClick:i,className:r,children:[d,m,h]}),e[14]=i,e[15]=r,e[16]=d,e[17]=m,e[18]=h,e[19]=l):l=e[19],l}function Rt(n){const e=F.c(5),{children:s,action:o}=n;let i;e[0]!==s?(i=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=i):i=e[1];let a;return e[2]!==o||e[3]!==i?(a=t.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,o]}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}function Ds(n){const e=F.c(23),{onClose:s,onSelectAgent:o,selectedAgentId:i,onImportFromGithub:a}=n,[r,d]=H.useState(""),c=ln(),u=c??[],{org:m}=oe(),{data:h}=ae.useSession(),l=h?.user?.id??"anon",g=In(c),S=Pn(),x=_s(m.slug),f=On(c),j=r.toLowerCase(),v=u.filter(Ps).filter(L=>!f.has(L.id)).filter(Is).filter(L=>!r||L.title.toLowerCase().includes(j)),C=v.filter(As),N=v.filter(ks),w=rt(m.id),P=!r||w.title.toLowerCase().includes(j),O=!!(o&&P);let p;e[0]!==s||e[1]!==o?(p=()=>{o?.(null),s(),d("")},e[0]=s,e[1]=o,e[2]=p):p=e[2];const _=p,T=L=>{if(o){o(L.id),s(),d("");return}Tn({orgId:m.id,userId:l},L.id,g),S(),s(),d(""),x(L.id)},y="flex flex-col max-h-[min(640px,80dvh)]";let b;e[3]!==r?(b=t.jsx(ps,{value:r,onChange:d}),e[3]=r,e[4]=b):b=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",k=o&&P&&w&&t.jsx(tt,{agent:w,selected:!i||i===w.id,onClick:_}),A=(C.length>0||!r)&&t.jsx(vs,{onImportFromGithub:a}),z=C.map(L=>t.jsx(tt,{agent:L,selected:o?i===L.id:void 0,onClick:()=>T(L)},L.id)),B=N.length>0&&t.jsx(js,{}),E=N.map(L=>t.jsx(tt,{agent:L,selected:o?i===L.id:void 0,onClick:()=>T(L)},L.id));let M;e[5]!==O||e[6]!==r||e[7]!==v.length?(M=v.length===0&&!O&&r&&t.jsx(hs,{}),e[5]=O,e[6]=r,e[7]=v.length,e[8]=M):M=e[8];let G;e[9]!==M||e[10]!==k||e[11]!==A||e[12]!==z||e[13]!==B||e[14]!==E?(G=t.jsxs("div",{className:I,children:[k,A,z,B,E,M]}),e[9]=M,e[10]=k,e[11]=A,e[12]=z,e[13]=B,e[14]=E,e[15]=G):G=e[15];let U;e[16]!==s||e[17]!==m?(U=t.jsx(xs,{org:m,onClose:s}),e[16]=s,e[17]=m,e[18]=U):U=e[18];let de;return e[19]!==G||e[20]!==U||e[21]!==b?(de=t.jsxs("div",{className:y,children:[b,G,U]}),e[19]=G,e[20]=U,e[21]=b,e[22]=de):de=e[22],de}function ks(n){return!Tt(n.metadata)}function As(n){return Tt(n.metadata)}function Is(n){return!an(n.id)}function Ps(n){return!on(n.id)}function Ts(n){const e=F.c(31);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{compact:o,trigger:i,onSelectAgent:a,selectedAgentId:r,side:d,align:c}=s,u=o===void 0?!1:o,m=d===void 0?"right":d,h=c===void 0?"start":c,[l,g]=H.useState(!1),[S,x]=H.useState(!1),f=It(),{setOpenMobile:j}=vt(),v=An(),C=v?"border border-border":void 0;let N;e[2]!==v?(N=A=>v?t.jsx(Ns,{children:A}):A,e[2]=v,e[3]=N):N=e[3];const w=N;let P;e[4]!==f||e[5]!==j?(P=()=>{g(!1),f&&j(!1)},e[4]=f,e[5]=j,e[6]=P):P=e[6];const O=P;let p;e[7]!==O?(p=()=>{O(),x(!0)},e[7]=O,e[8]=p):p=e[8];const _=p;let T;e[9]!==O||e[10]!==_||e[11]!==a||e[12]!==l||e[13]!==r?(T=l&&t.jsx(H.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(bn,{className:"h-4 w-24"})}),children:t.jsx(Ds,{onClose:O,onSelectAgent:a,selectedAgentId:r,onImportFromGithub:_})}),e[9]=O,e[10]=_,e[11]=a,e[12]=l,e[13]=r,e[14]=T):T=e[14];const y=T;let b;e[15]!==h||e[16]!==u||e[17]!==C||e[18]!==v||e[19]!==f||e[20]!==l||e[21]!==y||e[22]!==m||e[23]!==i||e[24]!==w?(b=f?t.jsxs(t.Fragment,{children:[i?t.jsx("button",{type:"button",onClick:()=>g(!0),className:"contents",children:i}):u?w(t.jsx(bs,{setOpen:g,emptyCtaClass:C})):t.jsx(Cs,{setOpen:g,highlightEmpty:v,emptyCtaClass:C}),t.jsx(Dt,{open:l,onOpenChange:g,direction:"bottom",children:t.jsxs(kt,{className:"max-h-[85dvh] p-0",children:[t.jsx(ys,{}),y]})})]}):t.jsxs(St,{open:l,onOpenChange:A=>{A&&!l&&R("agent_browser_opened",{surface:"desktop_popover"}),g(A)},children:[i?t.jsx(Be,{asChild:!0,children:i}):u?w(t.jsx(Be,{asChild:!0,children:t.jsx(Ss,{emptyCtaClass:C})})):t.jsx(ws,{wrapEmptyHint:w,highlightEmpty:v,emptyCtaClass:C}),t.jsx(yt,{className:"w-[380px] p-0 overflow-hidden",side:m,align:h,children:y})]}),e[15]=h,e[16]=u,e[17]=C,e[18]=v,e[19]=f,e[20]=l,e[21]=y,e[22]=m,e[23]=i,e[24]=w,e[25]=b):b=e[25];let I;e[26]!==S?(I=t.jsx(_n,{open:S,onOpenChange:x,mode:"agent"}),e[26]=S,e[27]=I):I=e[27];let k;return e[28]!==I||e[29]!==b?(k=t.jsxs(t.Fragment,{children:[b,I]}),e[28]=I,e[29]=b,e[30]=k):k=e[30],k}const Os="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function zs(n){const e=F.c(22),{agentId:s,fallback:o,onOpenHome:i,onPick:a}=n,r=V(),d=dn(s)??o??null,c=d?.title??"Super Agent";let u;e[0]!==r||e[1]!==c?(u=r("header.shellBreadcrumb.openAgentHome",{name:c}),e[0]=r,e[1]=c,e[2]=u):u=e[2];const m=d?.icon??null;let h;e[3]!==m||e[4]!==c?(h=t.jsx(jt,{icon:m,name:c,size:"xs"}),e[3]=m,e[4]=c,e[5]=h):h=e[5];let l;e[6]!==i||e[7]!==u||e[8]!==h?(l=t.jsx("button",{type:"button",onClick:i,"aria-label":u,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:h}),e[6]=i,e[7]=u,e[8]=h,e[9]=l):l=e[9];let g;e[10]!==c?(g=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:c}),e[10]=c,e[11]=g):g=e[11];let S;e[12]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[12]=S):S=e[12];let x;e[13]!==g?(x=t.jsxs("button",{type:"button",className:Os,children:[g,S]}),e[13]=g,e[14]=x):x=e[14];let f;e[15]!==s||e[16]!==a||e[17]!==x?(f=t.jsx(Ts,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:a,trigger:x}),e[15]=s,e[16]=a,e[17]=x,e[18]=f):f=e[18];let j;return e[19]!==l||e[20]!==f?(j=t.jsxs("div",{className:"flex min-w-0 items-center gap-0",children:[l,f]}),e[19]=l,e[20]=f,e[21]=j):j=e[21],j}function Lo(n){const e=F.c(30);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{showName:o}=s,i=V(),{org:a}=oe(),{state:r,isMobile:d}=vt(),c=Vt().invitations.length>0,u=r==="collapsed"||d;let m;e[2]!==c||e[3]!==a.name||e[4]!==i?(m=c?i("header.shellBreadcrumb.switchOrganizationPendingInvitation",{name:a.name}):i("header.shellBreadcrumb.switchOrganization",{name:a.name}),e[2]=c,e[3]=a.name,e[4]=i,e[5]=m):m=e[5];let h;e[6]!==a?(h=t.jsx(ct,{org:a,size:"sm"}),e[6]=a,e[7]=h):h=e[7];let l;e[8]!==c||e[9]!==u?(l=c&&t.jsx("span",{className:X("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",u?"-top-1":"top-1/2 -translate-y-1/2")}),e[8]=c,e[9]=u,e[10]=l):l=e[10];let g;e[11]!==h||e[12]!==l?(g=t.jsxs("span",{className:"relative inline-flex",children:[h,l]}),e[11]=h,e[12]=l,e[13]=g):g=e[13];let S;e[14]!==a.name||e[15]!==o?(S=o&&t.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:a.name}),e[14]=a.name,e[15]=o,e[16]=S):S=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[17]=x):x=e[17];let f;e[18]!==m||e[19]!==g||e[20]!==S?(f=t.jsx(Ce,{asChild:!0,children:t.jsxs("button",{type:"button","aria-label":m,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[g,S,x]})}),e[18]=m,e[19]=g,e[20]=S,e[21]=f):f=e[21];let j;e[22]!==a.slug||e[23]!==f?(j=t.jsx(ds,{orgParam:a.slug,trigger:f}),e[22]=a.slug,e[23]=f,e[24]=j):j=e[24];let v;e[25]!==a.name?(v=t.jsx(ye,{side:"bottom",children:a.name}),e[25]=a.name,e[26]=v):v=e[26];let C;return e[27]!==v||e[28]!==j?(C=t.jsxs(Se,{children:[j,v]}),e[27]=v,e[28]=j,e[29]=C):C=e[29],C}function Bo(n){const e=F.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:i}=oe();let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},e[2]=a):a=e[2];const r=ot(a);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[3]=d):d=e[3];const c=it(d),{threads:u}=Pt(),{data:m}=ae.useSession(),{setTaskId:h,createNewTask:l}=Ot();let g;e[4]!==i.id?(g=rt(i.id),e[4]=i.id,e[5]=g):g=e[5];const S=g,x=S.id,f=r.taskId?c.virtualmcpid??x:x;let j;e[6]!==l||e[7]!==x||e[8]!==o||e[9]!==m?.user?.id||e[10]!==h||e[11]!==u?(j=O=>{const p=O??x,_=zn(u,p,m?.user?.id);_?h(_.id,p):l(p),o?.()},e[6]=l,e[7]=x,e[8]=o,e[9]=m?.user?.id,e[10]=h,e[11]=u,e[12]=j):j=e[12];const v=j;let C;e[13]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=C):C=e[13];const N=f===x?S:void 0;let w;e[14]!==f||e[15]!==v?(w=()=>v(f),e[14]=f,e[15]=v,e[16]=w):w=e[16];let P;return e[17]!==f||e[18]!==v||e[19]!==N||e[20]!==w?(P=t.jsx(H.Suspense,{fallback:C,children:t.jsx(zs,{agentId:f,fallback:N,onOpenHome:w,onPick:v})}),e[17]=f,e[18]=v,e[19]=N,e[20]=w,e[21]=P):P=e[21],P}function Eo(){const n=F.c(24),e=V(),{org:s}=oe();let o;n[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},n[0]=o):o=n[0];const i=ot(o);let a;n[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},n[1]=a):a=n[1];const r=it(a),{threads:d}=Pt(),{createNewTask:c}=Ot();let u;n[2]!==s.id?(u=rt(s.id),n[2]=s.id,n[3]=u):u=n[3];const m=u.id,h=i.taskId?r.virtualmcpid??m:m;let l;n[4]!==i.taskId||n[5]!==d?(l=(i.taskId?d.find(P=>P.id===i.taskId)?.branch:null)??null,n[4]=i.taskId,n[5]=d,n[6]=l):l=n[6];const g=l;let S;n[7]!==h||n[8]!==c||n[9]!==g?(S=()=>{c(h,g)},n[7]=h,n[8]=c,n[9]=g,n[10]=S):S=n[10];const x=S;let f;n[11]!==e?(f=e("sidebar.taskGroupsList.newChat"),n[11]=e,n[12]=f):f=n[12];let j;n[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(nn,{size:16}),n[13]=j):j=n[13];let v;n[14]!==x||n[15]!==f?(v=t.jsx(Ce,{asChild:!0,children:t.jsx("button",{type:"button",onClick:x,"aria-label":f,className:"wco-no-drag flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:j})}),n[14]=x,n[15]=f,n[16]=v):v=n[16];let C;n[17]!==e?(C=e("sidebar.taskGroupsList.newChat"),n[17]=e,n[18]=C):C=n[18];let N;n[19]!==C?(N=t.jsx(ye,{side:"bottom",children:C}),n[19]=C,n[20]=N):N=n[20];let w;return n[21]!==v||n[22]!==N?(w=t.jsxs(Se,{children:[v,N]}),n[21]=v,n[22]=N,n[23]=w):w=n[23],w}function Ms({open:n,onOpenChange:e,onCreated:s}){const o=V(),{org:i}=oe(),{data:a}=ae.useSession(),{stdioEnabled:r}=Yt(),d=It(),c=Et(),u=zt(),h=Mt(u,"").items,l=ht({resolver:pt(Xn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),g=l.watch("ui_type"),S=l.watch("connection_url"),x=l.watch("npx_package"),f=Fe({uiType:g,connectionUrl:S??"",npxPackage:x??""})??ut({uiType:g,connectionUrl:S??"",registryItems:h}),j=p=>{const _=p.trim();if(!_)return;const T=!!l.formState.dirtyFields.title,y=!!l.formState.dirtyFields.description,b=!!l.formState.dirtyFields.env_vars,I=A=>{if(A&&(!T&&!l.getValues("title").trim()&&A.title&&l.setValue("title",A.title,{shouldDirty:!1}),!y&&!(l.getValues("description")??"").trim()&&A.description&&l.setValue("description",A.description,{shouldDirty:!1}),!b&&A.envVarKeys?.length)){const z=l.getValues("env_vars")??[],B=new Set(z.map(M=>M.key)),E=A.envVarKeys.filter(M=>!B.has(M));E.length>0&&l.setValue("env_vars",[...z,...E.map(M=>({key:M,value:""}))],{shouldDirty:!0})}},k=Qn(_);if(k&&r){l.setValue("ui_type","NPX",{shouldDirty:!0}),l.setValue("npx_package",k.packageName,{shouldDirty:!0}),l.setValue("connection_url","",{shouldDirty:!0}),l.setValue("connection_token",null,{shouldDirty:!0}),I(Fe({uiType:"NPX",npxPackage:k.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const A=g==="HTTP"||g==="SSE"||g==="Websocket"?g:"HTTP";l.setValue("ui_type",A,{shouldDirty:!0}),l.setValue("connection_url",_,{shouldDirty:!0}),I(Fe({uiType:A,connectionUrl:_})??ut({uiType:A,connectionUrl:_,registryItems:h}));return}g==="NPX"&&I(Fe({uiType:"NPX",npxPackage:_}))},v=p=>{p||l.reset(),e(p)},C=async p=>{let _,T=null,y=null,b=null;p.ui_type==="NPX"?(_="STDIO",T="",b=Yn(p.npx_package||"",p.env_vars||[])):p.ui_type==="STDIO"?(_="STDIO",T="",b=Jn(p.stdio_command||"",p.stdio_args||"",p.stdio_cwd,p.env_vars||[])):(_=p.ui_type,T=p.connection_url||"",y=p.connection_token||null);const I=Fn("conn");try{await c.create.mutateAsync({id:I,title:p.title,description:p.description||null,connection_type:_,connection_url:T,connection_token:y,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:a?.user?.id||"system",organization_id:i.id,icon:p.icon??null,app_name:null,app_id:null,connection_headers:b,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),l.reset(),e(!1),s?.(I)}catch{K.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},N=o("connections.createConnectionDialog.title"),w=o("connections.createConnectionDialog.description"),P=l.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),O=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(Q,{control:l.control,name:"ui_type",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(Hn,{value:p.value,onValueChange:p.onChange,children:[t.jsx(Z,{children:t.jsx(Kn,{children:t.jsx(Un,{})})}),t.jsxs(Gn,{children:[t.jsx(De,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(De,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(De,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),r&&t.jsxs(t.Fragment,{children:[t.jsx(De,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Le,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(De,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(sn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(ee,{})]})}),g==="NPX"&&t.jsx(Q,{control:l.control,name:"npx_package",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...p,value:p.value??"",onPaste:_=>{const T=_.clipboardData.getData("text");T&&(_.preventDefault(),l.setValue("npx_package",T.trim(),{shouldDirty:!0}),j(T))},onBlur:_=>{j(_.target.value),p.onBlur()}})}),t.jsx(ee,{})]})}),g==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(Q,{control:l.control,name:"stdio_command",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...p,value:p.value??""})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"stdio_args",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...p,value:p.value??""})}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:l.control,name:"stdio_cwd",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...p,value:p.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(ee,{})]})})]}),(g==="NPX"||g==="STDIO")&&t.jsx(Q,{control:l.control,name:"env_vars",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(Z,{children:t.jsx(Wn,{value:p.value??[],onChange:p.onChange})}),t.jsx(ee,{})]})}),g!=="NPX"&&g!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(Q,{control:l.control,name:"connection_url",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...p,value:p.value??"",onPaste:_=>{const T=_.clipboardData.getData("text");T&&(_.preventDefault(),l.setValue("connection_url",T.trim(),{shouldDirty:!0}),j(T))},onBlur:_=>{j(_.target.value),p.onBlur()}})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"connection_token",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:f?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(Z,{children:t.jsx(ie,{type:"password",placeholder:f?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...p,value:p.value??""})}),f?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[f.token.helperText,f.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),t.jsx(ee,{})]})})]}),t.jsx(Q,{control:l.control,name:"title",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(Z,{children:t.jsx(ie,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...p})}),t.jsx(ee,{})]})}),t.jsx(Q,{control:l.control,name:"description",render:({field:p})=>t.jsxs(Y,{children:[t.jsx(J,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(Z,{children:t.jsx(qn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...p,value:p.value??""})}),t.jsx(ee,{})]})})]});return d?t.jsx(Dt,{open:n,onOpenChange:v,children:t.jsxs(kt,{className:"max-h-[90vh]",children:[t.jsx(Cn,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(At,{children:N}),t.jsx(yn,{className:"mt-1",children:w})]}),t.jsx(Sn,{asChild:!0,children:t.jsx(ne,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(Nt,{size:16})})})]})}),t.jsx(nt,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(C),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:O}),t.jsx(wn,{children:t.jsx(ne,{type:"submit",disabled:l.formState.isSubmitting,className:"w-full",children:P})})]})})]})}):t.jsx(Ft,{open:n,onOpenChange:v,children:t.jsxs($t,{className:"sm:max-w-[525px]",children:[t.jsxs(Lt,{children:[t.jsx(Bt,{children:N}),t.jsx(Vn,{children:w})]}),t.jsx(nt,{...l,children:t.jsxs("form",{onSubmit:l.handleSubmit(C),children:[t.jsx("div",{className:"py-4",children:O}),t.jsxs(Rn,{children:[t.jsx(ne,{type:"button",variant:"outline",onClick:()=>v(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(ne,{type:"submit",disabled:l.formState.isSubmitting,className:"min-w-40",children:P})]})]})})]})})}function Fs(n){const e=F.c(72),{mode:s,agentId:o,addedConnectionIds:i,onAdd:a,onCloneAndAdd:r,onConnectAndAdd:d,connectingItemId:c,search:u,onCreateConnection:m,onBrowseNavigate:h,defaultTab:l}=n,g=s===void 0?"add":s,S=l===void 0?"connected":l,x=V(),{org:f}=oe(),j=H.useDeferredValue(u),v=u!==j;let C;e[0]!==j?(C=j.trim().toLowerCase(),e[0]=j,e[1]=C):C=e[1];const N=C;let w;e[2]!==S?(w=D=>D??S,e[2]=S,e[3]=w):w=e[3];const[P,O]=Jt(Zt.connectionsTab(f.slug)+(S==="all"?":home-modal":":agent-modal"),w);let p;e[4]!==P||e[5]!==O?(p=D=>{D!==P&&R("connections_dialog_tab_changed",{to_tab:D}),O(D)},e[4]=P,e[5]=O,e[6]=p):p=e[6];const _=p;let T;e[7]!==f.id||e[8]!==f.slug?(T={connectionId:rn,orgId:f.id,orgSlug:f.slug},e[7]=f.id,e[8]=f.slug,e[9]=T):T=e[9];const y=cn(T),b=j?.trim().split(/\s+/).filter(Boolean)??[],I=b.length>0?{operator:"or",conditions:b.flatMap(Ks)}:void 0,k={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},A=JSON.stringify(k),{data:z,fetchNextPage:B,hasNextPage:E,isFetchingNextPage:M}=ts({queryKey:at.collectionListInfinite(y,f.id,"","CONNECTIONS",A),queryFn:async D=>{const{pageParam:$}=D,se=$===void 0?0:$;return(await y.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:se}})).structuredContent},initialPageParam:0,getNextPageParam:Rs,staleTime:3e4}),G=z?.pages.flatMap(Vs)??[],U=En(G),de=new Set(G.filter(Es).map(Bs)),L=zt(),re=Mt(L,j),Re=mt(re.loadMore,re.hasMore,re.isLoadingMore),He=mt(B,E??!1,M),W=P==="all"||!!N,lt=W?re.items.filter(D=>{const $=$n(D);if($&&de.has($))return!1;if(!N)return!0;const se=Ve(D._meta),ce=[D.title,D.description,D.name,D.server?.title,D.server?.description,D.server?.name,se?.friendly_name,se?.friendlyName].filter(Boolean).join(" ").toLowerCase();return b.some(te=>ce.includes(te.toLowerCase()))}):[],Ne=lt.filter(Ls),_e=lt.filter($s);let Ae;e[10]!==i?(Ae=D=>D.some($=>i.has($.id)),e[10]=i,e[11]=Ae):Ae=e[11];const Ke=Ae;let Ie;e[12]!==i||e[13]!==o||e[14]!==c||e[15]!==Ke||e[16]!==g||e[17]!==a||e[18]!==h||e[19]!==r||e[20]!==x?(Ie=(D,$,se,ce,te)=>{const Me=Ke(te),be=te.find(le=>!i.has(le.id)),q=te[0];if(g==="browse"){const le=Zn(q);return t.jsx(Ye,{connection:{title:$,icon:se,description:te.length>1?`${te.length} instances`:ce??void 0},fallbackIcon:t.jsx(Le,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs($e,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",x("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{R("connection_browse_clicked",{app_name:q.app_name??null,connection_id:q.id,instances_count:te.length}),h?.(le)}},D)}return t.jsx(Ye,{connection:{title:$,icon:se,description:ce},fallbackIcon:t.jsx(Le,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Me&&t.jsxs($e,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(Ee,{size:11})," ",x("virtualMcp.connectionDialogContent.added")]}),t.jsx(ne,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:le=>{le.stopPropagation(),be?(R("connection_add_clicked",{action:"use_existing",app_name:q.app_name??null,connection_id:be.id}),o&&R("agent_connection_attached",{agent_id:o,connection_id:be.id,app_name:q.app_name??null,mode:"existing"}),a(be.id)):(R("connection_add_clicked",{action:"clone",app_name:q.app_name??null,base_connection_id:q.id}),r(q))},children:x("virtualMcp.connectionDialogContent.add")})]})},D)},e[12]=i,e[13]=o,e[14]=c,e[15]=Ke,e[16]=g,e[17]=a,e[18]=h,e[19]=r,e[20]=x,e[21]=Ie):Ie=e[21];const Pe=Ie;let Te;e[22]!==c||e[23]!==g||e[24]!==d||e[25]!==x?(Te=D=>{const $=Ve(D._meta),se=$?.friendlyName||$?.friendly_name||D.server?.title||D.title||D.server?.name||D.name||D.id||"",ce=D.server?.description||D.description||null,te=D.server?.icons?.[0]?.src||Ln(D.server?.repository)||null,Me=$?.official===!0,be=$?.verified===!0,q=$?.owner==="deco";return t.jsx(Ye,{connection:{title:se,description:ce,icon:te},fallbackIcon:t.jsx(Le,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[q&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:x("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.builtByDeco")})]}),!q&&Me&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx($e,{variant:"outline",size:"icon",children:t.jsx(Je,{})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!q&&!Me&&be&&t.jsxs(Se,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx($e,{variant:"outline",size:"icon",children:t.jsx(Je,{})})}),t.jsx(ye,{children:x("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(ne,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:le=>{le.stopPropagation(),R("connection_add_clicked",{action:"connect_new",registry_item_id:D.id,app_name:$?.friendlyName||D.server?.name||D.name||null}),d(D)},children:c===D.id?t.jsx(ke,{size:14,className:"animate-spin"}):x(g==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${D.id}`)},e[22]=c,e[23]=g,e[24]=d,e[25]=x,e[26]=Te):Te=e[26];const dt=Te;let ue;e[27]!==P||e[28]!==_||e[29]!==m||e[30]!==N||e[31]!==x?(ue=!N&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(es,{tabs:[{id:"all",label:x("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:x("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:P,onTabChange:D=>_(D)}),t.jsxs(ne,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{R("connections_dialog_custom_clicked"),m()},children:[t.jsx(we,{size:12}),x("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=P,e[28]=_,e[29]=m,e[30]=N,e[31]=x,e[32]=ue):ue=e[32];const Ue=v&&"opacity-50 pointer-events-none";let me;e[33]!==Ue?(me=X("flex-1 overflow-auto p-5 transition-opacity duration-150",Ue),e[33]=Ue,e[34]=me):me=e[34];const Ht="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Oe;e[35]!==Pe?(Oe=D=>{if(D.type==="group")return Pe(D.key,D.title,D.icon,null,D.connections);const $=D.connection;return Pe($.id,$.title,$.icon,$.description??null,[$])},e[35]=Pe,e[36]=Oe):Oe=e[36];const Ge=U.map(Oe);let fe;e[37]!==He?(fe=t.jsx("div",{ref:He,className:"col-span-full h-1"}),e[37]=He,e[38]=fe):fe=e[38];let ge;e[39]!==M?(ge=M&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),e[39]=M,e[40]=ge):ge=e[40];const qe=W&&Ne.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(Je,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:x("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Xe=W&&Ne.map(dt),We=W&&_e.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:x("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),Qe=W&&_e.map(dt);let pe;e[41]!==Re||e[42]!==L||e[43]!==W?(pe=W&&L.length>0&&t.jsx("div",{ref:Re,className:"col-span-full h-1"}),e[41]=Re,e[42]=L,e[43]=W,e[44]=pe):pe=e[44];let he;e[45]!==re.isLoadingMore||e[46]!==W?(he=W&&re.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),e[45]=re.isLoadingMore,e[46]=W,e[47]=he):he=e[47];let xe;e[48]!==Ge||e[49]!==fe||e[50]!==ge||e[51]!==qe||e[52]!==Xe||e[53]!==We||e[54]!==Qe||e[55]!==pe||e[56]!==he?(xe=t.jsxs("div",{className:Ht,children:[Ge,fe,ge,qe,Xe,We,Qe,pe,he]}),e[48]=Ge,e[49]=fe,e[50]=ge,e[51]=qe,e[52]=Xe,e[53]=We,e[54]=Qe,e[55]=pe,e[56]=he,e[57]=xe):xe=e[57];let je;e[58]!==P||e[59]!==U.length||e[60]!==_e||e[61]!==u||e[62]!==x||e[63]!==Ne?(je=U.length===0&&Ne.length===0&&_e.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?x("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):x(P==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=P,e[59]=U.length,e[60]=_e,e[61]=u,e[62]=x,e[63]=Ne,e[64]=je):je=e[64];let ve;e[65]!==me||e[66]!==xe||e[67]!==je?(ve=t.jsxs("div",{className:me,children:[xe,je]}),e[65]=me,e[66]=xe,e[67]=je,e[68]=ve):ve=e[68];let ze;return e[69]!==ue||e[70]!==ve?(ze=t.jsxs(t.Fragment,{children:[ue,ve]}),e[69]=ue,e[70]=ve,e[71]=ze):ze=e[71],ze}function $s(n){return!n.verified&&!Ve(n._meta)?.verified&&!n.meta?.verified}function Ls(n){return n.verified||Ve(n._meta)?.verified||n.meta?.verified}function Bs(n){return n.app_name}function Es(n){return n.app_name}function Vs(n){return n?.items??[]}function Rs(n,e){if(n?.hasMore)return e.reduce(Hs,0)}function Hs(n,e){return n+(e?.items?.length??0)}function Ks(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Vo({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...i}){const a=V(),r=i.mode??"add",d="agentId"in i?i.agentId:void 0,c="addedConnectionIds"in i?i.addedConnectionIds??new Set:new Set,u="onAdd"in i&&i.onAdd?i.onAdd:y=>{},m=(y,b,I)=>{d&&R("agent_connection_attached",{agent_id:d,connection_id:y,app_name:b,mode:I})},[h,l]=H.useState(null),[g,S]=H.useState(o),[x,f]=H.useState(!1),{org:j}=oe(),{data:v}=ae.useSession(),C=Et(),N=en(),w=st(),P=y=>{e(!1),w({to:"/$org/settings/connections/$appSlug",params:{org:j.slug,appSlug:y}})},O=()=>{N.invalidateQueries({predicate:y=>{const b=y.queryKey;return b[1]===j.id&&b[3]==="collection"&&b[4]==="CONNECTIONS"}})},p=async(y,b)=>{R("connection_oauth_succeeded",{connection_id:y,flow:b});const I=new URL(`/api/${j.slug}/mcp/${y}`,window.location.origin);await N.invalidateQueries({queryKey:at.isMCPAuthenticated(I.href,null)}),O()},_=async y=>{l(y.app_name??y.id);try{const I=`${y.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,A=(await C.create.mutateAsync({title:I,description:y.description??null,connection_type:y.connection_type,connection_url:y.connection_url??null,connection_token:null,icon:y.icon??null,app_name:y.app_name??null,app_id:y.app_id??null,connection_headers:y.connection_headers??null})).id,z=await et({connectionId:A,orgId:j.id,orgSlug:j.slug,persistFallback:B=>C.update.mutateAsync({id:A,data:{connection_token:B}}).then(()=>{})});if(z.ran&&!z.ok){R("connection_oauth_failed",{connection_id:A,flow:"clone",error:z.error??"no_token"}),K.error(a("virtualMcp.addConnectionDialog.authenticationFailedError",{error:z.error??"no token received"})),await C.delete.mutateAsync(A);return}z.ran&&await p(A,"clone"),m(A,y.app_name??null,"clone"),u(A)}catch(b){console.error("Failed to add connection:",b),K.error(a("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{l(null)}},T=async y=>{if(!(!j||!v?.user?.id)){l(y.id);try{const b=Bn(y,j.id,v.user.id,{remoteIndex:0}),I=b.connection_type==="STDIO",k=!!b.connection_url,A=I&&b.connection_headers&&typeof b.connection_headers=="object"&&"command"in b.connection_headers;if(!k&&!A){K.error(a("virtualMcp.addConnectionDialog.mcpServerConnectionError")),l(null);return}const{id:z}=await C.create.mutateAsync(b),B=await et({connectionId:z,orgId:j.id,orgSlug:j.slug,persistFallback:E=>C.update.mutateAsync({id:z,data:{connection_token:E}}).then(()=>{})});if(B.ran&&!B.ok){R("connection_oauth_failed",{connection_id:z,flow:"connect_new",error:B.error??"no_token"}),K.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:B.error??"no token received"})}),m(z,b.app_name??null,"new"),u(z);return}B.ran?(await p(z,"connect_new"),K.success(a("virtualMcp.addConnectionDialog.connectedAuthenticated"))):K.success(a("virtualMcp.addConnectionDialog.connected")),m(z,b.app_name??null,"new"),u(z)}catch(b){console.error("Failed to connect:",b),K.error(a("virtualMcp.addConnectionDialog.failedToConnect"))}finally{l(null)}}};return t.jsxs(Ft,{open:n,onOpenChange:e,children:[t.jsxs($t,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(Lt,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(Bt,{className:"text-base font-semibold",children:a(r==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(Mn,{value:g,onChange:S,placeholder:a("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(H.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ke,{size:24,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Fs,{mode:r,agentId:d,addedConnectionIds:c,onAdd:u,onCloneAndAdd:_,onConnectAndAdd:T,connectingItemId:h,search:g,onCreateConnection:()=>f(!0),onBrowseNavigate:P,defaultTab:s})})]}),t.jsx(Ms,{open:x,onOpenChange:f,onCreated:async y=>{f(!1);const b=await et({connectionId:y,orgId:j.id,orgSlug:j.slug,persistFallback:I=>C.update.mutateAsync({id:y,data:{connection_token:I}}).then(()=>{})});if(b.ran&&!b.ok){R("connection_oauth_failed",{connection_id:y,flow:"custom_create",error:b.error??"no_token"}),K.warning(a("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:a("virtualMcp.addConnectionDialog.signInFailedDescription",{error:b.error??"no token received"})}),m(y,null,"custom"),u(y),e(!1);return}b.ran&&await p(y,"custom_create"),m(y,null,"custom"),u(y),e(!1)}})]})}const gt=new Map;function Ro(){const{org:n}=oe(),e=ns(),s=ss(),o=s.find(f=>f.providerId==="deco"),{data:i,isLoading:a,refetch:r,isFetching:d}=tn({queryKey:at.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),c=i?.balanceCents??null,u=c!=null?c/100:null,m=H.useRef(new Map);if(c!=null){const f=gt.get(n.id);m.current.get(n.id)&&f!=null&&c>f&&R("credits_topped_up_detected",{organization_id:n.id,delta_cents:c-f,previous_balance_cents:f,new_balance_cents:c}),gt.set(n.id,c),m.current.set(n.id,!0)}const h=!!o,l=c!=null&&c>0,g=c!=null&&c===0,S=c!=null&&c===200,x=s.length>0&&s.every(f=>f.providerId==="deco");return{hasDecoKey:h,decoKeyId:o?.id??null,balanceCents:c,balanceDollars:u,hasCredits:l,isZeroBalance:g,isInitialFreeCredit:S,hasOnlyDecoProvider:x,isLoading:a,isFetching:d,refetch:r}}export{Bo as A,Eo as N,Lo as O,Vo as a,ds as b,ct as c,Ro as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-CZwqTscI.js";import{dW as i}from"./index-DEohtFix.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./use-infinite-scroll-CZwqTscI.js";import{dW as u,V as n}from"./index-DEohtFix.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|