decocms 2.289.1 → 2.290.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DvPnQfC5.js → AlertCircle-BKpPv_ue.js} +1 -1
- package/dist/client/assets/{ArrowNarrowLeft-BKxpVLR_.js → ArrowNarrowLeft-DzI4-MMz.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CuQjuTVk.js → ArrowUpRight-CgoB9CSG.js} +1 -1
- package/dist/client/assets/{CheckCircle-4_rcsB70.js → CheckCircle-_hRmcUCr.js} +1 -1
- package/dist/client/assets/{ChevronDown-DfsMdmf4.js → ChevronDown-DgrWziJW.js} +1 -1
- package/dist/client/assets/{ChevronRight-CVhRkUc0.js → ChevronRight-DJnGkhn4.js} +1 -1
- package/dist/client/assets/{ChevronUp-CD4XJT02.js → ChevronUp-CYzPfn3Y.js} +1 -1
- package/dist/client/assets/{Container-BcAiX456.js → Container-CCq3u0Gk.js} +1 -1
- package/dist/client/assets/{DotsVertical-e4sJs2sy.js → DotsVertical-om3rzQE9.js} +1 -1
- package/dist/client/assets/{LinkExternal01-M3Y1_vaI.js → LinkExternal01-DbNOYo2d.js} +1 -1
- package/dist/client/assets/{Lock01-_ctwMSEo.js → Lock01-BsLK0x7P.js} +1 -1
- package/dist/client/assets/{Palette-BkMTuMlr.js → Palette-CN1aN7Xh.js} +1 -1
- package/dist/client/assets/{Play-CrMiqzaH.js → Play-CwsBegSF.js} +1 -1
- package/dist/client/assets/{Plus-BR3le3XA.js → Plus-CnK1SC2T.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BvVeeLFE.js → RefreshCcw01-DESLbhAD.js} +1 -1
- package/dist/client/assets/{SearchMd-CnSMs6Gr.js → SearchMd-DlfhE_5j.js} +1 -1
- package/dist/client/assets/{Settings02-bYDpmczV.js → Settings02-LVlkEIxI.js} +1 -1
- package/dist/client/assets/{Shield01-CMpoeZYl.js → Shield01-DGTwcXqp.js} +1 -1
- package/dist/client/assets/{Star01-B5vecVQL.js → Star01-CWHB1ChF.js} +1 -1
- package/dist/client/assets/{Sun-wZV-LjB0.js → Sun-1aZYqU86.js} +1 -1
- package/dist/client/assets/{Tool01-CuCSRQWJ.js → Tool01-X8GEQ_TP.js} +1 -1
- package/dist/client/assets/{Trash01-J7CgYdQ6.js → Trash01-CIUqVsqV.js} +1 -1
- package/dist/client/assets/{User01-BgWj-XfO.js → User01-Dds7lT_Z.js} +1 -1
- package/dist/client/assets/{Users03-DuJUh6K5.js → Users03-BD0tlSQu.js} +1 -1
- package/dist/client/assets/{X-B94SYTq6.js → X-BDxrsCdA.js} +1 -1
- package/dist/client/assets/{XCircle-CV0L9GR_.js → XCircle-BJ-0U-0t.js} +1 -1
- package/dist/client/assets/{XClose-BDJKoeIM.js → XClose-Bl-2e8QV.js} +1 -1
- package/dist/client/assets/{Zap-DbOUQQao.js → Zap-B3a3OZUG.js} +1 -1
- package/dist/client/assets/{ZapSquare-BVc4n4iU.js → ZapSquare-Ddm4Ccl_.js} +1 -1
- package/dist/client/assets/{accordion-_jHDGcgU.js → accordion-eGw-yxkH.js} +1 -1
- package/dist/client/assets/{agent-icon-C6qW6eXG.js → agent-icon-Dhv8pT4N.js} +1 -1
- package/dist/client/assets/{agents-list-DQZlBppY.js → agents-list-BoLhMS8b.js} +1 -1
- package/dist/client/assets/ai-providers-5Y8Lye7a.js +1 -0
- package/dist/client/assets/ai-providers-logos-D6a8kmGH.js +1 -0
- package/dist/client/assets/{alert-dialog-DUehP6wO.js → alert-dialog-C5H0at4x.js} +1 -1
- package/dist/client/assets/{auth-catchall-Cbr_hZzc.js → auth-catchall-CDaNQLse.js} +1 -1
- package/dist/client/assets/{automation-list-row-CE-l0VNu.js → automation-list-row-i8Q9Zh9Z.js} +1 -1
- package/dist/client/assets/{automations-C3LxjCxf.js → automations-ulYqPLWi.js} +1 -1
- package/dist/client/assets/{avatar-BIm7SPe1.js → avatar-BCAMjlDk.js} +1 -1
- package/dist/client/assets/{badge-CtBsPi0r.js → badge-arNIH4S4.js} +1 -1
- package/dist/client/assets/{brand-context-CB2HhrLr.js → brand-context-doHsqzeN.js} +1 -1
- package/dist/client/assets/{card-BLtPWaiK.js → card-BcKfGMCs.js} +1 -1
- package/dist/client/assets/{chat-context-DcUrkBB6.js → chat-context-BgLXGROj.js} +14 -14
- package/dist/client/assets/{checkbox-BEdGbH_8.js → checkbox-eCIm2Y45.js} +1 -1
- package/dist/client/assets/{collection-detail-CtkPh5nj.js → collection-detail-BIdQmVBg.js} +1 -1
- package/dist/client/assets/{collection-display-button-DbKOigBA.js → collection-display-button-31iCSNaH.js} +1 -1
- package/dist/client/assets/{collection-search-CEPfUiWA.js → collection-search-CWRKNmnq.js} +1 -1
- package/dist/client/assets/{collection-search-BEbLDyCP.js → collection-search-CZEXNAkX.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B2huksH6.js → collection-table-wrapper-iKnV9U-a.js} +1 -1
- package/dist/client/assets/{collection-tabs-QSa5ykeq.js → collection-tabs-BB_C6DLQ.js} +1 -1
- package/dist/client/assets/{collections-CF9hrNRd.js → collections-BmZbVrT4.js} +1 -1
- package/dist/client/assets/{command-DmhSl-c8.js → command-BXuf0gSd.js} +1 -1
- package/dist/client/assets/{connection-card-bmzpIukU.js → connection-card-CaHQAi2l.js} +1 -1
- package/dist/client/assets/{connection-detail-DwoYH_6W.js → connection-detail-DtFDjt8X.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BrmC7SFw.js → connection-form-helpers-D-VsE2HN.js} +1 -1
- package/dist/client/assets/{connections-B52vPeyp.js → connections-B0CDxzS1.js} +1 -1
- package/dist/client/assets/{constants-DjiHYs3d.js → constants-CBodG1Pl.js} +1 -1
- package/dist/client/assets/{constants-Bv-ydthU.js → constants-fZUl7A6B.js} +1 -1
- package/dist/client/assets/{dialog-CbDVIhlb.js → dialog-CfIcbBij.js} +1 -1
- package/dist/client/assets/{domain-settings-5pXF-wm_.js → domain-settings-Bz-lXZFn.js} +1 -1
- package/dist/client/assets/{drawer-BmeDjX1X.js → drawer-D0hdbn63.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BfGuGlIh.js → dropdown-menu-Cye9zjaV.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BodX3cKc.js → dynamic-plugin-layout-DyEJh8Ah.js} +1 -1
- package/dist/client/assets/{empty-state-Bmk-UZeD.js → empty-state-Ce0UFiAd.js} +1 -1
- package/dist/client/assets/{empty-state-dX7dSbXx.js → empty-state-KsHmVPO4.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DpnZLfW6.js → extract-connection-data-C_Q81cim.js} +1 -1
- package/dist/client/assets/{features-B6zSQU4N.js → features-UEpssbRc.js} +1 -1
- package/dist/client/assets/{form-Bp7QYVLp.js → form-Bt1yLlZE.js} +1 -1
- package/dist/client/assets/{general-CwdchWiq.js → general-CX6SxsSV.js} +1 -1
- package/dist/client/assets/{github-repo-picker-iNFjYstD.js → github-repo-picker-4y_CmSBW.js} +1 -1
- package/dist/client/assets/{index-Bren1GGu.js → index-B5IXTINZ.js} +1 -1
- package/dist/client/assets/{index-CC820IDY.js → index-BdMwcoDn.js} +1 -1
- package/dist/client/assets/{index-EeoXzNpy.js → index-BqvsnDAu.js} +1 -1
- package/dist/client/assets/{index-BHs8YvDv.js → index-C1JqC4-z.js} +1 -1
- package/dist/client/assets/{index-B0QzmEJF.js → index-Cf59DRJ6.js} +1 -1
- package/dist/client/assets/{index-n7SSrZJX.js → index-D7IIXROb.js} +2 -2
- package/dist/client/assets/{index-CtxpjU_s.js → index-DP75UHA3.js} +1 -1
- package/dist/client/assets/{index-B2N3AyqY.js → index-DTSAQq_o.js} +26 -26
- package/dist/client/assets/{index-B5cVztKY.js → index-DU8sxbAO.js} +1 -1
- package/dist/client/assets/{index-BsNTGYXY.js → index-DtTftwEv.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BvBE16xD.js → infiniteQueryObserver-CYDDJzdR.js} +1 -1
- package/dist/client/assets/{input-93auOJA-.js → input-C-zd9-6X.js} +1 -1
- package/dist/client/assets/{integration-icon-D1WPsIeS.js → integration-icon-DoWhqWe3.js} +1 -1
- package/dist/client/assets/{label-CDWfKnpv.js → label-B9VSuQAr.js} +1 -1
- package/dist/client/assets/{layout-ALExO3RM.js → layout-BJjatDlM.js} +1 -1
- package/dist/client/assets/{login-Dh8YEJcV.js → login-DMa1Q2q-.js} +1 -1
- package/dist/client/assets/{members-B0H2ICnj.js → members-BOugcvjA.js} +1 -1
- package/dist/client/assets/{monaco-editor-D2WY7je5.js → monaco-editor-Bo3tZIb0.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CuznDVqp.js → monitoring-stats-row-B1bACC1V.js} +1 -1
- package/dist/client/assets/{oauth-callback-BxmH83JY.js → oauth-callback-CIypIDM5.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Dji18vK6.js → oauth-callback-ai-provider-Cx6R_dTa.js} +1 -1
- package/dist/client/assets/{onboarding-DO-aZIsc.js → onboarding-BqheUOWx.js} +1 -1
- package/dist/client/assets/{org-layout-DwQfVG_G.js → org-layout-CZ-JkZR2.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-C0Hb_7ZN.js → org-plugin-layout-BrcX-6Wg.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-DsKgDNt_.js → plugin-empty-state-DrfwC6PK.js} +1 -1
- package/dist/client/assets/{plugin-header-I-VJ7nR-.js → plugin-header-Dv9_QG9M.js} +1 -1
- package/dist/client/assets/{plugin-layout-rZ66K3Mj.js → plugin-layout-BYLLm93H.js} +1 -1
- package/dist/client/assets/{popover-BlhVdyjC.js → popover-BcJ5dkfy.js} +1 -1
- package/dist/client/assets/{profile-ChlGBaRJ.js → profile-BDIFKyuQ.js} +1 -1
- package/dist/client/assets/{project-app-view-CxGV0sjn.js → project-app-view-Dmfqsj8y.js} +1 -1
- package/dist/client/assets/registry-DWmg34NR.js +2 -0
- package/dist/client/assets/{registry-layout-fy1D5wVh.js → registry-layout-CcQfrJPf.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D3LKevpJ.js → required-auth-layout-C8vP14ZM.js} +1 -1
- package/dist/client/assets/{reset-password-Cl6OUHwF.js → reset-password-Cx8pIjDB.js} +1 -1
- package/dist/client/assets/{roles-BZIugQbX.js → roles-V2PuVErH.js} +1 -1
- package/dist/client/assets/{scroll-area-DjI8JrA4.js → scroll-area-BJTd57Y3.js} +1 -1
- package/dist/client/assets/{search-input-c4tKbop1.js → search-input-o1N12hd4.js} +1 -1
- package/dist/client/assets/select-model-i86p2wLu.js +4 -0
- package/dist/client/assets/{select-DXPKpbnT.js → select-wye91jBR.js} +1 -1
- package/dist/client/assets/{settings-layout-D5262yUh.js → settings-layout-Bre58uB_.js} +1 -1
- package/dist/client/assets/{settings-section-BlkGvCu3.js → settings-section-C9gADeUy.js} +1 -1
- package/dist/client/assets/{shell-layout-DhpXypjS.js → shell-layout-BkODIfEq.js} +1 -1
- package/dist/client/assets/{skeleton-BK_N4aC7.js → skeleton-DRv0yCtF.js} +1 -1
- package/dist/client/assets/{sso-BtozqQ30.js → sso-DZp-3maq.js} +1 -1
- package/dist/client/assets/{store-DyctnerN.js → store-CN0vQifq.js} +1 -1
- package/dist/client/assets/store-registry-BObCKoqP.js +2 -0
- package/dist/client/assets/{switch-CrF-gMSq.js → switch-PbUvXBwc.js} +1 -1
- package/dist/client/assets/{table-C8OGdLdI.js → table-Vdrlqd3N.js} +1 -1
- package/dist/client/assets/{tabs-C_BS-m5A.js → tabs-CMVGP6Nm.js} +1 -1
- package/dist/client/assets/{task-status-Cm6Qp7d4.js → task-status-Cc80uZAM.js} +1 -1
- package/dist/client/assets/{textarea-Bx9ByRsd.js → textarea-CFCCYt2a.js} +1 -1
- package/dist/client/assets/{toggle-group-3sydXp-E.js → toggle-group-C7CndFhA.js} +1 -1
- package/dist/client/assets/{tools-list-CBTIdi20.js → tools-list-Kw0AITzg.js} +1 -1
- package/dist/client/assets/{types-CZtgPZDT.js → types-CfADcGn6.js} +1 -1
- package/dist/client/assets/{use-ai-providers-D498L3pM.js → use-ai-providers-BH0Y2Lij.js} +1 -1
- package/dist/client/assets/{use-collections-CtCWr_i-.js → use-collections-BosUNiJP.js} +1 -1
- package/dist/client/assets/{use-connection-BNJDlOt9.js → use-connection-BHgGmTOA.js} +1 -1
- package/dist/client/assets/{use-copy-CogZRw7t.js → use-copy-D6qOpdpT.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BZbpQ7wy.js → use-create-virtual-mcp-Cx6IqxLi.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CGP9dkEP.js → use-decopilot-events-Bw4kdPRS.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DnC4oqeg.js → use-delete-connection-BNbEYahP.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BDcVHuzE.js → use-infinite-scroll-omTMTmB1.js} +1 -1
- package/dist/client/assets/{use-list-state-DhCZMYGi.js → use-list-state-BiBwgFiI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BtNM-5qj.js → use-mcp-tools-jeaH_mio.js} +1 -1
- package/dist/client/assets/{use-members-BhnMtyBX.js → use-members-BR83cmtt.js} +1 -1
- package/dist/client/assets/{use-mobile-BP1wV0Dh.js → use-mobile-CrP2KZis.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Bl8tivkk.js → use-navigate-to-agent-C3zfnZck.js} +1 -1
- package/dist/client/assets/{use-org-sso-BURT85r2.js → use-org-sso-Bp80Qjb5.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DFb5kpIb.js → use-organization-roles-BV6xrqqH.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DOx6Mt6y.js → use-organization-settings-qZ1AM5bR.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BnhgPbEO.js → use-registry-connections-4TVYi7-o.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DfEYCKF7.js → use-status-sounds-DOhvVAtI.js} +1 -1
- package/dist/client/assets/{use-tasks-CpxN0ye6.js → use-tasks-Cd7MvMgt.js} +1 -1
- package/dist/client/assets/{use-view-mode-CXzkxsjO.js → use-view-mode-BtY__6eQ.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CXDuGiqH.js → use-virtual-mcp-BUyveTe6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-c3E-w9DY.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-D705BqvF.js +1 -0
- package/dist/client/assets/{user-DzVhNpqN.js → user-DgdWVRpj.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DPCyIr82.js → view-mode-toggle-D2WG_Euq.js} +1 -1
- package/dist/client/assets/{workflow-CdQVYV4Q.js → workflow-DRs0QH0L.js} +1 -1
- package/dist/client/assets/workflow-detail-B8_Px7_-.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +393 -393
- package/dist/server/migrate.js +132 -132
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/{postgres-bytea/license → xtend/LICENSE} +1 -2
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/ai-providers-CbLrb_N0.js +0 -1
- package/dist/client/assets/ai-providers-logos-CS4PCiqI.js +0 -1
- package/dist/client/assets/registry-Fsu61we3.js +0 -2
- package/dist/client/assets/select-model-_tj2LEO8.js +0 -4
- package/dist/client/assets/store-registry-Iir3u5ll.js +0 -2
- package/dist/client/assets/useInfiniteQuery-CJd90n7M.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CJSBGdra.js +0 -1
- package/dist/client/assets/workflow-detail-BXw4DQr0.js +0 -1
- package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
- package/dist/server/node_modules/mimic-fn/index.js +0 -13
- package/dist/server/node_modules/mimic-fn/license +0 -9
- package/dist/server/node_modules/mimic-fn/package.json +0 -42
- package/dist/server/node_modules/mimic-fn/readme.md +0 -69
- package/dist/server/node_modules/pg-int8/LICENSE +0 -13
- package/dist/server/node_modules/pg-int8/README.md +0 -16
- package/dist/server/node_modules/pg-int8/index.js +0 -100
- package/dist/server/node_modules/pg-int8/package.json +0 -24
- package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
- package/dist/server/node_modules/postgres-array/index.js +0 -97
- package/dist/server/node_modules/postgres-array/license +0 -21
- package/dist/server/node_modules/postgres-array/package.json +0 -35
- package/dist/server/node_modules/postgres-array/readme.md +0 -43
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
- package/dist/server/node_modules/postgres-interval/index.js +0 -125
- package/dist/server/node_modules/postgres-interval/license +0 -21
- package/dist/server/node_modules/postgres-interval/package.json +0 -36
- package/dist/server/node_modules/postgres-interval/readme.md +0 -48
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as t,j as i}from"./index-n7SSrZJX.js";import{O as m}from"./select-model-_tj2LEO8.js";import"./checkbox-BEdGbH_8.js";import"./ChevronDown-DfsMdmf4.js";import"./input-93auOJA-.js";import"./dialog-CbDVIhlb.js";import"./X-B94SYTq6.js";import"./drawer-BmeDjX1X.js";import"./use-mobile-BP1wV0Dh.js";import"./select-DXPKpbnT.js";import"./ChevronUp-CD4XJT02.js";import"./skeleton-BK_N4aC7.js";import"./Tool01-CuCSRQWJ.js";import"./RefreshCcw01-BvVeeLFE.js";import"./SearchMd-CnSMs6Gr.js";import"./Settings02-bYDpmczV.js";import"./use-ai-providers-D498L3pM.js";import"./constants-Bv-ydthU.js";import"./chat-context-DcUrkBB6.js";import"./use-virtual-mcp-CXDuGiqH.js";import"./use-collections-CtCWr_i-.js";import"./use-decopilot-events-CGP9dkEP.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-CpxN0ye6.js";import"./use-organization-settings-DOx6Mt6y.js";import"./ai-providers-logos-CS4PCiqI.js";import"./Zap-DbOUQQao.js";import"./AlertCircle-DvPnQfC5.js";import"./CheckCircle-4_rcsB70.js";import"./Trash01-J7CgYdQ6.js";import"./index-B5cVztKY.js";import"./settings-section-BlkGvCu3.js";import"./card-BLtPWaiK.js";import"./ArrowUpRight-CuQjuTVk.js";import"./switch-CrF-gMSq.js";import"./toggle-group-3sydXp-E.js";import"./avatar-BIm7SPe1.js";import"./User01-BgWj-XfO.js";import"./alert-dialog-DUehP6wO.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function T(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{T as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const c="https://assets.decocache.com/decocms/bc2ca488-2bae-4aac-8d3e-ead262dad764/agent.png",d="https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",o="https://assets.decocache.com/decocms/51a209ae-14bc-4b6f-8216-8eb670695bd7/Anthropic-Icon--Streamline-Svg-Logos.svg";function t(e){const s=e.modelId.includes("/")?e.modelId.split("/")[0]:null;return s&&a[s]||a[e.providerId]||c}const a={"aion-labs":"https://assets.decocache.com/decocms/6da18da8-0160-4b85-8bca-84eefffebe12/images-(6).png",ai21:"https://assets.decocache.com/decocms/5d8388e9-027b-4b23-b816-90cee1cd28ad/images-(5).png",alfredpros:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",alibaba:"https://assets.decocache.com/decocms/4d113b13-5412-4d3b-96ec-3c2e7c1f7a5f/images-(8).png",allenai:"https://assets.decocache.com/decocms/21d6071a-e0da-4919-9f35-902b1d0b85b8/allen.png",alpindale:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",amazon:"https://assets.decocache.com/decocms/31e7b260-6cf0-4753-bb32-bd062b15c5f1/Amazon_icon.png",anthropic:o,"claude-code":"https://assets.decocache.com/decocms/2b91e6f8-5151-4b4f-bdf9-037ee769e6ff/Claude_AI_symbol.svg.png",codex:"https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png","anthracite-org":c,"arcee-ai":"https://assets.decocache.com/decocms/ee325839-6acc-48dc-8cf7-8bab74698015/126496414.png",baidu:"https://assets.decocache.com/decocms/cf4c19f1-39b5-499e-87b7-e16dc5da2b50/images-(9).png",bytedance:"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png","bytedance-seed":"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png",cognitivecomputations:c,cohere:"https://assets.decocache.com/decocms/c942091b-b3bf-4c46-af37-fc2c1086d9f7/cohere-color.png",deepcogito:"https://assets.decocache.com/decocms/4ee77a8f-a36a-4933-8cdf-d2e8676b88d8/images-(13).png",deepseek:"https://assets.decocache.com/decocms/3611e8ac-4cad-4b0e-a1f8-8f791288ce03/images-(1).png",eleutherai:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",essentialai:"https://assets.decocache.com/decocms/c5afc6de-1e41-457e-a6dd-91810d92541e/images-(1).jpeg",google:"https://assets.decocache.com/webdraw/17df85af-1578-42ef-ae07-4300de0d1723/gemini.svg",gryphe:"https://assets.decocache.com/decocms/a5503d3b-2056-47f2-a76c-611b7416bdc8/6798c7dccaaadd0a1318d66a_66f41d1fd146c3b0b9c76453_gryphe-logo.webp","ibm-granite":"https://assets.decocache.com/decocms/2c50018d-6f70-472d-be30-65a5e8e249f0/images-(10).png",inflection:c,inception:"https://assets.decocache.com/decocms/ff9822b8-a914-482b-bd7d-b0e46b9d5a56/images-(6).jpeg",kwaipilot:"https://assets.decocache.com/decocms/cd576e1d-1184-45ba-8162-cf2bd06d684f/images-(14).png",liquid:c,mancer:"https://assets.decocache.com/decocms/79762356-a0c5-4546-b268-ad4a0b51db51/Screenshot-2026-01-08-at-18.49.42.png",meituan:c,"meta-llama":"https://assets.decocache.com/decocms/56421cb3-488c-4cc3-83a5-16d9a303850e/images-(11).png",microsoft:"https://assets.decocache.com/decocms/0e352a51-4ea5-4f35-802e-fd82bf266683/images-(12).png",minimax:"https://assets.decocache.com/decocms/f362cc4f-7ccc-4317-afda-92e6f348fdfd/images-(2).png",mistralai:"https://assets.decocache.com/decocms/73ab9971-bbbc-40dc-99a3-5fddd9a0f340/images-(3).png",morph:c,moonshotai:"https://assets.decocache.com/decocms/b8abfea7-e8b4-4b72-b653-fdf11c9e3b66/moonshot.png",neversleep:c,"nex-agi":"https://assets.decocache.com/decocms/d2ada265-160d-4959-981d-e90210d71713/241570229.jpeg",nousresearch:"https://assets.decocache.com/decocms/496acb3d-9b5d-4759-b764-16c9ca7eb6b2/nousresearch.png",nvidia:"https://assets.decocache.com/decocms/ecca3238-fa79-4648-bb55-738f13a4293f/nvidia-7.svg",opengvlab:"https://assets.decocache.com/decocms/fb2d0c32-85f1-410a-87f4-9731dfafd248/images-(2).jpeg",openai:"https://assets.decocache.com/webdraw/15dc381c-23b4-4f6b-9ceb-9690f77a7cf5/openai.svg",openrouter:d,perplexity:"https://assets.decocache.com/decocms/3a134746-f370-4089-a3c9-fe545be0441c/images-(15).png","prime-intellect":c,qwen:"https://assets.decocache.com/decocms/ab94208c-4439-4aec-a06c-c51747120e43/Qwen_logo.svg.png",raifle:c,relace:"https://assets.decocache.com/decocms/c5dbae73-3ce0-40ca-8433-c38783fb13a9/Screenshot-2026-01-08-at-18.52.09.png",sao10k:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png","stepfun-ai":"https://assets.decocache.com/decocms/8892b883-4905-444e-b554-648565dc7fab/images-(16).png",switchpoint:"https://assets.decocache.com/decocms/0319d595-e0dd-4d8e-a0a3-b20ff4cbddcb/images-(4).jpeg",tencent:"https://assets.decocache.com/decocms/80f2f7bd-f9ea-4fcf-b89c-c58823a389ed/images-(3).jpeg",thedrummer:"https://assets.decocache.com/decocms/5c6c09fc-cf9d-43a1-a1c3-4a1ef367b824/images-(17).png",thudm:c,tngtech:"https://assets.decocache.com/decocms/5b5648ad-f858-4687-b67b-212cf186b62d/images-(7).png",undi95:c,xiaomi:"https://assets.decocache.com/decocms/2d7191b7-fc80-4867-a431-6d443d691cfc/images-(4).png","x-ai":"https://assets.decocache.com/webdraw/7a8003ff-8f2d-4988-8693-3feb20e87eca/xai.svg","z-ai":"https://assets.decocache.com/decocms/12a0877f-c978-4880-88d1-09097e606e2f/Z.ai_(company_logo).svg.png"};export{c as D,a as P,t as g};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-fy1D5wVh.js","assets/index-n7SSrZJX.js","assets/index-BHUL0rr0.css","assets/ArrowNarrowLeft-BKxpVLR_.js","assets/CheckCircle-4_rcsB70.js","assets/Container-BcAiX456.js","assets/Settings02-bYDpmczV.js","assets/XCircle-CV0L9GR_.js","assets/constants-Bv-ydthU.js","assets/useInfiniteQuery-CJd90n7M.js","assets/infiniteQueryObserver-BvBE16xD.js","assets/badge-CtBsPi0r.js","assets/input-93auOJA-.js","assets/dropdown-menu-BfGuGlIh.js","assets/ChevronDown-DfsMdmf4.js","assets/ChevronRight-CVhRkUc0.js","assets/DotsVertical-e4sJs2sy.js","assets/table-C8OGdLdI.js","assets/toggle-group-3sydXp-E.js","assets/use-view-mode-CXzkxsjO.js","assets/use-mobile-BP1wV0Dh.js","assets/SearchMd-CnSMs6Gr.js","assets/dialog-CbDVIhlb.js","assets/X-B94SYTq6.js","assets/AlertCircle-DvPnQfC5.js","assets/alert-dialog-DUehP6wO.js","assets/card-BLtPWaiK.js","assets/Trash01-J7CgYdQ6.js","assets/label-CDWfKnpv.js","assets/select-DXPKpbnT.js","assets/ChevronUp-CD4XJT02.js","assets/switch-CrF-gMSq.js","assets/textarea-Bx9ByRsd.js","assets/RefreshCcw01-BvVeeLFE.js","assets/checkbox-BEdGbH_8.js","assets/LinkExternal01-M3Y1_vaI.js","assets/use-copy-CogZRw7t.js","assets/Plus-BR3le3XA.js","assets/Play-CrMiqzaH.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as a,j as t,r,l as i,aE as o}from"./index-n7SSrZJX.js";const n=r.lazy(()=>o(()=>import("./registry-layout-fy1D5wVh.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])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{r as O,J as pt,v as se,y as z,aK as Se,aI as je,a_ as Ne,aJ as ke,e as K,j as l,E as $e,s as ie,o as ge,a as le,K as X,n as Be,c as oe,x as _e,w as we,z as Y,aB as ve,t as Z,B as te,aD as Ue,u as gt,f as bt,D as vt}from"./index-n7SSrZJX.js";import{C as yt}from"./checkbox-BEdGbH_8.js";import{I as ne}from"./input-93auOJA-.js";import{d as Ve,c as We,a as jt,D as qe,e as St,b as He,h as Nt}from"./dialog-CbDVIhlb.js";import{g as _t,a as wt,b as Ct,c as It}from"./drawer-BmeDjX1X.js";import{u as kt}from"./use-mobile-BP1wV0Dh.js";import{a as Et,c as Mt,d as At,S as Ot,b as Tt}from"./select-DXPKpbnT.js";import{S as q}from"./skeleton-BK_N4aC7.js";import{i as Rt,t as Pt,b as zt,a as Ft,c as Lt}from"./Tool01-CuCSRQWJ.js";import{b as Qe,s as Ge,c as Dt,a as Kt,i as $t}from"./RefreshCcw01-BvVeeLFE.js";import{t as Ee}from"./ChevronDown-DfsMdmf4.js";import{a as Ye,i as Xe}from"./SearchMd-CnSMs6Gr.js";import{a as Bt}from"./Settings02-bYDpmczV.js";import{u as ae,b as Je,a as he}from"./use-ai-providers-D498L3pM.js";import{p as Me,u as Ze}from"./chat-context-DcUrkBB6.js";import{g as Ce}from"./ai-providers-logos-CS4PCiqI.js";import{i as Ut}from"./Zap-DbOUQQao.js";import{i as Vt}from"./AlertCircle-DvPnQfC5.js";import{i as Wt}from"./CheckCircle-4_rcsB70.js";import{s as qt}from"./Trash01-J7CgYdQ6.js";import{P as fe}from"./index-B5cVztKY.js";import{d as Ht,S as xe,a as pe,b as ue}from"./settings-section-BlkGvCu3.js";import{S as Qt}from"./switch-CrF-gMSq.js";import{a as Ae,T as Gt}from"./toggle-group-3sydXp-E.js";import{A as Yt}from"./avatar-BIm7SPe1.js";import{c as et,b as tt,d as st,A as lt,e as it,g as nt,a as ot,f as rt}from"./alert-dialog-DUehP6wO.js";import{S as ce,u as de}from"./constants-Bv-ydthU.js";import{e as Xt,f as Jt}from"./use-organization-settings-DOx6Mt6y.js";import{f as Zt}from"./formatDistanceToNow-Cb2QZZJn.js";import{u as es}from"./unwrap-tool-result-BYXdCQMg.js";function re(t,e,s){let n=s.initialDeps??[],i,o=!0;function a(){var r,d,m;let c;s.key&&((r=s.debug)!=null&&r.call(s))&&(c=Date.now());const h=t();if(!(h.length!==n.length||h.some((j,b)=>n[b]!==j)))return i;n=h;let f;if(s.key&&((d=s.debug)!=null&&d.call(s))&&(f=Date.now()),i=e(...h),s.key&&((m=s.debug)!=null&&m.call(s))){const j=Math.round((Date.now()-c)*100)/100,b=Math.round((Date.now()-f)*100)/100,_=b/16,N=(x,p)=>{for(x=String(x);x.length<p;)x=" "+x;return x};console.info(`%c⏱ ${N(b,5)} /${N(j,5)} ms`,`
|
|
2
|
-
font-size: .6rem;
|
|
3
|
-
font-weight: bold;
|
|
4
|
-
color: hsl(${Math.max(0,Math.min(120-120*_,120))}deg 100% 31%);`,s?.key)}return s?.onChange&&!(o&&s.skipInitialOnChange)&&s.onChange(i),o=!1,i}return a.updateDeps=r=>{n=r},a}function Oe(t,e){if(t===void 0)throw new Error("Unexpected undefined");return t}const ts=(t,e)=>Math.abs(t-e)<1.01,ss=(t,e,s)=>{let n;return function(...i){t.clearTimeout(n),n=t.setTimeout(()=>e.apply(this,i),s)}},Te=t=>{const{offsetWidth:e,offsetHeight:s}=t;return{width:e,height:s}},ls=t=>t,is=t=>{const e=Math.max(t.startIndex-t.overscan,0),s=Math.min(t.endIndex+t.overscan,t.count-1),n=[];for(let i=e;i<=s;i++)n.push(i);return n},ns=(t,e)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;const i=a=>{const{width:r,height:d}=a;e({width:Math.round(r),height:Math.round(d)})};if(i(Te(s)),!n.ResizeObserver)return()=>{};const o=new n.ResizeObserver(a=>{const r=()=>{const d=a[0];if(d?.borderBoxSize){const m=d.borderBoxSize[0];if(m){i({width:m.inlineSize,height:m.blockSize});return}}i(Te(s))};t.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return o.observe(s,{box:"border-box"}),()=>{o.unobserve(s)}},Re={passive:!0},Pe=typeof window>"u"?!0:"onscrollend"in window,os=(t,e)=>{const s=t.scrollElement;if(!s)return;const n=t.targetWindow;if(!n)return;let i=0;const o=t.options.useScrollendEvent&&Pe?()=>{}:ss(n,()=>{e(i,!1)},t.options.isScrollingResetDelay),a=c=>()=>{const{horizontal:h,isRtl:u}=t.options;i=h?s.scrollLeft*(u&&-1||1):s.scrollTop,o(),e(i,c)},r=a(!0),d=a(!1);s.addEventListener("scroll",r,Re);const m=t.options.useScrollendEvent&&Pe;return m&&s.addEventListener("scrollend",d,Re),()=>{s.removeEventListener("scroll",r),m&&s.removeEventListener("scrollend",d)}},rs=(t,e,s)=>{if(e?.borderBoxSize){const n=e.borderBoxSize[0];if(n)return Math.round(n[s.options.horizontal?"inlineSize":"blockSize"])}return t[s.options.horizontal?"offsetWidth":"offsetHeight"]},as=(t,{adjustments:e=0,behavior:s},n)=>{var i,o;const a=t+e;(o=(i=n.scrollElement)==null?void 0:i.scrollTo)==null||o.call(i,{[n.options.horizontal?"left":"top"]:a,behavior:s})};class cs{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var s,n,i;return((i=(n=(s=this.targetWindow)==null?void 0:s.performance)==null?void 0:n.now)==null?void 0:i.call(n))??Date.now()},this.observer=(()=>{let s=null;const n=()=>s||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:s=new this.targetWindow.ResizeObserver(i=>{i.forEach(o=>{const a=()=>{const r=o.target,d=this.indexFromElement(r);if(!r.isConnected){this.observer.unobserve(r);return}this.shouldMeasureDuringScroll(d)&&this.resizeItem(d,this.options.measureElement(r,o,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var i;(i=n())==null||i.disconnect(),s=null},observe:i=>{var o;return(o=n())==null?void 0:o.observe(i,{box:"border-box"})},unobserve:i=>{var o;return(o=n())==null?void 0:o.unobserve(i)}}})(),this.range=null,this.setOptions=s=>{Object.entries(s).forEach(([n,i])=>{typeof i>"u"&&delete s[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:ls,rangeExtractor:is,onChange:()=>{},measureElement:rs,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...s}},this.notify=s=>{var n,i;(i=(n=this.options).onChange)==null||i.call(n,this,s)},this.maybeNotify=re(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),s=>{this.notify(s)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(s=>s()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var s;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((s=this.scrollElement)==null?void 0:s.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=o,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(s,n)=>{const i=new Map,o=new Map;for(let a=n-1;a>=0;a--){const r=s[a];if(i.has(r.lane))continue;const d=o.get(r.lane);if(d==null||r.end>d.end?o.set(r.lane,r):r.end<d.end&&i.set(r.lane,!0),i.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((a,r)=>a.end===r.end?a.index-r.index:a.end-r.end)[0]:void 0},this.getMeasurementOptions=re(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(s,n,i,o,a,r,d)=>(this.prevLanes!==void 0&&this.prevLanes!==r&&(this.lanesChangedFlag=!0),this.prevLanes=r,this.pendingMeasuredCacheIndexes=[],{count:s,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:r,laneAssignmentMode:d}),{key:!1}),this.getMeasurements=re(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:s,paddingStart:n,scrollMargin:i,getItemKey:o,enabled:a,lanes:r,laneAssignmentMode:d},m)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>s)for(const f of this.laneAssignments.keys())f>=s&&this.laneAssignments.delete(f);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(f=>{this.itemSizeCache.set(f.key,f.size)}));const c=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===s&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,c),u=new Array(r).fill(void 0);for(let f=0;f<c;f++){const j=h[f];j&&(u[j.lane]=f)}for(let f=c;f<s;f++){const j=o(f),b=this.laneAssignments.get(f);let _,N;const x=d==="estimate"||m.has(j);if(b!==void 0&&this.options.lanes>1){_=b;const g=u[_],y=g!==void 0?h[g]:void 0;N=y?y.end+this.options.gap:n+i}else{const g=this.options.lanes===1?h[f-1]:this.getFurthestMeasurement(h,f);N=g?g.end+this.options.gap:n+i,_=g?g.lane:f%this.options.lanes,this.options.lanes>1&&x&&this.laneAssignments.set(f,_)}const p=m.get(j),v=typeof p=="number"?p:this.options.estimateSize(f),w=N+v;h[f]={index:f,start:N,size:v,end:w,key:j,lane:_},u[_]=f}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=re(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(s,n,i,o)=>this.range=s.length>0&&n>0?ds({measurements:s,outerSize:n,scrollOffset:i,lanes:o}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=re(()=>{let s=null,n=null;const i=this.calculateRange();return i&&(s=i.startIndex,n=i.endIndex),this.maybeNotify.updateDeps([this.isScrolling,s,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,s,n]},(s,n,i,o,a)=>o===null||a===null?[]:s({startIndex:o,endIndex:a,overscan:n,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=s=>{const n=this.options.indexAttribute,i=s.getAttribute(n);return i?parseInt(i,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=s=>{var n;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const i=this.scrollState.index??((n=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:n.index);if(i!==void 0&&this.range){const o=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),a=Math.max(0,i-o),r=Math.min(this.options.count-1,i+o);return s>=a&&s<=r}return!0},this.measureElement=s=>{if(!s){this.elementsCache.forEach((a,r)=>{a.isConnected||(this.observer.unobserve(a),this.elementsCache.delete(r))});return}const n=this.indexFromElement(s),i=this.options.getItemKey(n),o=this.elementsCache.get(i);o!==s&&(o&&this.observer.unobserve(o),this.observer.observe(s),this.elementsCache.set(i,s)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(s,void 0,this))},this.resizeItem=(s,n)=>{var i;const o=this.measurementsCache[s];if(!o)return;const a=this.itemSizeCache.get(o.key)??o.size,r=n-a;r!==0&&(((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(o,r,this):o.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(o.index),this.itemSizeCache=new Map(this.itemSizeCache.set(o.key,n)),this.notify(!1))},this.getVirtualItems=re(()=>[this.getVirtualIndexes(),this.getMeasurements()],(s,n)=>{const i=[];for(let o=0,a=s.length;o<a;o++){const r=s[o],d=n[r];i.push(d)}return i},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=s=>{const n=this.getMeasurements();if(n.length!==0)return Oe(n[at(0,n.length-1,i=>Oe(n[i]).start,s)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const s=this.scrollElement.document.documentElement;return this.options.horizontal?s.scrollWidth-this.scrollElement.innerWidth:s.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(s,n,i=0)=>{if(!this.scrollElement)return 0;const o=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=s>=a+o?"end":"start"),n==="center"?s+=(i-o)/2:n==="end"&&(s-=o);const r=this.getMaxScrollOffset();return Math.max(Math.min(r,s),0)},this.getOffsetForIndex=(s,n="auto")=>{s=Math.max(0,Math.min(s,this.options.count-1));const i=this.getSize(),o=this.getScrollOffset(),a=this.measurementsCache[s];if(!a)return;if(n==="auto")if(a.end>=o+i-this.options.scrollPaddingEnd)n="end";else if(a.start<=o+this.options.scrollPaddingStart)n="start";else return[o,n];if(n==="end"&&s===this.options.count-1)return[this.getMaxScrollOffset(),n];const r=n==="end"?a.end+this.options.scrollPaddingEnd:a.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,n,a.size),n]},this.scrollToOffset=(s,{align:n="start",behavior:i="auto"}={})=>{const o=this.getOffsetForAlignment(s,n),a=this.now();this.scrollState={index:null,align:n,behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToIndex=(s,{align:n="auto",behavior:i="auto"}={})=>{s=Math.max(0,Math.min(s,this.options.count-1));const o=this.getOffsetForIndex(s,n);if(!o)return;const[a,r]=o,d=this.now();this.scrollState={index:s,align:r,behavior:i,startedAt:d,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollBy=(s,{behavior:n="auto"}={})=>{const i=this.getScrollOffset()+s,o=this.now();this.scrollState={index:null,align:"start",behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var s;const n=this.getMeasurements();let i;if(n.length===0)i=this.options.paddingStart;else if(this.options.lanes===1)i=((s=n[n.length-1])==null?void 0:s.end)??0;else{const o=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&o.some(r=>r===null);){const r=n[a];o[r.lane]===null&&(o[r.lane]=r.end),a--}i=Math.max(...o.filter(r=>r!==null))}return Math.max(i-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(s,{adjustments:n,behavior:i})=>{this.options.scrollToFn(s,{behavior:i,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const n=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,i=n?n[0]:this.scrollState.lastTargetOffset,o=1,a=i!==this.scrollState.lastTargetOffset;if(!a&&ts(i,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=o){this.scrollState=null;return}}else this.scrollState.stableFrames=0,a&&(this.scrollState.lastTargetOffset=i,this.scrollState.behavior="auto",this._scrollToOffset(i,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const at=(t,e,s,n)=>{for(;t<=e;){const i=(t+e)/2|0,o=s(i);if(o<n)t=i+1;else if(o>n)e=i-1;else return i}return t>0?t-1:0};function ds({measurements:t,outerSize:e,scrollOffset:s,lanes:n}){const i=t.length-1,o=d=>t[d].start;if(t.length<=n)return{startIndex:0,endIndex:i};let a=at(0,i,o,s),r=a;if(n===1)for(;r<i&&t[r].end<s+e;)r++;else if(n>1){const d=Array(n).fill(0);for(;r<i&&d.some(c=>c<s+e);){const c=t[r];d[c.lane]=c.end,r++}const m=Array(n).fill(s+e);for(;a>=0&&m.some(c=>c>=s);){const c=t[a];m[c.lane]=c.start,a--}a=Math.max(0,a-a%n),r=Math.min(i,r+(n-1-r%n))}return{startIndex:a,endIndex:r}}const ze=typeof document<"u"?O.useLayoutEffect:O.useEffect;function ms({useFlushSync:t=!0,...e}){const s=O.useReducer(()=>({}),{})[1],n={...e,onChange:(o,a)=>{var r;t&&a?pt.flushSync(s):s(),(r=e.onChange)==null||r.call(e,o,a)}},[i]=O.useState(()=>new cs(n));return i.setOptions(n),ze(()=>i._didMount(),[]),ze(()=>i._willUpdate()),i}function us(t){return ms({observeElementRect:ns,observeElementOffset:os,scrollToFn:as,...t})}se({title:z(),url:z(),icon:z()});se({registries:je(z(),se({enabled:Ne()})).describe("Per-registry enabled/disabled state. Key is connection ID. Absent registries are treated as enabled."),blockedMcps:Se(z()).describe("List of MCP app_name or app_id values to hide from the store.")});const me=se({keyId:z(),modelId:z(),title:z().optional()}).nullable(),hs=se({enabled:Ne(),chat:se({fast:me,smart:me,thinking:me}),image:me,webResearch:me});se({ids:Se(z()).describe("Ordered list of agent ids to show on the home view. Mix of well-known template ids and custom virtual MCP ids.")});se({id:z().describe("Brand context ID"),name:z().describe("Company name"),domain:z().describe("Company domain (e.g. example.com)"),overview:z().describe("Company overview / description"),logo:z().nullable().optional().describe("Logo URL"),favicon:z().nullable().optional().describe("Favicon URL"),ogImage:z().nullable().optional().describe("OG image URL"),fonts:se({heading:z().optional().describe("Font family for headings"),body:z().optional().describe("Font family for body text"),code:z().optional().describe("Font family for code / monospace")}).nullable().optional().describe("Font families by semantic role"),colors:se({primary:z().optional().describe("Primary brand color (hex)"),secondary:z().optional().describe("Secondary brand color (hex)"),accent:z().optional().describe("Accent / highlight color (hex)"),background:z().optional().describe("Background color (hex)"),foreground:z().optional().describe("Foreground / text color (hex)")}).nullable().optional().describe("Semantic color palette"),images:Se(je(z(),ke())).nullable().optional().describe("Brand images"),metadata:je(z(),ke()).nullable().optional().describe("Extra design tokens (typography, components, spacing, layout, tone, etc.)"),archivedAt:z().nullable().optional().describe("Archive timestamp (null to unarchive)"),isDefault:Ne().optional().describe("Whether this is the default brand for the organization")});function fs(t){const e=K.c(3),{error:s}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Vt,{size:16}),e[0]=n):n=e[0];let i;return e[1]!==s.message?(i=l.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[n,l.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",s.message]})]}),e[1]=s.message,e[2]=i):i=e[2],i}function xs(t){const e=K.c(27),{keys:s,onDelete:n,isDeleting:i}=t,[o,a]=O.useState(null);let r;if(e[0]!==o||e[1]!==s){let v;e[3]!==o?(v=w=>w.id===o,e[3]=o,e[4]=v):v=e[4],r=s.find(v),e[0]=o,e[1]=s,e[2]=r}else r=e[2];const d=r;let m;if(e[5]!==i||e[6]!==s){let v;e[8]!==i?(v=w=>l.jsxs("div",{className:"flex items-center justify-between p-2 rounded-md bg-muted/50 text-sm",children:[l.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[l.jsx(Ye,{size:14,className:"text-muted-foreground shrink-0"}),l.jsx("span",{className:"font-medium truncate",children:w.label}),l.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["added ",Zt(new Date(w.createdAt))," ago"]})]}),l.jsx("div",{onClick:gs,children:l.jsx(te,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",disabled:i,onClick:()=>a(w.id),children:l.jsx(qt,{size:14})})})]},w.id),e[8]=i,e[9]=v):v=e[9],m=s.map(v),e[5]=i,e[6]=s,e[7]=m}else m=e[7];const c=!!o;let h;e[10]===Symbol.for("react.memo_cache_sentinel")?(h=v=>!v&&a(null),e[10]=h):h=e[10];let u;e[11]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(et,{children:"Delete API Key"}),e[11]=u):u=e[11];const f=d?.label;let j;e[12]!==f?(j=l.jsxs(tt,{children:[u,l.jsxs(st,{children:["This action cannot be undone. This will permanently delete"," ",l.jsx("span",{className:"font-medium text-foreground",children:f}),"."]})]}),e[12]=f,e[13]=j):j=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=l.jsx(lt,{children:"Cancel"}),e[14]=b):b=e[14];let _;e[15]!==o||e[16]!==n?(_=l.jsxs(it,{children:[b,l.jsx(nt,{onClick:()=>{o&&(n(o),a(null))},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[15]=o,e[16]=n,e[17]=_):_=e[17];let N;e[18]!==j||e[19]!==_?(N=l.jsxs(ot,{onClick:ps,children:[j,_]}),e[18]=j,e[19]=_,e[20]=N):N=e[20];let x;e[21]!==N||e[22]!==c?(x=l.jsx(rt,{open:c,onOpenChange:h,children:N}),e[21]=N,e[22]=c,e[23]=x):x=e[23];let p;return e[24]!==x||e[25]!==m?(p=l.jsxs("div",{className:"flex flex-col gap-2 mt-4",children:[m,x]}),e[24]=x,e[25]=m,e[26]=p):p=e[26],p}function ps(t){return t.stopPropagation()}function gs(t){return t.stopPropagation()}const bs=se({label:z().optional(),apiKey:z().min(1,"API key is required")});function vs(t){const e=K.c(61),{providerId:s,onCancel:n,onSuccess:i}=t,{org:o}=ie();let a;e[0]!==o.id?(a={connectionId:ce,orgId:o.id},e[0]=o.id,e[1]=a):a=e[1];const r=de(a),d=ge(),[m,c]=O.useState(!1);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={resolver:we(bs),defaultValues:{label:"",apiKey:""}},e[2]=h):h=e[2];const{register:u,handleSubmit:f,formState:j}=_e(h),{errors:b}=j;let _;e[3]!==r||e[4]!==s?(_=async H=>{await r.callTool({name:"AI_PROVIDER_KEY_CREATE",arguments:{providerId:s,label:H.label||"Personal key",apiKey:H.apiKey}})},e[3]=r,e[4]=s,e[5]=_):_=e[5];let N;e[6]!==i||e[7]!==o.id||e[8]!==d?(N=()=>{d.invalidateQueries({queryKey:X.aiProviderKeys(o.id)}),d.invalidateQueries({queryKey:X.aiProviders(o.id)}),Y.success("Key saved successfully"),i()},e[6]=i,e[7]=o.id,e[8]=d,e[9]=N):N=e[9];let x;e[10]!==_||e[11]!==N?(x={mutationFn:_,onSuccess:N,onError:ys},e[10]=_,e[11]=N,e[12]=x):x=e[12];const{mutate:p,isPending:v,error:w}=le(x);let g;e[13]!==p?(g=H=>p(H),e[13]=p,e[14]=g):g=e[14];let y;e[15]!==f||e[16]!==g?(y=f(g),e[15]=f,e[16]=g,e[17]=y):y=e[17];let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=l.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),e[18]=C):C=e[18];let E;e[19]!==u?(E=u("label"),e[19]=u,e[20]=E):E=e[20];let I;e[21]!==E?(I=l.jsxs("div",{className:"space-y-1",children:[C,l.jsx(ne,{placeholder:"e.g. Personal key",...E,className:"h-8 text-sm"})]}),e[21]=E,e[22]=I):I=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"API Key"}),e[23]=S):S=e[23];const k=m?"text":"password";let T;e[24]!==u?(T=u("apiKey"),e[24]=u,e[25]=T):T=e[25];let M;e[26]!==k||e[27]!==T?(M=l.jsx(ne,{type:k,placeholder:"sk-...",...T,className:"ph-no-capture h-8 text-sm pr-8"}),e[26]=k,e[27]=T,e[28]=M):M=e[28];let A;e[29]!==m?(A=()=>c(!m),e[29]=m,e[30]=A):A=e[30];let R;e[31]!==m?(R=m?l.jsx(Qe,{size:14}):l.jsx(Ge,{size:14}),e[31]=m,e[32]=R):R=e[32];let P;e[33]!==A||e[34]!==R?(P=l.jsx("button",{type:"button",onClick:A,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:R}),e[33]=A,e[34]=R,e[35]=P):P=e[35];let L;e[36]!==M||e[37]!==P?(L=l.jsxs("div",{className:"relative",children:[M,P]}),e[36]=M,e[37]=P,e[38]=L):L=e[38];let Q;e[39]!==b.apiKey?(Q=b.apiKey&&l.jsx("p",{className:"text-xs text-destructive",children:b.apiKey.message}),e[39]=b.apiKey,e[40]=Q):Q=e[40];let U;e[41]!==L||e[42]!==Q?(U=l.jsxs("div",{className:"space-y-1",children:[S,L,Q]}),e[41]=L,e[42]=Q,e[43]=U):U=e[43];let $;e[44]!==w?($=w&&l.jsx("p",{className:"text-xs text-destructive",children:w.message}),e[44]=w,e[45]=$):$=e[45];let D;e[46]!==v||e[47]!==n?(D=l.jsx(te,{type:"button",variant:"ghost",size:"sm",onClick:n,disabled:v,children:"Cancel"}),e[46]=v,e[47]=n,e[48]=D):D=e[48];const V=v?"Saving...":"Save Key";let B;e[49]!==v||e[50]!==V?(B=l.jsx(te,{type:"submit",size:"sm",disabled:v,children:V}),e[49]=v,e[50]=V,e[51]=B):B=e[51];let W;e[52]!==D||e[53]!==B?(W=l.jsxs(He,{children:[D,B]}),e[52]=D,e[53]=B,e[54]=W):W=e[54];let G;return e[55]!==I||e[56]!==U||e[57]!==$||e[58]!==W||e[59]!==y?(G=l.jsxs("form",{onSubmit:y,className:"space-y-3",children:[I,U,$,W]}),e[55]=I,e[56]=U,e[57]=$,e[58]=W,e[59]=y,e[60]=G):G=e[60],G}function ys(t){Y.error(`Failed to save key: ${t.message}`)}const js=se({label:z().optional(),baseUrl:z().min(1,"Base URL is required"),apiKey:z().optional()});function Ss(t){const e=K.c(66),{onCancel:s,onSuccess:n}=t,{org:i}=ie();let o;e[0]!==i.id?(o={connectionId:ce,orgId:i.id},e[0]=i.id,e[1]=o):o=e[1];const a=de(o),r=ge(),[d,m]=O.useState(!1);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={resolver:we(js),defaultValues:{label:"",baseUrl:"",apiKey:""}},e[2]=c):c=e[2];const{register:h,handleSubmit:u,formState:f}=_e(c),{errors:j}=f;let b;e[3]!==a?(b=async F=>{const J=JSON.stringify({baseUrl:F.baseUrl,apiKey:F.apiKey||""});await a.callTool({name:"AI_PROVIDER_KEY_CREATE",arguments:{providerId:"openai-compatible",label:F.label||F.baseUrl,apiKey:J}})},e[3]=a,e[4]=b):b=e[4];let _;e[5]!==n||e[6]!==i.id||e[7]!==r?(_=()=>{r.invalidateQueries({queryKey:X.aiProviderKeys(i.id)}),r.invalidateQueries({queryKey:X.aiProviders(i.id)}),Y.success("Connection saved successfully"),n()},e[5]=n,e[6]=i.id,e[7]=r,e[8]=_):_=e[8];let N;e[9]!==b||e[10]!==_?(N={mutationFn:b,onSuccess:_,onError:Ns},e[9]=b,e[10]=_,e[11]=N):N=e[11];const{mutate:x,isPending:p,error:v}=le(N);let w;e[12]!==x?(w=F=>x(F),e[12]=x,e[13]=w):w=e[13];let g;e[14]!==u||e[15]!==w?(g=u(w),e[14]=u,e[15]=w,e[16]=g):g=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Label"}),e[17]=y):y=e[17];let C;e[18]!==h?(C=h("label"),e[18]=h,e[19]=C):C=e[19];let E;e[20]!==C?(E=l.jsxs("div",{className:"space-y-1",children:[y,l.jsx(ne,{placeholder:"e.g. LiteLLM, Ollama",...C,className:"h-8 text-sm"})]}),e[20]=C,e[21]=E):E=e[21];let I;e[22]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Base URL"}),e[22]=I):I=e[22];let S;e[23]!==h?(S=h("baseUrl"),e[23]=h,e[24]=S):S=e[24];let k;e[25]!==S?(k=l.jsx(ne,{type:"url",placeholder:"http://localhost:4000/v1",...S,className:"h-8 text-sm"}),e[25]=S,e[26]=k):k=e[26];let T;e[27]!==j.baseUrl?(T=j.baseUrl&&l.jsx("p",{className:"text-xs text-destructive",children:j.baseUrl.message}),e[27]=j.baseUrl,e[28]=T):T=e[28];let M;e[29]!==k||e[30]!==T?(M=l.jsxs("div",{className:"space-y-1",children:[I,k,T]}),e[29]=k,e[30]=T,e[31]=M):M=e[31];let A;e[32]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:["API Key ",l.jsx("span",{className:"text-muted-foreground/60",children:"(optional)"})]}),e[32]=A):A=e[32];const R=d?"text":"password";let P;e[33]!==h?(P=h("apiKey"),e[33]=h,e[34]=P):P=e[34];let L;e[35]!==R||e[36]!==P?(L=l.jsx(ne,{type:R,placeholder:"sk-...",...P,className:"ph-no-capture h-8 text-sm pr-8"}),e[35]=R,e[36]=P,e[37]=L):L=e[37];let Q;e[38]!==d?(Q=()=>m(!d),e[38]=d,e[39]=Q):Q=e[39];let U;e[40]!==d?(U=d?l.jsx(Qe,{size:14}):l.jsx(Ge,{size:14}),e[40]=d,e[41]=U):U=e[41];let $;e[42]!==Q||e[43]!==U?($=l.jsx("button",{type:"button",onClick:Q,className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:U}),e[42]=Q,e[43]=U,e[44]=$):$=e[44];let D;e[45]!==L||e[46]!==$?(D=l.jsxs("div",{className:"space-y-1",children:[A,l.jsxs("div",{className:"relative",children:[L,$]})]}),e[45]=L,e[46]=$,e[47]=D):D=e[47];let V;e[48]!==v?(V=v&&l.jsx("p",{className:"text-xs text-destructive",children:v.message}),e[48]=v,e[49]=V):V=e[49];let B;e[50]!==p||e[51]!==s?(B=l.jsx(te,{type:"button",variant:"ghost",size:"sm",onClick:s,disabled:p,children:"Cancel"}),e[50]=p,e[51]=s,e[52]=B):B=e[52];const W=p?"Saving...":"Save Connection";let G;e[53]!==p||e[54]!==W?(G=l.jsx(te,{type:"submit",size:"sm",disabled:p,children:W}),e[53]=p,e[54]=W,e[55]=G):G=e[55];let H;e[56]!==B||e[57]!==G?(H=l.jsxs(He,{children:[B,G]}),e[56]=B,e[57]=G,e[58]=H):H=e[58];let ee;return e[59]!==E||e[60]!==M||e[61]!==D||e[62]!==V||e[63]!==H||e[64]!==g?(ee=l.jsxs("form",{onSubmit:g,className:"space-y-3",children:[E,M,D,V,H]}),e[59]=E,e[60]=M,e[61]=D,e[62]=V,e[63]=H,e[64]=g,e[65]=ee):ee=e[65],ee}function Ns(t){Y.error(`Failed to save connection: ${t.message}`)}function Fe({provider:t,keys:e}){const{org:s}=ie(),n=de({connectionId:ce,orgId:s.id}),i=ge(),[o,a]=O.useState(!1),[r,d]=O.useState(!1),[m,c]=O.useState(null),h=t.supportedMethods.includes("cli-activate"),u=e.length>0,{mutate:f,isPending:j}=le({mutationFn:async S=>(await n.callTool({name:"AI_PROVIDER_KEY_DELETE",arguments:{keyId:S}}),S),onSuccess:S=>{i.invalidateQueries({queryKey:X.aiProviderKeys(s.id)}),i.invalidateQueries({queryKey:X.aiProviders(s.id)}),i.invalidateQueries({queryKey:X.aiProviderModels(s.id,S)}),Y.success("Key deleted")},onError:S=>{Y.error(`Failed to delete key: ${S.message}`)}}),{mutate:b}=le({mutationFn:async({code:S,stateToken:k})=>{const T=await n.callTool({name:"AI_PROVIDER_OAUTH_EXCHANGE",arguments:{providerId:t.id,code:S,stateToken:k,label:"Connected via OAuth"}});if(T?.isError){const M=T.content?.[0]?.text??"OAuth exchange failed";throw new Error(M)}},onSuccess:()=>{Z("ai_provider_oauth_succeeded",{provider_id:t.id}),i.invalidateQueries({queryKey:X.aiProviderKeys(s.id)}),i.invalidateQueries({queryKey:X.aiProviders(s.id)}),Y.success(`${t.name} connected successfully`),d(!1),c(null)},onError:S=>{Z("ai_provider_oauth_failed",{provider_id:t.id,error:S.message}),Y.error(`OAuth connection failed: ${S.message}`),d(!1),c(null)}}),{mutate:_,isPending:N}=le({mutationFn:async()=>{const S=await n.callTool({name:"AI_PROVIDER_CLI_ACTIVATE",arguments:{providerId:t.id}});if(S?.isError)throw new Error(S.content?.[0]?.text??"CLI activation failed");return S.structuredContent},onSuccess:S=>{if(!S?.activated){Z("ai_provider_cli_activate_failed",{provider_id:t.id,error:S?.error??"unknown"}),Y.error(S?.error??"CLI activation failed");return}Z("ai_provider_cli_activated",{provider_id:t.id}),i.invalidateQueries({queryKey:X.aiProviderKeys(s.id)}),i.invalidateQueries({queryKey:X.aiProviders(s.id)}),Y.success(`${t.name} activated`)},onError:S=>{Z("ai_provider_cli_activate_failed",{provider_id:t.id,error:S.message}),Y.error(S.message)}}),{mutate:x,isPending:p}=le({mutationFn:async()=>{const S=await n.callTool({name:"AI_PROVIDER_PROVISION_KEY",arguments:{providerId:t.id}});if(S?.isError){const k=S.content?.[0]?.text??"Key provisioning failed";throw new Error(k)}},onSuccess:()=>{Z("ai_provider_provision_succeeded",{provider_id:t.id}),i.invalidateQueries({queryKey:X.aiProviderKeys(s.id)}),i.invalidateQueries({queryKey:X.aiProviders(s.id)}),Y.success(`${t.name} connected successfully`)},onError:S=>{Z("ai_provider_provision_failed",{provider_id:t.id,error:S.message}),Y.error(`Failed to connect ${t.name}: ${S.message}`)}});O.useEffect(()=>{if(!r||!m)return;let S=!1;const k=M=>{if(M.origin===window.location.origin&&M.data?.type==="AI_PROVIDER_OAUTH_CALLBACK"){const{code:A,stateToken:R}=M.data;R===m?(S=!0,b({code:A,stateToken:R})):(console.error("State token mismatch"),Y.error("Security check failed: State token mismatch"),d(!1),c(null))}};window.addEventListener("message",k);const T=setTimeout(()=>{S||(Z("ai_provider_oauth_timeout",{provider_id:t.id}),d(!1),c(null),Y.error("Connection timed out"))},12e4);return()=>{window.removeEventListener("message",k),clearTimeout(T)}},[r,m,b,t.id]);const v=!!t.supportsProvision,w=t.supportedMethods.includes("oauth-pkce"),g=t.supportedMethods.includes("api-key"),y=()=>{if(!(o||r||N||p)){if(h){u||(Z("ai_provider_connect_clicked",{provider_id:t.id,method:"cli-activate"}),_());return}v?(Z("ai_provider_connect_clicked",{provider_id:t.id,method:"provision"}),x()):w?(Z("ai_provider_connect_clicked",{provider_id:t.id,method:"oauth-pkce"}),C()):g&&(Z("ai_provider_connect_clicked",{provider_id:t.id,method:"api-key"}),a(!0))}},C=async()=>{try{d(!0);const S=await n.callTool({name:"AI_PROVIDER_OAUTH_URL",arguments:{providerId:t.id,callbackUrl:`${window.location.origin}/oauth/callback/ai-provider`}});if(S.structuredContent)c(S.structuredContent.stateToken),window.open(S.structuredContent.url,"AiProviderOAuth","width=600,height=700");else throw new Error("Invalid response from AI_PROVIDER_OAUTH_URL")}catch(S){d(!1),Y.error(`Failed to start OAuth: ${S instanceof Error?S.message:String(S)}`)}},E=N?"Checking CLI...":p?"Connecting...":r?"Authorizing...":null,I=E??(u&&h?`Authenticated via ${t.name} CLI`:t.description);return l.jsxs(l.Fragment,{children:[l.jsx(ue,{icon:t.logo?l.jsx("img",{src:t.logo,alt:t.name,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):l.jsx(Yt,{fallback:t.name.charAt(0),className:"size-8 bg-primary/10 text-primary"}),title:l.jsxs("span",{className:"flex items-center gap-2",children:[t.name,u&&!h&&!E&&l.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:[e.length," key",e.length!==1?"s":""," configured",t.supportsCredits?" · Managed above":""]})]}),description:I,onClick:!r&&!N&&!p?y:void 0,className:oe((r||N||p)&&"cursor-wait"),action:l.jsx("div",{className:"flex items-center gap-2",children:u&&l.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 shrink-0"})}),children:u&&!h&&l.jsx(xs,{keys:e,onDelete:f,isDeleting:j})}),l.jsx(Ve,{open:o,onOpenChange:S=>{S||a(!1)},children:l.jsxs(We,{children:[l.jsxs(jt,{children:[l.jsxs(qe,{children:["Connect ",t.name]}),l.jsx(St,{children:t.id==="openai-compatible"?"Enter the base URL and optional API key for your OpenAI-compatible endpoint.":`Add an API key to connect your ${t.name} account.`})]}),t.id==="openai-compatible"?l.jsx(Ss,{onCancel:()=>a(!1),onSuccess:()=>a(!1)}):l.jsx(vs,{providerId:t.id,onCancel:()=>a(!1),onSuccess:()=>a(!1)})]})})]})}function ct(t){const e=K.c(24);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{hideProviderId:n}=s,i=Je(),o=ae();let a,r,d,m,c;if(e[2]!==i?.providers||e[3]!==o||e[4]!==n){let j;e[10]!==n?(j=p=>p.id!==n,e[10]=n,e[11]=j):j=e[11];const b=(i?.providers??[]).filter(j),_=b.filter(ws),N=b.filter(_s);m="flex flex-col gap-6 w-full",c=_.length>0&&l.jsx(xe,{children:l.jsxs("div",{className:"relative rounded-xl border border-lime-400/30 bg-gradient-to-br from-lime-50/50 via-transparent to-yellow-50/30 dark:from-lime-950/20 dark:to-yellow-950/10 p-4",children:[l.jsx("div",{className:"absolute inset-0 rounded-xl bg-gradient-to-br from-lime-400/5 to-yellow-400/5 pointer-events-none"}),l.jsx("p",{className:"text-xs font-medium text-lime-700 dark:text-lime-400 mb-3 relative",children:"Local models — use your existing AI provider"}),l.jsx(pe,{className:"relative",children:_.map(p=>l.jsx(Fe,{provider:p,keys:o.filter(v=>v.providerId===p.id)},p.id))})]})}),r=xe,a=pe;let x;e[12]!==o?(x=p=>l.jsx(Fe,{provider:p,keys:o.filter(v=>v.providerId===p.id)},p.id),e[12]=o,e[13]=x):x=e[13],d=N.map(x),e[2]=i?.providers,e[3]=o,e[4]=n,e[5]=a,e[6]=r,e[7]=d,e[8]=m,e[9]=c}else a=e[5],r=e[6],d=e[7],m=e[8],c=e[9];let h;e[14]!==a||e[15]!==d?(h=l.jsx(a,{children:d}),e[14]=a,e[15]=d,e[16]=h):h=e[16];let u;e[17]!==r||e[18]!==h?(u=l.jsx(r,{children:h}),e[17]=r,e[18]=h,e[19]=u):u=e[19];let f;return e[20]!==m||e[21]!==c||e[22]!==u?(f=l.jsxs("div",{className:m,children:[c,u]}),e[20]=m,e[21]=c,e[22]=u,e[23]=f):f=e[23],f}function _s(t){return!t.supportedMethods.includes("cli-activate")}function ws(t){return t.supportedMethods.includes("cli-activate")}const Cs={usd:[10,20,100],brl:[50,100,500]};function Is(){const t=K.c(28),{org:e}=ie();let s;t[0]!==e.id?(s={connectionId:ce,orgId:e.id},t[0]=e.id,t[1]=s):s=t[1];const n=de(s),[i,o]=O.useState(!1),{mutate:a,isPending:r}=le({mutationFn:async y=>{const C=await n.callTool({name:"AI_PROVIDER_TOPUP_URL",arguments:{providerId:"deco",amountCents:y,currency:u}});if(C?.isError)throw new Error(C.content?.[0]?.text??"Failed to get top-up URL");return C.structuredContent?.url},onSuccess:Es,onError:ks}),[d,m]=O.useState(""),[c,h]=O.useState("usd"),u=c,f=parseFloat(d),j=!isNaN(f)&&f>=1,b=u==="brl"?"R$":"$";let _;t[2]!==h?(_=y=>{y&&h(y)},t[2]=h,t[3]=_):_=t[3];let N,x;t[4]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(Ae,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),x=l.jsx(Ae,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),t[4]=N,t[5]=x):(N=t[4],x=t[5]);let p;t[6]!==u||t[7]!==_?(p=l.jsxs(Gt,{type:"single",variant:"outline",size:"default",value:u,onValueChange:_,children:[N,x]}),t[6]=u,t[7]=_,t[8]=p):p=t[8];let v;t[9]!==u||t[10]!==b||t[11]!==i||t[12]!==r||t[13]!==a?(v=!i&&l.jsxs(l.Fragment,{children:[Cs[u].map(y=>l.jsxs(te,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:r,onClick:()=>a(y*100),children:[b,y]},y)),l.jsx(te,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>o(!0),disabled:r,children:"Custom"})]}),t[9]=u,t[10]=b,t[11]=i,t[12]=r,t[13]=a,t[14]=v):v=t[14];let w;t[15]!==b||t[16]!==d||t[17]!==f||t[18]!==i||t[19]!==j||t[20]!==r||t[21]!==m||t[22]!==a?(w=i&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"relative max-w-[140px]",children:[l.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:b}),l.jsx(ne,{type:"number",min:"1",step:"1",placeholder:"50",value:d,onChange:y=>m(y.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),l.jsx(te,{className:"h-10",disabled:!j||r,onClick:()=>a(Math.round(f*100)),children:r?"...":"Add"}),l.jsx(te,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{o(!1),m("")},children:"Cancel"})]}),t[15]=b,t[16]=d,t[17]=f,t[18]=i,t[19]=j,t[20]=r,t[21]=m,t[22]=a,t[23]=w):w=t[23];let g;return t[24]!==p||t[25]!==v||t[26]!==w?(g=l.jsx("div",{className:"flex flex-col gap-2.5",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p,v,w]})}),t[24]=p,t[25]=v,t[26]=w,t[27]=g):g=t[27],g}function ks(t){Y.error(`Top-up failed: ${t.message}`)}function Es(t){t&&window.open(t,"_blank","noopener,noreferrer")}function Ms(t){return t<=0?"text-destructive":t<=1?"text-amber-500 dark:text-amber-400":"text-foreground"}function As(){const t=K.c(60),{org:e}=ie();let s;t[0]!==e.id?(s={connectionId:ce,orgId:e.id},t[0]=e.id,t[1]=s):s=t[1];const n=de(s),i=ge(),o=ae();let a;t[2]!==o?(a=o.find(Ts),t[2]=o,t[3]=a):a=t[3];const r=a,[d,m]=O.useState(!1);let c;t[4]!==n||t[5]!==r?(c=async()=>{r&&await n.callTool({name:"AI_PROVIDER_KEY_DELETE",arguments:{keyId:r.id}})},t[4]=n,t[5]=r,t[6]=c):c=t[6];let h;t[7]!==e.id||t[8]!==i?(h=()=>{i.invalidateQueries({queryKey:X.aiProviderKeys(e.id)}),i.invalidateQueries({queryKey:X.aiProviders(e.id)}),Y.success("Deco AI Gateway disconnected"),m(!1)},t[7]=e.id,t[8]=i,t[9]=h):h=t[9];let u;t[10]!==c||t[11]!==h?(u={mutationFn:c,onSuccess:h,onError:Os},t[10]=c,t[11]=h,t[12]=u):u=t[12];const{mutate:f,isPending:j}=le(u);let b;t[13]!==e.id?(b=X.aiProviderCredits(e.id,"deco"),t[13]=e.id,t[14]=b):b=t[14];const _=!!r;let N;t[15]!==n?(N=async()=>{const ee=await n.callTool({name:"AI_PROVIDER_CREDITS",arguments:{providerId:"deco"}});return ee?.isError?null:ee.structuredContent??null},t[15]=n,t[16]=N):N=t[16];let x;t[17]!==b||t[18]!==_||t[19]!==N?(x={queryKey:b,enabled:_,staleTime:6e4,queryFn:N},t[17]=b,t[18]=_,t[19]=N,t[20]=x):x=t[20];const{data:p,isLoading:v,refetch:w,isFetching:g}=Be(x);if(!r)return null;const y=p?.balanceCents!=null?p.balanceCents/100:null;let C;t[21]!==y?(C=y!=null?`$${y.toFixed(2)}`:"—",t[21]=y,t[22]=C):C=t[22];const E=C;let I;t[23]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("img",{src:"/logos/deco%20logo.svg",alt:"Deco AI Gateway",className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),l.jsx("div",{children:l.jsx("p",{className:"text-xs text-muted-foreground",children:"Access to 100+ models"})})]}),t[23]=I):I=t[23];let S;t[24]===Symbol.for("react.memo_cache_sentinel")?(S=()=>m(!0),t[24]=S):S=t[24];let k;t[25]!==j?(k=l.jsxs("div",{className:"flex items-center justify-between",children:[I,l.jsx(te,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:S,disabled:j,children:"Disconnect"})]}),t[25]=j,t[26]=k):k=t[26];let T;t[27]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsxs(tt,{children:[l.jsx(et,{children:"Disconnect Deco AI Gateway"}),l.jsx(st,{children:"This will remove the Deco AI Gateway from this workspace. Your credit balance is preserved and will be available if you reconnect."})]}),t[27]=T):T=t[27];let M;t[28]===Symbol.for("react.memo_cache_sentinel")?(M=l.jsx(lt,{children:"Cancel"}),t[28]=M):M=t[28];let A;t[29]!==f?(A=l.jsxs(ot,{children:[T,l.jsxs(it,{children:[M,l.jsx(nt,{onClick:()=>f(),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Disconnect"})]})]}),t[29]=f,t[30]=A):A=t[30];let R;t[31]!==d||t[32]!==A?(R=l.jsx(rt,{open:d,onOpenChange:m,children:A}),t[31]=d,t[32]=A,t[33]=R):R=t[33];let P;t[34]!==y||t[35]!==E||t[36]!==g||t[37]!==v?(P=v||g?l.jsx(q,{className:"h-9 w-24"}):l.jsx("span",{className:oe("text-3xl font-semibold tabular-nums tracking-tight",y!=null&&Ms(y)),children:E}),t[34]=y,t[35]=E,t[36]=g,t[37]=v,t[38]=P):P=t[38];let L;t[39]!==w?(L=()=>w(),t[39]=w,t[40]=L):L=t[40];const Q=g&&"animate-spin";let U;t[41]!==Q?(U=oe(Q),t[41]=Q,t[42]=U):U=t[42];let $;t[43]!==U?($=l.jsx(Ue,{size:14,className:U}),t[43]=U,t[44]=$):$=t[44];let D;t[45]!==g||t[46]!==L||t[47]!==$?(D=l.jsx("button",{type:"button",onClick:L,disabled:g,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":"Refresh balance",children:$}),t[45]=g,t[46]=L,t[47]=$,t[48]=D):D=t[48];let V;t[49]!==P||t[50]!==D?(V=l.jsxs("div",{className:"flex items-baseline gap-2",children:[P,D]}),t[49]=P,t[50]=D,t[51]=V):V=t[51];let B;t[52]===Symbol.for("react.memo_cache_sentinel")?(B=l.jsx("p",{className:"text-xs text-muted-foreground",children:"Available credit balance"}),t[52]=B):B=t[52];let W;t[53]!==V?(W=l.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[V,B]}),t[53]=V,t[54]=W):W=t[54];let G;t[55]===Symbol.for("react.memo_cache_sentinel")?(G=l.jsxs("div",{className:"pt-4 border-t border-border/60",children:[l.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:"Add credits"}),l.jsx(Is,{})]}),t[55]=G):G=t[55];let H;return t[56]!==k||t[57]!==R||t[58]!==W?(H=l.jsx(xe,{title:"Deco AI Gateway",children:l.jsx(pe,{children:l.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[k,R,W,G]})})}),t[56]=k,t[57]=R,t[58]=W,t[59]=H):H=t[59],H}function Os(t){Y.error(`Failed to disconnect: ${t.message}`)}function Ts(t){return t.providerId==="deco"}const Rs=t=>t.capabilities?.includes("image")===!0,Ps=t=>{const e=t.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return e.includes("sonar")||e.includes("deepresearch")},zs={fast:"Fast",smart:"Smart",thinking:"Thinking"},Fs={fast:"Fastest responses, best for quick tasks",smart:"Balanced speed and capability",thinking:"Most capable, best for complex tasks"};function ye(t){const e=K.c(20),{slot:s,onSlotChange:n,filterModels:i,defaultKeyId:o}=t,a=ae(),[r,d]=O.useState(s?.keyId??o);let m;e[0]!==s?(m=()=>{s?.keyId&&d(s.keyId)},e[0]=s,e[1]=m):m=e[1];const c=s?.keyId;let h;e[2]!==c?(h=[c],e[2]=c,e[3]=h):h=e[3],O.useEffect(m,h);const u=r??o;let f;e[4]!==u||e[5]!==a?(f=u?a.find(y=>y.id===u):null,e[4]=u,e[5]=a,e[6]=f):f=e[6];const j=f,{models:b,isLoading:_}=he(i?u??void 0:void 0),N=i?_||b.some(i):!0;let x;e[7]!==s||e[8]!==j?.providerId?(x=s?{modelId:s.modelId,title:s.title??s.modelId,keyId:s.keyId,providerId:j?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[7]=s,e[8]=j?.providerId,e[9]=x):x=e[9];const p=x;if(i&&!N){let y;return e[10]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Not available with current provider"}),e[10]=y):y=e[10],y}let v;e[11]===Symbol.for("react.memo_cache_sentinel")?(v=y=>d(y),e[11]=v):v=e[11];let w;e[12]!==u||e[13]!==n?(w=y=>{const C=y.keyId??u??"";d(C),n({keyId:C,modelId:y.modelId,title:y.title})},e[12]=u,e[13]=n,e[14]=w):w=e[14];let g;return e[15]!==u||e[16]!==i||e[17]!==p||e[18]!==w?(g=l.jsx(wl,{variant:"bordered",placeholder:"Pick model",model:p,credentialId:u,filterModels:i,onCredentialChange:v,onModelChange:w}),e[15]=u,e[16]=i,e[17]=p,e[18]=w,e[19]=g):g=e[19],g}function Ls(t){const e=K.c(2),{isPending:s,showSaved:n}=t;if(s){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(Ue,{size:12,className:"animate-spin"}),"Saving…"]}),e[0]=i):i=e[0],i}if(n){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[l.jsx(Wt,{size:12}),"Saved"]}),e[1]=i):i=e[1],i}return null}function Ds(){const t=ae(),e=Xt(),s=t.length>0,n=_e({resolver:we(hs),values:e,mode:"onChange"}),{mutate:i,isPending:o,isSuccess:a}=Jt(),r=n.watch(),d=n.formState.isDirty;O.useEffect(()=>{if(!d)return;const x=setTimeout(()=>{i(r,{onSuccess:()=>n.reset(r,{keepValues:!0}),onError:p=>{n.reset(e),Y.error(`Failed to save: ${p.message}`)}})},250);return()=>clearTimeout(x)},[r,d,i,n,e]);const m=t[0],c=t[1],h=t[2],{models:u}=he(m?.id),{models:f}=he(c?.id),{models:j}=he(h?.id),b=x=>{const p=n.getValues("chat");if(x&&!p.fast&&!p.smart&&!p.thinking){const v={};m?.id&&(v[m.id]=u),c?.id&&(v[c.id]=f),h?.id&&(v[h.id]=j);const w=Me(t,v);n.reset({enabled:!0,chat:w.chat,image:w.image,webResearch:w.webResearch},{keepDirty:!0})}else n.setValue("enabled",x,{shouldDirty:!0})};O.useEffect(()=>{s||n.reset({enabled:!1,chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null})},[s,n]),O.useEffect(()=>{const x=n.getValues();if(!x.enabled)return;const p=new Set(t.map(k=>k.id)),v={};m?.id&&(v[m.id]=u),c?.id&&(v[c.id]=f),h?.id&&(v[h.id]=j);const w=k=>k!=null&&!p.has(k.keyId),g={fast:w(x.chat.fast)?null:x.chat.fast,smart:w(x.chat.smart)?null:x.chat.smart,thinking:w(x.chat.thinking)?null:x.chat.thinking},y=w(x.image)?null:x.image,C=w(x.webResearch)?null:x.webResearch,E=!g.fast||!g.smart||!g.thinking||!y||!C,I=g.fast===x.chat.fast&&g.smart===x.chat.smart&&g.thinking===x.chat.thinking;if(!E&&I)return;const S=Me(t,v);n.reset({...x,chat:{fast:g.fast??S.chat.fast,smart:g.smart??S.chat.smart,thinking:g.thinking??S.chat.thinking},image:y??S.image,webResearch:C??S.webResearch},{keepDirty:!0})},[n,t,u,f,j,m?.id,c?.id,h?.id]);const N=n.watch("enabled")&&s;return l.jsx(xe,{title:"Simple model mode",children:l.jsxs(pe,{children:[l.jsx(ue,{title:"Enable simple model mode",description:s?"Replace the model picker with a Fast / Smart / Thinking toggle for all members of this org.":"Connect an AI provider above to enable this feature.",action:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx(Ls,{isPending:o,showSaved:a&&!d}),l.jsx(Qt,{checked:N,onCheckedChange:b,disabled:o||!s})]})}),N&&l.jsxs(l.Fragment,{children:[["fast","smart","thinking"].map(x=>l.jsx(ve,{control:n.control,name:`chat.${x}`,render:({field:p})=>l.jsx(ue,{title:zs[x],description:Fs[x],action:l.jsx(ye,{slot:p.value,defaultKeyId:t[0]?.id??null,onSlotChange:v=>p.onChange(v)})})},x)),l.jsx("div",{className:"h-px bg-border mx-5"}),l.jsx(ve,{control:n.control,name:"image",render:({field:x})=>l.jsx(ue,{title:"Image",action:l.jsx(ye,{slot:x.value,defaultKeyId:t[0]?.id??null,filterModels:Rs,onSlotChange:p=>x.onChange(p)})})}),l.jsx(ve,{control:n.control,name:"webResearch",render:({field:x})=>l.jsx(ue,{title:"Web research",action:l.jsx(ye,{slot:x.value,defaultKeyId:t[0]?.id??null,filterModels:Ps,onSlotChange:p=>x.onChange(p)})})})]})]})})}function Ks(){const t=K.c(6),s=ae().some($s);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(As,{}),t[0]=n):n=t[0];const i=s?"deco":void 0;let o;t[1]!==i?(o=l.jsx(ct,{hideProviderId:i}),t[1]=i,t[2]=o):o=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(O.Suspense,{fallback:l.jsx(q,{className:"h-16 w-full"}),children:l.jsx(Ds,{})}),t[3]=a):a=t[3];let r;return t[4]!==o?(r=l.jsxs(l.Fragment,{children:[n,o,a]}),t[4]=o,t[5]=r):r=t[5],r}function $s(t){return t.providerId==="deco"}function ii(){const t=K.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(fe.Title,{children:"AI Providers"}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx(fe,{children:l.jsx(fe.Content,{children:l.jsx(fe.Body,{children:l.jsxs(Ht,{children:[e,l.jsx($e,{fallback:Bs,children:l.jsx(O.Suspense,{fallback:l.jsx(q,{className:"h-64 w-full"}),children:l.jsx(Ks,{})})})]})})})}),t[1]=s):s=t[1],s}function Bs(t){const{error:e}=t;return l.jsx(fs,{error:e??new Error("Failed to load AI providers")})}function Us(){const t=K.c(9),{org:e}=ie();let s;t[0]!==e.id?(s={connectionId:ce,orgId:e.id},t[0]=e.id,t[1]=s):s=t[1];const n=de(s);let i;t[2]!==e.id?(i=X.defaultBrand(e.id),t[2]=e.id,t[3]=i):i=t[3];let o;t[4]!==n?(o=async()=>{const d=await n.callTool({name:"BRAND_CONTEXT_LIST",arguments:{}}),m=es(d);return(Array.isArray(m?.items)?m.items:[]).find(Vs)??null},t[4]=n,t[5]=o):o=t[5];let a;t[6]!==i||t[7]!==o?(a={queryKey:i,queryFn:o},t[6]=i,t[7]=o,t[8]=a):a=t[8];const{data:r}=Be(a);return r??null}function Vs(t){return t.isDefault&&!t.archivedAt}function Ws(t){const e=t.colors;if(!e)return null;if(Array.isArray(e)){const s=e.find(i=>typeof i=="object"&&i!==null&&"label"in i&&/primary|brand|main/i.test(i.label)),n=s?s.value:e[0]?.value;return typeof n=="string"?n:null}if(typeof e=="object"){const s=e;return s.primary??Object.values(s)[0]??null}return null}function qs(t){const e=K.c(31);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{title:n,description:i}=s,{org:o}=ie(),{localMode:a}=gt(),r=Us(),d=o.name;let m;e[2]!==r?(m=r?Ws(r):null,e[2]=r,e[3]=m):m=e[3];const c=m,h=r?.favicon??r?.logo??null,u=n??(d?`${d} is ready for agents`:"Your agents are almost ready"),f=i??"Choose how to power your AI team.",j=!!(h||c);let b;e[4]!==c?(b=c?{backgroundColor:`${c}18`,borderColor:`${c}30`}:void 0,e[4]=c,e[5]=b):b=e[5];const _=b,N=j?"flex items-center justify-center size-14 rounded-2xl border":"flex items-center justify-center size-14 rounded-2xl bg-gradient-to-br from-lime-100 to-yellow-50 dark:from-lime-900/30 dark:to-yellow-900/20 border border-lime-300/40 dark:border-lime-700/30";let x;e[6]!==h||e[7]!==c?(x=h?l.jsx("img",{src:h,alt:"",className:"size-7 rounded object-contain"}):l.jsx(Ut,{size:24,style:c?{color:c}:void 0,className:oe(!c&&"text-lime-600 dark:text-lime-400")}),e[6]=h,e[7]=c,e[8]=x):x=e[8];let p;e[9]!==N||e[10]!==_||e[11]!==x?(p=l.jsx("div",{className:N,style:_,children:x}),e[9]=N,e[10]=_,e[11]=x,e[12]=p):p=e[12];let v;e[13]!==u?(v=l.jsx("p",{className:"text-xl font-semibold text-foreground tracking-tight",children:u}),e[13]=u,e[14]=v):v=e[14];let w;e[15]!==f?(w=l.jsx("p",{className:"text-sm text-muted-foreground max-w-md",children:f}),e[15]=f,e[16]=w):w=e[16];let g;e[17]!==v||e[18]!==w?(g=l.jsxs("div",{className:"space-y-2",children:[v,w]}),e[17]=v,e[18]=w,e[19]=g):g=e[19];let y;e[20]!==p||e[21]!==g?(y=l.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[p,g]}),e[20]=p,e[21]=g,e[22]=y):y=e[22];let C;e[23]!==a?(C=a&&l.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Local models + use your existing AI provider"}),e[23]=a,e[24]=C):C=e[24];let E;e[25]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx(O.Suspense,{fallback:l.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 w-full",children:[l.jsx(q,{className:"h-32 w-full rounded-lg"}),l.jsx(q,{className:"h-32 w-full rounded-lg"})]}),children:l.jsx(ct,{})}),e[25]=E):E=e[25];let I;e[26]!==C?(I=l.jsxs("div",{className:"w-full space-y-3",children:[C,E]}),e[26]=C,e[27]=I):I=e[27];let S;return e[28]!==I||e[29]!==y?(S=l.jsxs("div",{className:"flex flex-col items-center gap-8 w-full max-w-2xl px-4",children:[y,I]}),e[28]=I,e[29]=y,e[30]=S):S=e[30],S}function Ie(t){const e=t.title.includes(": ");return{provider:e?t.title.split(": ")[0]??"":t.modelId.split("/")[0]??"",displayName:e?t.title.split(": ").slice(1).join(": "):t.title}}const dt=["smarter","faster","cheaper"],mt={smarter:"Smarter",faster:"Faster",cheaper:"Cheaper"},Hs=[{tier:"smarter",prefixes:["claude-code:opus","anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","openai/gpt-5.3-codex","codex:gpt-5.4","codex:gpt-5.4-mini","codex:gpt-5.3-codex","codex:gpt-5.2-codex","codex:gpt-5.1-codex-max","google/gemini-3-pro","google/gemini-2.5-pro","cohere/command-r-plus","cohere/command-a"]},{tier:"faster",prefixes:["claude-code:sonnet","anthropic/claude-haiku-4.5","anthropic/claude-4.5-haiku","google/gemini-3-flash","openai/gpt-5.1-codex-mini","codex:gpt-5.1-codex-mini","x-ai/grok-code-fast","x-ai/grok-3","mistralai/mistral-large","mistralai/codestral","mistralai/mistral-medium","minimax/minimax-m1"]},{tier:"cheaper",prefixes:["claude-code:haiku","google/gemini-2.5-flash-lite","google/gemini-2.5-flash","google/gemini-2.0-flash","deepseek/deepseek-v3","openai/gpt-oss-120b","mistralai/mistral-small","mistralai/pixtral","cohere/command-r"]}],Qs=Hs.flatMap(({tier:t,prefixes:e})=>e.map(s=>({tier:t,prefix:s}))).sort((t,e)=>e.prefix.length-t.prefix.length),Gs=new Set(["google/gemini-2.5-pro"]),Le=new Map;function Ys(t){const e=Le.get(t);if(e!==void 0)return e;let s=null;if(t.endsWith(":free"))s="cheaper";else e:for(const{tier:n,prefix:i}of Qs)if(t.startsWith(i)){if(Gs.has(i)&&t.length>i.length&&t[i.length]==="-"){const a=t[i.length+1];if(!a||!/\d/.test(a))continue e}s=n;break}return Le.set(t,s),s}function De(t){const e={smarter:[],faster:[],cheaper:[],other:[]};for(const s of t){const n=Ys(s.modelId);e[n??"other"].push(s)}for(const s of Object.keys(e))e[s].sort((n,i)=>n.title.localeCompare(i.title));return e}const ut="mesh:model-shortlist:",Xs=new Set(["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6","anthropic/claude-4.6-sonnet","anthropic/claude-sonnet-4.6:extended","openai/gpt-5.3-codex","google/gemini-3-pro-preview","google/gemini-2.5-pro","anthropic/claude-haiku-4.5","anthropic/claude-haiku-4.5-20251001","anthropic/claude-4.5-haiku","google/gemini-3-flash-preview","openai/gpt-5.1-codex-mini","x-ai/grok-code-fast-1","google/gemini-2.5-flash","deepseek/deepseek-v3.2","google/gemini-2.5-flash-lite","openai/gpt-oss-120b:free"]);function Js(t){try{const e=localStorage.getItem(ut+t);return e?new Set(JSON.parse(e)):null}catch{return null}}function Zs(t,e){localStorage.setItem(ut+t,JSON.stringify([...e]))}function el(t){return t<32e3?{level:1,label:"Small",description:"Short conversations"}:t<2e5?{level:2,label:"Medium",description:"Good for most tasks"}:t<5e5?{level:3,label:"Large",description:"Long projects & research"}:{level:4,label:"Very large",description:"Massive files & data"}}const tl=["bg-destructive","bg-warning","bg-success","bg-success"],sl=["text-success","text-warning","text-warning","text-destructive"];function ll(t){const e=Math.round(t*.75/1e3);return e>=1?`~${e}K words`:`~${Math.round(t*.75)} words`}function il(t){return t<1?{level:1,label:"Cheap"}:t<5?{level:2,label:"Moderate"}:t<15?{level:3,label:"High"}:{level:4,label:"Expensive"}}const nl={text:{icon:l.jsx(Lt,{className:"size-3.5"}),label:"Text"},vision:{icon:l.jsx(Ft,{className:"size-3.5"}),label:"Vision"},image:{icon:l.jsx(Dt,{className:"size-3.5"}),label:"Image"},tools:{icon:l.jsx(zt,{className:"size-3.5"}),label:"Tools"},reasoning:{icon:l.jsx(Pt,{className:"size-3.5"}),label:"Reasoning"},"web-search":{icon:l.jsx(Xe,{className:"size-3.5"}),label:"Web search"}};function ol(t){const e=K.c(5),{capability:s}=t;let n;e[0]!==s?(n=nl[s]??{icon:null,label:s.charAt(0).toUpperCase()+s.slice(1)},e[0]=s,e[1]=n):n=e[1];const i=n;let o;return e[2]!==i.icon||e[3]!==i.label?(o=l.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground border border-border rounded px-2 py-0.5",children:[i.icon,i.label]}),e[2]=i.icon,e[3]=i.label,e[4]=o):o=e[4],o}function rl(t){const e=K.c(49),{model:s,compact:n}=t,i=n===void 0?!1:n;if(!s){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=l.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Hover to preview"}),e[0]=g):g=e[0],g}const o=s.costs?.input!=null?s.costs.input*1e6:null,a=s.costs?.output!=null?s.costs.output*1e6:null;let r;e[1]!==s?(r=Ie(s),e[1]=s,e[2]=r):r=e[2];const{provider:d,displayName:m}=r;if(i){let g;e[3]!==s.limits?(g=s.limits?.contextWindow&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Context"}),l.jsxs("span",{className:"text-foreground font-medium",children:[s.limits.contextWindow.toLocaleString()," tokens"]})]}),e[3]=s.limits,e[4]=g):g=e[4];let y;e[5]!==o?(y=o!=null&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Input"}),l.jsxs("span",{className:"text-foreground font-medium",children:["$",o.toFixed(2)," / 1M"]})]}),e[5]=o,e[6]=y):y=e[6];let C;e[7]!==a?(C=a!=null&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Output"}),l.jsxs("span",{className:"text-foreground font-medium",children:["$",a.toFixed(2)," / 1M"]})]}),e[7]=a,e[8]=C):C=e[8];let E;e[9]!==s.limits?(E=s.limits?.maxOutputTokens&&l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-muted-foreground",children:"Output limit"}),l.jsxs("span",{className:"text-foreground font-medium",children:[s.limits.maxOutputTokens.toLocaleString()," tokens"]})]}),e[9]=s.limits,e[10]=E):E=e[10];let I;return e[11]!==g||e[12]!==y||e[13]!==C||e[14]!==E?(I=l.jsxs("div",{className:"flex flex-col gap-2 pt-3 pb-3 px-3 text-xs",children:[g,y,C,E]}),e[11]=g,e[12]=y,e[13]=C,e[14]=E,e[15]=I):I=e[15],I}let c;e[16]!==d?(c=l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:d}),e[16]=d,e[17]=c):c=e[17];let h;e[18]!==s.logo||e[19]!==s.title?(h=s.logo&&l.jsx("img",{src:s.logo,className:"size-6 shrink-0 rounded-md dark:bg-white dark:rounded-sm dark:p-px",alt:s.title}),e[18]=s.logo,e[19]=s.title,e[20]=h):h=e[20];let u;e[21]!==m?(u=l.jsx("p",{className:"text-lg font-semibold leading-snug tracking-tight",children:m}),e[21]=m,e[22]=u):u=e[22];let f;e[23]!==h||e[24]!==u?(f=l.jsxs("div",{className:"flex items-center gap-2.5",children:[h,u]}),e[23]=h,e[24]=u,e[25]=f):f=e[25];let j;e[26]!==s.modelId?(j=l.jsx("p",{className:"text-xs text-muted-foreground/50 font-mono",children:s.modelId}),e[26]=s.modelId,e[27]=j):j=e[27];let b;e[28]!==c||e[29]!==f||e[30]!==j?(b=l.jsxs("div",{className:"flex flex-col gap-1 pt-1 pr-6",children:[c,f,j]}),e[28]=c,e[29]=f,e[30]=j,e[31]=b):b=e[31];let _;e[32]!==s.capabilities?(_=s.capabilities&&s.capabilities.length>0&&l.jsx("div",{className:"flex flex-wrap items-center gap-1.5 pb-4 border-b border-border",children:[...new Set(s.capabilities)].map(al)}),e[32]=s.capabilities,e[33]=_):_=e[33];let N;e[34]!==s.limits?(N=s.limits?.contextWindow&&(()=>{const{level:g,label:y,description:C}=el(s.limits.contextWindow);return l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Context window"}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"flex items-center gap-0.5",children:[1,2,3,4].map(E=>l.jsx("div",{className:oe("w-2 h-2 rounded-full",E<=g?tl[g-1]:"bg-muted")},E))}),l.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:y}),l.jsxs("span",{className:"text-xs text-muted-foreground",children:["— ",C]})]}),l.jsxs("span",{className:"text-sm text-muted-foreground",children:[s.limits.contextWindow.toLocaleString()," tokens"]})]})})(),e[34]=s.limits,e[35]=N):N=e[35];let x;e[36]!==s.limits?(x=s.limits?.maxOutputTokens&&l.jsxs("div",{className:"flex flex-col gap-1",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Output limit"}),l.jsxs("div",{className:"flex items-baseline gap-2",children:[l.jsxs("span",{className:"text-sm text-foreground",children:[s.limits.maxOutputTokens.toLocaleString()," tokens"]}),l.jsx("span",{className:"text-sm text-muted-foreground",children:ll(s.limits.maxOutputTokens)})]})]}),e[36]=s.limits,e[37]=x):x=e[37];let p;e[38]!==o||e[39]!==a?(p=(o!=null||a!=null)&&(()=>{const{level:g,label:y}=o!=null?il(o):{level:0,label:""};return l.jsxs("div",{className:"flex flex-col gap-2",children:[l.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Pricing"}),o!=null&&l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("div",{className:"flex items-center",children:[1,2,3,4].map(C=>l.jsx("span",{className:oe("text-sm font-bold leading-none",C<=g?sl[g-1]:"text-muted-foreground/20"),children:"$"},C))}),l.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:y})]}),l.jsxs("div",{className:"flex flex-col gap-1",children:[o!=null&&l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-xs text-muted-foreground",children:"Input"}),l.jsxs("span",{className:"text-xs text-foreground",children:["$",o.toFixed(2)," / 1M tokens"]})]}),a!=null&&l.jsxs("div",{className:"flex justify-between items-center",children:[l.jsx("span",{className:"text-xs text-muted-foreground",children:"Output"}),l.jsxs("span",{className:"text-xs text-foreground",children:["$",a.toFixed(2)," / 1M tokens"]})]})]})]})})(),e[38]=o,e[39]=a,e[40]=p):p=e[40];let v;e[41]!==N||e[42]!==x||e[43]!==p?(v=l.jsxs("div",{className:"flex flex-col gap-6",children:[N,x,p]}),e[41]=N,e[42]=x,e[43]=p,e[44]=v):v=e[44];let w;return e[45]!==v||e[46]!==b||e[47]!==_?(w=l.jsxs("div",{className:"flex flex-col gap-5 py-1 px-1.5",children:[b,_,v]}),e[45]=v,e[46]=b,e[47]=_,e[48]=w):w=e[48],w}function al(t){return l.jsx(ol,{capability:t},t)}function cl(t){const e=K.c(21),{model:s,onHover:n}=t;let i;e[0]!==s?(i=Ie(s),e[0]=s,e[1]=i):i=e[1];const{displayName:o,provider:a}=i;let r;e[2]!==s?(r=Ce(s),e[2]=s,e[3]=r):r=e[3];const d=r;let m;e[4]!==s||e[5]!==n?(m=()=>n(s),e[4]=s,e[5]=n,e[6]=m):m=e[6];let c;e[7]!==s.title||e[8]!==d?(c=l.jsx("img",{src:d,className:"w-4 h-4 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:s.title}),e[7]=s.title,e[8]=d,e[9]=c):c=e[9];let h;e[10]!==o?(h=l.jsx("span",{className:"text-sm text-foreground leading-tight truncate",children:o}),e[10]=o,e[11]=h):h=e[11];let u;e[12]!==a?(u=l.jsx("span",{className:"text-xs text-muted-foreground/60 leading-tight",children:a}),e[12]=a,e[13]=u):u=e[13];let f;e[14]!==h||e[15]!==u?(f=l.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[h,u]}),e[14]=h,e[15]=u,e[16]=f):f=e[16];let j;return e[17]!==m||e[18]!==c||e[19]!==f?(j=l.jsxs("div",{className:"flex items-center gap-2.5 py-2 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:m,children:[c,f]}),e[17]=m,e[18]=c,e[19]=f,e[20]=j):j=e[20],j}function dl(t){const e=K.c(10),{error:s,onRetry:n}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("div",{className:"bg-destructive/10 p-2 rounded-full",children:l.jsx(vt,{className:"size-5 text-destructive"})}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsx("p",{className:"text-sm font-medium text-foreground",children:"Failed to load models"}),e[1]=o):o=e[1];const a=s?.message||"Could not fetch models from this provider.";let r;e[2]!==a?(r=l.jsxs("div",{className:"flex flex-col gap-1",children:[o,l.jsxs("p",{className:"text-xs text-muted-foreground max-w-[260px]",children:[a," Try another provider or retry."]})]}),e[2]=a,e[3]=r):r=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=l.jsx(Kt,{className:"size-3.5"}),e[4]=d):d=e[4];let m;e[5]!==n?(m=l.jsx("div",{className:"flex items-center gap-2",children:l.jsxs(te,{variant:"outline",size:"sm",onClick:n,className:"gap-1.5",children:[d,"Retry"]})}),e[5]=n,e[6]=m):m=e[6];let c;return e[7]!==r||e[8]!==m?(c=l.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-4 py-8 text-center",children:[i,r,m]}),e[7]=r,e[8]=m,e[9]=c):c=e[9],c}function ml(){const t=K.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:6}).map(ul)}),t[0]=e):e=t[0],e}function ul(t,e){return l.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[l.jsx(q,{className:"size-5 shrink-0 rounded-sm"}),l.jsx(q,{className:"flex-1 h-4"}),l.jsx(q,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function Ke(t){const e=K.c(12),{label:s,models:n,onSelect:i,onHover:o}=t;if(n.length===0)return null;let a;e[0]!==s?(a=l.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:s}),e[0]=s,e[1]=a):a=e[1];let r;if(e[2]!==n||e[3]!==o||e[4]!==i){let m;e[6]!==o||e[7]!==i?(m=c=>l.jsx("div",{onClick:()=>i(c),className:"cursor-pointer",children:l.jsx(cl,{model:c,onHover:o})},c.modelId),e[6]=o,e[7]=i,e[8]=m):m=e[8],r=n.map(m),e[2]=n,e[3]=o,e[4]=i,e[5]=r}else r=e[5];let d;return e[9]!==a||e[10]!==r?(d=l.jsxs("div",{children:[a,r]}),e[9]=a,e[10]=r,e[11]=d):d=e[11],d}function hl(t){const e=K.c(21),{model:s,isChecked:n,onToggle:i,onHover:o}=t,[a,r]=O.useState(n);a!==n&&r(n);let d;e[0]!==s?(d=Ce(s),e[0]=s,e[1]=d):d=e[1];const m=d;let c;e[2]!==s||e[3]!==o?(c=()=>o(s),e[2]=s,e[3]=o,e[4]=c):c=e[4];let h;e[5]!==s.modelId||e[6]!==i?(h=()=>{r(fl),i(s.modelId)},e[5]=s.modelId,e[6]=i,e[7]=h):h=e[7];let u;e[8]!==a||e[9]!==h?(u=l.jsx(yt,{checked:a,onCheckedChange:h}),e[8]=a,e[9]=h,e[10]=u):u=e[10];let f;e[11]!==m||e[12]!==s.title?(f=l.jsx("img",{src:m,className:"w-5 h-5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:s.title}),e[11]=m,e[12]=s.title,e[13]=f):f=e[13];let j;e[14]!==s.title?(j=l.jsx("span",{className:"text-sm text-foreground flex-1 min-w-0 line-clamp-1",children:s.title}),e[14]=s.title,e[15]=j):j=e[15];let b;return e[16]!==c||e[17]!==u||e[18]!==f||e[19]!==j?(b=l.jsxs("label",{className:"flex items-center gap-3 min-h-8 py-2.5 px-3 hover:bg-accent cursor-pointer rounded-lg",onMouseEnter:c,children:[u,f,j]}),e[16]=c,e[17]=u,e[18]=f,e[19]=j,e[20]=b):b=e[20],b}function fl(t){return!t}function xl(t){const e=[];for(const s of dt)if(t[s].length>0){e.push({type:"header",label:mt[s]});for(const n of t[s])e.push({type:"model",model:n})}if(t.other.length>0){e.push({type:"header",label:"Other"});for(const s of t.other)e.push({type:"model",model:s})}return e}function pl({items:t,shortlistSet:e,onToggle:s,onHover:n}){const i=O.useRef(null),o=us({count:t.length,getScrollElement:()=>i.current,estimateSize:a=>t[a]?.type==="header"?36:44,overscan:6});return l.jsx("div",{ref:i,className:"flex-1 overflow-y-auto",children:l.jsx("div",{className:"relative",style:{height:o.getTotalSize()},children:o.getVirtualItems().map(a=>{const r=t[a.index];return r?l.jsx("div",{"data-index":a.index,ref:o.measureElement,className:"absolute left-0 right-0 top-0 px-0.5",style:{transform:`translateY(${a.start}px)`},children:r.type==="header"?l.jsx("div",{className:"text-xs font-medium text-muted-foreground px-3 pt-3 pb-1",children:r.label}):l.jsx(hl,{model:r.model,isChecked:e.has(r.model.modelId),onToggle:s,onHover:n})},a.key):null})})})}function gl(t){const e=K.c(23),{keyId:s,searchTerm:n,onHover:i,onModelSelect:o,managing:a,onToggleManage:r,filterModels:d}=t,{models:m}=he(s),c=d?m.filter(d):m;let h;e[0]!==s?(h=()=>(s?Js(s):null)??Xs,e[0]=s,e[1]=h):h=e[1];const[u,f]=O.useState(h),[,j]=O.useTransition();let b;e[2]!==s||e[3]!==j?(b=I=>{s&&j(()=>{f(S=>{const k=new Set(S);return k.has(I)?k.delete(I):k.add(I),Zs(s,k),k})})},e[2]=s,e[3]=j,e[4]=b):b=e[4];const _=b,N=n.toLowerCase().trim(),x=I=>N?I.filter(S=>S.title.toLowerCase().includes(N)||S.modelId.toLowerCase().includes(N)):I;if(a){const I=De(x(c)),S=xl(I);let k;e[5]!==u?(k=R=>u.has(R.modelId),e[5]=u,e[6]=k):k=e[6];const T=c.filter(k).length;let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=l.jsx($t,{size:14}),e[7]=M):M=e[7];let A;return e[8]!==r?(A=l.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground cursor-pointer",children:[M,"Back"]}),e[8]=r,e[9]=A):A=e[9],l.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[l.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[A,l.jsxs("span",{className:"text-xs text-muted-foreground",children:[T," selected"]})]}),l.jsx(pl,{items:S,shortlistSet:u,onToggle:_,onHover:i})]})}let p;e[10]!==u?(p=I=>u.has(I.modelId),e[10]=u,e[11]=p):p=e[11];const v=c.filter(p),w=v.length>0?v:c,g=De(x(w));let y;e[12]!==g||e[13]!==i||e[14]!==o?(y=dt.map(I=>l.jsx(Ke,{label:mt[I],models:g[I],onSelect:o,onHover:i},I)),e[12]=g,e[13]=i,e[14]=o,e[15]=y):y=e[15];let C;e[16]!==g.other||e[17]!==i||e[18]!==o?(C=l.jsx(Ke,{label:"Other",models:g.other,onSelect:o,onHover:i}),e[16]=g.other,e[17]=i,e[18]=o,e[19]=C):C=e[19];let E;return e[20]!==y||e[21]!==C?(E=l.jsxs("div",{className:"flex-1 overflow-y-auto px-0.5 pt-1 [touch-action:pan-y]",children:[y,C]}),e[20]=y,e[21]=C,e[22]=E):E=e[22],E}function ht(t){const e=K.c(19),{model:s,placeholder:n,isLoading:i}=t,o=n===void 0?"Select model":n;if(i===void 0?!1:i){let b;return e[0]===Symbol.for("react.memo_cache_sentinel")?(b=l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(q,{className:"w-5 h-5 rounded-sm shrink-0"}),l.jsx(q,{className:"w-16 h-3 hidden md:block"})]}),e[0]=b):b=e[0],b}if(!s){let b;e[1]!==o?(b=l.jsx("span",{className:"text-sm text-muted-foreground",children:o}),e[1]=o,e[2]=b):b=e[2];let _;e[3]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(Ee,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[3]=_):_=e[3];let N;return e[4]!==b?(N=l.jsxs("div",{className:"flex items-center gap-1.5",children:[b,_]}),e[4]=b,e[5]=N):N=e[5],N}let r;e[6]!==s?(r=Ie(s),e[6]=s,e[7]=r):r=e[7];const{displayName:d}=r;let m;e[8]!==s?(m=Ce(s),e[8]=s,e[9]=m):m=e[9];const c=m;let h;e[10]!==s.title||e[11]!==c?(h=l.jsx("img",{src:c,className:"w-3.5 h-3.5 shrink-0 rounded-sm dark:bg-white dark:rounded-sm dark:p-px",alt:s.title}),e[10]=s.title,e[11]=c,e[12]=h):h=e[12];let u;e[13]!==d?(u=l.jsx("span",{className:"text-sm truncate whitespace-nowrap text-muted-foreground max-w-[100px] sm:max-w-none",children:d}),e[13]=d,e[14]=u):u=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ee,{size:14,className:"text-muted-foreground opacity-50 shrink-0"}),e[15]=f):f=e[15];let j;return e[16]!==h||e[17]!==u?(j=l.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden",children:[h,u,f]}),e[16]=h,e[17]=u,e[18]=j):j=e[18],j}const bl=["vision","image","file","audio","video"],ft=["image/png","image/jpeg","image/gif","image/webp"];function ni(t){const e=t?.capabilities;return e?bl.some(s=>e.includes(s)):!1}function oi(t,e){if(!t)return!1;if(t.startsWith("text/"))return!0;const s=e?.capabilities??[],n=s.includes("vision")||s.includes("image"),i=s.includes("file"),o=s.includes("audio"),a=s.includes("video");return!!(n&&ft.includes(t)||i&&t==="application/pdf"||o&&t.startsWith("audio/")||a&&t.startsWith("video/"))}function ri(t){const e=t?.capabilities??[],s=["text/*"];return(e.includes("vision")||e.includes("image"))&&s.push(...ft),e.includes("file")&&s.push("application/pdf"),e.includes("audio")&&s.push("audio/*"),e.includes("video")&&s.push("video/*"),s.join(",")}function ai(t){const e=t?.capabilities??[],s=[];return(e.includes("vision")||e.includes("image"))&&s.push("images"),e.includes("file")&&s.push("PDFs"),e.includes("audio")&&s.push("audio"),e.includes("video")&&s.push("video"),s.length===0?"text only":s.length===1?s[0]:s.length===2?`${s[0]} and ${s[1]}`:`${s.slice(0,-1).join(", ")}, and ${s.at(-1)}`}function vl(){const t=K.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx("div",{className:"border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",children:l.jsxs("div",{className:"flex items-center gap-2.5 h-12 px-4",children:[l.jsx(q,{className:"size-4 shrink-0"}),l.jsx(q,{className:"flex-1 h-6"}),l.jsx(q,{className:"w-[140px] h-8 shrink-0"})]})}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsxs("div",{className:"flex-1 flex flex-col md:border-r md:w-[420px] md:min-w-[420px] min-h-0 overflow-hidden",children:[e,l.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-1",children:Array.from({length:8}).map(yl)})]}),t[1]=s):s=t[1];let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[l.jsx(q,{className:"size-6 shrink-0"}),l.jsx(q,{className:"h-6 w-32"})]}),t[2]=n):n=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs("div",{className:"flex flex-col gap-3 py-2 px-0",children:[n,l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(q,{className:"h-6 w-20 rounded-md"}),l.jsx(q,{className:"h-6 w-24 rounded-md"})]})]}),t[3]=i):i=t[3];let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(q,{className:"h-4 w-24"}),l.jsx(q,{className:"h-4 w-32"})]}),t[4]=o):o=t[4];let a;return t[5]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsxs("div",{className:"flex flex-col md:flex-row h-full sm:h-[460px] min-h-0",children:[s,l.jsx("div",{className:"hidden md:block md:w-[320px] md:shrink-0 p-3",children:l.jsxs("div",{className:"flex flex-col gap-3 py-1 px-1.5",children:[i,l.jsxs("div",{className:"flex flex-col gap-4",children:[o,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(q,{className:"h-4 w-16"}),l.jsx(q,{className:"h-4 w-40"})]})]})]})})]}),t[5]=a):a=t[5],a}function yl(t,e){return l.jsxs("div",{className:"flex items-center gap-2 min-h-8 py-3 px-3 rounded-lg",children:[l.jsx(q,{className:"size-5 shrink-0 rounded-sm"}),l.jsx(q,{className:"flex-1 h-4"}),l.jsx(q,{className:"w-16 h-5 shrink-0 rounded-md"})]},e)}function xt(t){const e=K.c(43),{onClose:s,credentialId:n,onCredentialChange:i,selectedModel:o,onModelChange:a,filterModels:r}=t,[d,m]=O.useState(null),[c,h]=O.useState(""),[u,f]=O.useState(!1),j=O.useRef(null),b=Je(),_=ae(),N=Object.fromEntries((b?.providers??[]).map(Nl)),x=bt(),{org:p}=ie();let v;e[0]!==i?(v=F=>{i(F),m(null)},e[0]=i,e[1]=v):v=e[1];const w=v;let g;e[2]!==n||e[3]!==s||e[4]!==a?(g=F=>{n&&(a(F),h(""),s())},e[2]=n,e[3]=s,e[4]=a,e[5]=g):g=e[5];const y=g;if(_.length===0){let F;return e[6]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx("div",{className:"flex items-center justify-center p-8 w-full sm:w-[740px]",children:l.jsx(qs,{})}),e[6]=F):F=e[6],F}const C="flex flex-col md:flex-row h-full sm:h-[460px] min-h-0",E="flex-1 flex flex-col md:border-r md:w-[420px] md:min-w-[420px] min-h-0 overflow-hidden",I="border-b border-border h-12 bg-background/95 backdrop-blur sticky top-0 z-10",S="flex items-center gap-2.5 h-12 px-4 pr-12 md:pr-4 cursor-text";let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(Xe,{size:16,className:"text-muted-foreground shrink-0"}),e[7]=k):k=e[7];const T=u?"Search all models...":"Search for a model...";let M;e[8]===Symbol.for("react.memo_cache_sentinel")?(M=F=>h(F.target.value),e[8]=M):M=e[8];let A;e[9]!==c||e[10]!==T?(A=l.jsx(ne,{ref:j,type:"text",placeholder:T,value:c,onChange:M,className:"flex-1 min-w-0 border-0 !shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[9]=c,e[10]=T,e[11]=A):A=e[11];const R=_.length>0&&l.jsxs(Et,{value:n??"",onValueChange:w,children:[l.jsxs(Mt,{size:"sm",className:"w-auto max-w-[140px] h-8 shrink-0 gap-1.5 px-2 [&>svg:last-child]:hidden",onClick:Sl,children:[l.jsx(At,{placeholder:"Key",children:(()=>{const F=_.find(be=>be.id===n),J=F?N[F.providerId]:void 0;return l.jsxs("span",{className:"flex items-center gap-1.5 min-w-0",children:[J?.logo?l.jsx("img",{src:J.logo,alt:J.name,className:"w-4 h-4 rounded shrink-0 dark:bg-white dark:rounded-sm dark:p-px"}):l.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary shrink-0",children:(J?.name??F?.providerId??"?").slice(0,1).toUpperCase()}),l.jsx("span",{className:"text-xs truncate",children:J?.name??F?.providerId??"Key"})]})})()}),l.jsx(Rt,{className:"size-4 opacity-50 shrink-0 pointer-events-none"})]}),l.jsx(Ot,{children:_.map(F=>{const J=N[F.providerId];return l.jsx(Tt,{value:F.id,children:l.jsxs("div",{className:"flex items-center gap-2",children:[J?.logo?l.jsx("img",{src:J.logo,alt:J.name,className:"w-4 h-4 rounded dark:bg-white dark:rounded-sm dark:p-px"}):l.jsx("div",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:(J?.name??F.providerId).slice(0,1).toUpperCase()}),l.jsxs("span",{children:[J?.name??F.providerId," — ",F.label]})]})},F.id)})})]});let P;e[12]!==A||e[13]!==R||e[14]!==k?(P=l.jsx("div",{className:I,children:l.jsxs("label",{className:S,children:[k,A,R]})}),e[12]=A,e[13]=R,e[14]=k,e[15]=P):P=e[15];let L;e[16]!==n?(L=F=>{const{error:J,resetError:be}=F;return l.jsx(dl,{error:J,onRetry:be,credentialId:n??void 0})},e[16]=n,e[17]=L):L=e[17];let Q;e[18]===Symbol.for("react.memo_cache_sentinel")?(Q=l.jsx(ml,{}),e[18]=Q):Q=e[18];const U=n??void 0;let $;e[19]===Symbol.for("react.memo_cache_sentinel")?($=()=>f(jl),e[19]=$):$=e[19];let D;e[20]!==r||e[21]!==y||e[22]!==u||e[23]!==c||e[24]!==U?(D=l.jsx(O.Suspense,{fallback:Q,children:l.jsx(gl,{keyId:U,searchTerm:c,onHover:m,onModelSelect:y,managing:u,onToggleManage:$,filterModels:r})}),e[20]=r,e[21]=y,e[22]=u,e[23]=c,e[24]=U,e[25]=D):D=e[25];let V;e[26]!==n||e[27]!==L||e[28]!==D?(V=l.jsx($e,{fallback:L,children:D},n),e[26]=n,e[27]=L,e[28]=D,e[29]=V):V=e[29];let B;e[30]!==u||e[31]!==x||e[32]!==p?(B=!u&&l.jsxs("div",{className:"border-t border-border flex",children:[l.jsxs("button",{type:"button",onClick:()=>O.startTransition(()=>f(!0)),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[l.jsx(Bt,{className:"size-3.5 shrink-0"}),"Manage models"]}),l.jsx("div",{className:"w-px bg-border shrink-0"}),l.jsxs("button",{type:"button",onClick:()=>x({to:"/$org/settings/ai-providers",params:{org:p.slug}}),className:"flex items-center gap-2 flex-1 px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-accent cursor-pointer",children:[l.jsx(Ye,{className:"size-3.5 shrink-0"}),"Manage API keys"]})]}),e[30]=u,e[31]=x,e[32]=p,e[33]=B):B=e[33];let W;e[34]!==P||e[35]!==V||e[36]!==B?(W=l.jsxs("div",{className:E,children:[P,V,B]}),e[34]=P,e[35]=V,e[36]=B,e[37]=W):W=e[37];const G=d??o??null;let H;e[38]!==G?(H=l.jsx("div",{className:"hidden md:flex md:flex-col md:w-[320px] md:shrink-0 p-3",children:l.jsx(rl,{model:G})}),e[38]=G,e[39]=H):H=e[39];let ee;return e[40]!==W||e[41]!==H?(ee=l.jsxs("div",{className:C,children:[W,H]}),e[40]=W,e[41]=H,e[42]=ee):ee=e[42],ee}function jl(t){return!t}function Sl(t){return t.stopPropagation()}function Nl(t){return[t.id,t]}function _l(t){const e=K.c(12),{onClose:s}=t,{credentialId:n,setCredentialId:i,selectedModel:o,setModel:a}=Ze();let r;e[0]!==i?(r=c=>{Z("chat_credential_changed",{credential_id:c}),i(c)},e[0]=i,e[1]=r):r=e[1];let d;e[2]!==n||e[3]!==o?.modelId||e[4]!==a?(d=c=>{n&&(Z("chat_model_changed",{from_model_id:o?.modelId??null,to_model_id:c.modelId,to_model_provider:c.providerId??null,credential_id:n}),a({...c,keyId:n}))},e[2]=n,e[3]=o?.modelId,e[4]=a,e[5]=d):d=e[5];let m;return e[6]!==n||e[7]!==s||e[8]!==o||e[9]!==r||e[10]!==d?(m=l.jsx(xt,{onClose:s,credentialId:n,onCredentialChange:r,selectedModel:o,onModelChange:d}),e[6]=n,e[7]=s,e[8]=o,e[9]=r,e[10]=d,e[11]=m):m=e[11],m}function wl(t){const e=K.c(38),{variant:s,className:n,placeholder:i,model:o,isLoading:a,credentialId:r,onCredentialChange:d,onModelChange:m,filterModels:c}=t,h=s===void 0?"borderless":s,u=i===void 0?"Select model":i,[f,j]=O.useState(!1),b=m!==void 0,_=kt(),N=h==="borderless"?"ghost":"outline",x=h==="borderless"&&"md:border-none";let p;e[0]!==n||e[1]!==x?(p=oe("text-sm hover:bg-accent rounded-lg py-0.5 px-1 gap-1 shadow-none cursor-pointer border-0 group focus-visible:ring-0 focus-visible:ring-offset-0 min-w-0 shrink justify-start overflow-hidden",x,n),e[0]=n,e[1]=x,e[2]=p):p=e[2];let v;e[3]!==a||e[4]!==o||e[5]!==u||e[6]!==b?(v=b?l.jsx(ht,{model:o??null,placeholder:u,isLoading:a}):l.jsx(Il,{placeholder:u}),e[3]=a,e[4]=o,e[5]=u,e[6]=b,e[7]=v):v=e[7];let w;e[8]!==N||e[9]!==p||e[10]!==v?(w=l.jsx(te,{variant:N,size:"sm",className:p,children:v}),e[8]=N,e[9]=p,e[10]=v,e[11]=w):w=e[11];const g=w;let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(vl,{}),e[12]=y):y=e[12];let C;e[13]!==r||e[14]!==c||e[15]!==o||e[16]!==d||e[17]!==m||e[18]!==b?(C=l.jsx(O.Suspense,{fallback:y,children:b?l.jsx(xt,{onClose:()=>j(!1),credentialId:r??null,onCredentialChange:d??Cl,selectedModel:o??null,onModelChange:m,filterModels:c}):l.jsx(_l,{onClose:()=>j(!1)})}),e[13]=r,e[14]=c,e[15]=o,e[16]=d,e[17]=m,e[18]=b,e[19]=C):C=e[19];const E=C;if(_){let M;e[20]!==g?(M=l.jsx(_t,{asChild:!0,children:g}),e[20]=g,e[21]=M):M=e[21];let A;e[22]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(wt,{className:"sr-only",children:"Select model"}),e[22]=A):A=e[22];let R;e[23]!==E?(R=l.jsxs(Ct,{className:"p-0 flex flex-col max-h-[95vh]",children:[A,l.jsx("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:E})]}),e[23]=E,e[24]=R):R=e[24];let P;return e[25]!==f||e[26]!==M||e[27]!==R?(P=l.jsxs(It,{open:f,onOpenChange:j,children:[M,R]}),e[25]=f,e[26]=M,e[27]=R,e[28]=P):P=e[28],P}let I;e[29]!==g?(I=l.jsx(Nt,{asChild:!0,children:g}),e[29]=g,e[30]=I):I=e[30];let S;e[31]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(qe,{className:"sr-only",children:"Select model"}),e[31]=S):S=e[31];let k;e[32]!==E?(k=l.jsxs(We,{className:"p-0 gap-0 sm:max-w-fit overflow-hidden h-[100dvh] sm:h-auto max-h-[100dvh] sm:max-h-[85vh] w-full max-w-full sm:max-w-fit rounded-none sm:rounded-xl border-0 sm:border",closeButtonClassName:"top-3.5 right-3.5 z-20",children:[S,E]}),e[32]=E,e[33]=k):k=e[33];let T;return e[34]!==f||e[35]!==I||e[36]!==k?(T=l.jsxs(Ve,{open:f,onOpenChange:j,children:[I,k]}),e[34]=f,e[35]=I,e[36]=k,e[37]=T):T=e[37],T}function Cl(){}function Il(t){const e=K.c(4),{placeholder:s}=t,{selectedModel:n,isModelsLoading:i}=Ze();let o;return e[0]!==i||e[1]!==n||e[2]!==s?(o=l.jsx(ht,{model:n,placeholder:s,isLoading:i}),e[0]=i,e[1]=n,e[2]=s,e[3]=o):o=e[3],o}export{wl as M,qs as N,ii as O,ai as a,ri as g,oi as i,ni as m};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-fy1D5wVh.js","assets/index-n7SSrZJX.js","assets/index-BHUL0rr0.css","assets/ArrowNarrowLeft-BKxpVLR_.js","assets/CheckCircle-4_rcsB70.js","assets/Container-BcAiX456.js","assets/Settings02-bYDpmczV.js","assets/XCircle-CV0L9GR_.js","assets/constants-Bv-ydthU.js","assets/useInfiniteQuery-CJd90n7M.js","assets/infiniteQueryObserver-BvBE16xD.js","assets/badge-CtBsPi0r.js","assets/input-93auOJA-.js","assets/dropdown-menu-BfGuGlIh.js","assets/ChevronDown-DfsMdmf4.js","assets/ChevronRight-CVhRkUc0.js","assets/DotsVertical-e4sJs2sy.js","assets/table-C8OGdLdI.js","assets/toggle-group-3sydXp-E.js","assets/use-view-mode-CXzkxsjO.js","assets/use-mobile-BP1wV0Dh.js","assets/SearchMd-CnSMs6Gr.js","assets/dialog-CbDVIhlb.js","assets/X-B94SYTq6.js","assets/AlertCircle-DvPnQfC5.js","assets/alert-dialog-DUehP6wO.js","assets/card-BLtPWaiK.js","assets/Trash01-J7CgYdQ6.js","assets/label-CDWfKnpv.js","assets/select-DXPKpbnT.js","assets/ChevronUp-CD4XJT02.js","assets/switch-CrF-gMSq.js","assets/textarea-Bx9ByRsd.js","assets/RefreshCcw01-BvVeeLFE.js","assets/checkbox-BEdGbH_8.js","assets/LinkExternal01-M3Y1_vaI.js","assets/use-copy-CogZRw7t.js","assets/Plus-BR3le3XA.js","assets/Play-CrMiqzaH.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as n,f as c,g as m,j as r,l as f,r as l,aE as u}from"./index-n7SSrZJX.js";const g=l.lazy(()=>u(()=>import("./registry-layout-fy1D5wVh.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])));function _(){const e=n.c(5),o=c();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:i}=m(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==i?(a=r.jsx(l.Suspense,{fallback:s,children:r.jsx(g,{onBack:()=>o({to:"/$org/settings/store",params:{org:i}})})}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-BvBE16xD.js";import{c2 as i}from"./index-n7SSrZJX.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-BvBE16xD.js";import{c2 as u,c3 as n}from"./index-n7SSrZJX.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-n7SSrZJX.js";import{a as f}from"./index-CC820IDY.js";import"./index-Bren1GGu.js";import"./constants-Bv-ydthU.js";import"./collections-CF9hrNRd.js";import"./index-B0QzmEJF.js";import"./use-virtual-mcp-CXDuGiqH.js";import"./use-collections-CtCWr_i-.js";import"./monaco-editor-D2WY7je5.js";import"./scroll-area-DjI8JrA4.js";import"./select-DXPKpbnT.js";import"./use-mobile-BP1wV0Dh.js";import"./ChevronDown-DfsMdmf4.js";import"./ChevronUp-CD4XJT02.js";import"./accordion-_jHDGcgU.js";import"./agent-icon-C6qW6eXG.js";import"./AlertCircle-DvPnQfC5.js";import"./Tool01-CuCSRQWJ.js";import"./XClose-BDJKoeIM.js";import"./RefreshCcw01-BvVeeLFE.js";import"./ArrowNarrowLeft-BKxpVLR_.js";import"./XCircle-CV0L9GR_.js";import"./ArrowUpRight-CuQjuTVk.js";import"./ZapSquare-BVc4n4iU.js";import"./Users03-DuJUh6K5.js";import"./CheckCircle-4_rcsB70.js";import"./ChevronRight-CVhRkUc0.js";import"./DotsVertical-e4sJs2sy.js";import"./Container-BcAiX456.js";import"./Star01-B5vecVQL.js";import"./Palette-BkMTuMlr.js";import"./SearchMd-CnSMs6Gr.js";import"./index-B5cVztKY.js";import"./X-B94SYTq6.js";import"./LinkExternal01-M3Y1_vaI.js";import"./Lock01-_ctwMSEo.js";import"./Sun-wZV-LjB0.js";import"./Play-CrMiqzaH.js";import"./Plus-BR3le3XA.js";import"./Settings02-bYDpmczV.js";import"./Shield01-CMpoeZYl.js";import"./Trash01-J7CgYdQ6.js";import"./User01-BgWj-XfO.js";import"./Zap-DbOUQQao.js";import"./badge-CtBsPi0r.js";import"./view-mode-toggle-DPCyIr82.js";import"./layout-ALExO3RM.js";import"./use-connection-BNJDlOt9.js";import"./use-mcp-tools-BtNM-5qj.js";import"./dialog-CbDVIhlb.js";import"./dropdown-menu-BfGuGlIh.js";import"./integration-icon-D1WPsIeS.js";import"./index-BsNTGYXY.js";import"./empty-state-Bmk-UZeD.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-93auOJA-.js";function xt(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{xt as default};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
declare const mimicFn: {
|
|
2
|
-
/**
|
|
3
|
-
Make a function mimic another one. It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
4
|
-
|
|
5
|
-
@param to - Mimicking function.
|
|
6
|
-
@param from - Function to mimic.
|
|
7
|
-
@returns The modified `to` function.
|
|
8
|
-
|
|
9
|
-
@example
|
|
10
|
-
```
|
|
11
|
-
import mimicFn = require('mimic-fn');
|
|
12
|
-
|
|
13
|
-
function foo() {}
|
|
14
|
-
foo.unicorn = '🦄';
|
|
15
|
-
|
|
16
|
-
function wrapper() {
|
|
17
|
-
return foo();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
console.log(wrapper.name);
|
|
21
|
-
//=> 'wrapper'
|
|
22
|
-
|
|
23
|
-
mimicFn(wrapper, foo);
|
|
24
|
-
|
|
25
|
-
console.log(wrapper.name);
|
|
26
|
-
//=> 'foo'
|
|
27
|
-
|
|
28
|
-
console.log(wrapper.unicorn);
|
|
29
|
-
//=> '🦄'
|
|
30
|
-
```
|
|
31
|
-
*/
|
|
32
|
-
<
|
|
33
|
-
ArgumentsType extends unknown[],
|
|
34
|
-
ReturnType,
|
|
35
|
-
FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
36
|
-
>(
|
|
37
|
-
to: (...arguments: ArgumentsType) => ReturnType,
|
|
38
|
-
from: FunctionType
|
|
39
|
-
): FunctionType;
|
|
40
|
-
|
|
41
|
-
// TODO: Remove this for the next major release, refactor the whole definition to:
|
|
42
|
-
// declare function mimicFn<
|
|
43
|
-
// ArgumentsType extends unknown[],
|
|
44
|
-
// ReturnType,
|
|
45
|
-
// FunctionType extends (...arguments: ArgumentsType) => ReturnType
|
|
46
|
-
// >(
|
|
47
|
-
// to: (...arguments: ArgumentsType) => ReturnType,
|
|
48
|
-
// from: FunctionType
|
|
49
|
-
// ): FunctionType;
|
|
50
|
-
// export = mimicFn;
|
|
51
|
-
default: typeof mimicFn;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export = mimicFn;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const mimicFn = (to, from) => {
|
|
4
|
-
for (const prop of Reflect.ownKeys(from)) {
|
|
5
|
-
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
return to;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
module.exports = mimicFn;
|
|
12
|
-
// TODO: Remove this for the next major release
|
|
13
|
-
module.exports.default = mimicFn;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
-
|
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "mimic-fn",
|
|
3
|
-
"version": "2.1.0",
|
|
4
|
-
"description": "Make a function mimic another one",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": "sindresorhus/mimic-fn",
|
|
7
|
-
"author": {
|
|
8
|
-
"name": "Sindre Sorhus",
|
|
9
|
-
"email": "sindresorhus@gmail.com",
|
|
10
|
-
"url": "sindresorhus.com"
|
|
11
|
-
},
|
|
12
|
-
"engines": {
|
|
13
|
-
"node": ">=6"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"test": "xo && ava && tsd"
|
|
17
|
-
},
|
|
18
|
-
"files": [
|
|
19
|
-
"index.js",
|
|
20
|
-
"index.d.ts"
|
|
21
|
-
],
|
|
22
|
-
"keywords": [
|
|
23
|
-
"function",
|
|
24
|
-
"mimic",
|
|
25
|
-
"imitate",
|
|
26
|
-
"rename",
|
|
27
|
-
"copy",
|
|
28
|
-
"inherit",
|
|
29
|
-
"properties",
|
|
30
|
-
"name",
|
|
31
|
-
"func",
|
|
32
|
-
"fn",
|
|
33
|
-
"set",
|
|
34
|
-
"infer",
|
|
35
|
-
"change"
|
|
36
|
-
],
|
|
37
|
-
"devDependencies": {
|
|
38
|
-
"ava": "^1.4.1",
|
|
39
|
-
"tsd": "^0.7.1",
|
|
40
|
-
"xo": "^0.24.0"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# mimic-fn [](https://travis-ci.org/sindresorhus/mimic-fn)
|
|
2
|
-
|
|
3
|
-
> Make a function mimic another one
|
|
4
|
-
|
|
5
|
-
Useful when you wrap a function in another function and like to preserve the original name and other properties.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## Install
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
$ npm install mimic-fn
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
```js
|
|
18
|
-
const mimicFn = require('mimic-fn');
|
|
19
|
-
|
|
20
|
-
function foo() {}
|
|
21
|
-
foo.unicorn = '🦄';
|
|
22
|
-
|
|
23
|
-
function wrapper() {
|
|
24
|
-
return foo();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
console.log(wrapper.name);
|
|
28
|
-
//=> 'wrapper'
|
|
29
|
-
|
|
30
|
-
mimicFn(wrapper, foo);
|
|
31
|
-
|
|
32
|
-
console.log(wrapper.name);
|
|
33
|
-
//=> 'foo'
|
|
34
|
-
|
|
35
|
-
console.log(wrapper.unicorn);
|
|
36
|
-
//=> '🦄'
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
## API
|
|
41
|
-
|
|
42
|
-
It will copy over the properties `name`, `length`, `displayName`, and any custom properties you may have set.
|
|
43
|
-
|
|
44
|
-
### mimicFn(to, from)
|
|
45
|
-
|
|
46
|
-
Modifies the `to` function and returns it.
|
|
47
|
-
|
|
48
|
-
#### to
|
|
49
|
-
|
|
50
|
-
Type: `Function`
|
|
51
|
-
|
|
52
|
-
Mimicking function.
|
|
53
|
-
|
|
54
|
-
#### from
|
|
55
|
-
|
|
56
|
-
Type: `Function`
|
|
57
|
-
|
|
58
|
-
Function to mimic.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
## Related
|
|
62
|
-
|
|
63
|
-
- [rename-fn](https://github.com/sindresorhus/rename-fn) - Rename a function
|
|
64
|
-
- [keep-func-props](https://github.com/ehmicky/keep-func-props) - Wrap a function without changing its name, length and other properties
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
## License
|
|
68
|
-
|
|
69
|
-
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Copyright © 2017, Charmander <~@charmander.me>
|
|
2
|
-
|
|
3
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
4
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
5
|
-
copyright notice and this permission notice appear in all copies.
|
|
6
|
-
|
|
7
|
-
THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
9
|
-
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[![Build status][ci image]][ci]
|
|
2
|
-
|
|
3
|
-
64-bit big-endian signed integer-to-string conversion designed for [pg][].
|
|
4
|
-
|
|
5
|
-
```js
|
|
6
|
-
const readInt8 = require('pg-int8');
|
|
7
|
-
|
|
8
|
-
readInt8(Buffer.from([0, 1, 2, 3, 4, 5, 6, 7]))
|
|
9
|
-
// '283686952306183'
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[pg]: https://github.com/brianc/node-postgres
|
|
14
|
-
|
|
15
|
-
[ci]: https://travis-ci.org/charmander/pg-int8
|
|
16
|
-
[ci image]: https://api.travis-ci.org/charmander/pg-int8.svg
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// selected so (BASE - 1) * 0x100000000 + 0xffffffff is a safe integer
|
|
4
|
-
var BASE = 1000000;
|
|
5
|
-
|
|
6
|
-
function readInt8(buffer) {
|
|
7
|
-
var high = buffer.readInt32BE(0);
|
|
8
|
-
var low = buffer.readUInt32BE(4);
|
|
9
|
-
var sign = '';
|
|
10
|
-
|
|
11
|
-
if (high < 0) {
|
|
12
|
-
high = ~high + (low === 0);
|
|
13
|
-
low = (~low + 1) >>> 0;
|
|
14
|
-
sign = '-';
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
var result = '';
|
|
18
|
-
var carry;
|
|
19
|
-
var t;
|
|
20
|
-
var digits;
|
|
21
|
-
var pad;
|
|
22
|
-
var l;
|
|
23
|
-
var i;
|
|
24
|
-
|
|
25
|
-
{
|
|
26
|
-
carry = high % BASE;
|
|
27
|
-
high = high / BASE >>> 0;
|
|
28
|
-
|
|
29
|
-
t = 0x100000000 * carry + low;
|
|
30
|
-
low = t / BASE >>> 0;
|
|
31
|
-
digits = '' + (t - BASE * low);
|
|
32
|
-
|
|
33
|
-
if (low === 0 && high === 0) {
|
|
34
|
-
return sign + digits + result;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
pad = '';
|
|
38
|
-
l = 6 - digits.length;
|
|
39
|
-
|
|
40
|
-
for (i = 0; i < l; i++) {
|
|
41
|
-
pad += '0';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
result = pad + digits + result;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
{
|
|
48
|
-
carry = high % BASE;
|
|
49
|
-
high = high / BASE >>> 0;
|
|
50
|
-
|
|
51
|
-
t = 0x100000000 * carry + low;
|
|
52
|
-
low = t / BASE >>> 0;
|
|
53
|
-
digits = '' + (t - BASE * low);
|
|
54
|
-
|
|
55
|
-
if (low === 0 && high === 0) {
|
|
56
|
-
return sign + digits + result;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
pad = '';
|
|
60
|
-
l = 6 - digits.length;
|
|
61
|
-
|
|
62
|
-
for (i = 0; i < l; i++) {
|
|
63
|
-
pad += '0';
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
result = pad + digits + result;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
{
|
|
70
|
-
carry = high % BASE;
|
|
71
|
-
high = high / BASE >>> 0;
|
|
72
|
-
|
|
73
|
-
t = 0x100000000 * carry + low;
|
|
74
|
-
low = t / BASE >>> 0;
|
|
75
|
-
digits = '' + (t - BASE * low);
|
|
76
|
-
|
|
77
|
-
if (low === 0 && high === 0) {
|
|
78
|
-
return sign + digits + result;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
pad = '';
|
|
82
|
-
l = 6 - digits.length;
|
|
83
|
-
|
|
84
|
-
for (i = 0; i < l; i++) {
|
|
85
|
-
pad += '0';
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
result = pad + digits + result;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
carry = high % BASE;
|
|
93
|
-
t = 0x100000000 * carry + low;
|
|
94
|
-
digits = '' + t % BASE;
|
|
95
|
-
|
|
96
|
-
return sign + digits + result;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
module.exports = readInt8;
|