decocms 4.321.4 → 4.321.5
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-Dv6G1zch.js → AlertCircle-CjhgF3vK.js} +1 -1
- package/dist/client/assets/{AreaChart-Bh324PJ7.js → AreaChart-B4JKGcdS.js} +1 -1
- package/dist/client/assets/{ArrowLeft-Dyo7ZseM.js → ArrowLeft-DjieScGW.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dl1f2e9F.js → ArrowUp-DOewE1qv.js} +1 -1
- package/dist/client/assets/{Check-DiuzOTdo.js → Check-D5XzCZva.js} +1 -1
- package/dist/client/assets/{CheckCircle-BTMeEcth.js → CheckCircle-iUtdabgI.js} +1 -1
- package/dist/client/assets/{ChevronRight-CYJzqw1W.js → ChevronRight-BkCMOd4C.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-C0Fdqi9U.js → ChevronSelectorVertical-C7ueTKUo.js} +1 -1
- package/dist/client/assets/{ChevronUp-CHN7dU5d.js → ChevronUp-rYvSsRjP.js} +1 -1
- package/dist/client/assets/{Copy01-CZOGrHZ9.js → Copy01-D5UYujbX.js} +1 -1
- package/dist/client/assets/{CreditCard01-CxZhImMf.js → CreditCard01-3vvlQGFk.js} +1 -1
- package/dist/client/assets/{DotsVertical-CsIT64BQ.js → DotsVertical-D1_N6gFC.js} +1 -1
- package/dist/client/assets/{Download01-DEU1JkfL.js → Download01-hGLAd0mm.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-44kQWZkn.js → ErrorBarContext-o-Fkq2Ln.js} +1 -1
- package/dist/client/assets/{Eye-DNWGZGwG.js → Eye-msF77noH.js} +1 -1
- package/dist/client/assets/{GitBranch01-4HvT92Fb.js → GitBranch01-CfKitZQX.js} +1 -1
- package/dist/client/assets/{Globe01-CySbwdvS.js → Globe01-Cmz_gJoO.js} +1 -1
- package/dist/client/assets/{HardDrive-CkhRSS5J.js → HardDrive-CdioWthT.js} +1 -1
- package/dist/client/assets/{Image01-CnSVldaE.js → Image01-Db6iL1L-.js} +1 -1
- package/dist/client/assets/{Key01-BvfZtZef.js → Key01-D2vuY6hS.js} +1 -1
- package/dist/client/assets/{Link01-DELnIRjt.js → Link01-BkSSEygv.js} +1 -1
- package/dist/client/assets/{LinkExternal01-6r85JlVB.js → LinkExternal01-C9li9a1P.js} +1 -1
- package/dist/client/assets/{Monitor01-Ciyr-Z_-.js → Monitor01-BxqJ2lfk.js} +1 -1
- package/dist/client/assets/{Package-CGoiEMne.js → Package-sAm7St0O.js} +1 -1
- package/dist/client/assets/{Palette-CLInuq6o.js → Palette-D3vbkhAB.js} +1 -1
- package/dist/client/assets/{Play-CFcccqRE.js → Play-4YhTSJF0.js} +1 -1
- package/dist/client/assets/{Plus-DfniZcTj.js → Plus-BKIxzM6s.js} +1 -1
- package/dist/client/assets/{SearchMd-MV7l96VN.js → SearchMd-DjN-DKoK.js} +1 -1
- package/dist/client/assets/{Sector-CXJOKUEx.js → Sector-BLtiNIir.js} +1 -1
- package/dist/client/assets/{Settings02-DLKKNdDt.js → Settings02-CniOGh2R.js} +1 -1
- package/dist/client/assets/{Share07-BdYeKEPF.js → Share07-BJIuab_2.js} +1 -1
- package/dist/client/assets/{Shield01-Dbav6S5n.js → Shield01-Bi6Wt_Bu.js} +1 -1
- package/dist/client/assets/{Stars01-PjG8UcMP.js → Stars01-DF4f96O4.js} +1 -1
- package/dist/client/assets/{Sun-DmqaD0GF.js → Sun-Ccd3Vvd3.js} +1 -1
- package/dist/client/assets/{Tool01-CdkG5j9q.js → Tool01-BuNvOC1h.js} +1 -1
- package/dist/client/assets/{Tool02-CtS9_9Au.js → Tool02-DpNDBEil.js} +1 -1
- package/dist/client/assets/{Trash01-DpQq-xrz.js → Trash01-DXHCqEe6.js} +1 -1
- package/dist/client/assets/{TrendUp01-Dwgdtlxo.js → TrendUp01-DaIUMzmz.js} +1 -1
- package/dist/client/assets/{Upload01-C-aUSpkq.js → Upload01-CPO6AwG4.js} +1 -1
- package/dist/client/assets/{User01-CIlNhP30.js → User01-mzLrMAfi.js} +1 -1
- package/dist/client/assets/{UserSquare-CDP0762p.js → UserSquare-vGUnOUu5.js} +1 -1
- package/dist/client/assets/{Users01-CJ-REDik.js → Users01-Dtk1qxXT.js} +1 -1
- package/dist/client/assets/{Users03-C7y8d7lq.js → Users03-B7DS8i2Z.js} +1 -1
- package/dist/client/assets/{XCircle-D4lh-8UY.js → XCircle-D0IscWfB.js} +1 -1
- package/dist/client/assets/{XClose-CUFBDVP-.js → XClose-Bw26wZe2.js} +1 -1
- package/dist/client/assets/{Zap-BD_2K_N7.js → Zap-BxV_wNn9.js} +1 -1
- package/dist/client/assets/{ZoomOut-CYflMQc3.js → ZoomOut-CXTlcyBa.js} +1 -1
- package/dist/client/assets/{access-gate-B8SIJFr7.js → access-gate-VXc3n5Tl.js} +1 -1
- package/dist/client/assets/{agent-icon-Dj2ko6xN.js → agent-icon-BQA3BxVU.js} +1 -1
- package/dist/client/assets/{agents-list-DedSGOjL.js → agents-list-DAAaYRTV.js} +1 -1
- package/dist/client/assets/{ai-providers-PLInDAtU.js → ai-providers-BK3I1K8S.js} +1 -1
- package/dist/client/assets/{alert-D50pTGlG.js → alert-COnOFEuN.js} +1 -1
- package/dist/client/assets/{alert-dialog-DN6vGwKb.js → alert-dialog-C2u5xYM5.js} +1 -1
- package/dist/client/assets/{analytics-tab-DkOamiBu.js → analytics-tab-BF3qnd05.js} +1 -1
- package/dist/client/assets/api-keys-BSfQHEUl.js +1 -0
- package/dist/client/assets/{api-keys-CUuIcLOK.js → api-keys-k31q4uJT.js} +1 -1
- package/dist/client/assets/{app-editor-CXxJdDRj.js → app-editor-CBQYggH6.js} +1 -1
- package/dist/client/assets/{auth-catchall-CfznBWAb.js → auth-catchall-CXsAwLpp.js} +1 -1
- package/dist/client/assets/{auth-BF15VDKW.js → auth-cfubGdj3.js} +1 -1
- package/dist/client/assets/{auth-entry-BmdnPyAe.js → auth-entry-Cp-9Vl-Z.js} +1 -1
- package/dist/client/assets/{auth-split-layout-D8Qd5X5d.js → auth-split-layout-CVD6XG6e.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ORS2OKxY.js → authenticate-and-persist-oauth-BwmApcxP.js} +1 -1
- package/dist/client/assets/{automation-list-row-D_CbqNGG.js → automation-list-row-tSPFX-ed.js} +1 -1
- package/dist/client/assets/{automation-runs-oTVIsV-n.js → automation-runs-DQXBuaQh.js} +1 -1
- package/dist/client/assets/{automations-CkLUemPj.js → automations-DZtzLDko.js} +1 -1
- package/dist/client/assets/{avatar-BLCEls6Y.js → avatar-65M-tykE.js} +1 -1
- package/dist/client/assets/{badge-CSQtV4I1.js → badge-BlkJw9ZT.js} +1 -1
- package/dist/client/assets/{block-document-DHWwd1Xg.js → block-document-D7S4AfrT.js} +1 -1
- package/dist/client/assets/{breadcrumb-BY2L4Yur.js → breadcrumb-1tRgR6ke.js} +1 -1
- package/dist/client/assets/{buckets-BgzCy0Wo.js → buckets-DQgYHPnt.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-BsKaZScD.js → bulk-category-panel-BAYz2_C9.js} +1 -1
- package/dist/client/assets/{capability-load-error-CpA6LOWl.js → capability-load-error-DiWeeuLw.js} +1 -1
- package/dist/client/assets/{cards-DDW_x79J.js → cards-BQ5m1ZaL.js} +1 -1
- package/dist/client/assets/{category-editor-Ddez8F9D.js → category-editor-Dp4gJGUo.js} +1 -1
- package/dist/client/assets/{cdn-tab-DFZvtAMl.js → cdn-tab-DSB7ZS0h.js} +1 -1
- package/dist/client/assets/{chart-CMxD7edM.js → chart-BSRtxUXr.js} +1 -1
- package/dist/client/assets/{chat-context-C5TtMbeA.js → chat-context-DKWUJJQk.js} +1 -1
- package/dist/client/assets/{checkbox-CHvOkNek.js → checkbox-C6unHBB5.js} +1 -1
- package/dist/client/assets/{choose-editor-Bl3IlbHF.js → choose-editor-MOqcOH7b.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CEFSPlKa.js → cli-auth-success-CqFfKIh9.js} +1 -1
- package/dist/client/assets/{client-icons-CIyJtQzW.js → client-icons-DzX9Vbzz.js} +1 -1
- package/dist/client/assets/{collection-detail-V8ouNFsx.js → collection-detail-C31CzNrH.js} +1 -1
- package/dist/client/assets/{collection-display-button-ch8VsZJ-.js → collection-display-button-4eZzlNhD.js} +1 -1
- package/dist/client/assets/{collection-search-C0aemqyU.js → collection-search-7lVLJWOB.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-RraLzE6q.js → collection-table-wrapper-BrisTU0i.js} +1 -1
- package/dist/client/assets/{collection-tabs-DM3JgymS.js → collection-tabs-D9skai09.js} +1 -1
- package/dist/client/assets/{command-aq94pylP.js → command-CiqpOqS9.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-C6pquuZu.js → commerce-onboarding-DMDBByMY.js} +1 -1
- package/dist/client/assets/{connect-Db_FA2vM.js → connect-BzlWBjZm.js} +1 -1
- package/dist/client/assets/{connect-layout-DUtKqe8O.js → connect-layout-BjHZtb1k.js} +1 -1
- package/dist/client/assets/connection-LSXDLhvc.js +1 -0
- package/dist/client/assets/{connection-card-DZD9pIth.js → connection-card-CExTxSsL.js} +1 -1
- package/dist/client/assets/connection-detail-DatPU092.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CJ7gQUqN.js → connection-form-helpers-CuPBBiAF.js} +1 -1
- package/dist/client/assets/{connections-DP-c-cpk.js → connections-Bg6qG3Ax.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BFeoMeJI.js → create-organization-dialog-Bn2HCOk4.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-B2Ek6f9E.js → decopilot-sse-pool-CZGi6xG2.js} +1 -1
- package/dist/client/assets/{dialog-BVuXhd_n.js → dialog-B49rrPcE.js} +1 -1
- package/dist/client/assets/{domain-settings-Creutor_.js → domain-settings-CVN9LhLH.js} +1 -1
- package/dist/client/assets/{drawer-CXBUq1b4.js → drawer-CXWN5aFX.js} +1 -1
- package/dist/client/assets/{dropdown-menu-7nrlUaMG.js → dropdown-menu-DIF5PQaU.js} +1 -1
- package/dist/client/assets/{e2e-tab-Dr-mwFjd.js → e2e-tab-ChQwMMQw.js} +1 -1
- package/dist/client/assets/{editor-CSXnkhqo.js → editor-BCbV0AET.js} +1 -1
- package/dist/client/assets/{empty-state-N8rf9YSi.js → empty-state-BJDGKBD3.js} +1 -1
- package/dist/client/assets/{empty-state-D1TMU-hy.js → empty-state-BW8HBeBv.js} +1 -1
- package/dist/client/assets/extract-connection-data-CkOzL4EZ.js +1 -0
- package/dist/client/assets/{file-explorer-Ku7EjWAL.js → file-explorer-DrjG_dkv.js} +1 -1
- package/dist/client/assets/{file-type-icon-BnBH2hK9.js → file-type-icon-DOGxWp7T.js} +1 -1
- package/dist/client/assets/{folder-icon-1xzQyJ7C.js → folder-icon-CrwX1TKL.js} +1 -1
- package/dist/client/assets/{form-D7fAV9eN.js → form-DW1iRzK_.js} +1 -1
- package/dist/client/assets/{general-DLE7dZPk.js → general-DO74QmpP.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CVdHp0M0.js → github-repo-picker-DBMeVgPY.js} +1 -1
- package/dist/client/assets/{hooks-y1rkw2ir.js → hooks-BduZvxu6.js} +1 -1
- package/dist/client/assets/{hosting-tab-BAPE6MlT.js → hosting-tab-BwMW6-cj.js} +1 -1
- package/dist/client/assets/{index-CbU-T1m1.js → index-BOvZXmG5.js} +1 -1
- package/dist/client/assets/{index-BgfHML7J.js → index-BSFs19PU.js} +1 -1
- package/dist/client/assets/{index-CmirxoQz.js → index-BWAN2gi-.js} +1 -1
- package/dist/client/assets/{index-DHZW87eM.js → index-CZ1vtr8q.js} +1 -1
- package/dist/client/assets/{index-DK46XAl9.js → index-CeMxrEOa.js} +7 -7
- package/dist/client/assets/{index-Dr0vXAye.js → index-CplzrnNp.js} +1 -1
- package/dist/client/assets/{index-o5eMIupH.js → index-Czq-ZgYT.js} +1 -1
- package/dist/client/assets/{index-BOJEwmSU.js → index-Dq833TiR.js} +1 -1
- package/dist/client/assets/{index-Ciqhx4Es.js → index-Ds9_YQQm.js} +3 -3
- package/dist/client/assets/{index-B9n6l693.js → index-fhNPvwoK.js} +1 -1
- package/dist/client/assets/{index-redirect-Dy4llany.js → index-redirect-CPrLxGcH.js} +1 -1
- package/dist/client/assets/{infra-billing-CDH62RCF.js → infra-billing-kpC_vP6b.js} +1 -1
- package/dist/client/assets/{input-HiBvv-tS.js → input-CBtN_PPx.js} +1 -1
- package/dist/client/assets/{integration-icon-B63L2HtM.js → integration-icon-Dxw_FbSX.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-S-x8vUoc.js → invite-member-dialog-Cu3x-0JT.js} +1 -1
- package/dist/client/assets/{label-CGF50XGa.js → label-B8I1KhDR.js} +1 -1
- package/dist/client/assets/{layout-Cf_v7v8J.js → layout-BhRI7lH-.js} +1 -1
- package/dist/client/assets/{login-BRT3iRa2.js → login-CwG5hnUr.js} +1 -1
- package/dist/client/assets/{markdown-Srunai6w.js → markdown-Bj8bPaFr.js} +1 -1
- package/dist/client/assets/mcp-oauth-CL6Q-kht.js +1 -0
- package/dist/client/assets/{members-_klSSf7w.js → members-CERkIR2N.js} +1 -1
- package/dist/client/assets/{monaco-editor-BXDxtePS.js → monaco-editor-B806dXX7.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-D1pJtu9I.js → monitoring-stats-row-C2A8X1H1.js} +1 -1
- package/dist/client/assets/{multi-select-BZ-tCaud.js → multi-select-BP8V6T_m.js} +1 -1
- package/dist/client/assets/{oauth-callback-F8D4D968.js → oauth-callback-B3e62S4Z.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DlKy27tT.js → oauth-callback-ai-provider-BeU5aWSG.js} +1 -1
- package/dist/client/assets/{onboarding-CoNP24fk.js → onboarding-Ct4A_Jz9.js} +1 -1
- package/dist/client/assets/org-layout-DKVs--x0.js +1 -0
- package/dist/client/assets/{organization-choice-nbe4I9kY.js → organization-choice-CLLN-ACi.js} +1 -1
- package/dist/client/assets/{orgs-o3NxI1V6.js → orgs-CQQFJ08X.js} +1 -1
- package/dist/client/assets/{page-seo-form-DDV7VjV-.js → page-seo-form-71yQnW9g.js} +1 -1
- package/dist/client/assets/{popover-CRkM20y5.js → popover-BKkJ1_Xg.js} +1 -1
- package/dist/client/assets/{post-calendar-BacBxT2V.js → post-calendar-ClavelB2.js} +1 -1
- package/dist/client/assets/{post-editor-4rU4mFOM.js → post-editor-Ds6d5h9N.js} +1 -1
- package/dist/client/assets/{primitives-RPdPdtiK.js → primitives-CtpDwLvA.js} +1 -1
- package/dist/client/assets/{profile-weZdXHvp.js → profile-DO4qkKsK.js} +1 -1
- package/dist/client/assets/{project-app-view-Ben78Ktd.js → project-app-view-Cpin65jK.js} +1 -1
- package/dist/client/assets/{prompts-DqEM2vI1.js → prompts-nePHaw8G.js} +1 -1
- package/dist/client/assets/record-editor-B8zpMto0.js +1 -0
- package/dist/client/assets/redirect-editor-Q_hMRPu2.js +1 -0
- package/dist/client/assets/registry-Bid5M6jp.js +2 -0
- package/dist/client/assets/{registry-layout-BmS41XeK.js → registry-layout-lsA6ndEN.js} +1 -1
- package/dist/client/assets/{reports-Ex-p9Q6U.js → reports-z8c0XEWP.js} +1 -1
- package/dist/client/assets/{require-capability-B6bbEttD.js → require-capability-CXqHSbCc.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BNGtvzOt.js → required-auth-layout-BIgCtLKM.js} +1 -1
- package/dist/client/assets/{reset-password-CKdYnon5.js → reset-password-DpPr5niQ.js} +1 -1
- package/dist/client/assets/{review-settings-DHtFpGrU.js → review-settings-Cp01VqYx.js} +1 -1
- package/dist/client/assets/{roles-DEuEeqHH.js → roles-BApIuR8C.js} +1 -1
- package/dist/client/assets/{schema-BSi9J6XG.js → schema-CSzKWh-e.js} +1 -1
- package/dist/client/assets/{scroll-area-CjEkqIar.js → scroll-area-BSFqWPow.js} +1 -1
- package/dist/client/assets/{search-input-kDCevv38.js → search-input-CfcUKbcR.js} +1 -1
- package/dist/client/assets/{secrets-FJlGtZJz.js → secrets-BtAWzVgG.js} +1 -1
- package/dist/client/assets/{sections-editor-Db_XanCD.js → sections-editor-CkyqVakM.js} +1 -1
- package/dist/client/assets/{select-Dx7GTm0n.js → select-YGToc2er.js} +1 -1
- package/dist/client/assets/{select-model-BkS3JCk0.js → select-model-Gm2aIKeG.js} +1 -1
- package/dist/client/assets/{self-tool-result-9rkDiIrM.js → self-tool-result-D1fWp3qG.js} +1 -1
- package/dist/client/assets/{seo-editor-BLeAZw1O.js → seo-editor-BbrItmvh.js} +1 -1
- package/dist/client/assets/settings-layout-C1fOKdd9.js +1 -0
- package/dist/client/assets/{settings-sidebar-BAeW8psv.js → settings-sidebar-CEa69wW9.js} +1 -1
- package/dist/client/assets/{shell-controls-jJMoCrxb.js → shell-controls-Cpk05Xlw.js} +1 -1
- package/dist/client/assets/{shell-layout-r6wI2dxA.js → shell-layout-BStzIFKM.js} +1 -1
- package/dist/client/assets/{skill-preview-BV5lD9Ur.js → skill-preview-BgXO28GZ.js} +1 -1
- package/dist/client/assets/{skills-mHNv9mjy.js → skills-Bnft56YJ.js} +1 -1
- package/dist/client/assets/{sso-DQXV-Z9b.js → sso-Cfv5bRYB.js} +1 -1
- package/dist/client/assets/{store-B5QBWbgI.js → store-6e8Le4X5.js} +1 -1
- package/dist/client/assets/store-registry-T8JvcFLm.js +2 -0
- package/dist/client/assets/{switch-U7uzAFmD.js → switch-DXic8Uh_.js} +1 -1
- package/dist/client/assets/{synced-repos-CPCzRDss.js → synced-repos-BX3OCOkU.js} +1 -1
- package/dist/client/assets/{table-D3Y6ENY8.js → table-BCojuEdb.js} +1 -1
- package/dist/client/assets/{tabs-DuT8Yq6b.js → tabs-CgB53moJ.js} +1 -1
- package/dist/client/assets/{task-board-DWHUF-M8.js → task-board-BILXt1or.js} +1 -1
- package/dist/client/assets/task-route-DDbV2QN2.js +1 -0
- package/dist/client/assets/{tasks-Bj-Geic7.js → tasks-CsYew1RZ.js} +1 -1
- package/dist/client/assets/{textarea-bCfy8lu-.js → textarea-BZQ-H9le.js} +1 -1
- package/dist/client/assets/{thread-intent-CisrByhq.js → thread-intent-VOG1y4W9.js} +1 -1
- package/dist/client/assets/{thread-route-b08GDb6K.js → thread-route-CYj4FJe7.js} +1 -1
- package/dist/client/assets/{toggle-group-3YvrBCWM.js → toggle-group-B4zTvBSA.js} +1 -1
- package/dist/client/assets/{toolbar-BtJG1jFO.js → toolbar-CG1eQp71.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CCWdMNhD.js → toolbar-icon-button-BI33A1DT.js} +1 -1
- package/dist/client/assets/{track-CIoIWcra.js → track-B9IGnryN.js} +1 -1
- package/dist/client/assets/{types-BL_Cd649.js → types-D8EuE9Mj.js} +1 -1
- package/dist/client/assets/{use-ai-providers-ZNJMa2Qe.js → use-ai-providers-BtViIKA8.js} +1 -1
- package/dist/client/assets/{use-automations-CO5qll04.js → use-automations-Dd66jMcH.js} +1 -1
- package/dist/client/assets/{use-autosave-CWnBHJNw.js → use-autosave-BnjvVAx3.js} +1 -1
- package/dist/client/assets/{use-connection-BY4RTRF-.js → use-connection-D-P-oJeL.js} +1 -1
- package/dist/client/assets/{use-copy-MarDfxAW.js → use-copy-D7YVH85a.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BZY8HplW.js → use-create-virtual-mcp-BqJwGUXr.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CKZ9WmVu.js → use-debounced-autosave-dNIsOT-E.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DM_0TZ22.js → use-debounced-value-CQvHGF7W.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-GHwUJFdQ.js → use-decopilot-events-DDJx3VDP.js} +1 -1
- package/dist/client/assets/{use-delete-connection-p_Lc_Grq.js → use-delete-connection-DyDPErD6.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BZ1DWC9e.js → use-deployment-admin-DTead3D9.js} +1 -1
- package/dist/client/assets/{use-destination-route-BbzQn-n1.js → use-destination-route-DzHgzZDH.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dme4FNCs.js → use-file-configs-Etx2upQ_.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BnNCHFKn.js → use-infinite-scroll-CpGR8CTM.js} +1 -1
- package/dist/client/assets/{use-join-requests-Camfhmzs.js → use-join-requests-B74l_G0c.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DwCKSgFq.js → use-mcp-auth-status-B1LLuxQZ.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CLQpYb65.js → use-mcp-client-BzmGxRuq.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B4YApHQz.js → use-mcp-prompts-B9ZjCxIV.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DxNdkpqp.js → use-mcp-tools-BElJHPUX.js} +1 -1
- package/dist/client/assets/{use-members-Nw1pRVDm.js → use-members-DZQLsJGr.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-LzLdBs0e.js +1 -0
- package/dist/client/assets/{use-org-auth-client-CKoQfJfQ.js → use-org-auth-client-Cp3G9WC1.js} +1 -1
- package/dist/client/assets/{use-org-sso-DaGSGBc8.js → use-org-sso-CWXniPVe.js} +1 -1
- package/dist/client/assets/{use-organization-roles-G6vi9RUF.js → use-organization-roles-D-A39N_h.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Bj_N-FZ1.js → use-organization-settings-CpiPY2sA.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-ChqtBgPV.js → use-panel-navigate-Dev670TY.js} +1 -1
- package/dist/client/assets/{use-project-scope-DuXQlLft.js → use-project-scope-BAnUVA3r.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DzkmhEYo.js → use-registry-connections-RuRoPZjO.js} +1 -1
- package/dist/client/assets/{use-secrets-CPol22BF.js → use-secrets-BZQygYLJ.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CIXOY0XP.js → use-section-preview-base-Dbp7FR8A.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DjB7YACH.js → use-status-sounds-a-r3lT4g.js} +1 -1
- package/dist/client/assets/{use-tags-DhPuQwXu.js → use-tags-CziB3qDr.js} +1 -1
- package/dist/client/assets/{use-view-mode-XpzZpQOU.js → use-view-mode-B2sjpoVQ.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Dc_tNJd3.js → use-virtual-mcp-C2SUHuV8.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-n7OKFVHh.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BpKA0laV.js +1 -0
- package/dist/client/assets/{users-B-Fjt6R6.js → users-BtGMynxT.js} +1 -1
- package/dist/client/assets/{variant-calendar-BXwjNPsZ.js → variant-calendar-B5DPyQ2J.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BMxnYhp9.js → view-mode-toggle-D5oruA9V.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +509 -509
- package/dist/server/server.js +355 -355
- package/package.json +1 -1
- package/dist/client/assets/api-keys-BT6wuuDI.js +0 -1
- package/dist/client/assets/connection-D4KVb2vi.js +0 -1
- package/dist/client/assets/connection-detail-Rd3BNYmU.js +0 -1
- package/dist/client/assets/extract-connection-data-fYPcP0VJ.js +0 -1
- package/dist/client/assets/mcp-oauth-Bmt9vIvY.js +0 -1
- package/dist/client/assets/org-layout-D6WucjyK.js +0 -1
- package/dist/client/assets/record-editor-CcDRxPdh.js +0 -1
- package/dist/client/assets/redirect-editor-DN0sxwSC.js +0 -1
- package/dist/client/assets/registry-4_qn65ff.js +0 -2
- package/dist/client/assets/settings-layout-B0kIHXCh.js +0 -1
- package/dist/client/assets/store-registry-8k7WpgtY.js +0 -2
- package/dist/client/assets/task-route-CushdBcU.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-BP5fBiR_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-DYvex915.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-zzJOxA7J.js +0 -1
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o,j as r}from"./index-Ciqhx4Es.js";import{O as m}from"./api-keys-CUuIcLOK.js";import{R as p}from"./require-capability-B6bbEttD.js";import"./AlertCircle-Dv6G1zch.js";import"./Copy01-CZOGrHZ9.js";import"./Key01-BvfZtZef.js";import"./Plus-DfniZcTj.js";import"./Trash01-DpQq-xrz.js";import"./alert-dialog-DN6vGwKb.js";import"./dialog-BVuXhd_n.js";import"./input-HiBvv-tS.js";import"./label-CGF50XGa.js";import"./use-mcp-client-CLQpYb65.js";import"./constants-DNuUCxmW.js";import"./auth-BF15VDKW.js";import"./access-gate-B8SIJFr7.js";import"./capability-load-error-CpA6LOWl.js";function A(){const t=o.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=r.jsx(p,{capability:"api-keys:manage",area:"api-keys",children:r.jsx(m,{})}),t[0]=i):i=t[0],i}export{A as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as i,ai as r,af as t,ag as e,aj as o,ao as a,an as d,d5 as l,cf as u}from"./index-Ciqhx4Es.js";const p=i({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:t(e()),grantType:r(["authorization_code","client_credentials"])}),c=i({type:d("object"),properties:o(e(),a()).optional(),required:t(e()).optional()}).catchall(a()),b=l.extend({inputSchema:c,outputSchema:c.optional()}),m=i({headers:o(e(),e()).optional()}),h=i({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:t(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:o(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),s=i({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:r(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:u([h,m]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:p.nullable().describe("OAuth configuration"),configuration_state:o(e(),a()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:t(e()).nullable().optional().describe("Configuration scopes"),metadata:o(e(),a()).nullable().describe("Additional metadata (includes repository info)"),tools:t(b).nullable().describe("Discovered tools from MCP"),bindings:t(e()).nullable().describe("Detected bindings"),status:r(["active","inactive","error"]).describe("Current status")});s.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});s.partial();function f(n){return n!=null&&"command"in n}function g(n){return!n||!n.startsWith("virtual://")?null:n.replace("virtual://","")}export{p as O,f as i,g as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as be,aj as $e,ao as De,ag as me,af as Oe,c as U,b as L,j as t,h as ve,B as H,r as Z,l as Ne,W as te,a7 as Me,x as ze,K as ae,d as se,b4 as Ee,b7 as ue,F as Re,E as Ue,f as Ve,c4 as Fe,n as Le,ar as Be,as as He,bl as qe,bk as Ge,bi as Ke,bj as Qe,c5 as We,t as Y}from"./index-Ciqhx4Es.js";import{g as Xe}from"./extract-connection-data-fYPcP0VJ.js";import{E as Se}from"./empty-state-N8rf9YSi.js";import{E as Je,c as Ye,r as Ze,b as et,d as tt}from"./connection-form-helpers-CJ7gQUqN.js";import{c as st,S as nt,V as it}from"./index-o5eMIupH.js";import{u as ye,T as ot}from"./use-mcp-auth-status-DwCKSgFq.js";import{a as at}from"./use-members-Nw1pRVDm.js";import{A as lt}from"./avatar-BLCEls6Y.js";import{a as Ce,b as _e,u as rt}from"./use-connection-BY4RTRF-.js";import{u as we}from"./use-mcp-client-CLQpYb65.js";import{a as ct}from"./use-mcp-tools-DxNdkpqp.js";import{a as dt}from"./use-mcp-prompts-B4YApHQz.js";import{i as mt,a as ut}from"./mcp-oauth-Bmt9vIvY.js";import{I as le}from"./integration-icon-B63L2HtM.js";import{s as xt}from"./Plus-DfniZcTj.js";import{R as pt,S as ft,r as ht,aV as gt,s as ne}from"./agent-icon-Dj2ko6xN.js";import{a as ke,s as jt}from"./Settings02-DLKKNdDt.js";import{s as ce}from"./Trash01-DpQq-xrz.js";import{d as K,a as Q,e as W,b as B,c as X,f as bt,F as vt}from"./form-D7fAV9eN.js";import{I as J}from"./input-HiBvv-tS.js";import{u as Nt,D as St}from"./use-delete-connection-p_Lc_Grq.js";import{c as yt,B as Ct,a as _t,C as wt}from"./monitoring-stats-row-D1pJtu9I.js";import{C as kt,a as It,b as Tt}from"./chart-CMxD7edM.js";import{b as At}from"./use-virtual-mcp-Dc_tNJd3.js";import{i as Ie}from"./ChevronRight-CYJzqw1W.js";import{b as Te}from"./Users03-C7y8d7lq.js";import{b as ie,c as Pt,T as oe,a as $t}from"./tabs-DuT8Yq6b.js";import{g as Ae}from"./connection-slug-CITJ0kGN.js";import{b as Dt}from"./Tool01-CdkG5j9q.js";import{g as de,M as Ot}from"./types-BL_Cd649.js";import{C as Mt}from"./collection-search-C0aemqyU.js";import{B as zt}from"./badge-CSQtV4I1.js";import{c as Et,D as Rt,b as Ut,a as xe}from"./dropdown-menu-7nrlUaMG.js";import{S as pe,a as fe,b as he,c as ge,d as G}from"./select-Dx7GTm0n.js";import{i as Vt}from"./CheckCircle-BTMeEcth.js";import{t as Ft}from"./ChevronUp-CHN7dU5d.js";import{n as Lt}from"./Tool02-CtS9_9Au.js";import{b as Bt}from"./UserSquare-CDP0762p.js";import{s as Ht}from"./XClose-CUFBDVP-.js";import{p as qt,i as Gt}from"./connection-D4KVb2vi.js";import"./metadata-dUsYcpuu.js";import"./constants-DNuUCxmW.js";import"./Key01-BvfZtZef.js";import"./auth-BF15VDKW.js";import"./use-registry-connections-DzkmhEYo.js";import"./use-organization-settings-Bj_N-FZ1.js";import"./schema-BSi9J6XG.js";import"./task-board-DWHUF-M8.js";import"./index-Dr0vXAye.js";import"./index-BgfHML7J.js";import"./index-BOJEwmSU.js";import"./popover-CRkM20y5.js";import"./Check-DiuzOTdo.js";import"./SearchMd-MV7l96VN.js";import"./use-create-virtual-mcp-BZY8HplW.js";import"./use-navigate-to-agent-BP5fBiR_.js";import"./use-destination-route-BbzQn-n1.js";import"./hooks-y1rkw2ir.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B2Ek6f9E.js";import"./thread-intent-CisrByhq.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./Eye-DNWGZGwG.js";import"./use-org-auth-client-CKoQfJfQ.js";import"./User01-CIlNhP30.js";import"./AlertCircle-Dv6G1zch.js";import"./ArrowUp-Dl1f2e9F.js";import"./ArrowLeft-Dyo7ZseM.js";import"./XCircle-D4lh-8UY.js";import"./TrendUp01-Dwgdtlxo.js";import"./ZoomOut-CYflMQc3.js";import"./ChevronSelectorVertical-C0Fdqi9U.js";import"./DotsVertical-CsIT64BQ.js";import"./Copy01-CZOGrHZ9.js";import"./CreditCard01-CxZhImMf.js";import"./Download01-DEU1JkfL.js";import"./Share07-BdYeKEPF.js";import"./GitBranch01-4HvT92Fb.js";import"./Globe01-CySbwdvS.js";import"./HardDrive-CkhRSS5J.js";import"./Image01-CnSVldaE.js";import"./Link01-DELnIRjt.js";import"./LinkExternal01-6r85JlVB.js";import"./Monitor01-Ciyr-Z_-.js";import"./Sun-DmqaD0GF.js";import"./Package-CGoiEMne.js";import"./Palette-CLInuq6o.js";import"./Play-CFcccqRE.js";import"./Shield01-Dbav6S5n.js";import"./Stars01-PjG8UcMP.js";import"./Upload01-C-aUSpkq.js";import"./Users01-CJ-REDik.js";import"./Zap-BD_2K_N7.js";import"./label-CGF50XGa.js";import"./alert-dialog-DN6vGwKb.js";import"./AreaChart-Bh324PJ7.js";import"./ErrorBarContext-44kQWZkn.js";import"./Sector-CXJOKUEx.js";const Kt=be({scopes:Oe(me()).describe("List of scopes available"),stateSchema:$e(me(),De()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:be({}),outputSchema:Kt}];function Wt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l}=s,a=L();let r;e[0]!==n.id?(r={connectionId:n.id},e[0]=n.id,e[1]=r):r=e[1];const m=ye(r),d=!(n.connection_type==="VIRTUAL")&&m.supportsOAuth&&!m.isAuthenticated,f=n.status!=="active",u=d||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Ne("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let b;e[7]!==n.title?(b=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=b):b=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==d||e[12]!==a?(S=d?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=d,e[12]=a,e[13]=S):S=e[13];let v;e[14]!==b||e[15]!==S?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[b,S]}),e[14]=b,e[15]=S,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==d||e[19]!==o||e[20]!==a?(y=d&&t.jsx(H,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=d,e[19]=o,e[20]=a,e[21]=y):y=e[21];let P;e[22]!==n||e[23]!==f||e[24]!==l||e[25]!==a?(P=f?t.jsxs(H,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>l(n,"active"),children:[t.jsx(pt,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>l(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(ft,{size:13})}),e[22]=n,e[23]=f,e[24]=l,e[25]=a,e[26]=P):P=e[26];let $;e[27]!==n||e[28]!==c?($=()=>c(n),e[27]=n,e[28]=c,e[29]=$):$=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]!==a?(M=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=M):M=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let D;e[35]!==$||e[36]!==_||e[37]!==M?(D=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:$,title:_,"aria-label":M,children:T}),e[35]=$,e[36]=_,e[37]=M,e[38]=D):D=e[38];let I;e[39]!==n||e[40]!==i?(I=()=>i(n),e[39]=n,e[40]=i,e[41]=I):I=e[41];let N;e[42]!==a?(N=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=N):N=e[43];let j;e[44]!==a?(j=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=j):j=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let z;e[47]!==I||e[48]!==N||e[49]!==j?(z=t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:I,title:N,"aria-label":j,children:E}),e[47]=I,e[48]=N,e[49]=j,e[50]=z):z=e[50];let k;e[51]!==D||e[52]!==z||e[53]!==y||e[54]!==P?(k=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,P,D,z]}),e[51]=D,e[52]=z,e[53]=y,e[54]=P,e[55]=k):k=e[55];let A;return e[56]!==k||e[57]!==h||e[58]!==g||e[59]!==v?(A=t.jsxs("div",{className:h,children:[g,v,k]}),e[56]=k,e[57]=h,e[58]=g,e[59]=v,e[60]=A):A=e[60],A}function Xt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let l;e[3]!==n.title?(l=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=l):l=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let r;e[8]!==o?(r=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=r):r=e[9];let m;e[10]!==o?(m=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=m):m=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(ke,{size:13}),e[12]=x):x=e[12];let d;e[13]!==a||e[14]!==r||e[15]!==m?(d=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(H,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:r,"aria-label":m,children:x})}),e[13]=a,e[14]=r,e[15]=m,e[16]=d):d=e[16];let f;return e[17]!==i||e[18]!==l||e[19]!==d?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,l,d]}),e[17]=i,e[18]=l,e[19]=d,e[20]=f):f=e[20],f}function Jt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l,onAdd:a,isAdding:r}=s,m=L();if(n.length===0)return null;let x;e[0]!==n.length||e[1]!==m?(x=n.length===1?m("details.connectionInstancesPanel.instance"):m("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=m,e[2]=x):x=e[2];let d;e[3]!==x?(d=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:x}),e[3]=x,e[4]=d):d=e[4];let f;e[5]!==r?(f=r?t.jsx(ve,{className:"size-[13px]"}):t.jsx(xt,{size:13}),e[5]=r,e[6]=f):f=e[6];let u;e[7]!==m?(u=m("details.connectionInstancesPanel.addInstance"),e[7]=m,e[8]=u):u=e[8];let h;e[9]!==r||e[10]!==a||e[11]!==f||e[12]!==u?(h=t.jsxs(H,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:r,children:[f,u]}),e[9]=r,e[10]=a,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==d||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[d,h]}),e[14]=d,e[15]=h,e[16]=g):g=e[16];let b;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==l){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==l?(y=P=>t.jsx(Z.Suspense,{fallback:t.jsx(Xt,{instance:P,onConfigure:c}),children:t.jsx(Wt,{instance:P,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:l})},P.id),e[23]=o,e[24]=c,e[25]=i,e[26]=l,e[27]=y):y=e[27],b=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=l,e[22]=b}else b=e[22];let S;e[28]!==b?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:b}),e[28]=b,e[29]=S):S=e[29];let v;return e[30]!==g||e[31]!==S?(v=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=v):v=e[32],v}function Yt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=L(),l=Me(),a=es(o),{data:r}=ze({queryKey:ae.connectionActivity(n,o,c),queryFn:async()=>await l.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),m=yt(r?.logs??[],a,void 0,r?.total),x=m.data,d=m.totalCalls>0,f=Yt(r?.logs??[]),u=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let h;e[0]!==i?(h=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=h):h=e[1];let g;return e[2]!==h?(g=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:h}),e[2]=h,e[3]=g):g=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:m.totalCalls.toLocaleString()}),g]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),d?t.jsxs("div",{children:[t.jsx(kt,{config:ts,className:"h-16 w-full",children:t.jsxs(Ct,{data:x,barCategoryGap:"4%",children:[t.jsx(It,{content:t.jsx(Tt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:x.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:x[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:x[x.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),f.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),u>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:u.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:f.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function ls(s){const e=U.c(22),{connectionId:n}=s,c=L(),[o,i]=Z.useState("14d"),{org:l}=te();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let r;e[2]!==a?(r=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=r):r=e[3];let m;e[4]!==c?(m=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=m):m=e[5];let x;e[6]!==o?(x=Zt.map(b=>t.jsx("button",{type:"button","aria-pressed":o===b.value,onClick:()=>i(b.value),className:Ne("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===b.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:b.label},b.value)),e[6]=o,e[7]=x):x=e[7];let d;e[8]!==m||e[9]!==x?(d=t.jsx("div",{role:"group","aria-label":m,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:x}),e[8]=m,e[9]=x,e[10]=d):d=e[10];let f;e[11]!==r||e[12]!==d?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[r,d]}),e[11]=r,e[12]=d,e[13]=f):f=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(as,{}),e[14]=u):u=e[14];let h;e[15]!==n||e[16]!==l.id||e[17]!==o?(h=t.jsx(Z.Suspense,{fallback:u,children:t.jsx(ss,{connectionId:n,orgId:l.id,timeframe:o})}),e[15]=n,e[16]=l.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function rs(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=se();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const d=crypto.randomUUID();o({to:"/$org/$taskId",params:{org:c,taskId:d},search:{virtualmcpid:n.id}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Te,{size:16}),e[4]=l):l=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(le,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:l}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let r;e[8]!==n.title?(r=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=r):r=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Ie,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=m):m=e[10];let x;return e[11]!==i||e[12]!==a||e[13]!==r?(x=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,r,m]}),e[11]=i,e[12]=a,e[13]=r,e[14]=x):x=e[14],x}function cs(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let l;e[3]!==c?(l=a=>t.jsx(rs,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=l):l=e[4],o=n.map(l),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=U.c(13),{connection:n}=s,c=L(),{org:o}=te();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const l=At(i);if(!(l.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let r;e[3]!==c?(r=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=r):r=e[4];let m;e[5]!==r?(m=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:r})}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==o.slug||e[8]!==l?(x=t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:l,org:o.slug})}),e[7]=o.slug,e[8]=l,e[9]=x):x=e[9];let d;return e[10]!==m||e[11]!==x?(d=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[m,x]}),e[10]=m,e[11]=x,e[12]=d):d=e[12],d}function ms(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=L(),l=se(),{org:a}=te();let r;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(r={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=r):r=e[3];const m=we(r),x=Ce(c);let d;e[4]!==x||e[5]!==c?(d=x?Ae(x):c,e[4]=x,e[5]=c,e[6]=d):d=e[6];const f=d,[u,h]=Z.useState("");let g,b,S,v;if(e[7]!==f||e[8]!==m||e[9]!==l||e[10]!==o||e[11]!==u||e[12]!==i||e[13]!==n){const $=(n??[]).filter(us),_=u.toLowerCase().trim(),M=_?$.filter(j=>j.name.toLowerCase().includes(_)||j.description&&j.description.toLowerCase().includes(_)):$;let T;e[18]!==f||e[19]!==l||e[20]!==o?(T=j=>{l({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(j.name)}})},e[18]=f,e[19]=l,e[20]=o,e[21]=T):T=e[21];const D=T;S="flex flex-col h-full overflow-hidden";let I;e[22]!==i?(I=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=I):I=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=j=>{j.key==="Escape"&&(h(""),j.target.blur())},e[24]=N):N=e[24],e[25]!==u||e[26]!==I?(v=t.jsx(Mt,{value:u,onChange:h,placeholder:I,onKeyDown:N}),e[25]=u,e[26]=I,e[27]=v):v=e[27],g="flex-1 overflow-auto p-5",b=M.length===0?t.jsx(Se,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(j=>{const E=de(j._meta);return t.jsxs(Ee,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>D(j),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:E,toolInfo:{tool:j},displayMode:"inline",minHeight:200,maxHeight:200,client:m})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:j.annotations?.title??j.name}),t.jsx(ot,{annotations:j.annotations,_meta:j._meta})]}),j.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j.description})]})]},j.name)})}),e[7]=f,e[8]=m,e[9]=l,e[10]=o,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=b,e[16]=S,e[17]=v}else g=e[14],b=e[15],S=e[16],v=e[17];let y;e[28]!==g||e[29]!==b?(y=t.jsx("div",{className:g,children:b}),e[28]=g,e[29]=b,e[30]=y):y=e[30];let P;return e[31]!==S||e[32]!==v||e[33]!==y?(P=t.jsxs("div",{className:S,children:[v,y]}),e[31]=S,e[32]=v,e[33]=y,e[34]=P):P=e[34],P}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=l=>l.charAt(0).toUpperCase()+l.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function re(s){const e=U.c(5),{label:n}=s,c=L();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=U.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:l}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const r=a;let m;e[2]!==o?(m=o===void 0?[]:o,e[2]=o,e[3]=m):m=e[3];const x=m,d=L(),f=se(),u=Ce(i??"");let h;e[4]!==u||e[5]!==i?(h=u?Ae(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let b;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==l?(b=function(V){!i||!l||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(V)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=l,e[11]=b):b=e[11];const S=b;let v;e[12]!==i||e[13]!==l||e[14]!==n?(v=i&&l&&n.some(hs),e[12]=i,e[13]=l,e[14]=n,e[15]=v):v=e[15];const y=v;if(n.length+r.length+x.length===0){let C;e[16]!==d?(C=d("details.connectionCapabilities.capabilities"),e[16]=d,e[17]=C):C=e[17];let V;e[18]!==C?(V=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=V):V=e[19];let q;e[20]!==d?(q=d("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=d,e[21]=q):q=e[21];let F;e[22]!==q?(F=t.jsx("p",{className:"text-sm text-muted-foreground",children:q}),e[22]=q,e[23]=F):F=e[23];let ee;return e[24]!==F||e[25]!==V?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[V,F]}),e[24]=F,e[25]=V,e[26]=ee):ee=e[26],ee}let $;e[27]!==d||e[28]!==n.length?($=d("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=d,e[28]=n.length,e[29]=$):$=e[29];let _;e[30]!==$?(_=t.jsx(ie,{value:"tools",variant:"underline",children:$}),e[30]=$,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==d?(M=y&&t.jsx(ie,{value:"apps",variant:"underline",children:d("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=d,e[34]=M):M=e[34];let T;e[35]!==d?(T=d("details.connectionCapabilities.promptsTab"),e[35]=d,e[36]=T):T=e[36];let D;e[37]!==T?(D=t.jsx(ie,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=D):D=e[38];let I;e[39]!==d?(I=d("details.connectionCapabilities.resourcesTab"),e[39]=d,e[40]=I):I=e[40];let N;e[41]!==I?(N=t.jsx(ie,{value:"resources",variant:"underline",children:I}),e[41]=I,e[42]=N):N=e[42];let j;e[43]!==M||e[44]!==D||e[45]!==N||e[46]!==_?(j=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Pt,{variant:"underline",className:"gap-1",children:[_,M,D,N]})}),e[43]=M,e[44]=D,e[45]=N,e[46]=_,e[47]=j):j=e[47];let E;e[48]!==S||e[49]!==n?(E=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(Dt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Ie,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(re,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let z;e[51]!==E?(z=t.jsx(oe,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=z):z=e[52];let k;e[53]!==i||e[54]!==y||e[55]!==l||e[56]!==n?(k=y&&t.jsx(oe,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:l})}),e[53]=i,e[54]=y,e[55]=l,e[56]=n,e[57]=k):k=e[57];let A;e[58]!==r?(A=r.length>0?r.map(fs):t.jsx(re,{label:"prompts"}),e[58]=r,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(oe,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let p;e[62]!==x?(p=x.length>0?x.map(ps):t.jsx(re,{label:"resources"}),e[62]=x,e[63]=p):p=e[63];let w;e[64]!==p?(w=t.jsx(oe,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:p})}),e[64]=p,e[65]=w):w=e[65];let O;return e[66]!==j||e[67]!==z||e[68]!==k||e[69]!==R||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs($t,{defaultValue:"tools",variant:"underline",children:[j,z,k,R,w]})}),e[66]=j,e[67]=z,e[68]=k,e[69]=R,e[70]=w,e[71]=O):O=e[71],O}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(gt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ht,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(le,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let l;e[3]!==o?(l=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=l):l=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let r;e[7]!==l||e[8]!==a?(r=t.jsxs("div",{className:"flex-1 min-w-0",children:[l,a]}),e[7]=l,e[8]=a,e[9]=r):r=e[9];let m;return e[10]!==i||e[11]!==r?(m=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,r]}),e[10]=i,e[11]=r,e[12]=m):m=e[12],m}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=L(),l=ue({control:s.control,name:"ui_type"}),a=ue({control:s.control,name:"connection_url"}),{stdioEnabled:r}=Re(),m=(()=>{if(typeof a!="string"||!a)return!1;try{const u=new URL(a);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),x=r||e.connection_type==="STDIO",d=e.connection_type==="VIRTUAL",f=d?qt(e.connection_url):null;return d?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Te,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),l!=="NPX"&&l!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(pe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsxs(fe,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ne,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(he,{})]})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(G,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(G,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),x&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(G,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(pe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsx(fe,{className:"h-10",children:t.jsx(he,{})})}),t.jsxs(ge,{children:[t.jsx(G,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(G,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(G,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ne,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),x&&t.jsxs(t.Fragment,{children:[t.jsx(G,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(G,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Bt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),l==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),l==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(l==="NPX"||l==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(B,{children:t.jsx(Je,{value:u.value??[],onChange:u.onChange})}),t.jsx(X,{})]})}),l!=="NPX"&&l!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i(m?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Rt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Vt,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Ft,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(xe,{onClick:c,children:[t.jsx(jt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(xe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>u.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(Ht,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(B,{children:t.jsx(J,{type:"password",placeholder:i(m?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),m&&t.jsxs(bt,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(X,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function je(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Gt(s.connection_headers)){const c=s.connection_headers,o=Ze(c.envVars);if(bs(c)){const l=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:l,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=et(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=tt(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:l,siblings:a}){const r=L(),m=se({from:"/$org/settings/connections/$appSlug"}),x=Le(),d=_e(),{org:f}=te(),u=Nt({onSuccess:()=>{a.length<=1&&m({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[b,S]=Z.useState(!1),v=ye({connectionId:e}),{data:y}=at(),P=y?.data?.members??[],$=h??s,_=P.find(p=>p.userId===$.created_by),T=s?.connection_type==="VIRTUAL"||v.isAuthenticated,D={...s,tools:o},I=st(D,Qt),N=Be({resolver:He(Ye),values:je(h??s)}),j=N.formState.isDirty,E=async()=>{if(!await N.trigger())return;const w=N.getValues(),O=Ss(w),C=h?.id??e;await d.update.mutateAsync({id:C,data:O}),N.reset(w)},z=()=>{N.reset(je(h??s))},k=async p=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:V}=await ut({connectionId:p,orgSlug:f.slug,...w?{scope:w}:{}});if(V||!O){Y.error(r("details.connection.authFailed",{error:V??""}));return}if(C)try{const F=await fetch(`/api/${f.slug}/connections/${p}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!F.ok)console.error("Failed to save OAuth token:",await F.text()),await d.update.mutateAsync({id:p,data:{connection_token:O}});else try{await d.update.mutateAsync({id:p,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(F){console.error("Error saving OAuth token:",F),await d.update.mutateAsync({id:p,data:{connection_token:O}})}else await d.update.mutateAsync({id:p,data:{connection_token:O}});const q=new URL(`/api/${f.slug}/mcp/${p}`,window.location.origin);await x.invalidateQueries({queryKey:ae.isMCPAuthenticated(q.href,null)}),await x.invalidateQueries({queryKey:ae.mcpClientPrefix()}),Y.success(r("details.connection.authSuccess"))},A=()=>k(s.id),R=async()=>{try{const p=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!p.ok){const O=await p.text();Y.error(r("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await x.invalidateQueries({queryKey:ae.isMCPAuthenticated(w.href,null)}),Y.success(r("details.connection.oauthRemoved"))}catch(p){console.error("Error removing OAuth token:",p),Y.error(r("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(St,{...u}),t.jsx(qe,{open:h!==null,onOpenChange:p=>{p||g(null)},children:t.jsxs(Ge,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(Ke,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(Qe,{className:"text-base",children:h?.title??s.title}),t.jsx(We,{className:"text-xs",children:r("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:r("details.connection.connectedBy")}),t.jsx(lt,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(vt,{...N,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:N.control,name:"title",render:({field:p})=>t.jsxs(Q,{children:[t.jsx(W,{children:r("details.connection.nameLabel")}),t.jsx(B,{children:t.jsx(J,{...p})}),t.jsx(X,{})]})}),t.jsx(K,{control:N.control,name:"description",render:({field:p})=>t.jsxs(Q,{children:[t.jsx(W,{children:r("details.connection.descriptionLabel")}),t.jsx(B,{children:t.jsx(J,{...p,value:p.value||""})}),t.jsx(X,{})]})})]}),t.jsx(js,{form:N,connection:h??s,hasOAuthToken:v.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(nt,{connection:h??s,form:N,hasMcpBinding:I,isMCPAuthenticated:T,supportsOAuth:v.supportsOAuth,isServerError:v.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(H,{onClick:E,disabled:!j||c,className:"flex-1",children:r(c?"details.connection.savingButton":"details.connection.saveButton")}),j&&t.jsx(H,{variant:"outline",onClick:z,children:r("details.connection.undoButton")}),t.jsxs(H,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const p=h??s;g(null),u.requestDelete(p)},children:[t.jsx(ce,{size:15}),r("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(it,{hideHeader:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const p=a[0]??s;return p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(ls,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:p=>g(p),onAuthenticate:p=>k(p.id),onDelete:p=>u.requestDelete(p),onToggleStatus:async(p,w)=>{try{await d.update.mutateAsync({id:p.id,data:{status:w}}),Y.success(r(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(r("details.connection.failedUpdateConnection"))}},isAdding:b,onAdd:async()=>{S(!0);try{const p=a[0]??s,w=p.title.replace(/\s*\(\d+\)\s*$/,""),O=a.length+1,C=`${w} (${O})`,V=Xe("conn");await d.create.mutateAsync({id:V,title:C,description:p.description??null,connection_type:p.connection_type,connection_url:p.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:p.created_by,organization_id:p.organization_id,icon:p.icon??null,app_name:p.app_name??null,app_id:p.app_id??null,connection_headers:p.connection_headers??null,oauth_config:null,configuration_state:p.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const q=new URL(`/api/${f.slug}/mcp/${V}`,window.location.origin),F=await mt({url:q.href,token:null,orgId:f.id});F.supportsOAuth&&!F.isAuthenticated&&await k(V)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:l,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=se(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:l}=Ve(o),{org:a}=te(),r=_e();let m;s[2]!==i?(m={slug:i},s[2]=i,s[3]=m):m=s[3];const x=rt(m),d=x[0]??null,f=d?.id??"",u=f||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==u?(h={connectionId:u,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=u,s[7]=h):h=s[7];const g=we(h);let b;s[8]!==g?(b={client:g},s[8]=g,s[9]=b):b=s[9];const{data:S}=ct(b);let v;if(s[10]!==d?.tools||s[11]!==f||s[12]!==x||s[13]!==S){const k=S?S.tools.map(As):(d?.tools??[]).map(Ts);e:{if(x.length<=1){v=k;break e}const A=new Set,R=[],p=ks;for(const w of x){const O=w.id===f?k:p(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),R.push(C))}v=R.length>0?R:k}s[10]=d?.tools,s[11]=f,s[12]=x,s[13]=S,s[14]=v}else v=s[14];const y=v;let P;s[15]!==g?(P={client:g},s[15]=g,s[16]=P):P=s[16];const{data:$}=dt(P);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Fe(_);let T;s[19]!==$?.prompts?(T=$?.prompts??[],s[19]=$?.prompts,s[20]=T):T=s[20];let D;s[21]!==T?(D=T.map(ws),s[21]=T,s[22]=D):D=s[22];const I=D;let N;s[23]!==M?.resources?(N=M?.resources??[],s[23]=M?.resources,s[24]=N):N=s[24];let j;s[25]!==N?(j=N.map(_s),s[25]=N,s[26]=j):j=s[26];const E=j;if(!d){let k;s[27]!==e?(k=e("details.connection.notFoundTitle"),s[27]=e,s[28]=k):k=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let R;s[31]!==c||s[32]!==l?(R=()=>c({to:"/$org/settings/connections",params:{org:l}}),s[31]=c,s[32]=l,s[33]=R):R=s[33];let p;s[34]!==e?(p=e("details.connection.backButton"),s[34]=e,s[35]=p):p=s[35];let w;s[36]!==R||s[37]!==p?(w=t.jsx(H,{variant:"outline",onClick:R,children:p}),s[36]=R,s[37]=p,s[38]=w):w=s[38];let O;return s[39]!==k||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Se,{title:k,description:A,actions:w})}),s[39]=k,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let z;return s[43]!==r.update.isPending||s[44]!==y||s[45]!==d||s[46]!==f||s[47]!==l||s[48]!==I||s[49]!==E||s[50]!==x?(z=t.jsx(ys,{org:l,connection:d,connectionId:f,isUpdating:r.update.isPending,tools:y,prompts:I,resources:E,siblings:x}),s[43]=r.update.isPending,s[44]=y,s[45]=d,s[46]=f,s[47]=l,s[48]=I,s[49]=E,s[50]=x,s[51]=z):z=s[51],z}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function ks(s){return(s??[]).map(Is)}function Is(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ps(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(ve,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function _i(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ps,{}),s[0]=e):e=s[0],e}export{_i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as T}from"./metadata-dUsYcpuu.js";import"./index-Ciqhx4Es.js";import{c as U}from"./use-mcp-client-CLQpYb65.js";import{W as I}from"./constants-DNuUCxmW.js";import{O as E}from"./connection-D4KVb2vi.js";function H(e){if(!e)return null;const t=typeof e=="string"?e:e.url;if(!t)return null;const n=t.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function L(e){const t=H(e);if(!t)return null;const n=`https://github.com/${t.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function D(e,t){return e===I.REGISTRY(t)||e===I.COMMUNITY_REGISTRY(t)}function Z(e,t){return D(e,t)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function z(e){if(!e)return[];const t=[];for(const n of e){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const o=Object.keys(n).find(r=>Array.isArray(n[r]));o&&(a=n[o])}t.push(...a)}return t}const G={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function Y(e){return e?G[e]??e.toUpperCase():null}function ee(e){if(!e)return[];if(Array.isArray(e))return e;if(typeof e=="object"&&e!==null){const t=Object.keys(e).find(n=>Array.isArray(e[n]));if(t)return e[t]}return[]}async function te(e,t,n,a,o){const r=await U({connectionId:e,orgId:t,orgSlug:n});try{const c=await r.callTool({name:a,arguments:o});return c.structuredContent??c}finally{await r.close().catch(console.error)}}let $="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",j=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=$[n[e]&63];return t};function V(e){return`${e}_${j()}`}function K(e){return T(e._meta)?.appName||e.server?.name||null}function W(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function F(e){const t=e?.identifier||e?.name;return t?t.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function ne(e,t,n,a){const o=e.server,r=T(e._meta),c=new Date().toISOString(),R=r?.friendlyName||r?.friendly_name||e.title||o?.title||o?.name||"Unnamed MCP Server",C=o?.description||null,k=o?.icons?.[0]?.src||L(o?.repository)||null,m=E.safeParse(r?.oauth_config),w=m.success?m.data:null,A=r?.configuration_state,P=r?.configuration_scopes,S=o?.repository?{url:o.repository.url,source:o.repository.source,subfolder:o.repository.subfolder}:null,f=o?.packages??[],g=o?.remotes??[],v=a?.packageIndex??0,N=a?.remoteIndex??0,y=f.length>0&&(a?.packageIndex!==void 0||g.length===0),i=y?f[v]:null,s=y?null:g[N];let l,u,h=null;if(i){const _=i.identifier||i.name;l="STDIO",u="";const d={};if(i.environmentVariables)for(const b of i.environmentVariables)b.name&&(d[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(d).length>0&&{envVars:d}}}else s?(l=Y(s.type)||"HTTP",u=s.url||""):(l="HTTP",u="");const M=g.length>1,O=f.length>1;let p="";i&&O?p=` (${F(i)})`:s&&M&&(p=` (${W(s)})`);const x=R+p;return{id:V("conn"),title:x,description:C,icon:k,app_name:K(e),app_id:r?.id||e.id||null,connection_type:l,connection_url:u,connection_token:null,connection_headers:h,oauth_config:w,configuration_state:A??null,configuration_scopes:P??null,metadata:{source:"store",registry_item_id:e.id,verified:r?.verified??!1,scopeName:r?.scopeName??null,toolsCount:r?.tools?.length??0,publishedAt:r?.publishedAt??null,repository:S},created_at:c,updated_at:c,created_by:n,organization_id:t,tools:null,bindings:null,status:"inactive"}}export{L as a,K as b,te as c,ee as d,ne as e,z as f,V as g,Z as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as D,b as H,c as z,a as J}from"./auth-BF15VDKW.js";import{dE as L}from"./index-Ciqhx4Es.js";function K(){return window.location.origin}function R(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const P="mcp:oauth:callback:";let O=null;const W=1e3,j=10*6e4,C=15e3;class F{_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this._redirectUrl=t.callbackUrl??O?.redirectUrl??`${K()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/studio MCP client",...n&&{scope:n}}}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const s=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${s},top=${o},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}}async function B(e){const t=L(e,window.location.origin),n=e.orgSlug?`/api/${encodeURIComponent(e.orgSlug)}/mcp/${e.connectionId}`:`/mcp/${e.connectionId}`,i=new URL(n,t),s=new F({serverUrl:i.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),o={fn:null};try{const r=new Promise((u,d)=>{const y=e.timeout||j;let m,p,E,w=!1;const $=s.state(),S=`${P}${$}`,h=()=>{window.removeEventListener("message",b),window.removeEventListener("storage",U),clearTimeout(m),clearInterval(p),clearInterval(E);try{localStorage.removeItem(S)}catch{}};o.fn=c=>{w||(w=!0,h(),d(c))};const A=async c=>{if(w)return;if(w=!0,!c.success){h(),d(new Error(c.error||"OAuth authentication failed"));return}const{code:g,state:V}=c;if(!g){h(),d(new Error("Missing authorization code"));return}if(s.getStoredState()!==V){h(),d(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const M=(await D(i))?.authorization_servers?.[0]||i,I=await H(M),k=s.clientInformation();if(!k){h(),d(new Error("Client information not found"));return}const N=s.codeVerifier(),x=await z(M,{metadata:I,clientInformation:k,authorizationCode:g,codeVerifier:N,redirectUri:s.redirectUrl,resource:new URL(i)});h(),u({tokens:x,clientId:k.client_id??null,clientSecret:"client_secret"in k?k.client_secret:null,tokenEndpoint:I?.token_endpoint??null,userinfoEndpoint:I?.userinfo_endpoint??null})}catch(v){h(),d(v)}},b=async c=>{!R()&&c.origin!==window.location.origin||c.data?.type==="mcp:oauth:callback"&&await A(c.data)},U=async c=>{if(!(c.key!==S||!c.newValue))try{const g=JSON.parse(c.newValue);await A(g)}catch{}};window.addEventListener("message",b),window.addEventListener("storage",U),E=setInterval(()=>{if(w)return;let c=null;try{c=localStorage.getItem(S)}catch{return}if(c)try{A(JSON.parse(c))}catch{}},W),m=setTimeout(()=>{w||(w=!0,h(),d(new Error("OAuth authentication timeout")))},y)});if(r.catch(()=>{}),await J(s,{serverUrl:i})==="REDIRECT"){const u=await r;return{token:u.tokens.access_token,tokenInfo:{accessToken:u.tokens.access_token,refreshToken:u.tokens.refresh_token??null,expiresIn:u.tokens.expires_in??null,scope:u.tokens.scope??null,clientId:u.clientId,clientSecret:u.clientSecret,tokenEndpoint:u.tokenEndpoint,userinfoEndpoint:u.userinfoEndpoint,idToken:u.tokens.id_token??null},error:null}}const l=s.tokens(),f=s.clientInformation();return{token:l?.access_token||null,tokenInfo:l?{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in??null,scope:l.scope??null,clientId:f?.client_id??null,clientSecret:f&&"client_secret"in f?f.client_secret:null,tokenEndpoint:null,userinfoEndpoint:null,idToken:l.id_token??null}:null,error:null}}catch(r){return o.fn&&o.fn(r instanceof Error?r:new Error(String(r))),{token:null,tokenInfo:null,error:r instanceof Error?r.message:String(r)}}}function T(e,t){if(window.opener&&!window.opener.closed){const n=R()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${P}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function ee(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const i=e.get("error"),s=e.get("error_description");let o=n;if(n)try{const a=atob(n),l=JSON.parse(a);l.clientState&&(o=l.clientState)}catch{}if(i){const a=s||i;return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}if(!t||!n){const a="Missing code or state parameter";return T({type:"mcp:oauth:callback",success:!1,error:a},o),{success:!1,error:a}}return n=o||n,T({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function _(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function G(e){try{const t=_(),n=t?new URL(e,t):new URL(e),i=n.pathname.match(/^\/api\/[^/]+\/mcp\/([^/]+)/);return i?i[1]??null:n.pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}function Y(e){try{const t=_();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/api\/([^/]+)\/mcp\//)?.[1]??null}catch{return null}}async function X(e,t,n){try{const i=`/api/${encodeURIComponent(t)}/connections/${e}/oauth-token/status`,s=n?new URL(i,n).href:i,o=_(),r=!n||new URL(n).origin===o,a=await fetch(s,{credentials:r?"include":"omit"});return a.ok?{hasToken:(await a.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function te({url:e,token:t,orgId:n,studioUrl:i,meshUrl:s}){try{const o=new Headers;o.set("Content-Type","application/json"),o.set("Accept","application/json, text/event-stream");const r=await fetch(e,{method:"POST",headers:o,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/studio MCP client",version:"1.0.0"}}}),signal:AbortSignal.timeout(C)}),a=G(e),l=Y(e),f=_(),u=L({studioUrl:i,meshUrl:s},f?new URL(e,f).origin:new URL(e).origin);if(r.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(a&&l?await X(a,l,u):{hasToken:!1}).hasToken};let d;try{const p=await r.json();d=p.error||p.message}catch{}return r.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:d||`HTTP ${r.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!r.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:d||`HTTP ${r.status}`}}catch(o){return console.error("[isConnectionAuthenticated] Error:",o),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:o instanceof Error&&o.name==="TimeoutError"?`Connection check timed out after ${C/1e3}s`:o.message}}}export{B as a,ee as h,te as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as w,b as z,G as g,j as a,H as _,r as j,I as D,J as I,M as O,O as L,R as A,U as M}from"./index-Ciqhx4Es.js";import{S as T}from"./index-B9n6l693.js";import{u as H}from"./settings-sidebar-BAeW8psv.js";import"./task-route-CushdBcU.js";import"./thread-route-b08GDb6K.js";import"./dialog-BVuXhd_n.js";import"./Check-DiuzOTdo.js";import"./Copy01-CZOGrHZ9.js";import"./Download01-DEU1JkfL.js";import"./use-destination-route-BbzQn-n1.js";import"./constants-DNuUCxmW.js";import"./ChevronUp-CHN7dU5d.js";import"./agent-icon-Dj2ko6xN.js";import"./AlertCircle-Dv6G1zch.js";import"./Tool01-CdkG5j9q.js";import"./ArrowUp-Dl1f2e9F.js";import"./ArrowLeft-Dyo7ZseM.js";import"./Tool02-CtS9_9Au.js";import"./XCircle-D4lh-8UY.js";import"./TrendUp01-Dwgdtlxo.js";import"./ZoomOut-CYflMQc3.js";import"./Users03-C7y8d7lq.js";import"./CheckCircle-BTMeEcth.js";import"./ChevronRight-CYJzqw1W.js";import"./ChevronSelectorVertical-C0Fdqi9U.js";import"./DotsVertical-CsIT64BQ.js";import"./UserSquare-CDP0762p.js";import"./CreditCard01-CxZhImMf.js";import"./Settings02-DLKKNdDt.js";import"./Eye-DNWGZGwG.js";import"./Share07-BdYeKEPF.js";import"./GitBranch01-4HvT92Fb.js";import"./Globe01-CySbwdvS.js";import"./XClose-CUFBDVP-.js";import"./HardDrive-CkhRSS5J.js";import"./Image01-CnSVldaE.js";import"./Key01-BvfZtZef.js";import"./Link01-DELnIRjt.js";import"./LinkExternal01-6r85JlVB.js";import"./Monitor01-Ciyr-Z_-.js";import"./Sun-DmqaD0GF.js";import"./Package-CGoiEMne.js";import"./Palette-CLInuq6o.js";import"./Play-CFcccqRE.js";import"./Plus-DfniZcTj.js";import"./SearchMd-MV7l96VN.js";import"./Shield01-Dbav6S5n.js";import"./Stars01-PjG8UcMP.js";import"./Trash01-DpQq-xrz.js";import"./Upload01-C-aUSpkq.js";import"./User01-CIlNhP30.js";import"./Users01-CJ-REDik.js";import"./Zap-BD_2K_N7.js";import"./use-virtual-mcp-Dc_tNJd3.js";import"./use-mcp-client-CLQpYb65.js";import"./auth-BF15VDKW.js";import"./github-repo-BpKUwJal.js";import"./toolbar-icon-button-CCWdMNhD.js";import"./popover-CRkM20y5.js";import"./drawer-CXBUq1b4.js";import"./github-repo-picker-CVdHp0M0.js";import"./collection-search-C0aemqyU.js";import"./use-debounced-value-DM_0TZ22.js";import"./use-connection-BY4RTRF-.js";import"./authenticate-and-persist-oauth-ORS2OKxY.js";import"./mcp-oauth-Bmt9vIvY.js";import"./use-mcp-tools-DxNdkpqp.js";import"./extract-connection-data-fYPcP0VJ.js";import"./metadata-dUsYcpuu.js";import"./connection-D4KVb2vi.js";import"./use-navigate-to-agent-BP5fBiR_.js";import"./hooks-y1rkw2ir.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B2Ek6f9E.js";import"./task-board-DWHUF-M8.js";import"./schema-BSi9J6XG.js";import"./thread-intent-CisrByhq.js";import"./slugify-CEUa2lfQ.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./use-project-scope-DuXQlLft.js";import"./shell-layout-r6wI2dxA.js";import"./avatar-BLCEls6Y.js";import"./use-panel-navigate-ChqtBgPV.js";import"./command-aq94pylP.js";import"./index-BOJEwmSU.js";import"./use-is-desktop-app-BNujXJc_.js";import"./required-auth-layout-BNGtvzOt.js";import"./use-organization-settings-Bj_N-FZ1.js";import"./use-org-sso-DaGSGBc8.js";import"./connection-card-DZD9pIth.js";import"./use-registry-connections-DzkmhEYo.js";import"./useInfiniteQuery-DYvex915.js";import"./use-infinite-scroll-BnNCHFKn.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./integration-icon-B63L2HtM.js";import"./form-D7fAV9eN.js";import"./label-CGF50XGa.js";import"./input-HiBvv-tS.js";import"./select-Dx7GTm0n.js";import"./textarea-bCfy8lu-.js";import"./connection-form-helpers-CJ7gQUqN.js";import"./collection-tabs-DM3JgymS.js";import"./badge-CSQtV4I1.js";import"./useSuspenseInfiniteQuery-zzJOxA7J.js";import"./use-ai-providers-ZNJMa2Qe.js";import"./use-decopilot-events-GHwUJFdQ.js";import"./dropdown-menu-7nrlUaMG.js";import"./get-initials-D-f_fDFw.js";import"./use-deployment-admin-BZ1DWC9e.js";import"./invite-member-dialog-S-x8vUoc.js";import"./use-org-auth-client-CKoQfJfQ.js";import"./use-organization-roles-G6vi9RUF.js";import"./scroll-area-CjEkqIar.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-file-configs-Dme4FNCs.js";import"./site-slug-uya6Wp4-.js";import"./create-organization-dialog-BFeoMeJI.js";import"./alert-dialog-DN6vGwKb.js";import"./use-join-requests-Camfhmzs.js";function N(t){const e=w.c(11),{onPointerDown:o,onDoubleClick:l}=t,i=z(),{isMobile:b}=g(),c=H();if(b||c)return null;let s;e[0]!==i?(s=i("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=i,e[1]=s):s=e[1];let r;e[2]!==i?(r=i("sidebar.sidebarResizeHandle.title"),e[2]=i,e[3]=r):r=e[3];let p,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(p={left:"var(--sidebar-width)"},m=a.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=p,e[5]=m):(p=e[4],m=e[5]);let n;return e[6]!==l||e[7]!==o||e[8]!==s||e[9]!==r?(n=a.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":s,title:r,onPointerDown:o,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:p,children:m}),e[6]=l,e[7]=o,e[8]=s,e[9]=r,e[10]=n):n=e[10],n}const v=240,W=400,C="sidebar.width";function S(t){return Math.max(v,Math.min(W,t))}function X(){const t=w.c(11),[e,o]=_(C,$),l=j.useRef(null);let i;t[0]!==o||t[1]!==e?(i=m=>{m.preventDefault();const n=m.clientX,d=S(e),f=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),u=f?Array.from(f.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const y of u)y.style.transition="none";const h=y=>{const x=S(d+(y.clientX-n));f?.style.setProperty("--sidebar-width",`${x}px`)},R=y=>{const x=S(d+(y.clientX-n));o(x);for(const E of u)E.style.transition="";window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",R),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",h),window.addEventListener("pointerup",R)},t[0]=o,t[1]=e,t[2]=i):i=t[2];const b=i;let c;t[3]!==o?(c=()=>{o(v)},t[3]=o,t[4]=c):c=t[4];const s=c;let r;t[5]!==e?(r=S(e),t[5]=e,t[6]=r):r=t[6];let p;return t[7]!==b||t[8]!==s||t[9]!==r?(p={width:r,wrapperRef:l,onStartResize:b,resetWidth:s},t[7]=b,t[8]=s,t[9]=r,t[10]=p):p=t[10],p}function $(t){return typeof t=="number"?S(t):v}const P="3.125rem";function rr(){const t=w.c(16),e=D();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=I.sidebarOpen(),t[0]=o):o=t[0];const[l,i]=_(o,!0),{width:b,wrapperRef:c,onStartResize:s,resetWidth:r}=X(),p=`${b}px`;let m;t[1]!==p?(m={"--sidebar-width":p,"--sidebar-width-icon":P},t[1]=p,t[2]=m):m=t[2];const n=m;let d;t[3]!==e||t[4]!==s||t[5]!==r?(d=!e&&a.jsxs(a.Fragment,{children:[a.jsx(T,{}),a.jsx(N,{onPointerDown:s,onDoubleClick:r})]}),t[3]=e,t[4]=s,t[5]=r,t[6]=d):d=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=a.jsx(O,{className:"flex flex-col min-h-0",style:{background:"transparent",containerType:"inline-size"},children:a.jsx(L,{})}),t[7]=f):f=t[7];let u;t[8]!==n||t[9]!==d||t[10]!==c?(u=a.jsx("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:a.jsxs(A,{ref:c,className:"flex-1 bg-sidebar relative min-h-0",style:n,children:[d,f]})}),t[8]=n,t[9]=d,t[10]=c,t[11]=u):u=t[11];let h;return t[12]!==i||t[13]!==l||t[14]!==u?(h=a.jsx(M,{open:l,onOpenChange:i,children:u}),t[12]=i,t[13]=l,t[14]=u,t[15]=h):h=t[15],h}export{rr as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,b as L,j as r}from"./index-Ciqhx4Es.js";import{I as A}from"./input-HiBvv-tS.js";import{L as F}from"./label-CGF50XGa.js";import{S as R,a as z,b as J,c as O,d as V}from"./select-Dx7GTm0n.js";import{T as D}from"./textarea-bCfy8lu-.js";import{e as M,w as $,j as q,y as G,J as H}from"./index-DK46XAl9.js";import{s as P}from"./primitives-RPdPdtiK.js";import{u as Q}from"./use-autosave-CWnBHJNw.js";import"./Check-DiuzOTdo.js";import"./ChevronUp-CHN7dU5d.js";import"./ArrowUp-Dl1f2e9F.js";import"./chat-context-C5TtMbeA.js";import"./use-panel-navigate-ChqtBgPV.js";import"./use-destination-route-BbzQn-n1.js";import"./thread-route-b08GDb6K.js";import"./dialog-BVuXhd_n.js";import"./Copy01-CZOGrHZ9.js";import"./Download01-DEU1JkfL.js";import"./constants-DNuUCxmW.js";import"./thread-intent-CisrByhq.js";import"./slugify-CEUa2lfQ.js";import"./hooks-y1rkw2ir.js";import"./use-mcp-client-CLQpYb65.js";import"./auth-BF15VDKW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B2Ek6f9E.js";import"./task-board-DWHUF-M8.js";import"./schema-BSi9J6XG.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Dc_tNJd3.js";import"./use-ai-providers-ZNJMa2Qe.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-GHwUJFdQ.js";import"./use-organization-settings-Bj_N-FZ1.js";import"./automation-runs-oTVIsV-n.js";import"./agent-icon-Dj2ko6xN.js";import"./AlertCircle-Dv6G1zch.js";import"./Tool01-CdkG5j9q.js";import"./ArrowLeft-Dyo7ZseM.js";import"./Tool02-CtS9_9Au.js";import"./XCircle-D4lh-8UY.js";import"./TrendUp01-Dwgdtlxo.js";import"./ZoomOut-CYflMQc3.js";import"./Users03-C7y8d7lq.js";import"./CheckCircle-BTMeEcth.js";import"./ChevronRight-CYJzqw1W.js";import"./ChevronSelectorVertical-C0Fdqi9U.js";import"./DotsVertical-CsIT64BQ.js";import"./UserSquare-CDP0762p.js";import"./CreditCard01-CxZhImMf.js";import"./Settings02-DLKKNdDt.js";import"./Eye-DNWGZGwG.js";import"./Share07-BdYeKEPF.js";import"./GitBranch01-4HvT92Fb.js";import"./Globe01-CySbwdvS.js";import"./XClose-CUFBDVP-.js";import"./HardDrive-CkhRSS5J.js";import"./Image01-CnSVldaE.js";import"./Key01-BvfZtZef.js";import"./Link01-DELnIRjt.js";import"./LinkExternal01-6r85JlVB.js";import"./Monitor01-Ciyr-Z_-.js";import"./Sun-DmqaD0GF.js";import"./Package-CGoiEMne.js";import"./Palette-CLInuq6o.js";import"./Play-CFcccqRE.js";import"./Plus-DfniZcTj.js";import"./SearchMd-MV7l96VN.js";import"./Shield01-Dbav6S5n.js";import"./Stars01-PjG8UcMP.js";import"./Trash01-DpQq-xrz.js";import"./Upload01-C-aUSpkq.js";import"./User01-CIlNhP30.js";import"./Users01-CJ-REDik.js";import"./Zap-BD_2K_N7.js";import"./useInfiniteQuery-DYvex915.js";import"./use-infinite-scroll-BnNCHFKn.js";import"./use-connection-BY4RTRF-.js";import"./table-D3Y6ENY8.js";import"./empty-state-N8rf9YSi.js";import"./use-members-Nw1pRVDm.js";import"./use-org-auth-client-CKoQfJfQ.js";import"./use-automations-CO5qll04.js";import"./useSuspenseInfiniteQuery-zzJOxA7J.js";import"./avatar-BLCEls6Y.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-MarDfxAW.js";import"./markdown-Srunai6w.js";import"./monaco-editor-BXDxtePS.js";import"./editor-CSXnkhqo.js";import"./types-BL_Cd649.js";import"./shell-layout-r6wI2dxA.js";import"./use-project-scope-DuXQlLft.js";import"./github-repo-BpKUwJal.js";import"./command-aq94pylP.js";import"./index-BOJEwmSU.js";import"./required-auth-layout-BNGtvzOt.js";import"./use-org-sso-DaGSGBc8.js";import"./integration-icon-B63L2HtM.js";import"./use-navigate-to-agent-BP5fBiR_.js";import"./use-mcp-prompts-B4YApHQz.js";import"./form-D7fAV9eN.js";import"./file-type-icon-BnBH2hK9.js";import"./drawer-CXBUq1b4.js";import"./collection-search-C0aemqyU.js";import"./use-mcp-tools-DxNdkpqp.js";import"./tabs-DuT8Yq6b.js";import"./toggle-group-3YvrBCWM.js";import"./task-route-CushdBcU.js";import"./toolbar-icon-button-CCWdMNhD.js";import"./popover-CRkM20y5.js";import"./github-repo-picker-CVdHp0M0.js";import"./use-debounced-value-DM_0TZ22.js";import"./authenticate-and-persist-oauth-ORS2OKxY.js";import"./mcp-oauth-Bmt9vIvY.js";import"./extract-connection-data-fYPcP0VJ.js";import"./metadata-dUsYcpuu.js";import"./connection-D4KVb2vi.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-DZD9pIth.js";import"./use-registry-connections-DzkmhEYo.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./connection-form-helpers-CJ7gQUqN.js";import"./collection-tabs-DM3JgymS.js";import"./badge-CSQtV4I1.js";import"./dropdown-menu-7nrlUaMG.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BkS3JCk0.js";import"./checkbox-CHvOkNek.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-1xzQyJ7C.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DjB7YACH.js";import"./toolbar-BtJG1jFO.js";import"./use-file-configs-Dme4FNCs.js";import"./site-slug-uya6Wp4-.js";import"./skill-preview-BV5lD9Ur.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-DN6vGwKb.js";import"./use-debounced-autosave-CKZ9WmVu.js";import"./scroll-area-CjEkqIar.js";import"./search-input-kDCevv38.js";import"./use-mcp-auth-status-DwCKSgFq.js";import"./switch-U7uzAFmD.js";import"./use-secrets-CPol22BF.js";import"./client-icons-CIyJtQzW.js";import"./connect-layout-DUtKqe8O.js";import"./self-tool-result-9rkDiIrM.js";import"./track-CIoIWcra.js";import"./use-tags-DhPuQwXu.js";import"./breadcrumb-BY2L4Yur.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-D_CbqNGG.js";import"./site-error--i37Vnuw.js";import"./cards-DDW_x79J.js";const U={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"}]},W={authors:"sandbox.recordEditor.titleAuthor"};function Qr(I){const t=B.c(39),{orgSlug:E,virtualMcpId:K,branch:w,kind:a,blockKey:b,block:f}=I,i=L();let h;t[0]!==w||t[1]!==E||t[2]!==K?(h={orgSlug:E,virtualMcpId:K,branch:w},t[0]=w,t[1]=E,t[2]=K,t[3]=h):h=t[3];const p=M(h);let g;t[4]!==f||t[5]!==a?(g=$(f,a),t[4]=f,t[5]=a,t[6]=g):g=t[6];const C=g;let k;t[7]!==b||t[8]!==a||t[9]!==p?(k=l=>{p.mutate({blockKey:b,data:G(b,a,l)})},t[7]=b,t[8]=a,t[9]=p,t[10]=k):k=t[10];const[e,S]=Q(C,k);let v;t[11]!==e||t[12]!==S?(v=(l,o)=>S({...e,[l]:o}),t[11]=e,t[12]=S,t[13]=v):v=t[13];const s=v,N=W[a];let n;t[14]!==i||t[15]!==N?(n=i(N),t[14]=i,t[15]=N,t[16]=n):n=t[16];let c;t[17]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[17]=n,t[18]=c):c=t[18];let d;t[19]!==p.isError||t[20]!==p.isPending?(d=r.jsx(q,{isPending:p.isPending,isError:p.isError}),t[19]=p.isError,t[20]=p.isPending,t[21]=d):d=t[21];let y;t[22]!==c||t[23]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[22]=c,t[23]=d,t[24]=y):y=t[24];const T=U[a];let x;if(t[25]!==e||t[26]!==s||t[27]!==i||t[28]!==T){let l;t[30]!==e||t[31]!==s||t[32]!==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:P(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(J,{placeholder:i(o.labelKey)})}),r.jsx(O,{children:(o.options??[]).map(m=>r.jsx(V,{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(D,{id:o.key,value:P(e[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(A,{id:o.key,value:P(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[30]=e,t[31]=s,t[32]=i,t[33]=l):l=t[33],x=T.map(l),t[25]=e,t[26]=s,t[27]=i,t[28]=T,t[29]=x}else x=t[29];let u;t[34]!==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[34]=x,t[35]=u):u=t[35];let j;return t[36]!==u||t[37]!==y?(j=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[36]=u,t[37]=y,t[38]=j):j=t[38],j}export{Qr as RecordEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as pt,b as at,j as r}from"./index-Ciqhx4Es.js";import{C as ct}from"./checkbox-CHvOkNek.js";import{I as rt}from"./input-HiBvv-tS.js";import{L as et}from"./label-CGF50XGa.js";import{d as dt,a as nt,b as ft,c as xt,S as ht}from"./select-Dx7GTm0n.js";import{e as ut,bG as bt,j as yt,bH as jt,bI as vt}from"./index-DK46XAl9.js";import{u as gt}from"./use-autosave-CWnBHJNw.js";import"./Check-DiuzOTdo.js";import"./ChevronUp-CHN7dU5d.js";import"./ArrowUp-Dl1f2e9F.js";import"./chat-context-C5TtMbeA.js";import"./use-panel-navigate-ChqtBgPV.js";import"./use-destination-route-BbzQn-n1.js";import"./thread-route-b08GDb6K.js";import"./dialog-BVuXhd_n.js";import"./Copy01-CZOGrHZ9.js";import"./Download01-DEU1JkfL.js";import"./constants-DNuUCxmW.js";import"./thread-intent-CisrByhq.js";import"./slugify-CEUa2lfQ.js";import"./hooks-y1rkw2ir.js";import"./use-mcp-client-CLQpYb65.js";import"./auth-BF15VDKW.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-B2Ek6f9E.js";import"./task-board-DWHUF-M8.js";import"./schema-BSi9J6XG.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-Dc_tNJd3.js";import"./use-ai-providers-ZNJMa2Qe.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-GHwUJFdQ.js";import"./use-organization-settings-Bj_N-FZ1.js";import"./automation-runs-oTVIsV-n.js";import"./agent-icon-Dj2ko6xN.js";import"./AlertCircle-Dv6G1zch.js";import"./Tool01-CdkG5j9q.js";import"./ArrowLeft-Dyo7ZseM.js";import"./Tool02-CtS9_9Au.js";import"./XCircle-D4lh-8UY.js";import"./TrendUp01-Dwgdtlxo.js";import"./ZoomOut-CYflMQc3.js";import"./Users03-C7y8d7lq.js";import"./CheckCircle-BTMeEcth.js";import"./ChevronRight-CYJzqw1W.js";import"./ChevronSelectorVertical-C0Fdqi9U.js";import"./DotsVertical-CsIT64BQ.js";import"./UserSquare-CDP0762p.js";import"./CreditCard01-CxZhImMf.js";import"./Settings02-DLKKNdDt.js";import"./Eye-DNWGZGwG.js";import"./Share07-BdYeKEPF.js";import"./GitBranch01-4HvT92Fb.js";import"./Globe01-CySbwdvS.js";import"./XClose-CUFBDVP-.js";import"./HardDrive-CkhRSS5J.js";import"./Image01-CnSVldaE.js";import"./Key01-BvfZtZef.js";import"./Link01-DELnIRjt.js";import"./LinkExternal01-6r85JlVB.js";import"./Monitor01-Ciyr-Z_-.js";import"./Sun-DmqaD0GF.js";import"./Package-CGoiEMne.js";import"./Palette-CLInuq6o.js";import"./Play-CFcccqRE.js";import"./Plus-DfniZcTj.js";import"./SearchMd-MV7l96VN.js";import"./Shield01-Dbav6S5n.js";import"./Stars01-PjG8UcMP.js";import"./Trash01-DpQq-xrz.js";import"./Upload01-C-aUSpkq.js";import"./User01-CIlNhP30.js";import"./Users01-CJ-REDik.js";import"./Zap-BD_2K_N7.js";import"./useInfiniteQuery-DYvex915.js";import"./use-infinite-scroll-BnNCHFKn.js";import"./use-connection-BY4RTRF-.js";import"./table-D3Y6ENY8.js";import"./empty-state-N8rf9YSi.js";import"./use-members-Nw1pRVDm.js";import"./use-org-auth-client-CKoQfJfQ.js";import"./use-automations-CO5qll04.js";import"./useSuspenseInfiniteQuery-zzJOxA7J.js";import"./avatar-BLCEls6Y.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-MarDfxAW.js";import"./markdown-Srunai6w.js";import"./monaco-editor-BXDxtePS.js";import"./editor-CSXnkhqo.js";import"./types-BL_Cd649.js";import"./shell-layout-r6wI2dxA.js";import"./use-project-scope-DuXQlLft.js";import"./github-repo-BpKUwJal.js";import"./command-aq94pylP.js";import"./index-BOJEwmSU.js";import"./required-auth-layout-BNGtvzOt.js";import"./use-org-sso-DaGSGBc8.js";import"./integration-icon-B63L2HtM.js";import"./use-navigate-to-agent-BP5fBiR_.js";import"./use-mcp-prompts-B4YApHQz.js";import"./form-D7fAV9eN.js";import"./file-type-icon-BnBH2hK9.js";import"./drawer-CXBUq1b4.js";import"./collection-search-C0aemqyU.js";import"./use-mcp-tools-DxNdkpqp.js";import"./tabs-DuT8Yq6b.js";import"./toggle-group-3YvrBCWM.js";import"./task-route-CushdBcU.js";import"./toolbar-icon-button-CCWdMNhD.js";import"./popover-CRkM20y5.js";import"./github-repo-picker-CVdHp0M0.js";import"./use-debounced-value-DM_0TZ22.js";import"./authenticate-and-persist-oauth-ORS2OKxY.js";import"./mcp-oauth-Bmt9vIvY.js";import"./extract-connection-data-fYPcP0VJ.js";import"./metadata-dUsYcpuu.js";import"./connection-D4KVb2vi.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-DZD9pIth.js";import"./use-registry-connections-DzkmhEYo.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-bCfy8lu-.js";import"./connection-form-helpers-CJ7gQUqN.js";import"./collection-tabs-DM3JgymS.js";import"./badge-CSQtV4I1.js";import"./dropdown-menu-7nrlUaMG.js";import"./get-initials-D-f_fDFw.js";import"./select-model-BkS3JCk0.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-1xzQyJ7C.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DjB7YACH.js";import"./toolbar-BtJG1jFO.js";import"./use-file-configs-Dme4FNCs.js";import"./site-slug-uya6Wp4-.js";import"./skill-preview-BV5lD9Ur.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-DN6vGwKb.js";import"./use-debounced-autosave-CKZ9WmVu.js";import"./scroll-area-CjEkqIar.js";import"./search-input-kDCevv38.js";import"./use-mcp-auth-status-DwCKSgFq.js";import"./switch-U7uzAFmD.js";import"./use-secrets-CPol22BF.js";import"./client-icons-CIyJtQzW.js";import"./connect-layout-DUtKqe8O.js";import"./self-tool-result-9rkDiIrM.js";import"./track-CIoIWcra.js";import"./use-tags-DhPuQwXu.js";import"./breadcrumb-BY2L4Yur.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-D_CbqNGG.js";import"./site-error--i37Vnuw.js";import"./cards-DDW_x79J.js";const Et=[{value:"temporary",labelKey:"sandbox.redirectEditor.typeTemporary"},{value:"permanent",labelKey:"sandbox.redirectEditor.typePermanent"}];function yi(it){const t=pt.c(106),{orgSlug:z,virtualMcpId:J,branch:W,blockKey:X,block:Z}=it,e=at();let V;t[0]!==W||t[1]!==z||t[2]!==J?(V={orgSlug:z,virtualMcpId:J,branch:W},t[0]=W,t[1]=z,t[2]=J,t[3]=V):V=t[3];const s=ut(V);let G;t[4]!==Z?(G=bt(Z),t[4]=Z,t[5]=G):G=t[5];const ot=G;let H;t[6]!==X||t[7]!==s?(H=i=>{s.mutate({blockKey:X,data:vt(i)})},t[6]=X,t[7]=s,t[8]=H):H=t[8];const[o,tt]=gt(ot,H);let M;t[9]!==o||t[10]!==tt?(M=i=>tt({...o,...i}),t[9]=o,t[10]=tt,t[11]=M):M=t[11];const m=M;let l;t[12]!==e?(l=e("sandbox.redirectEditor.title"),t[12]=e,t[13]=l):l=t[13];let p;t[14]!==l?(p=r.jsx("span",{className:"text-sm font-medium",children:l}),t[14]=l,t[15]=p):p=t[15];let a;t[16]!==s.isError||t[17]!==s.isPending?(a=r.jsx(yt,{isPending:s.isPending,isError:s.isError}),t[16]=s.isError,t[17]=s.isPending,t[18]=a):a=t[18];let c;t[19]!==p||t[20]!==a?(c=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[p,a]}),t[19]=p,t[20]=a,t[21]=c):c=t[21];let d;t[22]!==e?(d=e("sandbox.redirectEditor.fromLabel"),t[22]=e,t[23]=d):d=t[23];let n;t[24]!==d?(n=r.jsx(et,{htmlFor:"redirect-from",children:d}),t[24]=d,t[25]=n):n=t[25];const mt=o.from;let f;t[26]!==e?(f=e("sandbox.redirectEditor.fromPlaceholder"),t[26]=e,t[27]=f):f=t[27];let x;t[28]!==m?(x=i=>m({from:i.target.value}),t[28]=m,t[29]=x):x=t[29];let h;t[30]!==o.from||t[31]!==f||t[32]!==x?(h=r.jsx(rt,{id:"redirect-from",value:mt,placeholder:f,onChange:x,className:"h-10"}),t[30]=o.from,t[31]=f,t[32]=x,t[33]=h):h=t[33];let u;t[34]!==e?(u=e("sandbox.redirectEditor.fromDescription"),t[34]=e,t[35]=u):u=t[35];let b;t[36]!==u?(b=r.jsx("p",{className:"text-xs text-muted-foreground",children:u}),t[36]=u,t[37]=b):b=t[37];let y;t[38]!==n||t[39]!==h||t[40]!==b?(y=r.jsxs("div",{className:"space-y-2",children:[n,h,b]}),t[38]=n,t[39]=h,t[40]=b,t[41]=y):y=t[41];let j;t[42]!==e?(j=e("sandbox.redirectEditor.toLabel"),t[42]=e,t[43]=j):j=t[43];let v;t[44]!==j?(v=r.jsx(et,{htmlFor:"redirect-to",children:j}),t[44]=j,t[45]=v):v=t[45];const st=o.to;let g;t[46]!==e?(g=e("sandbox.redirectEditor.toPlaceholder"),t[46]=e,t[47]=g):g=t[47];let E;t[48]!==m?(E=i=>m({to:i.target.value}),t[48]=m,t[49]=E):E=t[49];let P;t[50]!==o.to||t[51]!==g||t[52]!==E?(P=r.jsx(rt,{id:"redirect-to",value:st,placeholder:g,onChange:E,className:"h-10"}),t[50]=o.to,t[51]=g,t[52]=E,t[53]=P):P=t[53];let N;t[54]!==e?(N=e("sandbox.redirectEditor.toDescription"),t[54]=e,t[55]=N):N=t[55];let S;t[56]!==N?(S=r.jsx("p",{className:"text-xs text-muted-foreground",children:N}),t[56]=N,t[57]=S):S=t[57];let C;t[58]!==v||t[59]!==P||t[60]!==S?(C=r.jsxs("div",{className:"space-y-2",children:[v,P,S]}),t[58]=v,t[59]=P,t[60]=S,t[61]=C):C=t[61];let T;t[62]!==e?(T=e("sandbox.redirectEditor.typeLabel"),t[62]=e,t[63]=T):T=t[63];let k;t[64]!==T?(k=r.jsx(et,{htmlFor:"redirect-type",children:T}),t[64]=T,t[65]=k):k=t[65];const lt=o.type;let w;t[66]!==m?(w=i=>m({type:i}),t[66]=m,t[67]=w):w=t[67];let I;t[68]!==e?(I=e("sandbox.redirectEditor.typePlaceholder"),t[68]=e,t[69]=I):I=t[69];let R;t[70]!==I?(R=r.jsx(nt,{id:"redirect-type",className:"h-10 w-full",children:r.jsx(ft,{placeholder:I})}),t[70]=I,t[71]=R):R=t[71];let _;t[72]!==e?(_=Et.map(i=>r.jsx(dt,{value:i.value,children:e(i.labelKey,{status:jt[i.value]})},i.value)),t[72]=e,t[73]=_):_=t[73];let L;t[74]!==_?(L=r.jsx(xt,{children:_}),t[74]=_,t[75]=L):L=t[75];let Q;t[76]!==o.type||t[77]!==w||t[78]!==R||t[79]!==L?(Q=r.jsxs(ht,{value:lt,onValueChange:w,children:[R,L]}),t[76]=o.type,t[77]=w,t[78]=R,t[79]=L,t[80]=Q):Q=t[80];let Y;t[81]===Symbol.for("react.memo_cache_sentinel")?(Y=r.jsx("strong",{children:"Temporary"}),t[81]=Y):Y=t[81];let $;t[82]===Symbol.for("react.memo_cache_sentinel")?($=r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Use ",Y," when the redirect may change;"," ",r.jsx("strong",{children:"Permanent"})," lets browsers cache it."]}),t[82]=$):$=t[82];let F;t[83]!==k||t[84]!==Q?(F=r.jsxs("div",{className:"space-y-2",children:[k,Q,$]}),t[83]=k,t[84]=Q,t[85]=F):F=t[85];let K;t[86]!==m?(K=i=>m({discardQueryParameters:i===!0}),t[86]=m,t[87]=K):K=t[87];let D;t[88]!==o.discardQueryParameters||t[89]!==K?(D=r.jsx(ct,{checked:o.discardQueryParameters,onCheckedChange:K}),t[88]=o.discardQueryParameters,t[89]=K,t[90]=D):D=t[90];let A;t[91]!==e?(A=e("sandbox.redirectEditor.discardQueryParameters"),t[91]=e,t[92]=A):A=t[92];let B;t[93]!==A?(B=r.jsx("span",{className:"text-sm",children:A}),t[93]=A,t[94]=B):B=t[94];let O;t[95]!==D||t[96]!==B?(O=r.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5",children:[D,B]}),t[95]=D,t[96]=B,t[97]=O):O=t[97];let U;t[98]!==y||t[99]!==C||t[100]!==F||t[101]!==O?(U=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsxs("div",{className:"mx-auto max-w-xl space-y-6",children:[y,C,F,O]})}),t[98]=y,t[99]=C,t[100]=F,t[101]=O,t[102]=U):U=t[102];let q;return t[103]!==U||t[104]!==c?(q=r.jsxs("div",{className:"flex h-full flex-col",children:[c,U]}),t[103]=U,t[104]=c,t[105]=q):q=t[105],q}export{yi as RedirectEditor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BmS41XeK.js","assets/index-Ciqhx4Es.js","assets/index-DrotPsL6.css","assets/Tool02-CtS9_9Au.js","assets/CheckCircle-BTMeEcth.js","assets/Settings02-DLKKNdDt.js","assets/use-mcp-client-CLQpYb65.js","assets/constants-DNuUCxmW.js","assets/auth-BF15VDKW.js","assets/useInfiniteQuery-DYvex915.js","assets/use-infinite-scroll-BnNCHFKn.js","assets/badge-CSQtV4I1.js","assets/input-HiBvv-tS.js","assets/dropdown-menu-7nrlUaMG.js","assets/Check-DiuzOTdo.js","assets/ChevronRight-CYJzqw1W.js","assets/DotsVertical-CsIT64BQ.js","assets/table-D3Y6ENY8.js","assets/toggle-group-3YvrBCWM.js","assets/use-view-mode-XpzZpQOU.js","assets/Globe01-CySbwdvS.js","assets/SearchMd-MV7l96VN.js","assets/dialog-BVuXhd_n.js","assets/AlertCircle-Dv6G1zch.js","assets/Download01-DEU1JkfL.js","assets/Upload01-C-aUSpkq.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-DN6vGwKb.js","assets/Trash01-DpQq-xrz.js","assets/label-CGF50XGa.js","assets/select-Dx7GTm0n.js","assets/ChevronUp-CHN7dU5d.js","assets/switch-U7uzAFmD.js","assets/textarea-bCfy8lu-.js","assets/ArrowLeft-Dyo7ZseM.js","assets/XCircle-D4lh-8UY.js","assets/Link01-DELnIRjt.js","assets/safe-image-url-D5z803Ot.js","assets/checkbox-CHvOkNek.js","assets/Eye-DNWGZGwG.js","assets/LinkExternal01-6r85JlVB.js","assets/use-copy-MarDfxAW.js","assets/Copy01-CZOGrHZ9.js","assets/Key01-BvfZtZef.js","assets/Plus-DfniZcTj.js","assets/mcp-oauth-Bmt9vIvY.js","assets/Play-CFcccqRE.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as i,j as e,r as s,h as a,bn as o}from"./index-Ciqhx4Es.js";import{R as n}from"./require-capability-B6bbEttD.js";import"./access-gate-B8SIJFr7.js";import"./capability-load-error-CpA6LOWl.js";const c=s.lazy(()=>o(()=>import("./registry-layout-BmS41XeK.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])));function u(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(n,{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,{className:"size-5 text-muted-foreground"})}),children:e.jsx(c,{})})}),r[0]=t):t=r[0],t}export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,I as a,j as o,W as c,l as d,Y as f,bX as x,O as h}from"./index-Ciqhx4Es.js";import{h as u}from"./settings-sidebar-BAeW8psv.js";import{T as p}from"./toolbar-BtJG1jFO.js";import{S as j,M as b}from"./shell-controls-jJMoCrxb.js";import{u as S}from"./use-status-sounds-DjB7YACH.js";import"./ChevronUp-CHN7dU5d.js";import"./ChevronRight-CYJzqw1W.js";import"./TrendUp01-Dwgdtlxo.js";import"./toolbar-icon-button-CCWdMNhD.js";import"./Check-DiuzOTdo.js";import"./ChevronSelectorVertical-C0Fdqi9U.js";import"./Plus-DfniZcTj.js";import"./command-aq94pylP.js";import"./index-BOJEwmSU.js";import"./dialog-BVuXhd_n.js";import"./SearchMd-MV7l96VN.js";import"./popover-CRkM20y5.js";import"./agent-icon-Dj2ko6xN.js";import"./AlertCircle-Dv6G1zch.js";import"./Tool01-CdkG5j9q.js";import"./ArrowUp-Dl1f2e9F.js";import"./ArrowLeft-Dyo7ZseM.js";import"./Tool02-CtS9_9Au.js";import"./XCircle-D4lh-8UY.js";import"./ZoomOut-CYflMQc3.js";import"./Users03-C7y8d7lq.js";import"./CheckCircle-BTMeEcth.js";import"./DotsVertical-CsIT64BQ.js";import"./UserSquare-CDP0762p.js";import"./Copy01-CZOGrHZ9.js";import"./CreditCard01-CxZhImMf.js";import"./Download01-DEU1JkfL.js";import"./Settings02-DLKKNdDt.js";import"./Eye-DNWGZGwG.js";import"./Share07-BdYeKEPF.js";import"./GitBranch01-4HvT92Fb.js";import"./Globe01-CySbwdvS.js";import"./XClose-CUFBDVP-.js";import"./HardDrive-CkhRSS5J.js";import"./Image01-CnSVldaE.js";import"./Key01-BvfZtZef.js";import"./Link01-DELnIRjt.js";import"./LinkExternal01-6r85JlVB.js";import"./Monitor01-Ciyr-Z_-.js";import"./Sun-DmqaD0GF.js";import"./Package-CGoiEMne.js";import"./Palette-CLInuq6o.js";import"./Play-CFcccqRE.js";import"./Shield01-Dbav6S5n.js";import"./Stars01-PjG8UcMP.js";import"./Trash01-DpQq-xrz.js";import"./Upload01-C-aUSpkq.js";import"./User01-CIlNhP30.js";import"./Users01-CJ-REDik.js";import"./Zap-BD_2K_N7.js";import"./create-organization-dialog-BFeoMeJI.js";import"./alert-dialog-DN6vGwKb.js";import"./form-D7fAV9eN.js";import"./label-CGF50XGa.js";import"./input-HiBvv-tS.js";import"./use-destination-route-BbzQn-n1.js";import"./use-project-scope-DuXQlLft.js";import"./constants-DNuUCxmW.js";import"./use-virtual-mcp-Dc_tNJd3.js";import"./use-mcp-client-CLQpYb65.js";import"./auth-BF15VDKW.js";import"./github-repo-BpKUwJal.js";import"./use-join-requests-Camfhmzs.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-GHwUJFdQ.js";import"./decopilot-sse-pool-B2Ek6f9E.js";import"./task-board-DWHUF-M8.js";import"./schema-BSi9J6XG.js";import"./backoff-CrEUbyZT.js";function g(){const t=n.c(3),r=a(),{org:l}=c();S(l.slug);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(f,{children:o.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:o.jsx(x,{value:"p-0",children:o.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:o.jsx(h,{})})})})}),t[0]=e):e=t[0];const m=e;if(r){let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"flex flex-col flex-1 bg-background min-h-0 overflow-hidden",children:m}),t[1]=s):s=t[1],s}let i;return t[2]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex-1 min-h-0 p-1.5",children:o.jsx("div",{className:d("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),children:m})}),t[2]=i):i=t[2],i}function qt(){const t=n.c(10),r=a();let l;t[0]!==r?(l=r&&o.jsxs(p.Header,{children:[o.jsx(p.LeftColumn,{children:o.jsx(j,{})}),o.jsx(p.CenterSlot,{}),o.jsx(p.RightColumn,{children:o.jsx("span",{})})]}),t[0]=r,t[1]=l):l=t[1];let e;t[2]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(g,{}),t[2]=e):e=t[2];let m;t[3]!==l?(m=o.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[l,e]}),t[3]=l,t[4]=m):m=t[4];let i;t[5]!==r?(i=r&&o.jsx(b,{renderSidebar:v}),t[5]=r,t[6]=i):i=t[6];let s;return t[7]!==m||t[8]!==i?(s=o.jsxs(p.Provider,{children:[m,i]}),t[7]=m,t[8]=i,t[9]=s):s=t[9],s}function v(t){const{onClose:r}=t;return o.jsx(u,{onClose:r})}export{qt as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BmS41XeK.js","assets/index-Ciqhx4Es.js","assets/index-DrotPsL6.css","assets/Tool02-CtS9_9Au.js","assets/CheckCircle-BTMeEcth.js","assets/Settings02-DLKKNdDt.js","assets/use-mcp-client-CLQpYb65.js","assets/constants-DNuUCxmW.js","assets/auth-BF15VDKW.js","assets/useInfiniteQuery-DYvex915.js","assets/use-infinite-scroll-BnNCHFKn.js","assets/badge-CSQtV4I1.js","assets/input-HiBvv-tS.js","assets/dropdown-menu-7nrlUaMG.js","assets/Check-DiuzOTdo.js","assets/ChevronRight-CYJzqw1W.js","assets/DotsVertical-CsIT64BQ.js","assets/table-D3Y6ENY8.js","assets/toggle-group-3YvrBCWM.js","assets/use-view-mode-XpzZpQOU.js","assets/Globe01-CySbwdvS.js","assets/SearchMd-MV7l96VN.js","assets/dialog-BVuXhd_n.js","assets/AlertCircle-Dv6G1zch.js","assets/Download01-DEU1JkfL.js","assets/Upload01-C-aUSpkq.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-DN6vGwKb.js","assets/Trash01-DpQq-xrz.js","assets/label-CGF50XGa.js","assets/select-Dx7GTm0n.js","assets/ChevronUp-CHN7dU5d.js","assets/switch-U7uzAFmD.js","assets/textarea-bCfy8lu-.js","assets/ArrowLeft-Dyo7ZseM.js","assets/XCircle-D4lh-8UY.js","assets/Link01-DELnIRjt.js","assets/safe-image-url-D5z803Ot.js","assets/checkbox-CHvOkNek.js","assets/Eye-DNWGZGwG.js","assets/LinkExternal01-6r85JlVB.js","assets/use-copy-MarDfxAW.js","assets/Copy01-CZOGrHZ9.js","assets/Key01-BvfZtZef.js","assets/Plus-DfniZcTj.js","assets/mcp-oauth-Bmt9vIvY.js","assets/Play-CFcccqRE.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as n,d as c,f as m,j as t,h as f,r as l,bn as p}from"./index-Ciqhx4Es.js";import{R as u}from"./require-capability-B6bbEttD.js";import"./access-gate-B8SIJFr7.js";import"./capability-load-error-CpA6LOWl.js";const g=l.lazy(()=>p(()=>import("./registry-layout-BmS41XeK.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])));function h(){const e=n.c(5),i=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=m(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,{className:"size-5 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{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bW as Ds,c as R,l as X,j as s,h as He,r as G,I as Gt,G as ws,o as Z,b as Q,b6 as As,W as ge,d as qt,a6 as Qt,_ as Wt,L as Is,a1 as $e,a2 as Oe,a4 as Re,a as Ct,F as Ts,ar as Bs,as as Fs,B as be,t as oe,H as Ps,J as Es,K as ye,n as vt,a7 as kt,m as Yt,e as Le,bm as Ms,ap as Ls}from"./index-Ciqhx4Es.js";import{c as Xt,u as $s,d as Jt}from"./thread-route-b08GDb6K.js";import{t as Ve}from"./ChevronUp-CHN7dU5d.js";import{A as Zt,N as Os,s as dt,aL as Rs,aM as Ks,aN as Ft,aO as zs,t as Vs,aP as Us,a6 as Hs,aQ as Gs,o as qs,aR as Qs,a4 as ut,a3 as Ws,aa as Ys}from"./agent-icon-Dj2ko6xN.js";import{a as es,i as Xs,e as Js,S as Zs,f as en}from"./constants-DNuUCxmW.js";import{b as Nt,u as tn}from"./use-virtual-mcp-Dc_tNJd3.js";import{g as sn}from"./github-repo-BpKUwJal.js";import{T as ts}from"./toolbar-icon-button-CCWdMNhD.js";import{P as nt,a as ze,b as ot}from"./popover-CRkM20y5.js";import{D as _t,a as St,b as Dt,c as nn,e as on,f as ss,g as ns,d as an}from"./drawer-CXBUq1b4.js";import{i as ln}from"./SearchMd-MV7l96VN.js";import{i as Ge}from"./Check-DiuzOTdo.js";import{s as Qe}from"./Plus-DfniZcTj.js";import{G as ht,a as rn}from"./github-repo-picker-CVdHp0M0.js";import{g as cn,u as dn,b as os}from"./hooks-y1rkw2ir.js";import{g as un,b as as}from"./use-project-scope-DuXQlLft.js";import{b as fn,c as mn,a as gn}from"./use-navigate-to-agent-BP5fBiR_.js";import{u as ls}from"./shell-layout-r6wI2dxA.js";import{d as pn}from"./thread-intent-CisrByhq.js";import{C as hn}from"./collection-search-C0aemqyU.js";import{g as xn,b as jn,a as bn,e as yn}from"./extract-connection-data-fYPcP0VJ.js";import{u as is,a as rs,g as Cn,C as ft}from"./connection-card-DZD9pIth.js";import{D as cs,b as ds,c as us,d as fs,h as vn,e as kn}from"./dialog-BVuXhd_n.js";import{d as ce,a as de,e as ue,b as fe,c as me,F as Pt}from"./form-D7fAV9eN.js";import{I as _e}from"./input-HiBvv-tS.js";import{S as Nn,a as _n,b as Sn,c as Dn,d as Ue}from"./select-Dx7GTm0n.js";import{T as wn}from"./textarea-bCfy8lu-.js";import{b as ms}from"./use-connection-BY4RTRF-.js";import{n as et,a as mt,i as gs}from"./Tool02-CtS9_9Au.js";import{b as An,d as In}from"./UserSquare-CDP0762p.js";import{s as Tn}from"./XClose-CUFBDVP-.js";import{c as Bn,i as Xe,a as Et,E as Fn,p as Pn,b as En,d as Mn}from"./connection-form-helpers-CJ7gQUqN.js";import{a as gt}from"./authenticate-and-persist-oauth-ORS2OKxY.js";import{g as Ln}from"./connection-slug-CITJ0kGN.js";import{C as $n}from"./collection-tabs-DM3JgymS.js";import{u as Mt}from"./use-infinite-scroll-BnNCHFKn.js";import{B as Je}from"./badge-CSQtV4I1.js";import{u as On}from"./useSuspenseInfiniteQuery-zzJOxA7J.js";import{u as Rn}from"./use-mcp-client-CLQpYb65.js";import{g as tt}from"./metadata-dUsYcpuu.js";import{u as Kn}from"./use-ai-providers-ZNJMa2Qe.js";import{T as zn,C as wt,c as Vn,d as Un,S as xt}from"./task-board-DWHUF-M8.js";import{t as Hn}from"./decopilot-sse-pool-B2Ek6f9E.js";import{u as Gn}from"./use-decopilot-events-GHwUJFdQ.js";import{A as Lt}from"./avatar-BLCEls6Y.js";import{h as st,D as ps,b as hs,g as xs,c as js}from"./dropdown-menu-7nrlUaMG.js";import{a as At,c as It,d as ve,e as qe,b as Tt,C as Bt}from"./command-aq94pylP.js";import{s as qn}from"./TrendUp01-Dwgdtlxo.js";import{a as Qn}from"./Settings02-DLKKNdDt.js";import{s as $t}from"./User01-CIlNhP30.js";import{g as Ot}from"./get-initials-D-f_fDFw.js";import{i as Wn}from"./AlertCircle-Dv6G1zch.js";import{i as Yn}from"./CheckCircle-BTMeEcth.js";import{a as bs}from"./DotsVertical-CsIT64BQ.js";import{s as Xn}from"./Eye-DNWGZGwG.js";import{i as Jn}from"./Shield01-Dbav6S5n.js";const Zn=Ds("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function eo(t){const e=R.c(21),{value:n,onChange:a,placeholder:i,onKeyDown:l,className:o,isSearching:d,disabled:c}=t,u=i===void 0?"Search...":i;let f;e[0]!==o?(f=X("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=f):f=e[1];const p=c?"cursor-not-allowed opacity-50":"cursor-text";let r;e[2]!==p?(r=X("flex items-center gap-2.5 h-12 px-4",p),e[2]=p,e[3]=r):r=e[3];let m;e[4]!==d?(m=d?s.jsx(He,{className:"size-4 text-muted-foreground shrink-0"}):s.jsx(ln,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=d,e[5]=m):m=e[5];let g;e[6]!==a?(g=_=>a(_.target.value),e[6]=a,e[7]=g):g=e[7];let h;e[8]!==c||e[9]!==l||e[10]!==u||e[11]!==g||e[12]!==n?(h=s.jsx("input",{type:"text",value:n,onChange:g,onKeyDown:l,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]=l,e[10]=u,e[11]=g,e[12]=n,e[13]=h):h=e[13];let x;e[14]!==r||e[15]!==m||e[16]!==h?(x=s.jsxs("label",{className:r,children:[m,h]}),e[14]=r,e[15]=m,e[16]=h,e[17]=x):x=e[17];let b;return e[18]!==f||e[19]!==x?(b=s.jsx("div",{className:f,children:x}),e[18]=f,e[19]=x,e[20]=b):b=e[20],b}function to(t,e,n){if(!n)return null;const a=cn(t,e);return a?a.threads.get().find(l=>l.id===n)?.branch??null:null}function so(t){const e=R.c(6),{value:n,onChange:a}=t,i=Q();let l;e[0]!==i?(l=i("sidebar.agentsSection.searchAgents"),e[0]=i,e[1]=l):l=e[1];let o;return e[2]!==a||e[3]!==l||e[4]!==n?(o=s.jsx(eo,{value:n,onChange:a,placeholder:l}),e[2]=a,e[3]=l,e[4]=n,e[5]=o):o=e[5],o}function no(){const t=R.c(4),e=Q();let n;t[0]!==e?(n=e("sidebar.agentsSection.noAgentsFound"),t[0]=e,t[1]=n):n=t[1];let a;return t[2]!==n?(a=s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:n}),t[2]=n,t[3]=a):a=t[3],a}function oo(t){const e=R.c(10),{org:n,onClose:a}=t,i=Q();let l;e[0]!==n.slug?(l={org:n.slug},e[0]=n.slug,e[1]=l):l=e[1];let o;e[2]!==a?(o=()=>a(),e[2]=a,e[3]=o):o=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]!==l||e[7]!==o||e[8]!==d?(c=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Is,{to:"/$org/settings/agents",params:l,onClick:o,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:d})}),e[6]=l,e[7]=o,e[8]=d,e[9]=c):c=e[9],c}function ao(){const t=R.c(4),e=Q();let n;t[0]!==e?(n=e("sidebar.agentsSection.agents"),t[0]=e,t[1]=n):n=t[1];let a;return t[2]!==n?(a=s.jsx(ys,{children:n}),t[2]=n,t[3]=a):a=t[3],a}function lo(t){const e=R.c(11),{onImportFromGithub:n}=t,a=Q();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ht,{className:"size-3.5"}),e[0]=i):i=e[0];let l;e[1]!==a?(l=a("sidebar.agentsSection.import"),e[1]=a,e[2]=l):l=e[2];let o;e[3]!==n||e[4]!==l?(o=s.jsxs("button",{type:"button",onClick:n,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,l]}),e[3]=n,e[4]=l,e[5]=o):o=e[5];let d;e[6]!==a?(d=a("sidebar.agentsSection.codeAgents"),e[6]=a,e[7]=d):d=e[7];let c;return e[8]!==o||e[9]!==d?(c=s.jsx(ys,{action:o,children:d}),e[8]=o,e[9]=d,e[10]=c):c=e[10],c}function io(t){const e=R.c(11),{setOpen:n,emptyCtaClass:a}=t,i=Q();let l;e[0]!==i?(l=i("sidebar.agentsSection.browseAgents"),e[0]=i,e[1]=l):l=e[1];let o;e[2]!==a?(o=X(a),e[2]=a,e[3]=o):o=e[3];let d;e[4]!==n?(d=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),n(!0)},e[4]=n,e[5]=d):d=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qe,{className:"size-4"}),e[6]=c):c=e[6];let u;return e[7]!==l||e[8]!==o||e[9]!==d?(u=s.jsx(ts,{"aria-label":l,className:o,onClick:d,children:c}),e[7]=l,e[8]=o,e[9]=d,e[10]=u):u=e[10],u}function ro(t){const e=R.c(17),{setOpen:n,highlightEmpty:a,emptyCtaClass:i}=t,l=Q();let o;e[0]!==a||e[1]!==l?(o=a?void 0:l("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=l,e[2]=o):o=e[2];let d;e[3]!==i?(d=X(i),e[3]=i,e[4]=d):d=e[4];let c;e[5]!==n?(c=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),n(!0)},e[5]=n,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Qe,{}),e[7]=u):u=e[7];let f;e[8]!==l?(f=l("sidebar.agentsSection.newAgent"),e[8]=l,e[9]=f):f=e[9];let p;e[10]!==f?(p=s.jsx("span",{children:f}),e[10]=f,e[11]=p):p=e[11];let r;return e[12]!==o||e[13]!==d||e[14]!==c||e[15]!==p?(r=s.jsx(Qt,{children:s.jsxs(Wt,{tooltip:o,className:d,onClick:c,children:[u,p]})}),e[12]=o,e[13]=d,e[14]=c,e[15]=p,e[16]=r):r=e[16],r}function co(){const t=R.c(4),e=Q();let n;t[0]!==e?(n=e("sidebar.agentsSection.browseAgents"),t[0]=e,t[1]=n):n=t[1];let a;return t[2]!==n?(a=s.jsx(Dt,{className:"sr-only",children:n}),t[2]=n,t[3]=a):a=t[3],a}function uo(t){const e=R.c(8),{emptyCtaClass:n}=t,a=Q();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==n?(l=X(n),e[2]=n,e[3]=l):l=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Qe,{className:"size-4"}),e[4]=o):o=e[4];let d;return e[5]!==i||e[6]!==l?(d=s.jsx(ts,{"aria-label":i,className:l,children:o}),e[5]=i,e[6]=l,e[7]=d):d=e[7],d}function fo(t){const e=R.c(19),{wrapEmptyHint:n,highlightEmpty:a,emptyCtaClass:i}=t,l=Q();let o;e[0]!==a||e[1]!==l?(o=a?void 0:l("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=l,e[2]=o):o=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=s.jsx(Qe,{}),e[5]=c):c=e[5];let u;e[6]!==l?(u=l("sidebar.agentsSection.newAgent"),e[6]=l,e[7]=u):u=e[7];let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let p;e[10]!==o||e[11]!==d||e[12]!==f?(p=s.jsx(ze,{asChild:!0,children:s.jsxs(Wt,{tooltip:o,className:d,children:[c,f]})}),e[10]=o,e[11]=d,e[12]=f,e[13]=p):p=e[13];let r;e[14]!==p||e[15]!==n?(r=n(p),e[14]=p,e[15]=n,e[16]=r):r=e[16];let m;return e[17]!==r?(m=s.jsx(Qt,{children:r}),e[17]=r,e[18]=m):m=e[18],m}function mo(t){const e=R.c(9),{children:n}=t,a=Q();let i;e[0]!==n?(i=s.jsx($e,{asChild:!0,children:n}),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==a?(l=a("sidebar.agentsSection.selectAnExistingAgent"),e[2]=a,e[3]=l):l=e[3];let o;e[4]!==l?(o=s.jsx(Oe,{side:"right",sideOffset:8,children:l}),e[4]=l,e[5]=o):o=e[5];let d;return e[6]!==i||e[7]!==o?(d=s.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[i,o]}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function go(t){const e=qt(),{create:n}=dn(),{locator:a}=ge(),i=Xt(),l=$s();return async o=>{const d=crypto.randomUUID(),c=o===l?to(t,a,i??""):null;try{await n({id:d,virtual_mcp_id:o,...c?{branch:c}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:d},search:{virtualmcpid:o}})}}function pt(t){const e=R.c(20),{agent:n,selected:a,onClick:i}=t,l=a?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==l?(o=X("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",l),e[0]=l,e[1]=o):o=e[1];let d;e[2]!==n.icon||e[3]!==n.title?(d=s.jsx(Zt,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=d):d=e[4];let c;e[5]!==n.title?(c=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=c):c=e[6];let u;e[7]!==n.description?(u=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=u):u=e[8];let f;e[9]!==c||e[10]!==u?(f=s.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[9]=c,e[10]=u,e[11]=f):f=e[11];let p;e[12]!==a?(p=a&&s.jsx(Ge,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=a,e[13]=p):p=e[13];let r;return e[14]!==i||e[15]!==o||e[16]!==d||e[17]!==f||e[18]!==p?(r=s.jsxs("button",{type:"button",onClick:i,className:o,children:[d,f,p]}),e[14]=i,e[15]=o,e[16]=d,e[17]=f,e[18]=p,e[19]=r):r=e[19],r}function ys(t){const e=R.c(5),{children:n,action:a}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let l;return e[2]!==a||e[3]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,a]}),e[2]=a,e[3]=i,e[4]=l):l=e[4],l}function po(t){const e=R.c(44),{onClose:n,onSelectAgent:a,selectedAgentId:i,onImportFromGithub:l}=t,[o,d]=G.useState(""),c=G.useDeferredValue(o),u=c||void 0;let f;e[0]!==u?(f={searchTerm:u},e[0]=u,e[1]=f):f=e[1];const p=Nt(f),r=p??[],{org:m}=ge(),g=mn(),h=go(m.slug),x=un(p),b=c.toLowerCase(),_=r.filter(bo).filter(z=>!x.has(z.id)).filter(jo),y=_.filter(xo),N=_.filter(ho),k=es(m.id),C=!c||k.title.toLowerCase().includes(b),w=!!(a&&C);let j;e[2]!==n||e[3]!==a?(j=()=>{a?.(null),n(),d("")},e[2]=n,e[3]=a,e[4]=j):j=e[4];const S=j;let D;e[5]!==g||e[6]!==h||e[7]!==n||e[8]!==a?(D=z=>{if(a){a(z.id),n(),d("");return}g(),n(),d(""),h(z.id)},e[5]=g,e[6]=h,e[7]=n,e[8]=a,e[9]=D):D=e[9];const I=D,M="flex flex-col max-h-[min(640px,80dvh)]";let v;e[10]!==o?(v=s.jsx(so,{value:o,onChange:d}),e[10]=o,e[11]=v):v=e[11];const A="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let T;e[12]!==k||e[13]!==a||e[14]!==S||e[15]!==i||e[16]!==C?(T=a&&C&&k&&s.jsx(pt,{agent:k,selected:!i||i===k.id,onClick:S}),e[12]=k,e[13]=a,e[14]=S,e[15]=i,e[16]=C,e[17]=T):T=e[17];const O=(y.length>0||!c)&&s.jsx(lo,{onImportFromGithub:l});let B;e[18]!==I||e[19]!==a||e[20]!==i?(B=z=>s.jsx(pt,{agent:z,selected:a?i===z.id:void 0,onClick:()=>I(z)},z.id),e[18]=I,e[19]=a,e[20]=i,e[21]=B):B=e[21];const F=y.map(B),$=N.length>0&&s.jsx(ao,{});let U;e[22]!==I||e[23]!==a||e[24]!==i?(U=z=>s.jsx(pt,{agent:z,selected:a?i===z.id:void 0,onClick:()=>I(z)},z.id),e[22]=I,e[23]=a,e[24]=i,e[25]=U):U=e[25];const P=N.map(U);let K;e[26]!==w||e[27]!==c||e[28]!==_.length?(K=_.length===0&&!w&&c&&s.jsx(no,{}),e[26]=w,e[27]=c,e[28]=_.length,e[29]=K):K=e[29];let L;e[30]!==F||e[31]!==$||e[32]!==P||e[33]!==K||e[34]!==T||e[35]!==O?(L=s.jsxs("div",{className:A,children:[T,O,F,$,P,K]}),e[30]=F,e[31]=$,e[32]=P,e[33]=K,e[34]=T,e[35]=O,e[36]=L):L=e[36];let V;e[37]!==n||e[38]!==m?(V=s.jsx(oo,{org:m,onClose:n}),e[37]=n,e[38]=m,e[39]=V):V=e[39];let J;return e[40]!==L||e[41]!==V||e[42]!==v?(J=s.jsxs("div",{className:M,children:[v,L,V]}),e[40]=L,e[41]=V,e[42]=v,e[43]=J):J=e[43],J}function ho(t){return!as(t.metadata)}function xo(t){return as(t.metadata)}function jo(t){return!Js(t.id)}function bo(t){return!Xs(t.id)}function yo(t){const e=R.c(14),{compact:n,trigger:a,onSelectAgent:i,selectedAgentId:l,side:o,align:d}=t===void 0?{}:t,c=n===void 0?!1:n,u=o===void 0?"right":o,f=d===void 0?"start":d,[p,r]=G.useState(!1),[m,g]=G.useState(!1),h=Gt(),{setOpenMobile:x}=ws(),b=fn(),_=b?"border border-border":void 0;let y;e[0]!==b?(y=v=>b?s.jsx(mo,{children:v}):v,e[0]=b,e[1]=y):y=e[1];const N=y;let k;e[2]!==h||e[3]!==x?(k=()=>{r(!1),h&&x(!1)},e[2]=h,e[3]=x,e[4]=k):k=e[4];const C=k;let w;e[5]!==C||e[6]!==g?(w=()=>{C(),g(!0)},e[5]=C,e[6]=g,e[7]=w):w=e[7];const j=w,S=p&&s.jsx(G.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(As,{className:"h-4 w-24"})}),children:s.jsx(po,{onClose:C,onSelectAgent:i,selectedAgentId:l,onImportFromGithub:j})}),D=h?s.jsxs(s.Fragment,{children:[a?G.cloneElement(a,{onClick:v=>{a.props.onClick?.(v),r(!0)}}):c?N(s.jsx(io,{setOpen:r,emptyCtaClass:_})):s.jsx(ro,{setOpen:r,highlightEmpty:b,emptyCtaClass:_}),s.jsx(_t,{open:p,onOpenChange:r,direction:"bottom",children:s.jsxs(St,{className:"max-h-[85dvh] p-0",children:[s.jsx(co,{}),S]})})]}):s.jsxs(nt,{open:p,onOpenChange:v=>{v&&!p&&Z("agent_browser_opened",{surface:"desktop_popover"}),r(v)},children:[a?s.jsx(ze,{asChild:!0,children:a}):c?N(s.jsx(ze,{asChild:!0,children:s.jsx(uo,{emptyCtaClass:_})})):s.jsx(fo,{wrapEmptyHint:N,highlightEmpty:b,emptyCtaClass:_}),s.jsx(ot,{className:"w-[380px] p-0 overflow-hidden",side:u,align:f,children:S})]});let I;e[8]!==m||e[9]!==g?(I=s.jsx(rn,{open:m,onOpenChange:g,mode:"agent"}),e[8]=m,e[9]=g,e[10]=I):I=e[10];let M;return e[11]!==D||e[12]!==I?(M=s.jsxs(s.Fragment,{children:[D,I]}),e[11]=D,e[12]=I,e[13]=M):M=e[13],M}function Co(){const t=R.c(2),e=Nt()??[];let n;return t[0]!==e?(n=a=>{if(!a)return;const i=e.find(l=>l.id===a);return i?pn(i.metadata):void 0},t[0]=e,t[1]=n):n=t[1],n}const vo="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 ko(t){const e=R.c(29),{agentId:n,fallback:a,onOpenHome:i,onPick:l}=t,o=Q(),d=tn(n)??a??null;let c,u,f,p,r;e[0]!==d?.title||e[1]!==i||e[2]!==o?(r=d?.title??o("header.shellBreadcrumb.superAgentDefaultName"),p="flex min-w-0 items-center gap-0",c="button",u=i,f=o("header.shellBreadcrumb.openAgentHome",{name:r}),e[0]=d?.title,e[1]=i,e[2]=o,e[3]=c,e[4]=u,e[5]=f,e[6]=p,e[7]=r):(c=e[3],u=e[4],f=e[5],p=e[6],r=e[7]);const m=d?.icon??null;let g;e[8]!==m||e[9]!==r?(g=s.jsx(Zt,{icon:m,name:r,size:"xs"}),e[8]=m,e[9]=r,e[10]=g):g=e[10];let h;e[11]!==c||e[12]!==u||e[13]!==f||e[14]!==g?(h=s.jsx("button",{type:c,onClick:u,"aria-label":f,className:"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:g}),e[11]=c,e[12]=u,e[13]=f,e[14]=g,e[15]=h):h=e[15];let x;e[16]!==r?(x=s.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:r}),e[16]=r,e[17]=x):x=e[17];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ve,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=b):b=e[18];let _;e[19]!==x?(_=s.jsxs("button",{type:"button",className:vo,children:[x,b]}),e[19]=x,e[20]=_):_=e[20];let y;e[21]!==n||e[22]!==l||e[23]!==_?(y=s.jsx(yo,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:l,trigger:_}),e[21]=n,e[22]=l,e[23]=_,e[24]=y):y=e[24];let N;return e[25]!==y||e[26]!==p||e[27]!==h?(N=s.jsxs("div",{className:p,children:[h,y]}),e[25]=y,e[26]=p,e[27]=h,e[28]=N):N=e[28],N}function ml(t){const e=R.c(22);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:a}=n,{org:i}=ge(),{threads:l}=os(),o=Nt(),{data:d}=Ct.useSession(),{setTaskId:c,createNewTask:u}=ls(),f=Co();let p;e[2]!==i.id?(p=es(i.id),e[2]=i.id,e[3]=p):p=e[3];const r=p,m=r.id,g=Jt();let h;e[4]!==o||e[5]!==u||e[6]!==m||e[7]!==a||e[8]!==f||e[9]!==d?.user?.id||e[10]!==c||e[11]!==l?(h=k=>{const C=k??m,w=(o??[]).find(S=>S.id===C),j=gn(l,C,d?.user?.id,f(C),!!(w&&sn(w)));j?c(j.id,C):u(C),a?.()},e[4]=o,e[5]=u,e[6]=m,e[7]=a,e[8]=f,e[9]=d?.user?.id,e[10]=c,e[11]=l,e[12]=h):h=e[12];const x=h;let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=b):b=e[13];const _=g===m?r:void 0;let y;e[14]!==g||e[15]!==x?(y=()=>x(g),e[14]=g,e[15]=x,e[16]=y):y=e[16];let N;return e[17]!==g||e[18]!==x||e[19]!==_||e[20]!==y?(N=s.jsx(G.Suspense,{fallback:b,children:s.jsx(ko,{agentId:g,fallback:_,onOpenHome:y,onPick:x})}),e[17]=g,e[18]=x,e[19]=_,e[20]=y,e[21]=N):N=e[21],N}function gl(){const t=R.c(20),e=Q(),{threads:n}=os(),{createNewTask:a}=ls(),i=Jt(),l=Xt();let o;t[0]!==l||t[1]!==n?(o=n.find(x=>x.id===l)?.branch??null,t[0]=l,t[1]=n,t[2]=o):o=t[2];const d=o;let c;t[3]!==i||t[4]!==a||t[5]!==d?(c=()=>{a(i,d)},t[3]=i,t[4]=a,t[5]=d,t[6]=c):c=t[6];const u=c;let f;t[7]!==e?(f=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Os,{size:16}),t[9]=p):p=t[9];let r;t[10]!==u||t[11]!==f?(r=s.jsx($e,{asChild:!0,children:s.jsx("button",{type:"button",onClick:u,"aria-label":f,className:"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:p})}),t[10]=u,t[11]=f,t[12]=r):r=t[12];let m;t[13]!==e?(m=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=m):m=t[14];let g;t[15]!==m?(g=s.jsx(Oe,{side:"bottom",children:m}),t[15]=m,t[16]=g):g=t[16];let h;return t[17]!==r||t[18]!==g?(h=s.jsxs(Re,{children:[r,g]}),t[17]=r,t[18]=g,t[19]=h):h=t[19],h}function No({open:t,onOpenChange:e,onCreated:n}){const a=Q(),{org:i}=ge(),{data:l}=Ct.useSession(),{stdioEnabled:o}=Ts(),d=Gt(),c=ms(),u=is(),p=rs(u,"").items,r=Bs({resolver:Fs(Bn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=r.watch("ui_type"),g=r.watch("connection_url"),h=r.watch("npx_package"),x=Xe({uiType:m,connectionUrl:g??"",npxPackage:h??""})??Et({uiType:m,connectionUrl:g??"",registryItems:p}),b=j=>{const S=j.trim();if(!S)return;const D=!!r.formState.dirtyFields.title,I=!!r.formState.dirtyFields.description,M=!!r.formState.dirtyFields.env_vars,v=T=>{if(T&&(!D&&!r.getValues("title").trim()&&T.title&&r.setValue("title",T.title,{shouldDirty:!1}),!I&&!(r.getValues("description")??"").trim()&&T.description&&r.setValue("description",T.description,{shouldDirty:!1}),!M&&T.envVarKeys?.length)){const O=r.getValues("env_vars")??[],B=new Set(O.map($=>$.key)),F=T.envVarKeys.filter($=>!B.has($));F.length>0&&r.setValue("env_vars",[...O,...F.map($=>({key:$,value:""}))],{shouldDirty:!0})}},A=Pn(S);if(A&&o){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",A.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),v(Xe({uiType:"NPX",npxPackage:A.packageName}));return}if(S.startsWith("http://")||S.startsWith("https://")){const T=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";r.setValue("ui_type",T,{shouldDirty:!0}),r.setValue("connection_url",S,{shouldDirty:!0}),v(Xe({uiType:T,connectionUrl:S})??Et({uiType:T,connectionUrl:S,registryItems:p}));return}m==="NPX"&&v(Xe({uiType:"NPX",npxPackage:S}))},_=j=>{j||r.reset(),e(j)},y=async j=>{let S,D=null,I=null,M=null;j.ui_type==="NPX"?(S="STDIO",D="",M=En(j.npx_package||"",j.env_vars||[])):j.ui_type==="STDIO"?(S="STDIO",D="",M=Mn(j.stdio_command||"",j.stdio_args||"",j.stdio_cwd,j.env_vars||[])):(S=j.ui_type,D=j.connection_url||"",I=j.connection_token||null);const v=xn("conn");try{await c.create.mutateAsync({id:v,title:j.title,description:j.description||null,connection_type:S,connection_url:D,connection_token:I,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:l?.user?.id||"system",organization_id:i.id,icon:j.icon??null,app_name:null,app_id:null,connection_headers:M,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),r.reset(),e(!1),n?.(v)}catch{oe.error(a("connections.createConnectionDialog.failedToCreateConnection"))}},N=a("connections.createConnectionDialog.title"),k=a("connections.createConnectionDialog.description"),C=r.formState.isSubmitting?a("connections.createConnectionDialog.saving"):a("connections.createConnectionDialog.createButton"),w=s.jsxs("div",{className:"grid gap-4",children:[s.jsx(ce,{control:r.control,name:"ui_type",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.typeLabel")}),s.jsxs(Nn,{value:j.value,onValueChange:j.onChange,children:[s.jsx(fe,{children:s.jsx(_n,{children:s.jsx(Sn,{})})}),s.jsxs(Dn,{children:[s.jsx(Ue,{value:"HTTP",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),a("connections.createConnectionDialog.httpType")]})}),s.jsx(Ue,{value:"SSE",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),a("connections.createConnectionDialog.sseType")]})}),s.jsx(Ue,{value:"Websocket",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(dt,{className:"w-4 h-4"}),a("connections.createConnectionDialog.websocketType")]})}),o&&s.jsxs(s.Fragment,{children:[s.jsx(Ue,{value:"NPX",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(et,{className:"w-4 h-4"}),a("connections.createConnectionDialog.npxPackageType")]})}),s.jsx(Ue,{value:"STDIO",children:s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(An,{className:"w-4 h-4"}),a("connections.createConnectionDialog.customCommandType")]})})]})]})]}),s.jsx(me,{})]})}),m==="NPX"&&s.jsx(ce,{control:r.control,name:"npx_package",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.npmPackageLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.npmPackagePlaceholder"),...j,value:j.value??"",onPaste:S=>{const D=S.clipboardData.getData("text");D&&(S.preventDefault(),r.setValue("npx_package",D.trim(),{shouldDirty:!0}),b(D))},onBlur:S=>{b(S.target.value),j.onBlur()}})}),s.jsx(me,{})]})}),m==="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[s.jsx(ce,{control:r.control,name:"stdio_command",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.commandLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.commandPlaceholder"),...j,value:j.value??""})}),s.jsx(me,{})]})}),s.jsx(ce,{control:r.control,name:"stdio_args",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.argumentsLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.argumentsPlaceholder"),...j,value:j.value??""})}),s.jsx(me,{})]})})]}),s.jsx(ce,{control:r.control,name:"stdio_cwd",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.workingDirectoryLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.workingDirectoryPlaceholder"),...j,value:j.value??""})}),s.jsx("p",{className:"text-xs text-muted-foreground",children:a("connections.createConnectionDialog.workingDirectoryDescription")}),s.jsx(me,{})]})})]}),(m==="NPX"||m==="STDIO")&&s.jsx(ce,{control:r.control,name:"env_vars",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.environmentVariablesLabel")}),s.jsx(fe,{children:s.jsx(Fn,{value:j.value??[],onChange:j.onChange})}),s.jsx(me,{})]})}),m!=="NPX"&&m!=="STDIO"&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{control:r.control,name:"connection_url",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.urlLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.urlPlaceholder"),...j,value:j.value??"",onPaste:S=>{const D=S.clipboardData.getData("text");D&&(S.preventDefault(),r.setValue("connection_url",D.trim(),{shouldDirty:!0}),b(D))},onBlur:S=>{b(S.target.value),j.onBlur()}})}),s.jsx(me,{})]})}),s.jsx(ce,{control:r.control,name:"connection_token",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:x?.token?.label??a("connections.createConnectionDialog.tokenLabelDefault")}),s.jsx(fe,{children:s.jsx(_e,{type:"password",placeholder:x?.token?.placeholder??a("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...j,value:j.value??""})}),x?.token?.helperText&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&s.jsxs(s.Fragment,{children:[" ","·"," ",s.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:a("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),s.jsx(me,{})]})})]}),s.jsx(ce,{control:r.control,name:"title",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.nameLabel")}),s.jsx(fe,{children:s.jsx(_e,{placeholder:a("connections.createConnectionDialog.namePlaceholder"),...j})}),s.jsx(me,{})]})}),s.jsx(ce,{control:r.control,name:"description",render:({field:j})=>s.jsxs(de,{children:[s.jsx(ue,{children:a("connections.createConnectionDialog.descriptionLabel")}),s.jsx(fe,{children:s.jsx(wn,{placeholder:a("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...j,value:j.value??""})}),s.jsx(me,{})]})})]});return d?s.jsx(_t,{open:t,onOpenChange:_,children:s.jsxs(St,{className:"max-h-[90vh]",children:[s.jsx(nn,{className:"pb-2",children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex-1 text-left",children:[s.jsx(Dt,{children:N}),s.jsx(on,{className:"mt-1",children:k})]}),s.jsx(ss,{asChild:!0,children:s.jsx(be,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:s.jsx(Tn,{size:16})})})]})}),s.jsx(Pt,{...r,children:s.jsxs("form",{onSubmit:r.handleSubmit(y),children:[s.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:w}),s.jsx(ns,{children:s.jsx(be,{type:"submit",disabled:r.formState.isSubmitting,className:"w-full",children:C})})]})})]})}):s.jsx(cs,{open:t,onOpenChange:_,children:s.jsxs(ds,{className:"sm:max-w-[525px]",children:[s.jsxs(us,{children:[s.jsx(fs,{children:N}),s.jsx(vn,{children:k})]}),s.jsx(Pt,{...r,children:s.jsxs("form",{onSubmit:r.handleSubmit(y),children:[s.jsx("div",{className:"py-4",children:w}),s.jsxs(kn,{children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>_(!1),children:a("connections.createConnectionDialog.cancelButton")}),s.jsx(be,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:C})]})]})})]})})}function _o(t){const e=R.c(72),{mode:n,agentId:a,addedConnectionIds:i,onAdd:l,onCloneAndAdd:o,onConnectAndAdd:d,connectingItemId:c,search:u,onCreateConnection:f,onBrowseNavigate:p,defaultTab:r}=t,m=n===void 0?"add":n,g=r===void 0?"connected":r,h=Q(),{org:x}=ge(),b=G.useDeferredValue(u),_=u!==b;let y;e[0]!==b?(y=b.trim().toLowerCase(),e[0]=b,e[1]=y):y=e[1];const N=y;let k;e[2]!==g?(k=E=>E??g,e[2]=g,e[3]=k):k=e[3];const[C,w]=Ps(Es.connectionsTab(x.slug)+(g==="all"?":home-modal":":agent-modal"),k);let j;e[4]!==C||e[5]!==w?(j=E=>{E!==C&&Z("connections_dialog_tab_changed",{to_tab:E}),w(E)},e[4]=C,e[5]=w,e[6]=j):j=e[6];const S=j;let D;e[7]!==x.id||e[8]!==x.slug?(D={connectionId:Zs,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=D):D=e[9];const I=Rn(D),M=b?.trim().split(/\s+/).filter(Boolean)??[],v=M.length>0?{operator:"or",conditions:M.flatMap(Fo)}:void 0,A={...v&&{where:v},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:O,fetchNextPage:B,hasNextPage:F,isFetchingNextPage:$}=On({queryKey:ye.collectionListInfinite(I,x.id,"","CONNECTIONS",T),queryFn:async E=>{const{pageParam:Y}=E,je=Y===void 0?0:Y;return(await I.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...v&&{where:v},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:je}})).structuredContent},initialPageParam:0,getNextPageParam:To,staleTime:3e4}),U=O?.pages.flatMap(Io)??[],P=Cn(U),K=new Set(U.filter(Ao).map(wo)),L=is(),V=rs(L,b),J=Mt(V.loadMore,V.hasMore,V.isLoadingMore),z=Mt(B,F??!1,$),W=C==="all"||!!N,pe=W?V.items.filter(E=>{const Y=jn(E);if(Y&&K.has(Y))return!1;if(!N)return!0;const je=tt(E._meta),ke=[E.title,E.description,E.name,E.server?.title,E.server?.description,E.server?.name,je?.friendly_name,je?.friendlyName].filter(Boolean).join(" ").toLowerCase();return M.some(re=>ke.includes(re.toLowerCase()))}):[],te=pe.filter(Do),se=pe.filter(So);let ae;e[10]!==i?(ae=E=>E.some(Y=>i.has(Y.id)),e[10]=i,e[11]=ae):ae=e[11];const ie=ae;let he;e[12]!==i||e[13]!==a||e[14]!==c||e[15]!==ie||e[16]!==m||e[17]!==l||e[18]!==p||e[19]!==o||e[20]!==h?(he=(E,Y,je,ke,re)=>{const Ye=ie(re),Me=re.find(Ne=>!i.has(Ne.id)),ne=re[0];if(m==="browse"){const Ne=Ln(ne);return s.jsx(ft,{connection:{title:Y,icon:je,description:re.length>1?`${re.length} instances`:ke??void 0},fallbackIcon:s.jsx(et,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs(Je,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(Ge,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{Z("connection_browse_clicked",{app_name:ne.app_name??null,connection_id:ne.id,instances_count:re.length}),p?.(Ne)}},E)}return s.jsx(ft,{connection:{title:Y,icon:je,description:ke},fallbackIcon:s.jsx(et,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[Ye&&s.jsxs(Je,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[s.jsx(Ge,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),Me?(Z("connection_add_clicked",{action:"use_existing",app_name:ne.app_name??null,connection_id:Me.id}),a&&Z("agent_connection_attached",{agent_id:a,connection_id:Me.id,app_name:ne.app_name??null,mode:"existing"}),l(Me.id)):(Z("connection_add_clicked",{action:"clone",app_name:ne.app_name??null,base_connection_id:ne.id}),o(ne))},children:h("virtualMcp.connectionDialogContent.add")})]})},E)},e[12]=i,e[13]=a,e[14]=c,e[15]=ie,e[16]=m,e[17]=l,e[18]=p,e[19]=o,e[20]=h,e[21]=he):he=e[21];const H=he;let q;e[22]!==c||e[23]!==m||e[24]!==d||e[25]!==h?(q=E=>{const Y=tt(E._meta),je=Y?.friendlyName||Y?.friendly_name||E.server?.title||E.title||E.server?.name||E.name||E.id||"",ke=E.server?.description||E.description||null,re=E.server?.icons?.[0]?.src||bn(E.server?.repository)||null,Ye=Y?.official===!0,Me=Y?.verified===!0,ne=Y?.owner==="deco";return s.jsx(ft,{connection:{title:je,description:ke,icon:re},fallbackIcon:s.jsx(et,{}),headerActionsAlwaysVisible:!0,headerActions:s.jsxs("div",{className:"flex items-center gap-1.5",children:[ne&&s.jsxs(Re,{children:[s.jsx($e,{asChild:!0,children:s.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),s.jsx(Oe,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ne&&Ye&&s.jsxs(Re,{children:[s.jsx($e,{asChild:!0,children:s.jsx(Je,{variant:"outline",size:"icon",children:s.jsx(mt,{})})}),s.jsx(Oe,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ne&&!Ye&&Me&&s.jsxs(Re,{children:[s.jsx($e,{asChild:!0,children:s.jsx(Je,{variant:"outline",size:"icon",children:s.jsx(mt,{})})}),s.jsx(Oe,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),s.jsx(be,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:c!==null,onClick:Ne=>{Ne.stopPropagation(),Z("connection_add_clicked",{action:"connect_new",registry_item_id:E.id,app_name:Y?.friendlyName||E.server?.name||E.name||null}),d(E)},children:c===E.id?s.jsx(He,{className:"size-3.5"}):h(m==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${E.id}`)},e[22]=c,e[23]=m,e[24]=d,e[25]=h,e[26]=q):q=e[26];const xe=q;let ee;e[27]!==C||e[28]!==S||e[29]!==f||e[30]!==N||e[31]!==h?(ee=!N&&s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[s.jsx($n,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:C,onTabChange:E=>S(E)}),s.jsxs(be,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{Z("connections_dialog_custom_clicked"),f()},children:[s.jsx(Qe,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=C,e[28]=S,e[29]=f,e[30]=N,e[31]=h,e[32]=ee):ee=e[32];const Ce=_&&"opacity-50 pointer-events-none";let le;e[33]!==Ce?(le=X("flex-1 overflow-auto p-5 transition-opacity duration-150",Ce),e[33]=Ce,e[34]=le):le=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let we;e[35]!==H?(we=E=>{if(E.type==="group")return H(E.key,E.title,E.icon,null,E.connections);const Y=E.connection;return H(Y.id,Y.title,Y.icon,Y.description??null,[Y])},e[35]=H,e[36]=we):we=e[36];const at=P.map(we);let Ae;e[37]!==z?(Ae=s.jsx("div",{ref:z,className:"col-span-full h-1"}),e[37]=z,e[38]=Ae):Ae=e[38];let Ie;e[39]!==$?(Ie=$&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(He,{className:"size-6 text-muted-foreground"})}),e[39]=$,e[40]=Ie):Ie=e[40];const lt=W&&te.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx(mt,{size:13,className:"text-muted-foreground shrink-0"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=W&&te.map(xe),rt=W&&se.length>0&&s.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),ct=W&&se.map(xe);let Te;e[41]!==J||e[42]!==L||e[43]!==W?(Te=W&&L.length>0&&s.jsx("div",{ref:J,className:"col-span-full h-1"}),e[41]=J,e[42]=L,e[43]=W,e[44]=Te):Te=e[44];let Be;e[45]!==V.isLoadingMore||e[46]!==W?(Be=W&&V.isLoadingMore&&s.jsx("div",{className:"col-span-full flex justify-center py-6",children:s.jsx(He,{className:"size-6 text-muted-foreground"})}),e[45]=V.isLoadingMore,e[46]=W,e[47]=Be):Be=e[47];let Fe;e[48]!==at||e[49]!==Ae||e[50]!==Ie||e[51]!==lt||e[52]!==it||e[53]!==rt||e[54]!==ct||e[55]!==Te||e[56]!==Be?(Fe=s.jsxs("div",{className:De,children:[at,Ae,Ie,lt,it,rt,ct,Te,Be]}),e[48]=at,e[49]=Ae,e[50]=Ie,e[51]=lt,e[52]=it,e[53]=rt,e[54]=ct,e[55]=Te,e[56]=Be,e[57]=Fe):Fe=e[57];let Pe;e[58]!==C||e[59]!==P.length||e[60]!==se||e[61]!==u||e[62]!==h||e[63]!==te?(Pe=P.length===0&&te.length===0&&se.length===0&&s.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:u}):h(C==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=C,e[59]=P.length,e[60]=se,e[61]=u,e[62]=h,e[63]=te,e[64]=Pe):Pe=e[64];let Ee;e[65]!==le||e[66]!==Fe||e[67]!==Pe?(Ee=s.jsxs("div",{className:le,children:[Fe,Pe]}),e[65]=le,e[66]=Fe,e[67]=Pe,e[68]=Ee):Ee=e[68];let We;return e[69]!==ee||e[70]!==Ee?(We=s.jsxs(s.Fragment,{children:[ee,Ee]}),e[69]=ee,e[70]=Ee,e[71]=We):We=e[71],We}function So(t){return!t.verified&&!tt(t._meta)?.verified&&!t.meta?.verified}function Do(t){return t.verified||tt(t._meta)?.verified||t.meta?.verified}function wo(t){return t.app_name}function Ao(t){return t.app_name}function Io(t){return t?.items??[]}function To(t,e){if(t?.hasMore)return e.reduce(Bo,0)}function Bo(t,e){return t+(e?.items?.length??0)}function Fo(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function pl({open:t,onOpenChange:e,defaultTab:n,initialSearch:a="",...i}){const l=Q(),o=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:v=>{},f=(v,A,T)=>{d&&Z("agent_connection_attached",{agent_id:d,connection_id:v,app_name:A,mode:T})},[p,r]=G.useState(null),[m,g]=G.useState(a),[h,x]=G.useState(!1),[b,_]=G.useState(t);t!==b&&(_(t),t&&g(a));const{org:y}=ge(),{data:N}=Ct.useSession(),k=ms(),C=vt(),w=qt(),j=v=>{e(!1),w({to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:v}})},S=()=>{C.invalidateQueries({predicate:v=>{const A=v.queryKey;return A[1]===y.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},D=async(v,A)=>{Z("connection_oauth_succeeded",{connection_id:v,flow:A});const T=new URL(`/api/${y.slug}/mcp/${v}`,window.location.origin);await C.invalidateQueries({queryKey:ye.isMCPAuthenticated(T.href,null)}),S()},I=async v=>{r(v.app_name??v.id);try{const T=`${v.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,B=(await k.create.mutateAsync({title:T,description:v.description??null,connection_type:v.connection_type,connection_url:v.connection_url??null,connection_token:null,icon:v.icon??null,app_name:v.app_name??null,app_id:v.app_id??null,connection_headers:v.connection_headers??null})).id,F=await gt({connectionId:B,orgId:y.id,orgSlug:y.slug,persistFallback:$=>k.update.mutateAsync({id:B,data:{connection_token:$}}).then(()=>{})});if(F.ran&&!F.ok){Z("connection_oauth_failed",{connection_id:B,flow:"clone",error:F.error??"no_token"}),oe.error(l("virtualMcp.addConnectionDialog.authenticationFailedError",{error:F.error??"no token received"})),await k.delete.mutateAsync(B);return}F.ran&&await D(B,"clone"),f(B,v.app_name??null,"clone"),u(B)}catch(A){console.error("Failed to add connection:",A),oe.error(l("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{r(null)}},M=async v=>{if(!(!y||!N?.user?.id)){r(v.id);try{const A=yn(v,y.id,N.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",O=!!A.connection_url,B=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!O&&!B){oe.error(l("virtualMcp.addConnectionDialog.mcpServerConnectionError")),r(null);return}const{id:F}=await k.create.mutateAsync(A),$=await gt({connectionId:F,orgId:y.id,orgSlug:y.slug,persistFallback:U=>k.update.mutateAsync({id:F,data:{connection_token:U}}).then(()=>{})});if($.ran&&!$.ok){Z("connection_oauth_failed",{connection_id:F,flow:"connect_new",error:$.error??"no_token"}),oe.warning(l("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:l("virtualMcp.addConnectionDialog.signInFailedDescription",{error:$.error??"no token received"})}),f(F,A.app_name??null,"new"),u(F);return}$.ran?(await D(F,"connect_new"),oe.success(l("virtualMcp.addConnectionDialog.connectedAuthenticated"))):oe.success(l("virtualMcp.addConnectionDialog.connected")),f(F,A.app_name??null,"new"),u(F)}catch(A){console.error("Failed to connect:",A),oe.error(l("virtualMcp.addConnectionDialog.failedToConnect"))}finally{r(null)}}};return s.jsxs(cs,{open:t,onOpenChange:e,children:[s.jsxs(ds,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[s.jsx(us,{className:"px-6 pt-5 pb-0 shrink-0",children:s.jsx(fs,{className:"text-base font-semibold",children:l(o==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),s.jsx("div",{className:"pt-3 shrink-0",children:s.jsx(hn,{value:m,onChange:g,placeholder:l("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),s.jsx(G.Suspense,{fallback:s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(He,{className:"size-6 text-muted-foreground"})}),children:s.jsx(_o,{mode:o,agentId:d,addedConnectionIds:c,onAdd:u,onCloneAndAdd:I,onConnectAndAdd:M,connectingItemId:p,search:m,onCreateConnection:()=>x(!0),onBrowseNavigate:j,defaultTab:n})})]}),s.jsx(No,{open:h,onOpenChange:x,onCreated:async v=>{x(!1);const A=await gt({connectionId:v,orgId:y.id,orgSlug:y.slug,persistFallback:T=>k.update.mutateAsync({id:v,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){Z("connection_oauth_failed",{connection_id:v,flow:"custom_create",error:A.error??"no_token"}),oe.warning(l("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:l("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),f(v,null,"custom"),u(v),e(!1);return}A.ran&&await D(v,"custom_create"),f(v,null,"custom"),u(v),e(!1)}})]})}const Rt=new Map;function hl(){const{org:t}=ge(),e=kt(),n=Kn(),a=n.find(x=>x.providerId==="deco"),{data:i,isLoading:l,refetch:o,isFetching:d}=Yt({queryKey:ye.aiProviderCredits(t.id,"deco"),enabled:!!a,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,f=G.useRef(new Map);if(c!=null){const x=Rt.get(t.id);f.current.get(t.id)&&x!=null&&c>x&&Z("credits_topped_up_detected",{organization_id:t.id,delta_cents:c-x,previous_balance_cents:x,new_balance_cents:c}),Rt.set(t.id,c),f.current.set(t.id,!0)}const p=!!a,r=c!=null&&c>0,m=c!=null&&c===0,g=c!=null&&c===200,h=n.length>0&&n.every(x=>x.providerId==="deco");return{hasDecoKey:p,decoKeyId:a?.id??null,balanceCents:c,balanceDollars:u,hasCredits:r,isZeroBalance:m,isInitialFreeCredit:g,hasOnlyDecoProvider:h,isLoading:l,isFetching:d,refetch:o}}const Po=4,Eo="TASK";function Mo(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,Po)||Eo}function Lo(t,e){return e==null?null:`${Mo(t)}-${String(e).padStart(2,"0")}`}const $o=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function Oo(t){const e=$o.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function Kt(t){const e=R.c(8),{size:n,className:a}=t,i=n===void 0?16:n;let l;e[0]!==i?(l={width:i,height:i},e[0]=i,e[1]=l):l=e[1];let o;e[2]!==a?(o=X("shrink-0 rounded-full object-cover",a),e[2]=a,e[3]=o):o=e[3];let d;return e[4]!==i||e[5]!==l||e[6]!==o?(d=s.jsx("img",{src:en,alt:"Super Agent",width:i,height:i,style:l,className:o}),e[4]=i,e[5]=l,e[6]=o,e[7]=d):d=e[7],d}function xl(t,e){if(!e)return null;const n=e.toLowerCase();return t.find(a=>{const i=a.bucket.toLowerCase();return a.siteSlug?.toLowerCase()===n||i===n||i===`deco-assets-${n}`})??null}const zt=()=>0;function Ro(t){const{orgSlug:e,enabled:n=!0,onUpdate:a,onDelete:i,onResync:l}=t,o=G.useRef(a);o.current=a;const d=G.useRef(i);d.current=i;const c=G.useRef(l);c.current=l;const u=G.useRef(null),f=G.useRef(n),p=G.useRef(e);(!u.current||f.current!==n||p.current!==e)&&(f.current=n,p.current=e,u.current=m=>{if(!n||!e)return()=>{};const g=h=>{let x;try{x=JSON.parse(h.data)}catch{return}x.data&&(h.type===zn?d.current?.(x.data.id):o.current(x.data)),m()};return Hn.subscribe(e,g,()=>c.current?.())}),G.useSyncExternalStore(u.current,zt,zt)}function Ko(t,e){return{queryKey:ye.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:n}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:n}}}}function zo(){const t=R.c(21),{org:e,locator:n}=ge(),a=vt();let i;t[0]!==n?(i=ye.taskBoardItems(n),t[0]=n,t[1]=i):i=t[1];const l=i;let o;t[2]!==n||t[3]!==a||t[4]!==l?(o=r=>{a.cancelQueries({queryKey:l}),a.setQueryData(l,m=>m&&{...m,items:m.items.some(g=>g.id===r.id)?m.items.map(g=>g.id===r.id?r:g):[r,...m.items]}),a.invalidateQueries({queryKey:ye.taskBoardActivity(n,r.id)})},t[2]=n,t[3]=a,t[4]=l,t[5]=o):o=t[5];let d,c;t[6]!==a||t[7]!==l?(d=()=>{a.invalidateQueries({queryKey:l})},c=r=>{a.cancelQueries({queryKey:l}),a.setQueryData(l,m=>m&&{...m,items:m.items.filter(g=>g.id!==r)})},t[6]=a,t[7]=l,t[8]=d,t[9]=c):(d=t[8],c=t[9]);let u;t[10]!==e.slug||t[11]!==o||t[12]!==d||t[13]!==c?(u={orgSlug:e.slug,onUpdate:o,onResync:d,onDelete:c},t[10]=e.slug,t[11]=o,t[12]=d,t[13]=c,t[14]=u):u=t[14],Ro(u);let f;t[15]!==a||t[16]!==l?(f=r=>{const m=r.subject,g=r.data.status;a.cancelQueries({queryKey:l}),a.setQueryData(l,h=>h&&{...h,items:h.items.map(x=>x.threads.some(b=>b.threadId===m)?{...x,threads:x.threads.map(b=>b.threadId===m?{...b,status:g}:b)}:x)})},t[15]=a,t[16]=l,t[17]=f):f=t[17];let p;t[18]!==e.slug||t[19]!==f?(p={orgSlug:e.slug,onTaskStatus:f},t[18]=e.slug,t[19]=f,t[20]=p):p=t[20],Gn(p)}function jl(){const t=R.c(9),{locator:e}=ge(),n=kt();let a;t[0]!==e||t[1]!==n?(a=Ko(e,n),t[0]=e,t[1]=n,t[2]=a):a=t[2];const i=Yt(a);zo();let l;t[3]!==i.data?.items?(l=i.data?.items??[],t[3]=i.data?.items,t[4]=l):l=t[4];let o;return t[5]!==i.error||t[6]!==i.isLoading||t[7]!==l?(o={items:l,isLoading:i.isLoading,error:i.error},t[5]=i.error,t[6]=i.isLoading,t[7]=l,t[8]=o):o=t[8],o}function bl(){const t=R.c(70),{org:e,locator:n}=ge(),a=kt(),i=vt(),l=Q();let o;t[0]!==n?(o=ye.taskBoardItems(n),t[0]=n,t[1]=o):o=t[1];const d=o;let c;t[2]!==i||t[3]!==d?(c=()=>i.invalidateQueries({queryKey:d}),t[2]=i,t[3]=d,t[4]=c):c=t[4];const u=c;let f;t[5]!==a?(f=P=>a.call("TASK_BOARD_ITEM_CREATE",P),t[5]=a,t[6]=f):f=t[6];let p;t[7]!==u||t[8]!==f?(p={mutationFn:f,onSuccess:u},t[7]=u,t[8]=f,t[9]=p):p=t[9];const r=Le(p);let m;t[10]!==a?(m=P=>a.call("TASK_BOARD_ITEM_UPDATE",P),t[10]=a,t[11]=m):m=t[11];let g;t[12]!==i||t[13]!==d?(g=async P=>{await i.cancelQueries({queryKey:d});const K=i.getQueryData(d);return i.setQueryData(d,L=>L&&{...L,items:L.items.map(V=>V.id===P.id?{...V,...P}:V)}),{previous:K}},t[12]=i,t[13]=d,t[14]=g):g=t[14];let h;t[15]!==e?(h=(P,K)=>{K.status==="done"&&Z("task_marked_done",{organization_id:e.id,task_board_item_id:K.id})},t[15]=e,t[16]=h):h=t[16];let x;t[17]!==i||t[18]!==d?(x=(P,K,L)=>{L?.previous&&i.setQueryData(d,L.previous)},t[17]=i,t[18]=d,t[19]=x):x=t[19];let b;t[20]!==u||t[21]!==n||t[22]!==i?(b=(P,K,L)=>{u(),i.invalidateQueries({queryKey:ye.taskBoardActivity(n,L.id)})},t[20]=u,t[21]=n,t[22]=i,t[23]=b):b=t[23];let _;t[24]!==m||t[25]!==g||t[26]!==h||t[27]!==x||t[28]!==b?(_={mutationFn:m,onMutate:g,onSuccess:h,onError:x,onSettled:b},t[24]=m,t[25]=g,t[26]=h,t[27]=x,t[28]=b,t[29]=_):_=t[29];const y=Le(_);let N;t[30]!==a?(N=P=>a.call("TASK_BOARD_ITEM_DELETE",{id:P}),t[30]=a,t[31]=N):N=t[31];let k;t[32]!==u||t[33]!==l?(k=P=>{oe.error(P instanceof Error&&P.message?P.message:l("taskBoard.taskBoard.deleteError")),u()},t[32]=u,t[33]=l,t[34]=k):k=t[34];let C;t[35]!==u||t[36]!==N||t[37]!==k?(C={mutationFn:N,onSuccess:u,onError:k},t[35]=u,t[36]=N,t[37]=k,t[38]=C):C=t[38];const w=Le(C);let j;t[39]!==a?(j=async P=>{const K=await Promise.allSettled(P.map(L=>a.call("TASK_BOARD_ITEM_DELETE",{id:L})));return{total:P.length,failed:K.filter(Vo).length}},t[39]=a,t[40]=j):j=t[40];let S,D;t[41]!==l?(S=P=>{const{total:K,failed:L}=P;L!==0&&oe.error(l("taskBoard.taskBoard.deleteBulkError",{failed:String(L),total:String(K)}))},D=()=>oe.error(l("taskBoard.taskBoard.deleteError")),t[41]=l,t[42]=S,t[43]=D):(S=t[42],D=t[43]);let I;t[44]!==u||t[45]!==j||t[46]!==S||t[47]!==D?(I={mutationFn:j,onSuccess:S,onError:D,onSettled:u},t[44]=u,t[45]=j,t[46]=S,t[47]=D,t[48]=I):I=t[48];const M=Le(I);let v;t[49]!==a?(v=P=>a.call("TASK_BOARD_ITEM_UPDATE",P),t[49]=a,t[50]=v):v=t[50];let A;t[51]!==u||t[52]!==v?(A={mutationFn:v,onSuccess:u},t[51]=u,t[52]=v,t[53]=A):A=t[53];const T=Le(A);let O;t[54]!==a?(O=P=>a.call("TASK_BOARD_ITEM_RERUN",P),t[54]=a,t[55]=O):O=t[55];let B;t[56]!==u||t[57]!==n||t[58]!==i?(B=(P,K,L)=>{u(),i.invalidateQueries({queryKey:ye.taskBoardActivity(n,L.id)})},t[56]=u,t[57]=n,t[58]=i,t[59]=B):B=t[59];let F;t[60]!==O||t[61]!==B?(F={mutationFn:O,onSettled:B},t[60]=O,t[61]=B,t[62]=F):F=t[62];const $=Le(F);let U;return t[63]!==r||t[64]!==T||t[65]!==w||t[66]!==M||t[67]!==$||t[68]!==y?(U={create:r,update:y,remove:w,removeMany:M,link:T,rerun:$},t[63]=r,t[64]=T,t[65]=w,t[66]=M,t[67]=$,t[68]=y,t[69]=U):U=t[69],U}function Vo(t){return t.status==="rejected"}const Uo=["ended_after_delivery","superseded"];function Ho(t){return!!t&&Uo.includes(t)}function yl(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function Cl(t){return t.failureKind!=="superseded"}function Cs(t){return t.threads.some(e=>e.status==="requires_action")}function vl(t){return t.status==="in_review"&&!t.assigneeId}function kl(t){return Cs(t)}function Nl(t){return t.status==="in_progress"&&Cs(t)?"text-warning animate-pulse":ks(t.status).iconClassName}function _l(t){return t.threads.some(n=>n.status==="in_progress")?"running":t.threads.some(n=>n.status==="failed"&&!Ho(n.failureKind))?"failed":null}function Sl(t,e,n){const a=t.findIndex(f=>f.id===n),i=e===n?t[a+1]?.id??null:e,l=t.filter(f=>f.id!==n),o=i?l.findIndex(f=>f.id===i):-1,d=o===-1?l.length:o,c=l[d-1],u=l[d];return c&&u?(c.sortOrder+u.sortOrder)/2:c?c.sortOrder+1:u?u.sortOrder-1:0}function Dl(t,e){return Array.from({length:e},(n,a)=>t-(e-1-a)*1e-4)}const Go=["archived"],vs={triage:{labelKey:"taskBoard.config.statusBacklog",icon:Wn,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:bs,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:Hs,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Xn,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:Us,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:In,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:Vs,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:Yn,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:Ms,iconClassName:"text-muted-foreground"}},qo={icon:bs,iconClassName:"text-muted-foreground"},Qo=vs;function ks(t){return Qo[t]??qo}function wl(t,e){const n=vs[t];return{label:n?e(n.labelKey):t,visual:ks(t)}}const Al=["bug","feature","chore","spike","security"],Il={bug:{labelKey:"taskBoard.config.typeBug",icon:Zn,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:Qs,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:qs,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:Gs,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:Jn,iconClassName:"text-purple-500"}};function jt(t){return Un.includes(t)}function Tl(t){return wt.filter(e=>t||!jt(e))}function Bl({deliveryEnabled:t,shownLanes:e,occupied:n}){const a=wt.filter(o=>t||!jt(o)||n.includes(o)),i=a.filter(o=>Go.includes(o)||!t&&jt(o)),l=i.filter(o=>!e.includes(o));return{lanes:a.filter(o=>!l.includes(o)),hidden:l,hideable:i}}const Vt="lane:";function Wo(t){return wt.includes(t)}function Fl({overId:t,statusOf:e}){if(t===void 0)return null;const n=String(t),a=n.startsWith(Vt)?n.slice(Vt.length):e(n);return a!==void 0&&Wo(a)?a:null}const Yo=["none","low","medium","high","urgent"],Ze={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Ft,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:zs,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Ft,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:Ks,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:Rs,iconClassName:"text-destructive"}};function Pl(t,e=Date.now()){const n=new Date(t).getTime();return Number.isNaN(n)?null:n<e?"overdue":n-e<=Xo*864e5?"soon":null}const Xo=3;function Ut(t){return`color-mix(in oklab, ${t??Vn} var(--user-color-strength), transparent)`}const bt="__unassigned__",yt="__no_repo__",Ke="__any__",Ns={assignee:null,priority:null,due:null,tags:[],repo:null,search:""};function Jo(t){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||t.repo!==null||t.search.trim()!==""}function Zo(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(t.repo!==null?1:0)+(t.search.trim()!==""?1:0)}const ea=864e5;function ta(t,e){const n=new Date(t),a=new Date(e);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()&&n.getDate()===a.getDate()}function _s(t,e){const n=t.trim();return n===""?!1:e!=null&&Oo(n)===e}function sa(t,e){return t.assigneeId===e?!0:t.assigneeId===xt&&t.assignedBy===e}function El(t,e){const n=e.search.trim().toLowerCase();if(n!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(n)&&!_s(n,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===bt){if(t.assigneeId!==null)return!1}else if(!sa(t,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"&&!ta(a,i)||e.due==="week"&&(a<i||a>i+7*ea))return!1}if(e.tags.length>0){const a=t.tags.map(i=>i.id);if(!e.tags.some(i=>a.includes(i)))return!1}if(e.repo!==null){if(e.repo===yt){if(t.repo!=null)return!1}else if(t.repo?.toLowerCase()!==e.repo.toLowerCase())return!1}return!0}const Ht={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function Se(t,e=!1){return X("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",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 na(t){const e=R.c(107),{value:n,members:a,onChange:i,block:l}=t,o=Q(),[d,c]=G.useState(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx($t,{size:14,className:"shrink-0"}),e[0]=u):u=e[0];let f=u,p;e[1]!==o?(p=o("taskBoard.taskFilters.assigneeLabel"),e[1]=o,e[2]=p):p=e[2];let r=p;if(n===bt){let H;e[3]!==o?(H=o("taskBoard.taskFilters.assigneeUnassigned"),e[3]=o,e[4]=H):H=e[4],r=H}else if(n===xt){let H;e[5]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(Kt,{size:14}),e[5]=H):H=e[5],f=H;let q;e[6]!==o?(q=o("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=o,e[7]=q):q=e[7],r=q}else if(n){let H,q,xe,ee;if(e[8]!==a||e[9]!==n){let De;e[14]!==n?(De=we=>we.userId===n,e[14]=n,e[15]=De):De=e[15],q=a.find(De),H=Lt,xe=q?.user?.image??void 0,ee=Ot(q?.user?.name),e[8]=a,e[9]=n,e[10]=H,e[11]=q,e[12]=xe,e[13]=ee}else H=e[10],q=e[11],xe=e[12],ee=e[13];let Ce;e[16]!==H||e[17]!==xe||e[18]!==ee?(Ce=s.jsx(H,{url:xe,fallback:ee,shape:"circle",size:"2xs"}),e[16]=H,e[17]=xe,e[18]=ee,e[19]=Ce):Ce=e[19],f=Ce;let le;e[20]!==q?.user?.name||e[21]!==o?(le=q?.user?.name??o("taskBoard.taskFilters.assigneeMember"),e[20]=q?.user?.name,e[21]=o,e[22]=le):le=e[22],r=le}let m;e[23]!==i?(m=H=>{i(H),c(!1)},e[23]=i,e[24]=m):m=e[24];const g=m,h=n!==null;let x;e[25]!==l||e[26]!==h?(x=Se(h,l),e[25]=l,e[26]=h,e[27]=x):x=e[27];const b=x,_=l&&"ml-auto";let y;e[28]!==_?(y=X("shrink-0 opacity-60",_),e[28]=_,e[29]=y):y=e[29];const N=y;let k;e[30]!==r?(k=s.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[30]=r,e[31]=k):k=e[31];let C;e[32]!==N?(C=s.jsx(Ve,{size:12,className:N}),e[32]=N,e[33]=C):C=e[33];let w;e[34]!==f||e[35]!==k||e[36]!==C||e[37]!==b?(w=s.jsx(ze,{asChild:!0,children:s.jsxs("button",{type:"button",className:b,children:[f,k,C]})}),e[34]=f,e[35]=k,e[36]=C,e[37]=b,e[38]=w):w=e[38];let j;e[39]!==o?(j=o("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=o,e[40]=j):j=e[40];let S;e[41]!==o?(S=o("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=o,e[42]=S):S=e[42];let D;e[43]!==j||e[44]!==S?(D=s.jsx(At,{placeholder:j,"aria-label":S,className:"h-9"}),e[43]=j,e[44]=S,e[45]=D):D=e[45];let I;e[46]!==o?(I=o("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=o,e[47]=I):I=e[47];let M;e[48]!==I?(M=s.jsx(It,{children:I}),e[48]=I,e[49]=M):M=e[49];let v;e[50]!==o?(v=o("taskBoard.taskFilters.assigneeAnyone"),e[50]=o,e[51]=v):v=e[51];let A;e[52]!==g?(A=()=>g(null),e[52]=g,e[53]=A):A=e[53];let T;e[54]!==o?(T=o("taskBoard.taskFilters.assigneeAnyone"),e[54]=o,e[55]=T):T=e[55];let O;e[56]!==v||e[57]!==A||e[58]!==T?(O=s.jsx(ve,{value:v,onSelect:A,children:T}),e[56]=v,e[57]=A,e[58]=T,e[59]=O):O=e[59];let B;e[60]!==o?(B=o("taskBoard.taskFilters.assigneeUnassigned"),e[60]=o,e[61]=B):B=e[61];let F;e[62]!==g?(F=()=>g(bt),e[62]=g,e[63]=F):F=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx($t,{size:16,className:"text-muted-foreground"}),e[64]=$):$=e[64];let U;e[65]!==o?(U=o("taskBoard.taskFilters.assigneeUnassigned"),e[65]=o,e[66]=U):U=e[66];let P;e[67]!==B||e[68]!==F||e[69]!==U?(P=s.jsxs(ve,{value:B,onSelect:F,className:"gap-2",children:[$,U]}),e[67]=B,e[68]=F,e[69]=U,e[70]=P):P=e[70];let K;e[71]!==o?(K=o("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=o,e[72]=K):K=e[72];let L;e[73]!==g?(L=()=>g(xt),e[73]=g,e[74]=L):L=e[74];let V;e[75]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Kt,{size:16}),e[75]=V):V=e[75];let J;e[76]!==o?(J=o("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=o,e[77]=J):J=e[77];let z;e[78]!==K||e[79]!==L||e[80]!==J?(z=s.jsxs(ve,{value:K,onSelect:L,className:"gap-2",children:[V,J]}),e[78]=K,e[79]=L,e[80]=J,e[81]=z):z=e[81];let W;e[82]!==O||e[83]!==P||e[84]!==z?(W=s.jsxs(qe,{children:[O,P,z]}),e[82]=O,e[83]=P,e[84]=z,e[85]=W):W=e[85];let pe;e[86]!==o?(pe=o("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=o,e[87]=pe):pe=e[87];let te;if(e[88]!==a||e[89]!==g){let H;e[91]!==g?(H=q=>s.jsxs(ve,{value:q.user?.name??q.userId,onSelect:()=>g(q.userId),className:"gap-2",children:[s.jsx(Lt,{url:q.user?.image??void 0,fallback:Ot(q.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:q.user?.name??q.userId})]},q.userId),e[91]=g,e[92]=H):H=e[92],te=a.map(H),e[88]=a,e[89]=g,e[90]=te}else te=e[90];let se;e[93]!==pe||e[94]!==te?(se=s.jsx(qe,{heading:pe,children:te}),e[93]=pe,e[94]=te,e[95]=se):se=e[95];let ae;e[96]!==M||e[97]!==W||e[98]!==se?(ae=s.jsxs(Tt,{children:[M,W,se]}),e[96]=M,e[97]=W,e[98]=se,e[99]=ae):ae=e[99];let ie;e[100]!==D||e[101]!==ae?(ie=s.jsx(ot,{align:"start",className:"w-56 p-0",children:s.jsxs(Bt,{children:[D,ae]})}),e[100]=D,e[101]=ae,e[102]=ie):ie=e[102];let he;return e[103]!==d||e[104]!==w||e[105]!==ie?(he=s.jsxs(nt,{open:d,onOpenChange:c,children:[w,ie]}),e[103]=d,e[104]=w,e[105]=ie,e[106]=he):he=e[106],he}function oa(t){const e=R.c(33),{value:n,onChange:a,block:i}=t,l=Q(),o=n!==null;let d;e[0]!==i||e[1]!==o?(d=Se(o,i),e[0]=i,e[1]=o,e[2]=d):d=e[2];const c=d,u=i&&"ml-auto";let f;e[3]!==u?(f=X("shrink-0 opacity-60",u),e[3]=u,e[4]=f):f=e[4];const p=f;let r;e[5]!==n?(r=n?s.jsx("span",{className:X("size-2 shrink-0 rounded-full",Ze[n].dotClassName)}):s.jsx(qn,{size:14,className:"shrink-0"}),e[5]=n,e[6]=r):r=e[6];let m;e[7]!==l||e[8]!==n?(m=l(n?Ze[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=n,e[9]=m):m=e[9];let g;e[10]!==p?(g=s.jsx(Ve,{size:12,className:p}),e[10]=p,e[11]=g):g=e[11];let h;e[12]!==r||e[13]!==m||e[14]!==g||e[15]!==c?(h=s.jsx(ps,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[r,m,g]})}),e[12]=r,e[13]=m,e[14]=g,e[15]=c,e[16]=h):h=e[16];const x=n??Ke;let b;e[17]!==a?(b=w=>a(w===Ke?null:w),e[17]=a,e[18]=b):b=e[18];let _;e[19]!==l?(_=l("taskBoard.taskFilters.priorityAnyPriority"),e[19]=l,e[20]=_):_=e[20];let y;e[21]!==_?(y=s.jsx(st,{value:Ke,children:_}),e[21]=_,e[22]=y):y=e[22];let N;e[23]!==l?(N=Yo.map(w=>s.jsxs(st,{value:w,className:"gap-2",children:[s.jsx("span",{className:X("size-2 rounded-full",Ze[w].dotClassName)}),l(Ze[w].labelKey)]},w)),e[23]=l,e[24]=N):N=e[24];let k;e[25]!==b||e[26]!==y||e[27]!==N||e[28]!==x?(k=s.jsx(hs,{align:"start",className:"w-40",children:s.jsxs(xs,{value:x,onValueChange:b,children:[y,N]})}),e[25]=b,e[26]=y,e[27]=N,e[28]=x,e[29]=k):k=e[29];let C;return e[30]!==k||e[31]!==h?(C=s.jsxs(js,{children:[h,k]}),e[30]=k,e[31]=h,e[32]=C):C=e[32],C}function aa(t){const e=R.c(35),{value:n,onChange:a,block:i}=t,l=Q();let o;e[0]!==l||e[1]!==n?(o=n?l(Ht[n]):void 0,e[0]=l,e[1]=n,e[2]=o):o=e[2];const d=o,c=n!==null;let u;e[3]!==i||e[4]!==c?(u=Se(c,i),e[3]=i,e[4]=c,e[5]=u):u=e[5];const f=u,p=i&&"ml-auto";let r;e[6]!==p?(r=X("shrink-0 opacity-60",p),e[6]=p,e[7]=r):r=e[7];const m=r;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ut,{size:14,className:"shrink-0"}),e[8]=g):g=e[8];let h;e[9]!==d||e[10]!==l?(h=d??l("taskBoard.taskFilters.dueDateLabel"),e[9]=d,e[10]=l,e[11]=h):h=e[11];let x;e[12]!==m?(x=s.jsx(Ve,{size:12,className:m}),e[12]=m,e[13]=x):x=e[13];let b;e[14]!==h||e[15]!==x||e[16]!==f?(b=s.jsx(ps,{asChild:!0,children:s.jsxs("button",{type:"button",className:f,children:[g,h,x]})}),e[14]=h,e[15]=x,e[16]=f,e[17]=b):b=e[17];const _=n??Ke;let y;e[18]!==a?(y=D=>a(D===Ke?null:D),e[18]=a,e[19]=y):y=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(ut,{size:16,className:"text-muted-foreground"}),e[20]=N):N=e[20];let k;e[21]!==l?(k=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=k):k=e[22];let C;e[23]!==k?(C=s.jsxs(st,{value:Ke,className:"gap-2",children:[N,k]}),e[23]=k,e[24]=C):C=e[24];let w;e[25]!==l?(w=Object.entries(Ht).map(D=>{const[I,M]=D,v=I==="overdue";return s.jsxs(st,{value:I,className:X("gap-2",v&&"text-destructive"),children:[s.jsx(ut,{size:16,className:X("shrink-0",v?"text-destructive":"text-muted-foreground")}),l(M)]},I)}),e[25]=l,e[26]=w):w=e[26];let j;e[27]!==_||e[28]!==y||e[29]!==C||e[30]!==w?(j=s.jsx(hs,{align:"start",className:"w-44",children:s.jsxs(xs,{value:_,onValueChange:y,children:[C,w]})}),e[27]=_,e[28]=y,e[29]=C,e[30]=w,e[31]=j):j=e[31];let S;return e[32]!==j||e[33]!==b?(S=s.jsxs(js,{children:[b,j]}),e[32]=j,e[33]=b,e[34]=S):S=e[34],S}function la(t){const e=R.c(56),{value:n,tags:a,onChange:i,block:l}=t,o=Q(),[d,c]=G.useState(!1);let u;e[0]!==i||e[1]!==n?(u=B=>i(n.includes(B)?n.filter(F=>F!==B):[...n,B]),e[0]=i,e[1]=n,e[2]=u):u=e[2];const f=u;let p;e[3]!==o||e[4]!==a||e[5]!==n[0]||e[6]!==n.length?(p=n.length===0?o("taskBoard.taskFilters.tagsLabel"):n.length===1?a.find(B=>B.id===n[0])?.name??o("taskBoard.taskFilters.tagsLabel"):o("taskBoard.taskFilters.tagsSelectedCount",{count:n.length}),e[3]=o,e[4]=a,e[5]=n[0],e[6]=n.length,e[7]=p):p=e[7];const r=p,m=n.length>0;let g;e[8]!==l||e[9]!==m?(g=Se(m,l),e[8]=l,e[9]=m,e[10]=g):g=e[10];const h=g,x=l&&"ml-auto";let b;e[11]!==x?(b=X("shrink-0 opacity-60",x),e[11]=x,e[12]=b):b=e[12];const _=b;let y;e[13]!==a||e[14]!==n[0]||e[15]!==n.length?(y=n.length===1?s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Ut(a.find(B=>B.id===n[0])?.color)}}):s.jsx(Ws,{size:14,className:"shrink-0"}),e[13]=a,e[14]=n[0],e[15]=n.length,e[16]=y):y=e[16];let N;e[17]!==r?(N=s.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[17]=r,e[18]=N):N=e[18];let k;e[19]!==_?(k=s.jsx(Ve,{size:12,className:_}),e[19]=_,e[20]=k):k=e[20];let C;e[21]!==y||e[22]!==N||e[23]!==k||e[24]!==h?(C=s.jsx(ze,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[y,N,k]})}),e[21]=y,e[22]=N,e[23]=k,e[24]=h,e[25]=C):C=e[25];let w;e[26]!==o?(w=o("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=o,e[27]=w):w=e[27];let j;e[28]!==o?(j=o("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=o,e[29]=j):j=e[29];let S;e[30]!==w||e[31]!==j?(S=s.jsx(At,{placeholder:w,"aria-label":j,className:"h-9"}),e[30]=w,e[31]=j,e[32]=S):S=e[32];let D;e[33]!==o?(D=o("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=o,e[34]=D):D=e[34];let I;e[35]!==D?(I=s.jsx(It,{children:D}),e[35]=D,e[36]=I):I=e[36];let M;if(e[37]!==a||e[38]!==f||e[39]!==n){let B;e[41]!==f||e[42]!==n?(B=F=>s.jsxs(ve,{value:F.name,onSelect:()=>f(F.id),className:"gap-2",children:[s.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Ut(F.color)}}),s.jsx("span",{className:"flex-1 truncate",children:F.name}),n.includes(F.id)&&s.jsx(Ge,{size:14,className:"shrink-0 text-foreground"})]},F.id),e[41]=f,e[42]=n,e[43]=B):B=e[43],M=a.map(B),e[37]=a,e[38]=f,e[39]=n,e[40]=M}else M=e[40];let v;e[44]!==M?(v=s.jsx(qe,{children:M}),e[44]=M,e[45]=v):v=e[45];let A;e[46]!==I||e[47]!==v?(A=s.jsxs(Tt,{children:[I,v]}),e[46]=I,e[47]=v,e[48]=A):A=e[48];let T;e[49]!==S||e[50]!==A?(T=s.jsx(ot,{align:"start",className:"w-56 p-0",children:s.jsxs(Bt,{children:[S,A]})}),e[49]=S,e[50]=A,e[51]=T):T=e[51];let O;return e[52]!==d||e[53]!==C||e[54]!==T?(O=s.jsxs(nt,{open:d,onOpenChange:c,children:[C,T]}),e[52]=d,e[53]=C,e[54]=T,e[55]=O):O=e[55],O}function ia(t){const e=R.c(73),{value:n,repos:a,onChange:i,block:l}=t,o=Q(),[d,c]=G.useState(!1);let u;e[0]!==o||e[1]!==n?(u=n===null?o("taskBoard.taskFilters.repoLabel"):n===yt?o("taskBoard.taskFilters.repoNoRepo"):n,e[0]=o,e[1]=n,e[2]=u):u=e[2];const f=u;let p;e[3]!==i?(p=z=>{i(z),c(!1)},e[3]=i,e[4]=p):p=e[4];const r=p,m=n!==null;let g;e[5]!==l||e[6]!==m?(g=Se(m,l),e[5]=l,e[6]=m,e[7]=g):g=e[7];const h=g,x=l&&"ml-auto";let b;e[8]!==x?(b=X("shrink-0 opacity-60",x),e[8]=x,e[9]=b):b=e[9];const _=b;let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ht,{className:"size-3.5 shrink-0"}),e[10]=y):y=e[10];let N;e[11]!==f?(N=s.jsx("span",{className:"max-w-[12rem] truncate",children:f}),e[11]=f,e[12]=N):N=e[12];let k;e[13]!==_?(k=s.jsx(Ve,{size:12,className:_}),e[13]=_,e[14]=k):k=e[14];let C;e[15]!==N||e[16]!==k||e[17]!==h?(C=s.jsx(ze,{asChild:!0,children:s.jsxs("button",{type:"button",className:h,children:[y,N,k]})}),e[15]=N,e[16]=k,e[17]=h,e[18]=C):C=e[18];let w;e[19]!==o?(w=o("taskBoard.taskFilters.repoFilterPlaceholder"),e[19]=o,e[20]=w):w=e[20];let j;e[21]!==o?(j=o("taskBoard.taskFilters.repoFilterPlaceholder"),e[21]=o,e[22]=j):j=e[22];let S;e[23]!==w||e[24]!==j?(S=s.jsx(At,{placeholder:w,"aria-label":j,className:"h-9"}),e[23]=w,e[24]=j,e[25]=S):S=e[25];let D;e[26]!==o?(D=o("taskBoard.taskFilters.repoNoReposFound"),e[26]=o,e[27]=D):D=e[27];let I;e[28]!==D?(I=s.jsx(It,{children:D}),e[28]=D,e[29]=I):I=e[29];let M;e[30]!==o?(M=o("taskBoard.taskFilters.repoAnyRepo"),e[30]=o,e[31]=M):M=e[31];let v;e[32]!==r?(v=()=>r(null),e[32]=r,e[33]=v):v=e[33];let A;e[34]!==o?(A=o("taskBoard.taskFilters.repoAnyRepo"),e[34]=o,e[35]=A):A=e[35];let T;e[36]!==M||e[37]!==v||e[38]!==A?(T=s.jsx(ve,{value:M,onSelect:v,children:A}),e[36]=M,e[37]=v,e[38]=A,e[39]=T):T=e[39];let O;e[40]!==o?(O=o("taskBoard.taskFilters.repoNoRepo"),e[40]=o,e[41]=O):O=e[41];let B;e[42]!==r?(B=()=>r(yt),e[42]=r,e[43]=B):B=e[43];let F;e[44]!==o?(F=o("taskBoard.taskFilters.repoNoRepo"),e[44]=o,e[45]=F):F=e[45];let $;e[46]!==O||e[47]!==B||e[48]!==F?($=s.jsx(ve,{value:O,onSelect:B,children:F}),e[46]=O,e[47]=B,e[48]=F,e[49]=$):$=e[49];let U;e[50]!==T||e[51]!==$?(U=s.jsxs(qe,{children:[T,$]}),e[50]=T,e[51]=$,e[52]=U):U=e[52];let P;if(e[53]!==a||e[54]!==r||e[55]!==n){let z;e[57]!==r||e[58]!==n?(z=W=>s.jsxs(ve,{value:W,onSelect:()=>r(W),className:"gap-2",children:[s.jsx(ht,{className:"size-4 shrink-0"}),s.jsx("span",{className:"flex-1 truncate",children:W}),n===W&&s.jsx(Ge,{size:14,className:"shrink-0 text-foreground"})]},W),e[57]=r,e[58]=n,e[59]=z):z=e[59],P=a.map(z),e[53]=a,e[54]=r,e[55]=n,e[56]=P}else P=e[56];let K;e[60]!==P?(K=s.jsx(qe,{children:P}),e[60]=P,e[61]=K):K=e[61];let L;e[62]!==I||e[63]!==U||e[64]!==K?(L=s.jsxs(Tt,{children:[I,U,K]}),e[62]=I,e[63]=U,e[64]=K,e[65]=L):L=e[65];let V;e[66]!==S||e[67]!==L?(V=s.jsx(ot,{align:"start",className:"w-64 p-0",children:s.jsxs(Bt,{children:[S,L]})}),e[66]=S,e[67]=L,e[68]=V):V=e[68];let J;return e[69]!==d||e[70]!==C||e[71]!==V?(J=s.jsxs(nt,{open:d,onOpenChange:c,children:[C,V]}),e[69]=d,e[70]=C,e[71]=V,e[72]=J):J=e[72],J}function ra(t){const e=R.c(25),{value:n,onChange:a,block:i}=t,l=Q(),[o,d]=G.useState(n!==""),[c,u]=G.useState(!1),[f,p]=G.useState(n);n!==f&&(p(n),n===""&&!c&&d(!1));const r=o||i,m=r?"w-32 sm:w-44":"w-8 px-0 justify-center",g=i&&"h-10 w-full px-3 text-sm sm:w-full";let h;e[0]!==m||e[1]!==g?(h=X("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",m,g),e[0]=m,e[1]=g,e[2]=h):h=e[2];let x;e[3]!==l?(x=l("taskBoard.taskFilters.searchLabel"),e[3]=l,e[4]=x):x=e[4];let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=()=>d(!0),e[5]=b):b=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx(Ys,{size:14}),e[6]=_):_=e[6];let y;e[7]!==x?(y=s.jsx("button",{type:"button","aria-label":x,onClick:b,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:_}),e[7]=x,e[8]=y):y=e[8];let N;e[9]!==i||e[10]!==r||e[11]!==a||e[12]!==l||e[13]!==n?(N=r&&s.jsx("input",{autoFocus:!i,value:n,onChange:w=>a(w.target.value),onFocus:()=>u(!0),onBlur:()=>{u(!1),n===""&&d(!1)},placeholder:l("taskBoard.taskFilters.searchPlaceholder"),"aria-label":l("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=i,e[10]=r,e[11]=a,e[12]=l,e[13]=n,e[14]=N):N=e[14];let k;e[15]!==i||e[16]!==a||e[17]!==l||e[18]!==n?(k=n!==""&&s.jsx("button",{type:"button","aria-label":l("taskBoard.taskFilters.searchClearLabel"),onMouseDown:ca,onClick:()=>{a(""),i||d(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:s.jsx(Ls,{size:14})}),e[15]=i,e[16]=a,e[17]=l,e[18]=n,e[19]=k):k=e[19];let C;return e[20]!==h||e[21]!==y||e[22]!==N||e[23]!==k?(C=s.jsxs("div",{className:h,children:[y,N,k]}),e[20]=h,e[21]=y,e[22]=N,e[23]=k,e[24]=C):C=e[24],C}function ca(t){return t.preventDefault()}function da(t){const e=R.c(20),{block:n,onClick:a}=t,i=Q();let l;e[0]!==i?(l=i("taskBoard.taskFilters.boardSettingsLabel"),e[0]=i,e[1]=l):l=e[1];const o=l;let d;e[2]!==n?(d=X(Se(!1,n),n?"h-10 w-full":"w-8 justify-center px-0"),e[2]=n,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Qn,{size:14,className:"shrink-0"}),e[4]=c):c=e[4];let u;e[5]!==n||e[6]!==o?(u=n&&s.jsx("span",{children:o}),e[5]=n,e[6]=o,e[7]=u):u=e[7];let f;e[8]!==o||e[9]!==a||e[10]!==d||e[11]!==u?(f=s.jsxs("button",{type:"button",onClick:a,"aria-label":o,className:d,children:[c,u]}),e[8]=o,e[9]=a,e[10]=d,e[11]=u,e[12]=f):f=e[12];const p=f;if(n)return p;let r;e[13]!==p?(r=s.jsx($e,{asChild:!0,children:p}),e[13]=p,e[14]=r):r=e[14];let m;e[15]!==o?(m=s.jsx(Oe,{side:"top",children:o}),e[15]=o,e[16]=m):m=e[16];let g;return e[17]!==r||e[18]!==m?(g=s.jsxs(Re,{children:[r,m]}),e[17]=r,e[18]=m,e[19]=g):g=e[19],g}function Ss(t){const e=R.c(53),{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d,block:c}=t;let u;e[0]!==n||e[1]!==o?(u=C=>o({...n,search:C}),e[0]=n,e[1]=o,e[2]=u):u=e[2];let f;e[3]!==c||e[4]!==n.search||e[5]!==u?(f=s.jsx(ra,{block:c,value:n.search,onChange:u}),e[3]=c,e[4]=n.search,e[5]=u,e[6]=f):f=e[6];let p;e[7]!==n||e[8]!==o?(p=C=>o({...n,assignee:C}),e[7]=n,e[8]=o,e[9]=p):p=e[9];let r;e[10]!==c||e[11]!==n.assignee||e[12]!==a||e[13]!==p?(r=s.jsx(na,{block:c,value:n.assignee,members:a,onChange:p}),e[10]=c,e[11]=n.assignee,e[12]=a,e[13]=p,e[14]=r):r=e[14];let m;e[15]!==n||e[16]!==o?(m=C=>o({...n,priority:C}),e[15]=n,e[16]=o,e[17]=m):m=e[17];let g;e[18]!==c||e[19]!==n.priority||e[20]!==m?(g=s.jsx(oa,{block:c,value:n.priority,onChange:m}),e[18]=c,e[19]=n.priority,e[20]=m,e[21]=g):g=e[21];let h;e[22]!==n||e[23]!==o?(h=C=>o({...n,due:C}),e[22]=n,e[23]=o,e[24]=h):h=e[24];let x;e[25]!==c||e[26]!==n.due||e[27]!==h?(x=s.jsx(aa,{block:c,value:n.due,onChange:h}),e[25]=c,e[26]=n.due,e[27]=h,e[28]=x):x=e[28];let b;e[29]!==n||e[30]!==o?(b=C=>o({...n,tags:C}),e[29]=n,e[30]=o,e[31]=b):b=e[31];let _;e[32]!==c||e[33]!==n.tags||e[34]!==b||e[35]!==i?(_=s.jsx(la,{block:c,value:n.tags,tags:i,onChange:b}),e[32]=c,e[33]=n.tags,e[34]=b,e[35]=i,e[36]=_):_=e[36];let y;e[37]!==c||e[38]!==n||e[39]!==o||e[40]!==l?(y=(l.length>0||n.repo!==null)&&s.jsx(ia,{block:c,value:n.repo,repos:l,onChange:C=>o({...n,repo:C})}),e[37]=c,e[38]=n,e[39]=o,e[40]=l,e[41]=y):y=e[41];let N;e[42]!==c||e[43]!==d?(N=s.jsx(da,{block:c,onClick:d}),e[42]=c,e[43]=d,e[44]=N):N=e[44];let k;return e[45]!==_||e[46]!==y||e[47]!==N||e[48]!==f||e[49]!==r||e[50]!==g||e[51]!==x?(k=s.jsxs(s.Fragment,{children:[f,r,g,x,_,y,N]}),e[45]=_,e[46]=y,e[47]=N,e[48]=f,e[49]=r,e[50]=g,e[51]=x,e[52]=k):k=e[52],k}function Ml(t){const e=R.c(15),{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d}=t,c=Q();let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(gs,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=u):u=e[0];let f;e[1]!==n||e[2]!==a||e[3]!==o||e[4]!==d||e[5]!==l||e[6]!==i?(f=s.jsx(Ss,{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d}),e[1]=n,e[2]=a,e[3]=o,e[4]=d,e[5]=l,e[6]=i,e[7]=f):f=e[7];let p;e[8]!==n||e[9]!==o||e[10]!==c?(p=Jo(n)&&s.jsx("button",{type:"button",onClick:()=>o(Ns),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:c("taskBoard.taskFilters.clearButton")}),e[8]=n,e[9]=o,e[10]=c,e[11]=p):p=e[11];let r;return e[12]!==f||e[13]!==p?(r=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[u,f,p]}),e[12]=f,e[13]=p,e[14]=r):r=e[14],r}function Ll(t){const e=R.c(41),{filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d}=t,c=Q(),[u,f]=G.useState(!1),p=Zo(n),r=p>0;let m;e[0]!==r?(m=Se(r),e[0]=r,e[1]=m):m=e[1];const g=m;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(gs,{size:14,className:"shrink-0"}),e[2]=h):h=e[2];let x;e[3]!==c?(x=c("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=c,e[4]=x):x=e[4];let b;e[5]!==p?(b=p>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:p}),e[5]=p,e[6]=b):b=e[6];let _;e[7]!==x||e[8]!==b||e[9]!==g?(_=s.jsx(an,{asChild:!0,children:s.jsxs("button",{type:"button",className:g,children:[h,x,b]})}),e[7]=x,e[8]=b,e[9]=g,e[10]=_):_=e[10];let y;e[11]!==c?(y=c("taskBoard.taskFilters.filterDrawerTitle"),e[11]=c,e[12]=y):y=e[12];let N;e[13]!==y?(N=s.jsx(Dt,{className:"px-4 pt-4 text-base font-medium text-foreground",children:y}),e[13]=y,e[14]=N):N=e[14];let k;e[15]!==n||e[16]!==a||e[17]!==o||e[18]!==d||e[19]!==l||e[20]!==i?(k=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Ss,{block:!0,filters:n,members:a,tags:i,repos:l,onChange:o,onOpenBoardSettings:d})}),e[15]=n,e[16]=a,e[17]=o,e[18]=d,e[19]=l,e[20]=i,e[21]=k):k=e[21];let C;e[22]!==p||e[23]!==o||e[24]!==c?(C=p>0&&s.jsx(be,{variant:"outline",className:"flex-1",onClick:()=>o(Ns),children:c("taskBoard.taskFilters.clearAllButton")}),e[22]=p,e[23]=o,e[24]=c,e[25]=C):C=e[25];let w;e[26]!==c?(w=c("taskBoard.taskFilters.doneButton"),e[26]=c,e[27]=w):w=e[27];let j;e[28]!==w?(j=s.jsx(ss,{asChild:!0,children:s.jsx(be,{className:"flex-1",children:w})}),e[28]=w,e[29]=j):j=e[29];let S;e[30]!==C||e[31]!==j?(S=s.jsxs(ns,{className:"flex-row gap-2",children:[C,j]}),e[30]=C,e[31]=j,e[32]=S):S=e[32];let D;e[33]!==S||e[34]!==N||e[35]!==k?(D=s.jsxs(St,{className:"p-0",children:[N,k,S]}),e[33]=S,e[34]=N,e[35]=k,e[36]=D):D=e[36];let I;return e[37]!==u||e[38]!==D||e[39]!==_?(I=s.jsxs(_t,{open:u,onOpenChange:f,direction:"bottom",children:[_,D]}),e[37]=u,e[38]=D,e[39]=_,e[40]=I):I=e[40],I}function $l(t,e){return Lo(t,e.keySeq)??e.id}function Ol(t,e){const n=e?.trim();if(n)return t.find(a=>_s(n,a.keySeq))??t.find(a=>a.id===n)}export{pl as A,Bl as B,_l as C,kl as D,Ns as E,Sl as F,Fl as G,El as H,Go as I,Pl as J,Co as K,Vt as L,gl as N,Ze as P,Kt as S,Il as T,$l as a,vl as b,Ko as c,ml as d,zo as e,bl as f,Yo as g,Al as h,Cs as i,Ut as j,ks as k,wl as l,xl as m,Tl as n,yl as o,Cl as p,Ho as q,vs as r,Nl as s,Lo as t,hl as u,jl as v,Ol as w,Ll as x,Ml as y,Dl as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as p,c as A,j as x,d as N,W as _,n as w,a as P,y as j}from"./index-Ciqhx4Es.js";import{D as T}from"./use-destination-route-BbzQn-n1.js";import{e as D,g as G}from"./use-virtual-mcp-Dc_tNJd3.js";import{a as U}from"./hooks-y1rkw2ir.js";import{p as $,d as R,w as k}from"./thread-intent-CisrByhq.js";import{g as B}from"./github-repo-BpKUwJal.js";const S=p.createContext(null);function M(e){const t=A.c(7),{children:n}=e,[s,r]=p.useState(!1),[a,m]=p.useState(0);let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>m(F),t[0]=i):i=t[0];const l=i;let o;t[1]!==s||t[2]!==a?(o={empty:s,setEmpty:r,orderRevision:a,bumpOrderRevision:l},t[1]=s,t[2]=a,t[3]=o):o=t[3];let c;return t[4]!==n||t[5]!==o?(c=x.jsx(S.Provider,{value:o,children:n}),t[4]=n,t[5]=o,t[6]=c):c=t[6],c}function F(e){return e+1}function I(){return p.useContext(S)?.empty??!1}function L(){return p.useContext(S)?.bumpOrderRevision??V}function V(){}function E(e,t){if(!t)return!0;if(e.partial)return!1;const n=$(e.metadata?.runtime);return n===null||n===t}function q(e,t,n,s){let r=null;for(const a of e)a.virtual_mcp_id===t&&a.created_by===n&&(a.hidden||E(a,s)&&(!r||a.updated_at>r.updated_at)&&(r=a));return r}function C(e,t,n,s){return e.find(r=>!r.hidden&&r.virtual_mcp_id===t&&r.created_by===n&&r.title==="New chat"&&!r.harness_id&&E(r,s))}function H(e,t,n,s,r){return r?q(e,t,n,s)??C(e,t,n,s):C(e,t,n,s)}const Q=[];function ee(){const e=A.c(14),t=N(),{org:n,locator:s}=_(),r=w(),a=D(),{data:m}=P.useSession(),i=L(),l=U();let o;e[0]!==i||e[1]!==a||e[2]!==s||e[3]!==l?.threads||e[4]!==t||e[5]!==n.slug||e[6]!==m?.user?.id?(o=(d,f,g)=>{i();const u=(a??[]).find(O=>O.id===d),b=H(l?.threads.get()??Q,d,m?.user?.id,g??(u?R(u.metadata):void 0),!!(u&&B(u))),y=b?.id??crypto.randomUUID();!b&&f?.runtime&&k(sessionStorage,s,y,{runtime:f.runtime});const v=f?.panel?j(f.panel):null;if(!v?.panel){t({to:T.home,params:{org:n.slug},search:{virtualmcpid:d,thread:y}});return}t({to:T.agents,params:{org:n.slug,panel:v.panel},search:{...v.payload,virtualmcpid:d,thread:y}})},e[0]=i,e[1]=a,e[2]=s,e[3]=l?.threads,e[4]=t,e[5]=n.slug,e[6]=m?.user?.id,e[7]=o):o=e[7];const c=o;let h;return e[8]!==i||e[9]!==a||e[10]!==c||e[11]!==n||e[12]!==r?(h=(d,f)=>{i();const g=a.find(u=>u.id===d);if(f?.runtime)return c(d,f,f.runtime);if(g)return c(d,f,R(g.metadata));G(r,n).then(u=>u.find(b=>b.id===d)).catch(W).then(u=>c(d,f,u?R(u.metadata):void 0))},e[8]=i,e[9]=a,e[10]=c,e[11]=n,e[12]=r,e[13]=h):h=e[13],h}function W(){}export{M as S,H as a,I as b,L as c,C as f,ee as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./use-infinite-scroll-BnNCHFKn.js";import{fg as i}from"./index-Ciqhx4Es.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-BnNCHFKn.js";import{fg as u,bU as n}from"./index-Ciqhx4Es.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|