From 69f5fe35d8ac7970df175fda3a76cc4f853a59e5 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Sat, 1 Aug 2026 17:17:18 -0700 Subject: [PATCH 1/2] Merge pull request #35523 from BerriAI/litellm_ui_login_no_mcp_landing fix(ui): land general login on the keys dashboard, send MCP consent to /ui/connect (cherry picked from commit ceaf556b2e7eab737517fc4e494816e4b4359c71) --- .../mcp_server/gateway_dcr_flow.py | 2 +- .../internal-user/internalUserNoTeam.spec.ts | 5 +- .../mcp_server/test_gateway_dcr_flow.py | 2 +- .../src/app/(dashboard)/hooks/keys/useKeys.ts | 3 +- .../src/app/(dashboard)/page.test.tsx | 88 ++++++++----------- .../src/app/(dashboard)/page.tsx | 24 +---- .../src/app/connect/page.test.tsx | 51 ++++++++++- ui/litellm-dashboard/src/app/connect/page.tsx | 11 ++- 8 files changed, 103 insertions(+), 83 deletions(-) diff --git a/litellm/proxy/_experimental/mcp_server/gateway_dcr_flow.py b/litellm/proxy/_experimental/mcp_server/gateway_dcr_flow.py index 58233c4c9e5..20094ce3e21 100644 --- a/litellm/proxy/_experimental/mcp_server/gateway_dcr_flow.py +++ b/litellm/proxy/_experimental/mcp_server/gateway_dcr_flow.py @@ -361,7 +361,7 @@ def aggregate_authorize( exp=int(now.timestamp()) + CONNECT_FLOW_TTL_SECONDS, ) connect_url = _append_query_params( - f"{base_url}/ui/chat/integrations", + f"{base_url}/ui/connect", {"connect_flow": handle, "connect_client": _origin_only(redirect_uri)}, ) response = RedirectResponse(connect_url, status_code=303) diff --git a/tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.ts b/tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.ts index 3affa4d898d..1b048198456 100644 --- a/tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.ts +++ b/tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.ts @@ -17,9 +17,8 @@ test.describe("Internal User with no team memberships", () => { await page.getByPlaceholder("Enter your username").fill("noteam@test.local"); await page.getByPlaceholder("Enter your password").fill("test"); await page.getByRole("button", { name: "Login", exact: true }).click(); - // A non-admin with no keys lands on /ui/connect, so the keys dashboard has - // to be asked for explicitly once that redirect settles. - await page.waitForURL(/\/ui\/connect/, { timeout: 30_000 }); + await expect(page.getByRole("complementary").getByText("Virtual Keys")).toBeVisible({ timeout: 30_000 }); + expect(new URL(page.url()).pathname).not.toMatch(/\/connect$/); await navigateToPage(page, Page.ApiKeys); // Scope to the sidebar; the top-bar breadcrumb also shows "Virtual Keys". await expect(page.getByRole("complementary").getByText("Virtual Keys")).toBeVisible({ timeout: 15_000 }); diff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_gateway_dcr_flow.py b/tests/test_litellm/proxy/_experimental/mcp_server/test_gateway_dcr_flow.py index 375ec022115..b7f2a93f8fb 100644 --- a/tests/test_litellm/proxy/_experimental/mcp_server/test_gateway_dcr_flow.py +++ b/tests/test_litellm/proxy/_experimental/mcp_server/test_gateway_dcr_flow.py @@ -208,7 +208,7 @@ async def test_authorize_with_session_hands_browser_to_connect_page_with_flow_co response = _authorize(client_id, session_user_id="u1") assert response.status_code == 303 location = urlparse(response.headers["location"]) - assert location.path == "/ui/chat/integrations" + assert location.path == "/ui/connect" params = parse_qs(location.query) handle = params["connect_flow"][0] assert params["connect_client"] == ["https://claude.ai"] diff --git a/ui/litellm-dashboard/src/app/(dashboard)/hooks/keys/useKeys.ts b/ui/litellm-dashboard/src/app/(dashboard)/hooks/keys/useKeys.ts index 0df809bc582..198058803eb 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/hooks/keys/useKeys.ts +++ b/ui/litellm-dashboard/src/app/(dashboard)/hooks/keys/useKeys.ts @@ -101,14 +101,13 @@ export const useKeys = ( page: number, pageSize: number, options: KeyListCallOptions = {}, - enabled: boolean = true, ): UseQueryResult => { const { accessToken } = useAuthorized(); return useQuery({ queryKey: keyKeys.list({ page, limit: pageSize, ...options }), queryFn: async () => await keyListCall(accessToken!, page, pageSize, options), - enabled: Boolean(accessToken) && enabled, + enabled: Boolean(accessToken), staleTime: 30000, // 30 seconds placeholderData: keepPreviousData, }); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/page.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/page.test.tsx index 89975f231aa..5abb219f019 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/page.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/page.test.tsx @@ -1,4 +1,4 @@ -import { afterEach, describe, expect, it, vi } from "vitest"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { render, screen } from "@testing-library/react"; import CreateKeyPage from "./page"; @@ -11,16 +11,15 @@ const { mockReplace, mockUseKeys, mockMigratedHref, state } = vi.hoisted(() => { login: "success" as string | null, userRole: "Internal User", keys: [] as KeyRow[], - keysLoading: false, returnUrl: null as string | null, }; return { state, mockReplace: vi.fn(), mockMigratedHref: vi.fn((segment: string) => `/mocked-ui/${segment}`), - mockUseKeys: vi.fn((_page: number, _size: number, _opts: unknown, _enabled: boolean) => ({ - data: state.keysLoading ? undefined : { keys: state.keys, total_count: state.keys.length }, - isLoading: state.keysLoading, + mockUseKeys: vi.fn(() => ({ + data: { keys: state.keys, total_count: state.keys.length }, + isLoading: false, })), }; }); @@ -55,73 +54,60 @@ vi.mock("@/utils/returnUrlUtils", () => ({ storeReturnUrl: () => undefined, })); -describe("dashboard landing keyless redirect", () => { +const realLocation = window.location; +const mockLocationReplace = vi.fn(); + +describe("dashboard landing", () => { + beforeEach(() => { + Object.defineProperty(window, "location", { + configurable: true, + value: { + origin: "http://localhost:3000", + href: "http://localhost:3000/ui/?login=success", + replace: mockLocationReplace, + }, + }); + }); + afterEach(() => { + Object.defineProperty(window, "location", { configurable: true, value: realLocation }); state.login = "success"; state.userRole = "Internal User"; state.keys = []; - state.keysLoading = false; state.returnUrl = null; mockReplace.mockClear(); mockUseKeys.mockClear(); mockMigratedHref.mockClear(); + mockLocationReplace.mockClear(); }); - it.each(["Internal User", "Internal Viewer"])("sends a keyless %s to the connect page after login", (role) => { - state.userRole = role; - render(); - expect(mockReplace).toHaveBeenCalledWith("/mocked-ui/connect"); - expect(screen.queryByTestId("api-keys-dashboard")).not.toBeInTheDocument(); - }); + it.each(["Internal User", "Internal Viewer", "Admin", "Admin Viewer", "Org Admin", ""])( + "lands a keyless %s on the keys dashboard, never on the MCP connect page", + (role) => { + state.userRole = role; + render(); + expect(screen.getByTestId("api-keys-dashboard")).toBeInTheDocument(); + expect(screen.queryByTestId("loading-screen")).not.toBeInTheDocument(); + expect(mockReplace).not.toHaveBeenCalled(); + expect(mockMigratedHref).not.toHaveBeenCalledWith("connect"); + }, + ); - it.each(["Admin", "Admin Viewer", "Org Admin"])("leaves a keyless %s on the dashboard", (role) => { - state.userRole = role; - render(); - expect(mockReplace).not.toHaveBeenCalled(); - expect(screen.getByTestId("api-keys-dashboard")).toBeInTheDocument(); - }); - - it("leaves a user who already has a key on the dashboard", () => { + it("lands a user who already owns a key on the keys dashboard", () => { state.keys = [{ token: "sk-abc" }]; render(); - expect(mockReplace).not.toHaveBeenCalled(); expect(screen.getByTestId("api-keys-dashboard")).toBeInTheDocument(); - }); - - it("does not redirect outside the post-login landing, and skips the key lookup entirely", () => { - state.login = null; - render(); - expect(mockReplace).not.toHaveBeenCalled(); - expect(screen.getByTestId("api-keys-dashboard")).toBeInTheDocument(); - expect(mockUseKeys.mock.calls[0][3]).toBe(false); - }); - - it("holds the loading screen on the landing until the role hydrates, instead of flashing the dashboard", () => { - state.userRole = ""; - render(); - expect(screen.getByTestId("loading-screen")).toBeInTheDocument(); - expect(screen.queryByTestId("api-keys-dashboard")).not.toBeInTheDocument(); expect(mockReplace).not.toHaveBeenCalled(); }); - it("does not hold the dashboard for an unhydrated role outside the post-login landing", () => { - state.login = null; - state.userRole = ""; + it("never looks a user's keys up to decide where the landing goes", () => { render(); - expect(screen.getByTestId("api-keys-dashboard")).toBeInTheDocument(); + expect(mockUseKeys).not.toHaveBeenCalled(); }); - it("holds the loading screen while the key lookup is in flight", () => { - state.keysLoading = true; - render(); - expect(screen.getByTestId("loading-screen")).toBeInTheDocument(); - expect(screen.queryByTestId("api-keys-dashboard")).not.toBeInTheDocument(); - expect(mockReplace).not.toHaveBeenCalled(); - }); - - it("yields to an explicit return URL instead of the connect redirect", () => { + it("still sends the user to an explicit stored return URL", () => { state.returnUrl = "/ui/models-and-endpoints"; render(); - expect(mockReplace).not.toHaveBeenCalledWith("/mocked-ui/connect"); + expect(mockLocationReplace).toHaveBeenCalledWith("http://localhost:3000/ui/models-and-endpoints"); }); }); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/page.tsx b/ui/litellm-dashboard/src/app/(dashboard)/page.tsx index c43ba12985d..9e82d33dc2b 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/page.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/page.tsx @@ -3,8 +3,6 @@ import ApiKeysDashboard from "@/app/(dashboard)/api-keys/ApiKeysDashboard"; import LoadingScreen from "@/components/common_components/LoadingScreen"; import { proxyBaseUrl } from "@/components/networking"; -import { useKeys } from "@/app/(dashboard)/hooks/keys/useKeys"; -import { internalUserRoles } from "@/utils/roles"; import { useAuth } from "@/contexts/AuthContext"; import { buildLoginUrlWithReturn, @@ -19,7 +17,7 @@ import { useRouter, useSearchParams } from "next/navigation"; import { Suspense, useEffect, useRef } from "react"; function CreateKeyPageContent() { - const { authLoading, token, userRole, userID } = useAuth(); + const { authLoading, token } = useAuth(); const router = useRouter(); const searchParams = useSearchParams()!; @@ -28,7 +26,6 @@ function CreateKeyPageContent() { // Track if we've already attempted a return URL redirect to prevent race conditions const hasAttemptedReturnRedirectRef = useRef(false); - const didReturnRedirectRef = useRef(false); const redirectToLogin = authLoading === false && token === null; @@ -78,7 +75,6 @@ function CreateKeyPageContent() { // Only redirect if the return URL is different from the current URL // This prevents infinite redirect loops if (normalizedReturnUrl !== normalizedCurrentUrl) { - didReturnRedirectRef.current = true; window.location.replace(safeUrl.href); } } @@ -87,26 +83,10 @@ function CreateKeyPageContent() { useEffect(() => { if (!token) { hasAttemptedReturnRedirectRef.current = false; - didReturnRedirectRef.current = false; } }, [token]); - const isPostLoginLanding = searchParams.get("login") === "success"; - const isSignedIn = !authLoading && Boolean(token); - const isAwaitingRole = isPostLoginLanding && isSignedIn && userRole === ""; - const shouldCheckForKeys = isPostLoginLanding && isSignedIn && internalUserRoles.includes(userRole); - const { data: keysData, isLoading: keysLoading } = useKeys(1, 1, { userID }, shouldCheckForKeys); - const isKeylessLanding = shouldCheckForKeys && !keysLoading && keysData?.keys?.length === 0; - const isResolvingKeylessLanding = (shouldCheckForKeys && keysLoading) || isKeylessLanding; - const isResolvingLanding = isAwaitingRole || isResolvingKeylessLanding; - - useEffect(() => { - if (isKeylessLanding && !didReturnRedirectRef.current) { - router.replace(migratedHref("connect")); - } - }, [isKeylessLanding, router]); - - const isRedirecting = redirectToLogin || isLegacyRedirect || isResolvingLanding; + const isRedirecting = redirectToLogin || isLegacyRedirect; if (authLoading || isRedirecting) { return ; diff --git a/ui/litellm-dashboard/src/app/connect/page.test.tsx b/ui/litellm-dashboard/src/app/connect/page.test.tsx index 07b0e7a305a..7d49a8b6a4c 100644 --- a/ui/litellm-dashboard/src/app/connect/page.test.tsx +++ b/ui/litellm-dashboard/src/app/connect/page.test.tsx @@ -6,33 +6,53 @@ interface PanelProps { accessToken: string; selectedServers: string[]; onChange: (servers: string[]) => void; + connectMode?: boolean; } -const { mockReplace, mockPanel, state } = vi.hoisted(() => { +interface BannerProps { + flowHandle: string; + clientOrigin: string | null; +} + +const { mockReplace, mockPanel, mockBanner, state } = vi.hoisted(() => { const state = { oauthReturn: null as string | null, + connectFlow: null as string | null, + connectClient: null as string | null, }; return { state, mockReplace: vi.fn(), mockPanel: vi.fn((_props: PanelProps) =>
), + mockBanner: vi.fn((_props: BannerProps) =>
), }; }); vi.mock("next/navigation", () => ({ useRouter: () => ({ replace: mockReplace }), - useSearchParams: () => ({ get: (key: string) => (key === "mcpOauthReturn" ? state.oauthReturn : null) }), + useSearchParams: () => ({ + get: (key: string) => { + if (key === "mcpOauthReturn") return state.oauthReturn; + if (key === "connect_flow") return state.connectFlow; + if (key === "connect_client") return state.connectClient; + return null; + }, + }), })); vi.mock("@/app/(dashboard)/hooks/useAuthorized", () => ({ default: () => ({ accessToken: "token-123" }), })); vi.mock("@/components/chat/MCPAppsPanel", () => ({ default: mockPanel })); +vi.mock("@/components/chat/ConnectFlowBanner", () => ({ default: mockBanner })); describe("ConnectPage", () => { afterEach(() => { state.oauthReturn = null; + state.connectFlow = null; + state.connectClient = null; mockReplace.mockClear(); mockPanel.mockClear(); + mockBanner.mockClear(); }); it("renders the MCP connect panel with the user's access token", () => { @@ -52,4 +72,31 @@ describe("ConnectPage", () => { render(); expect(mockReplace).not.toHaveBeenCalled(); }); + + it("mounts the gateway connect banner and puts the panel in connect mode for a DCR flow", () => { + state.connectFlow = "flow-handle-123"; + state.connectClient = "https://claude.ai"; + render(); + expect(screen.getByTestId("connect-flow-banner")).toBeInTheDocument(); + expect(mockBanner.mock.calls[0][0]).toMatchObject({ + flowHandle: "flow-handle-123", + clientOrigin: "https://claude.ai", + }); + expect(mockPanel.mock.calls[0][0].connectMode).toBe(true); + }); + + it("shows no connect banner and leaves connect mode off for a plain visit", () => { + render(); + expect(screen.queryByTestId("connect-flow-banner")).not.toBeInTheDocument(); + expect(mockBanner).not.toHaveBeenCalled(); + expect(mockPanel.mock.calls[0][0].connectMode).toBe(false); + }); + + it("keeps the connect flow handle in the URL while stripping the OAuth return param", () => { + state.oauthReturn = "apps"; + state.connectFlow = "flow-handle-123"; + window.history.replaceState({}, "", "/connect?connect_flow=flow-handle-123&mcpOauthReturn=apps"); + render(); + expect(mockReplace).toHaveBeenCalledWith("/connect?connect_flow=flow-handle-123"); + }); }); diff --git a/ui/litellm-dashboard/src/app/connect/page.tsx b/ui/litellm-dashboard/src/app/connect/page.tsx index 84770915e46..3f0c269e86b 100644 --- a/ui/litellm-dashboard/src/app/connect/page.tsx +++ b/ui/litellm-dashboard/src/app/connect/page.tsx @@ -4,6 +4,7 @@ import { Suspense, useEffect, useState } from "react"; import { useRouter, useSearchParams } from "next/navigation"; import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized"; import MCPAppsPanel from "@/components/chat/MCPAppsPanel"; +import ConnectFlowBanner from "@/components/chat/ConnectFlowBanner"; function ConnectPageContent() { const { accessToken } = useAuthorized(); @@ -11,6 +12,8 @@ function ConnectPageContent() { const router = useRouter(); const searchParams = useSearchParams(); const oauthReturn = searchParams.get("mcpOauthReturn"); + const connectFlow = searchParams.get("connect_flow"); + const connectClient = searchParams.get("connect_client"); useEffect(() => { if (oauthReturn) { @@ -22,7 +25,13 @@ function ConnectPageContent() { return (
- + {connectFlow && } +
); } From 7d0963a2969614e9d968bafdae0901775600f2a4 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 1 Aug 2026 17:27:37 -0700 Subject: [PATCH 2/2] chore: update Next.js build artifacts (2026-08-02 00:27 UTC, node v20.20.2) --- litellm/proxy/_experimental/out/404.html | 2 +- litellm/proxy/_experimental/out/404/index.html | 2 +- .../out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt | 4 ++-- .../out/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- litellm/proxy/_experimental/out/__next._full.txt | 8 ++++---- litellm/proxy/_experimental/out/__next._head.txt | 2 +- .../proxy/_experimental/out/__next._index.txt | 2 +- litellm/proxy/_experimental/out/__next._tree.txt | 2 +- .../_buildManifest.js | 0 .../_clientMiddlewareManifest.js | 0 .../_ssgManifest.js | 0 .../out/_next/static/chunks/007c8g8hmd9qz.js | 1 - .../out/_next/static/chunks/00g6xfr4yow7h.js | 1 - .../out/_next/static/chunks/05gtohlbmxr4-.js | 1 + .../out/_next/static/chunks/05id71gg6oywc.js | 1 - .../out/_next/static/chunks/06q8aep867ss7.js | 1 - .../out/_next/static/chunks/0dh09yfknpuy3.js | 1 - .../out/_next/static/chunks/0ekppsigd1c7x.js | 1 + .../out/_next/static/chunks/0i25zatajbma2.js | 1 - .../out/_next/static/chunks/0jc5k1aju4npz.js | 1 + .../out/_next/static/chunks/0jffxvle4fz98.js | 1 + .../out/_next/static/chunks/0nb8zgkq5nq1r.js | 1 - .../out/_next/static/chunks/0puabvl8lbw4f.js | 1 + .../{0eamb3kk74kws.js => 0x0jl947h6pc2.js} | 2 +- .../out/_next/static/chunks/0xma3x__xf0bc.js | 1 + .../out/_next/static/chunks/1-xfgtefesa0q.js | 1 + .../out/_next/static/chunks/11f7pk3f8kvvz.js | 1 + .../out/_next/static/chunks/149mkwj8vvf2d.js | 1 + .../out/_next/static/chunks/14aik5-j--wpq.js | 16 ---------------- .../out/_next/static/chunks/19283pb0f3m0p.js | 1 - .../out/_next/static/chunks/19wkvbsdat9-w.js | 1 - .../out/_next/static/chunks/1_l2msnvj037n.js | 1 - .../out/_next/static/chunks/1a0bgy7kzrj91.js | 1 - .../out/_next/static/chunks/1cu4fo0qe7dbg.js | 1 + .../{058j9m4b8p4wx.js => 1jgomcpnpdcun.js} | 2 +- .../{24quqpgjv0f2h.js => 1lrw-21mmi7hg.js} | 2 +- .../{3-9r9qzlv5bdt.js => 1s1-y1y3dcjrr.js} | 2 +- .../out/_next/static/chunks/1uy2av_f_ojad.js | 2 -- .../out/_next/static/chunks/1xuhivu7ukxx1.js | 1 - .../out/_next/static/chunks/22iools_e0k44.js | 1 - .../out/_next/static/chunks/2647ky-e2mlht.js | 1 + .../out/_next/static/chunks/2_zhbb0j-b2ok.js | 1 - .../out/_next/static/chunks/2a6gczh1lyd79.js | 1 - .../out/_next/static/chunks/2csr0_og3ad-m.js | 1 + .../out/_next/static/chunks/2gx4rjd0cpk7t.js | 1 + .../out/_next/static/chunks/2mgqulwb_9fuy.js | 1 + .../out/_next/static/chunks/2qeanmy565n9w.js | 1 - .../out/_next/static/chunks/2rq8yc88w8h8j.js | 1 + .../out/_next/static/chunks/2u7n8srjka729.js | 1 - .../out/_next/static/chunks/2x6bixy54rehh.js | 1 - .../{1fgqa8zynis07.js => 31dsntvzth6um.js} | 2 +- .../out/_next/static/chunks/3b1zpgtutyasu.js | 7 +++++++ .../out/_next/static/chunks/3b36lpc0hi_oc.js | 2 ++ .../out/_next/static/chunks/3im7o_chegc3_.js | 1 + .../out/_next/static/chunks/3jstcofmhxj55.js | 1 + .../out/_next/static/chunks/3o9hk2qrms04m.js | 16 ++++++++++++++++ .../out/_next/static/chunks/3rxr_fmvlxjkw.js | 1 - .../out/_next/static/chunks/3tva2e_i4hgs3.js | 1 - .../out/_next/static/chunks/43ka9o8yln4me.js | 1 + .../out/_next/static/chunks/43kzbrxr4c9fm.js | 1 + .../out/_next/static/chunks/44y6deyjlpmn3.js | 1 + .../out/_not-found/__next._full.txt | 2 +- .../out/_not-found/__next._head.txt | 2 +- .../out/_not-found/__next._index.txt | 2 +- .../_not-found/__next._not-found.__PAGE__.txt | 2 +- .../out/_not-found/__next._not-found.txt | 2 +- .../out/_not-found/__next._tree.txt | 2 +- .../_experimental/out/_not-found/index.html | 2 +- .../proxy/_experimental/out/_not-found/index.txt | 2 +- ...t.!KGRhc2hib2FyZCk.access-groups.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.access-groups.txt | 2 +- .../access-groups/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/access-groups/__next._full.txt | 8 ++++---- .../out/access-groups/__next._head.txt | 2 +- .../out/access-groups/__next._index.txt | 2 +- .../out/access-groups/__next._tree.txt | 2 +- .../_experimental/out/access-groups/index.html | 2 +- .../_experimental/out/access-groups/index.txt | 8 ++++---- ...ext.!KGRhc2hib2FyZCk.admin-panel.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.admin-panel.txt | 2 +- .../out/admin-panel/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/admin-panel/__next._full.txt | 6 +++--- .../out/admin-panel/__next._head.txt | 2 +- .../out/admin-panel/__next._index.txt | 2 +- .../out/admin-panel/__next._tree.txt | 2 +- .../_experimental/out/admin-panel/index.html | 2 +- .../_experimental/out/admin-panel/index.txt | 6 +++--- .../__next.!KGRhc2hib2FyZCk.agents.__PAGE__.txt | 4 ++-- .../agents/__next.!KGRhc2hib2FyZCk.agents.txt | 2 +- .../out/agents/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/agents/__next._full.txt | 8 ++++---- .../_experimental/out/agents/__next._head.txt | 2 +- .../_experimental/out/agents/__next._index.txt | 2 +- .../_experimental/out/agents/__next._tree.txt | 2 +- .../proxy/_experimental/out/agents/index.html | 2 +- litellm/proxy/_experimental/out/agents/index.txt | 8 ++++---- ...__next.!KGRhc2hib2FyZCk.api-keys.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.api-keys.txt | 2 +- .../out/api-keys/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/api-keys/__next._full.txt | 8 ++++---- .../_experimental/out/api-keys/__next._head.txt | 2 +- .../_experimental/out/api-keys/__next._index.txt | 2 +- .../_experimental/out/api-keys/__next._tree.txt | 2 +- .../proxy/_experimental/out/api-keys/index.html | 2 +- .../proxy/_experimental/out/api-keys/index.txt | 8 ++++---- ...t.!KGRhc2hib2FyZCk.api-reference.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.api-reference.txt | 2 +- .../api-reference/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/api-reference/__next._full.txt | 6 +++--- .../out/api-reference/__next._head.txt | 2 +- .../out/api-reference/__next._index.txt | 2 +- .../out/api-reference/__next._tree.txt | 2 +- .../_experimental/out/api-reference/index.html | 2 +- .../_experimental/out/api-reference/index.txt | 6 +++--- .../__next.!KGRhc2hib2FyZCk.budgets.__PAGE__.txt | 4 ++-- .../budgets/__next.!KGRhc2hib2FyZCk.budgets.txt | 2 +- .../out/budgets/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/budgets/__next._full.txt | 6 +++--- .../_experimental/out/budgets/__next._head.txt | 2 +- .../_experimental/out/budgets/__next._index.txt | 2 +- .../_experimental/out/budgets/__next._tree.txt | 2 +- .../proxy/_experimental/out/budgets/index.html | 2 +- .../proxy/_experimental/out/budgets/index.txt | 6 +++--- .../__next.!KGRhc2hib2FyZCk.caching.__PAGE__.txt | 4 ++-- .../caching/__next.!KGRhc2hib2FyZCk.caching.txt | 2 +- .../out/caching/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/caching/__next._full.txt | 8 ++++---- .../_experimental/out/caching/__next._head.txt | 2 +- .../_experimental/out/caching/__next._index.txt | 2 +- .../_experimental/out/caching/__next._tree.txt | 2 +- .../proxy/_experimental/out/caching/index.html | 2 +- .../proxy/_experimental/out/caching/index.txt | 8 ++++---- .../_experimental/out/chat/__next._full.txt | 2 +- .../_experimental/out/chat/__next._head.txt | 2 +- .../_experimental/out/chat/__next._index.txt | 2 +- .../_experimental/out/chat/__next._tree.txt | 2 +- .../out/chat/__next.chat.__PAGE__.txt | 2 +- .../proxy/_experimental/out/chat/__next.chat.txt | 2 +- .../out/chat/api-keys/__next._full.txt | 2 +- .../out/chat/api-keys/__next._head.txt | 2 +- .../out/chat/api-keys/__next._index.txt | 2 +- .../out/chat/api-keys/__next._tree.txt | 2 +- .../api-keys/__next.chat.api-keys.__PAGE__.txt | 2 +- .../out/chat/api-keys/__next.chat.api-keys.txt | 2 +- .../out/chat/api-keys/__next.chat.txt | 2 +- .../_experimental/out/chat/api-keys/index.html | 2 +- .../_experimental/out/chat/api-keys/index.txt | 2 +- .../out/chat/credentials/__next._full.txt | 2 +- .../out/chat/credentials/__next._head.txt | 2 +- .../out/chat/credentials/__next._index.txt | 2 +- .../out/chat/credentials/__next._tree.txt | 2 +- .../__next.chat.credentials.__PAGE__.txt | 2 +- .../chat/credentials/__next.chat.credentials.txt | 2 +- .../out/chat/credentials/__next.chat.txt | 2 +- .../out/chat/credentials/index.html | 2 +- .../_experimental/out/chat/credentials/index.txt | 2 +- litellm/proxy/_experimental/out/chat/index.html | 2 +- litellm/proxy/_experimental/out/chat/index.txt | 2 +- .../out/chat/integrations/__next._full.txt | 6 +++--- .../out/chat/integrations/__next._head.txt | 2 +- .../out/chat/integrations/__next._index.txt | 2 +- .../out/chat/integrations/__next._tree.txt | 2 +- .../__next.chat.integrations.__PAGE__.txt | 4 ++-- .../integrations/__next.chat.integrations.txt | 2 +- .../out/chat/integrations/__next.chat.txt | 2 +- .../out/chat/integrations/index.html | 2 +- .../out/chat/integrations/index.txt | 6 +++--- .../_experimental/out/chat/logs/__next._full.txt | 2 +- .../_experimental/out/chat/logs/__next._head.txt | 2 +- .../out/chat/logs/__next._index.txt | 2 +- .../_experimental/out/chat/logs/__next._tree.txt | 2 +- .../out/chat/logs/__next.chat.logs.__PAGE__.txt | 2 +- .../out/chat/logs/__next.chat.logs.txt | 2 +- .../_experimental/out/chat/logs/__next.chat.txt | 2 +- .../proxy/_experimental/out/chat/logs/index.html | 2 +- .../proxy/_experimental/out/chat/logs/index.txt | 2 +- .../out/chat/usage/__next._full.txt | 2 +- .../out/chat/usage/__next._head.txt | 2 +- .../out/chat/usage/__next._index.txt | 2 +- .../out/chat/usage/__next._tree.txt | 2 +- .../_experimental/out/chat/usage/__next.chat.txt | 2 +- .../chat/usage/__next.chat.usage.__PAGE__.txt | 2 +- .../out/chat/usage/__next.chat.usage.txt | 2 +- .../_experimental/out/chat/usage/index.html | 2 +- .../proxy/_experimental/out/chat/usage/index.txt | 2 +- .../_experimental/out/connect/__next._full.txt | 4 ++-- .../_experimental/out/connect/__next._head.txt | 2 +- .../_experimental/out/connect/__next._index.txt | 2 +- .../_experimental/out/connect/__next._tree.txt | 2 +- .../out/connect/__next.connect.__PAGE__.txt | 4 ++-- .../_experimental/out/connect/__next.connect.txt | 2 +- .../proxy/_experimental/out/connect/index.html | 2 +- .../proxy/_experimental/out/connect/index.txt | 4 ++-- ...GRhc2hib2FyZCk.cost-optimization.__PAGE__.txt | 4 ++-- ...__next.!KGRhc2hib2FyZCk.cost-optimization.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/cost-optimization/__next._full.txt | 8 ++++---- .../out/cost-optimization/__next._head.txt | 2 +- .../out/cost-optimization/__next._index.txt | 2 +- .../out/cost-optimization/__next._tree.txt | 2 +- .../out/cost-optimization/index.html | 2 +- .../out/cost-optimization/index.txt | 8 ++++---- ...t.!KGRhc2hib2FyZCk.cost-tracking.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.cost-tracking.txt | 2 +- .../cost-tracking/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/cost-tracking/__next._full.txt | 6 +++--- .../out/cost-tracking/__next._head.txt | 2 +- .../out/cost-tracking/__next._index.txt | 2 +- .../out/cost-tracking/__next._tree.txt | 2 +- .../_experimental/out/cost-tracking/index.html | 2 +- .../_experimental/out/cost-tracking/index.txt | 6 +++--- ...Rhc2hib2FyZCk.guardrails-monitor.__PAGE__.txt | 4 ++-- ..._next.!KGRhc2hib2FyZCk.guardrails-monitor.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/guardrails-monitor/__next._full.txt | 8 ++++---- .../out/guardrails-monitor/__next._head.txt | 2 +- .../out/guardrails-monitor/__next._index.txt | 2 +- .../out/guardrails-monitor/__next._tree.txt | 2 +- .../out/guardrails-monitor/index.html | 2 +- .../out/guardrails-monitor/index.txt | 8 ++++---- ...next.!KGRhc2hib2FyZCk.guardrails.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.guardrails.txt | 2 +- .../out/guardrails/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/guardrails/__next._full.txt | 6 +++--- .../out/guardrails/__next._head.txt | 2 +- .../out/guardrails/__next._index.txt | 2 +- .../out/guardrails/__next._tree.txt | 2 +- .../_experimental/out/guardrails/index.html | 2 +- .../proxy/_experimental/out/guardrails/index.txt | 6 +++--- litellm/proxy/_experimental/out/index.html | 2 +- litellm/proxy/_experimental/out/index.txt | 8 ++++---- ...Rhc2hib2FyZCk.logging-and-alerts.__PAGE__.txt | 4 ++-- ..._next.!KGRhc2hib2FyZCk.logging-and-alerts.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/logging-and-alerts/__next._full.txt | 8 ++++---- .../out/logging-and-alerts/__next._head.txt | 2 +- .../out/logging-and-alerts/__next._index.txt | 2 +- .../out/logging-and-alerts/__next._tree.txt | 2 +- .../out/logging-and-alerts/index.html | 2 +- .../out/logging-and-alerts/index.txt | 8 ++++---- .../_experimental/out/login/__next._full.txt | 2 +- .../_experimental/out/login/__next._head.txt | 2 +- .../_experimental/out/login/__next._index.txt | 2 +- .../_experimental/out/login/__next._tree.txt | 2 +- .../out/login/__next.login.__PAGE__.txt | 2 +- .../_experimental/out/login/__next.login.txt | 2 +- litellm/proxy/_experimental/out/login/index.html | 2 +- litellm/proxy/_experimental/out/login/index.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.logs.__PAGE__.txt | 4 ++-- .../out/logs/__next.!KGRhc2hib2FyZCk.logs.txt | 2 +- .../out/logs/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/logs/__next._full.txt | 8 ++++---- .../_experimental/out/logs/__next._head.txt | 2 +- .../_experimental/out/logs/__next._index.txt | 2 +- .../_experimental/out/logs/__next._tree.txt | 2 +- litellm/proxy/_experimental/out/logs/index.html | 2 +- litellm/proxy/_experimental/out/logs/index.txt | 8 ++++---- ...ext.!KGRhc2hib2FyZCk.mcp-servers.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.mcp-servers.txt | 2 +- .../out/mcp-servers/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/mcp-servers/__next._full.txt | 8 ++++---- .../out/mcp-servers/__next._head.txt | 2 +- .../out/mcp-servers/__next._index.txt | 2 +- .../out/mcp-servers/__next._tree.txt | 2 +- .../_experimental/out/mcp-servers/index.html | 2 +- .../_experimental/out/mcp-servers/index.txt | 8 ++++---- .../out/mcp/oauth/callback/__next._full.txt | 2 +- .../out/mcp/oauth/callback/__next._head.txt | 2 +- .../out/mcp/oauth/callback/__next._index.txt | 2 +- .../out/mcp/oauth/callback/__next._tree.txt | 2 +- .../__next.mcp.oauth.callback.__PAGE__.txt | 2 +- .../oauth/callback/__next.mcp.oauth.callback.txt | 2 +- .../out/mcp/oauth/callback/__next.mcp.oauth.txt | 2 +- .../out/mcp/oauth/callback/__next.mcp.txt | 2 +- .../out/mcp/oauth/callback/index.html | 2 +- .../out/mcp/oauth/callback/index.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.memory.__PAGE__.txt | 4 ++-- .../memory/__next.!KGRhc2hib2FyZCk.memory.txt | 2 +- .../out/memory/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/memory/__next._full.txt | 6 +++--- .../_experimental/out/memory/__next._head.txt | 2 +- .../_experimental/out/memory/__next._index.txt | 2 +- .../_experimental/out/memory/__next._tree.txt | 2 +- .../proxy/_experimental/out/memory/index.html | 2 +- litellm/proxy/_experimental/out/memory/index.txt | 6 +++--- ...!KGRhc2hib2FyZCk.model-hub-table.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.model-hub-table.txt | 2 +- .../model-hub-table/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/model-hub-table/__next._full.txt | 6 +++--- .../out/model-hub-table/__next._head.txt | 2 +- .../out/model-hub-table/__next._index.txt | 2 +- .../out/model-hub-table/__next._tree.txt | 2 +- .../_experimental/out/model-hub-table/index.html | 2 +- .../_experimental/out/model-hub-table/index.txt | 6 +++--- .../_experimental/out/model_hub/__next._full.txt | 2 +- .../_experimental/out/model_hub/__next._head.txt | 2 +- .../out/model_hub/__next._index.txt | 2 +- .../_experimental/out/model_hub/__next._tree.txt | 2 +- .../out/model_hub/__next.model_hub.__PAGE__.txt | 2 +- .../out/model_hub/__next.model_hub.txt | 2 +- .../proxy/_experimental/out/model_hub/index.html | 2 +- .../proxy/_experimental/out/model_hub/index.txt | 2 +- .../out/model_hub_table/__next._full.txt | 2 +- .../out/model_hub_table/__next._head.txt | 2 +- .../out/model_hub_table/__next._index.txt | 2 +- .../out/model_hub_table/__next._tree.txt | 2 +- .../__next.model_hub_table.__PAGE__.txt | 2 +- .../model_hub_table/__next.model_hub_table.txt | 2 +- .../_experimental/out/model_hub_table/index.html | 2 +- .../_experimental/out/model_hub_table/index.txt | 2 +- ...c2hib2FyZCk.models-and-endpoints.__PAGE__.txt | 4 ++-- ...ext.!KGRhc2hib2FyZCk.models-and-endpoints.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/models-and-endpoints/__next._full.txt | 8 ++++---- .../out/models-and-endpoints/__next._head.txt | 2 +- .../out/models-and-endpoints/__next._index.txt | 2 +- .../out/models-and-endpoints/__next._tree.txt | 2 +- .../out/models-and-endpoints/index.html | 2 +- .../out/models-and-endpoints/index.txt | 8 ++++---- ..._next.!KGRhc2hib2FyZCk.old-usage.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.old-usage.txt | 2 +- .../out/old-usage/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/old-usage/__next._full.txt | 8 ++++---- .../_experimental/out/old-usage/__next._head.txt | 2 +- .../out/old-usage/__next._index.txt | 2 +- .../_experimental/out/old-usage/__next._tree.txt | 2 +- .../proxy/_experimental/out/old-usage/index.html | 2 +- .../proxy/_experimental/out/old-usage/index.txt | 8 ++++---- .../out/onboarding/__next._full.txt | 2 +- .../out/onboarding/__next._head.txt | 2 +- .../out/onboarding/__next._index.txt | 2 +- .../out/onboarding/__next._tree.txt | 2 +- .../onboarding/__next.onboarding.__PAGE__.txt | 2 +- .../out/onboarding/__next.onboarding.txt | 2 +- .../_experimental/out/onboarding/index.html | 2 +- .../proxy/_experimental/out/onboarding/index.txt | 2 +- ...t.!KGRhc2hib2FyZCk.organizations.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.organizations.txt | 2 +- .../organizations/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/organizations/__next._full.txt | 8 ++++---- .../out/organizations/__next._head.txt | 2 +- .../out/organizations/__next._index.txt | 2 +- .../out/organizations/__next._tree.txt | 2 +- .../_experimental/out/organizations/index.html | 2 +- .../_experimental/out/organizations/index.txt | 8 ++++---- ...next.!KGRhc2hib2FyZCk.playground.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.playground.txt | 2 +- .../out/playground/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/playground/__next._full.txt | 6 +++--- .../out/playground/__next._head.txt | 2 +- .../out/playground/__next._index.txt | 2 +- .../out/playground/__next._tree.txt | 2 +- .../_experimental/out/playground/index.html | 2 +- .../proxy/_experimental/out/playground/index.txt | 6 +++--- ...__next.!KGRhc2hib2FyZCk.policies.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.policies.txt | 2 +- .../out/policies/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/policies/__next._full.txt | 8 ++++---- .../_experimental/out/policies/__next._head.txt | 2 +- .../_experimental/out/policies/__next._index.txt | 2 +- .../_experimental/out/policies/__next._tree.txt | 2 +- .../proxy/_experimental/out/policies/index.html | 2 +- .../proxy/_experimental/out/policies/index.txt | 8 ++++---- ...__next.!KGRhc2hib2FyZCk.projects.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.projects.txt | 2 +- .../out/projects/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/projects/__next._full.txt | 8 ++++---- .../_experimental/out/projects/__next._head.txt | 2 +- .../_experimental/out/projects/__next._index.txt | 2 +- .../_experimental/out/projects/__next._tree.txt | 2 +- .../proxy/_experimental/out/projects/index.html | 2 +- .../proxy/_experimental/out/projects/index.txt | 8 ++++---- .../__next.!KGRhc2hib2FyZCk.prompts.__PAGE__.txt | 4 ++-- .../prompts/__next.!KGRhc2hib2FyZCk.prompts.txt | 2 +- .../out/prompts/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/prompts/__next._full.txt | 6 +++--- .../_experimental/out/prompts/__next._head.txt | 2 +- .../_experimental/out/prompts/__next._index.txt | 2 +- .../_experimental/out/prompts/__next._tree.txt | 2 +- .../proxy/_experimental/out/prompts/index.html | 2 +- .../proxy/_experimental/out/prompts/index.txt | 6 +++--- ...!KGRhc2hib2FyZCk.router-settings.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.router-settings.txt | 2 +- .../router-settings/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/router-settings/__next._full.txt | 6 +++--- .../out/router-settings/__next._head.txt | 2 +- .../out/router-settings/__next._index.txt | 2 +- .../out/router-settings/__next._tree.txt | 2 +- .../_experimental/out/router-settings/index.html | 2 +- .../_experimental/out/router-settings/index.txt | 6 +++--- ...xt.!KGRhc2hib2FyZCk.search-tools.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.search-tools.txt | 2 +- .../out/search-tools/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/search-tools/__next._full.txt | 8 ++++---- .../out/search-tools/__next._head.txt | 2 +- .../out/search-tools/__next._index.txt | 2 +- .../out/search-tools/__next._tree.txt | 2 +- .../_experimental/out/search-tools/index.html | 2 +- .../_experimental/out/search-tools/index.txt | 8 ++++---- .../__next.!KGRhc2hib2FyZCk.skills.__PAGE__.txt | 4 ++-- .../skills/__next.!KGRhc2hib2FyZCk.skills.txt | 2 +- .../out/skills/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/skills/__next._full.txt | 6 +++--- .../_experimental/out/skills/__next._head.txt | 2 +- .../_experimental/out/skills/__next._index.txt | 2 +- .../_experimental/out/skills/__next._tree.txt | 2 +- .../proxy/_experimental/out/skills/index.html | 2 +- litellm/proxy/_experimental/out/skills/index.txt | 6 +++--- ....!KGRhc2hib2FyZCk.tag-management.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.tag-management.txt | 2 +- .../tag-management/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/tag-management/__next._full.txt | 8 ++++---- .../out/tag-management/__next._head.txt | 2 +- .../out/tag-management/__next._index.txt | 2 +- .../out/tag-management/__next._tree.txt | 2 +- .../_experimental/out/tag-management/index.html | 2 +- .../_experimental/out/tag-management/index.txt | 8 ++++---- .../__next.!KGRhc2hib2FyZCk.teams.__PAGE__.txt | 4 ++-- .../out/teams/__next.!KGRhc2hib2FyZCk.teams.txt | 2 +- .../out/teams/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../_experimental/out/teams/__next._full.txt | 8 ++++---- .../_experimental/out/teams/__next._head.txt | 2 +- .../_experimental/out/teams/__next._index.txt | 2 +- .../_experimental/out/teams/__next._tree.txt | 2 +- litellm/proxy/_experimental/out/teams/index.html | 2 +- litellm/proxy/_experimental/out/teams/index.txt | 8 ++++---- ...t.!KGRhc2hib2FyZCk.tool-policies.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.tool-policies.txt | 2 +- .../tool-policies/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/tool-policies/__next._full.txt | 6 +++--- .../out/tool-policies/__next._head.txt | 2 +- .../out/tool-policies/__next._index.txt | 2 +- .../out/tool-policies/__next._tree.txt | 2 +- .../_experimental/out/tool-policies/index.html | 2 +- .../_experimental/out/tool-policies/index.txt | 6 +++--- ...GRhc2hib2FyZCk.transform-request.__PAGE__.txt | 4 ++-- ...__next.!KGRhc2hib2FyZCk.transform-request.txt | 2 +- .../__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../out/transform-request/__next._full.txt | 8 ++++---- .../out/transform-request/__next._head.txt | 2 +- .../out/transform-request/__next._index.txt | 2 +- .../out/transform-request/__next._tree.txt | 2 +- .../out/transform-request/index.html | 2 +- .../out/transform-request/index.txt | 8 ++++---- .../out/ui-theme/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- ...__next.!KGRhc2hib2FyZCk.ui-theme.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.ui-theme.txt | 2 +- .../_experimental/out/ui-theme/__next._full.txt | 8 ++++---- .../_experimental/out/ui-theme/__next._head.txt | 2 +- .../_experimental/out/ui-theme/__next._index.txt | 2 +- .../_experimental/out/ui-theme/__next._tree.txt | 2 +- .../proxy/_experimental/out/ui-theme/index.html | 2 +- .../proxy/_experimental/out/ui-theme/index.txt | 8 ++++---- .../out/usage/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.usage.__PAGE__.txt | 4 ++-- .../out/usage/__next.!KGRhc2hib2FyZCk.usage.txt | 2 +- .../_experimental/out/usage/__next._full.txt | 8 ++++---- .../_experimental/out/usage/__next._head.txt | 2 +- .../_experimental/out/usage/__next._index.txt | 2 +- .../_experimental/out/usage/__next._tree.txt | 2 +- litellm/proxy/_experimental/out/usage/index.html | 2 +- litellm/proxy/_experimental/out/usage/index.txt | 8 ++++---- .../out/users/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.users.__PAGE__.txt | 4 ++-- .../out/users/__next.!KGRhc2hib2FyZCk.users.txt | 2 +- .../_experimental/out/users/__next._full.txt | 8 ++++---- .../_experimental/out/users/__next._head.txt | 2 +- .../_experimental/out/users/__next._index.txt | 2 +- .../_experimental/out/users/__next._tree.txt | 2 +- litellm/proxy/_experimental/out/users/index.html | 2 +- litellm/proxy/_experimental/out/users/index.txt | 8 ++++---- .../vector-stores/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- ...t.!KGRhc2hib2FyZCk.vector-stores.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.vector-stores.txt | 2 +- .../out/vector-stores/__next._full.txt | 8 ++++---- .../out/vector-stores/__next._head.txt | 2 +- .../out/vector-stores/__next._index.txt | 2 +- .../out/vector-stores/__next._tree.txt | 2 +- .../_experimental/out/vector-stores/index.html | 2 +- .../_experimental/out/vector-stores/index.txt | 8 ++++---- .../out/workflows/__next.!KGRhc2hib2FyZCk.txt | 4 ++-- ..._next.!KGRhc2hib2FyZCk.workflows.__PAGE__.txt | 4 ++-- .../__next.!KGRhc2hib2FyZCk.workflows.txt | 2 +- .../_experimental/out/workflows/__next._full.txt | 6 +++--- .../_experimental/out/workflows/__next._head.txt | 2 +- .../out/workflows/__next._index.txt | 2 +- .../_experimental/out/workflows/__next._tree.txt | 2 +- .../proxy/_experimental/out/workflows/index.html | 2 +- .../proxy/_experimental/out/workflows/index.txt | 6 +++--- 489 files changed, 756 insertions(+), 749 deletions(-) rename litellm/proxy/_experimental/out/_next/static/{qXutWsQW5C1Pf62WxTkEI => 9zJ4Kk9K1xZTYyn5792eJ}/_buildManifest.js (100%) rename litellm/proxy/_experimental/out/_next/static/{qXutWsQW5C1Pf62WxTkEI => 9zJ4Kk9K1xZTYyn5792eJ}/_clientMiddlewareManifest.js (100%) rename litellm/proxy/_experimental/out/_next/static/{qXutWsQW5C1Pf62WxTkEI => 9zJ4Kk9K1xZTYyn5792eJ}/_ssgManifest.js (100%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05gtohlbmxr4-.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0ekppsigd1c7x.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0jc5k1aju4npz.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0jffxvle4fz98.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0puabvl8lbw4f.js rename litellm/proxy/_experimental/out/_next/static/chunks/{0eamb3kk74kws.js => 0x0jl947h6pc2.js} (59%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/0xma3x__xf0bc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1-xfgtefesa0q.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/11f7pk3f8kvvz.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/149mkwj8vvf2d.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/14aik5-j--wpq.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/19283pb0f3m0p.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/19wkvbsdat9-w.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1_l2msnvj037n.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1a0bgy7kzrj91.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1cu4fo0qe7dbg.js rename litellm/proxy/_experimental/out/_next/static/chunks/{058j9m4b8p4wx.js => 1jgomcpnpdcun.js} (64%) rename litellm/proxy/_experimental/out/_next/static/chunks/{24quqpgjv0f2h.js => 1lrw-21mmi7hg.js} (69%) rename litellm/proxy/_experimental/out/_next/static/chunks/{3-9r9qzlv5bdt.js => 1s1-y1y3dcjrr.js} (66%) delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1uy2av_f_ojad.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/1xuhivu7ukxx1.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/22iools_e0k44.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2647ky-e2mlht.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2_zhbb0j-b2ok.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2a6gczh1lyd79.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2csr0_og3ad-m.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2gx4rjd0cpk7t.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2mgqulwb_9fuy.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2qeanmy565n9w.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2rq8yc88w8h8j.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2u7n8srjka729.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/2x6bixy54rehh.js rename litellm/proxy/_experimental/out/_next/static/chunks/{1fgqa8zynis07.js => 31dsntvzth6um.js} (59%) create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3b1zpgtutyasu.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3b36lpc0hi_oc.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3im7o_chegc3_.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3jstcofmhxj55.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3o9hk2qrms04m.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3rxr_fmvlxjkw.js delete mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/3tva2e_i4hgs3.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/43ka9o8yln4me.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/43kzbrxr4c9fm.js create mode 100644 litellm/proxy/_experimental/out/_next/static/chunks/44y6deyjlpmn3.js diff --git a/litellm/proxy/_experimental/out/404.html b/litellm/proxy/_experimental/out/404.html index 0a164642dab..d833c7c49e7 100644 --- a/litellm/proxy/_experimental/out/404.html +++ b/litellm/proxy/_experimental/out/404.html @@ -1 +1 @@ -404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/404/index.html b/litellm/proxy/_experimental/out/404/index.html index 0a164642dab..d833c7c49e7 100644 --- a/litellm/proxy/_experimental/out/404/index.html +++ b/litellm/proxy/_experimental/out/404/index.html @@ -1 +1 @@ -404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.LiteLLM Dashboard

404

This page could not be found.

\ No newline at end of file diff --git a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt index c10ced8b6bc..f356a2446b3 100644 --- a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt +++ b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.__PAGE__.txt @@ -1,9 +1,9 @@ 1:"$Sreact.fragment" 2:I[347257,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientPageRoot"] -3:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js"],"default"] +3:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/05gtohlbmxr4-.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","/litellm-asset-prefix/_next/static/chunks/44y6deyjlpmn3.js","/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/3b1zpgtutyasu.js","/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/2gx4rjd0cpk7t.js"],"default"] 6:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"OutletBoundary"] 7:"$Sreact.suspense" -0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"} +0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/44y6deyjlpmn3.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b1zpgtutyasu.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","async":true}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/2gx4rjd0cpk7t.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"9zJ4Kk9K1xZTYyn5792eJ"} 4:{} 5:"$0:rsc:props:children:0:props:serverProvidedParams:params" 8:null diff --git a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt index ef8a75b27ce..beb6ffedf59 100644 --- a/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt +++ b/litellm/proxy/_experimental/out/__next.!KGRhc2hib2FyZCk.txt @@ -1,7 +1,7 @@ 1:"$Sreact.fragment" 2:I[92825,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientSegmentRoot"] -3:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js"],"default"] +3:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/05gtohlbmxr4-.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js"],"default"] 4:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"] 5:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"] -0:{"rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","async":true}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"} +0:{"rsc":["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","async":true}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","async":true}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/05gtohlbmxr4-.js","async":true}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","async":true}]],["$","$L2",null,{"Component":"$3","slots":{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]},"serverProvidedParams":{"params":{},"promises":["$@6"]}}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"9zJ4Kk9K1xZTYyn5792eJ"} 6:"$0:rsc:props:children:1:props:serverProvidedParams:params" diff --git a/litellm/proxy/_experimental/out/__next._full.txt b/litellm/proxy/_experimental/out/__next._full.txt index 3ee486db39b..970890c9c0e 100644 --- a/litellm/proxy/_experimental/out/__next._full.txt +++ b/litellm/proxy/_experimental/out/__next._full.txt @@ -5,21 +5,21 @@ 5:I[339756,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"] 6:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"] 7:I[92825,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientSegmentRoot"] -8:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js"],"default"] +8:I[216370,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/05gtohlbmxr4-.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js"],"default"] e:I[168027,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default",1] :HL["/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.2bn3s6zvc0dyp.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","async":true,"nonce":"$undefined"}]],["$","$L7",null,{"Component":"$8","slots":{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$La","forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@b"]}}]]}],{"children":["$Lc",{},null,false,null]},null,false,null]},null,false,null],"$Ld",false]],"m":"$undefined","G":["$e",["$Lf","$L10"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"qXutWsQW5C1Pf62WxTkEI"} +0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["(dashboard)",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]}]}]}]]}],{"children":[["$","$1","c",{"children":[[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/05gtohlbmxr4-.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","async":true,"nonce":"$undefined"}]],["$","$L7",null,{"Component":"$8","slots":{"children":["$","$L5",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":"$L9","templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$La","forbidden":"$undefined","unauthorized":"$undefined"}]},"serverProvidedParams":{"params":{},"promises":["$@b"]}}]]}],{"children":["$Lc",{},null,false,null]},null,false,null]},null,false,null],"$Ld",false]],"m":"$undefined","G":["$e",["$Lf","$L10"]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"9zJ4Kk9K1xZTYyn5792eJ"} 11:I[347257,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ClientPageRoot"] -12:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/1a0bgy7kzrj91.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js"],"default"] +12:I[871135,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","/litellm-asset-prefix/_next/static/chunks/1ioy8obpggx93.js","/litellm-asset-prefix/_next/static/chunks/3_3dj4vdy-3xy.js","/litellm-asset-prefix/_next/static/chunks/1zr7rrk4wkmju.js","/litellm-asset-prefix/_next/static/chunks/2cngn5bal3278.js","/litellm-asset-prefix/_next/static/chunks/2up3bks93iqds.js","/litellm-asset-prefix/_next/static/chunks/0fk0i3e2aixp7.js","/litellm-asset-prefix/_next/static/chunks/0zduf1gntl_f8.js","/litellm-asset-prefix/_next/static/chunks/0dbvgsc7ha049.js","/litellm-asset-prefix/_next/static/chunks/0g_w4tf2inv3i.js","/litellm-asset-prefix/_next/static/chunks/1vquuz09jxl5_.js","/litellm-asset-prefix/_next/static/chunks/17-6zku8f68gf.js","/litellm-asset-prefix/_next/static/chunks/1iakmimqrlpn0.js","/litellm-asset-prefix/_next/static/chunks/05gtohlbmxr4-.js","/litellm-asset-prefix/_next/static/chunks/0f5fel02jwglw.js","/litellm-asset-prefix/_next/static/chunks/0g8wwba6umbim.js","/litellm-asset-prefix/_next/static/chunks/1di-caw05k3tq.js","/litellm-asset-prefix/_next/static/chunks/44y6deyjlpmn3.js","/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","/litellm-asset-prefix/_next/static/chunks/3b1zpgtutyasu.js","/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","/litellm-asset-prefix/_next/static/chunks/2gx4rjd0cpk7t.js"],"default"] 15:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"OutletBoundary"] 16:"$Sreact.suspense" 18:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"ViewportBoundary"] 1a:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"MetadataBoundary"] 9:["$","$L6",null,{}] a:[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:children:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],[]] -c:["$","$1","c",{"children":[["$","$L11",null,{"Component":"$12","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@13","$@14"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/00g6xfr4yow7h.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/22iools_e0k44.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/0am68mi9t9cb6.js","async":true,"nonce":"$undefined"}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true,"nonce":"$undefined"}]],["$","$L15",null,{"children":["$","$16",null,{"name":"Next.MetadataOutlet","children":"$@17"}]}]]}] +c:["$","$1","c",{"children":[["$","$L11",null,{"Component":"$12","serverProvidedParams":{"searchParams":{},"params":"$0:f:0:1:1:children:0:props:children:1:props:serverProvidedParams:params","promises":["$@13","$@14"]}}],[["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/44y6deyjlpmn3.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/2kcxwg1mpncp6.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1fmx49l6q8v39.js","async":true,"nonce":"$undefined"}],["$","script","script-3",{"src":"/litellm-asset-prefix/_next/static/chunks/0ww76lz_0cphv.js","async":true,"nonce":"$undefined"}],["$","script","script-4",{"src":"/litellm-asset-prefix/_next/static/chunks/2uc2pi4ob086w.js","async":true,"nonce":"$undefined"}],["$","script","script-5",{"src":"/litellm-asset-prefix/_next/static/chunks/2hu1vyy-5pv13.js","async":true,"nonce":"$undefined"}],["$","script","script-6",{"src":"/litellm-asset-prefix/_next/static/chunks/2l25bmiiw9ixp.js","async":true,"nonce":"$undefined"}],["$","script","script-7",{"src":"/litellm-asset-prefix/_next/static/chunks/1uz3jt-tj9lkf.js","async":true,"nonce":"$undefined"}],["$","script","script-8",{"src":"/litellm-asset-prefix/_next/static/chunks/3drq2_k-jeio2.js","async":true,"nonce":"$undefined"}],["$","script","script-9",{"src":"/litellm-asset-prefix/_next/static/chunks/3b1zpgtutyasu.js","async":true,"nonce":"$undefined"}],["$","script","script-10",{"src":"/litellm-asset-prefix/_next/static/chunks/3srzg1la93pwv.js","async":true,"nonce":"$undefined"}],["$","script","script-11",{"src":"/litellm-asset-prefix/_next/static/chunks/17nqbxvhztf3k.js","async":true,"nonce":"$undefined"}],["$","script","script-12",{"src":"/litellm-asset-prefix/_next/static/chunks/2c90xukbd3il6.js","async":true,"nonce":"$undefined"}],["$","script","script-13",{"src":"/litellm-asset-prefix/_next/static/chunks/0kap_rdm2-lem.js","async":true,"nonce":"$undefined"}],["$","script","script-14",{"src":"/litellm-asset-prefix/_next/static/chunks/09l_m9l1emin2.js","async":true,"nonce":"$undefined"}],["$","script","script-15",{"src":"/litellm-asset-prefix/_next/static/chunks/112n0hv3cc2rg.js","async":true,"nonce":"$undefined"}],["$","script","script-16",{"src":"/litellm-asset-prefix/_next/static/chunks/323l6h8s7ahat.js","async":true,"nonce":"$undefined"}],["$","script","script-17",{"src":"/litellm-asset-prefix/_next/static/chunks/12wsfsljxg4xv.js","async":true,"nonce":"$undefined"}],["$","script","script-18",{"src":"/litellm-asset-prefix/_next/static/chunks/199uwr871eene.js","async":true,"nonce":"$undefined"}],["$","script","script-19",{"src":"/litellm-asset-prefix/_next/static/chunks/23-g73xaw3kap.js","async":true,"nonce":"$undefined"}],["$","script","script-20",{"src":"/litellm-asset-prefix/_next/static/chunks/0dsiq_ok1yngk.js","async":true,"nonce":"$undefined"}],["$","script","script-21",{"src":"/litellm-asset-prefix/_next/static/chunks/105643dvf00hu.js","async":true,"nonce":"$undefined"}],["$","script","script-22",{"src":"/litellm-asset-prefix/_next/static/chunks/1cea03gg5a_c7.js","async":true,"nonce":"$undefined"}],["$","script","script-23",{"src":"/litellm-asset-prefix/_next/static/chunks/2gx4rjd0cpk7t.js","async":true,"nonce":"$undefined"}]],["$","$L15",null,{"children":["$","$16",null,{"name":"Next.MetadataOutlet","children":"$@17"}]}]]}] d:["$","$1","h",{"children":[null,["$","$L18",null,{"children":"$L19"}],["$","div",null,{"hidden":true,"children":["$","$L1a",null,{"children":["$","$16",null,{"name":"Next.Metadata","children":"$L1b"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}] f:["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}] 10:["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}] diff --git a/litellm/proxy/_experimental/out/__next._head.txt b/litellm/proxy/_experimental/out/__next._head.txt index 9b12cf54d0c..f21e7c1be7b 100644 --- a/litellm/proxy/_experimental/out/__next._head.txt +++ b/litellm/proxy/_experimental/out/__next._head.txt @@ -3,4 +3,4 @@ 3:I[897367,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"MetadataBoundary"] 4:"$Sreact.suspense" 5:I[27201,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"IconMark"] -0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3arlap5n8tyzg.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/get_favicon"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"} +0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"LiteLLM Dashboard"}],["$","meta","1",{"name":"description","content":"LiteLLM Proxy Admin UI"}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.3arlap5n8tyzg.ico","sizes":"48x48","type":"image/x-icon"}],["$","link","3",{"rel":"icon","href":"/get_favicon"}],["$","$L5","4",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"9zJ4Kk9K1xZTYyn5792eJ"} diff --git a/litellm/proxy/_experimental/out/__next._index.txt b/litellm/proxy/_experimental/out/__next._index.txt index 8649901b01b..a77954ba80a 100644 --- a/litellm/proxy/_experimental/out/__next._index.txt +++ b/litellm/proxy/_experimental/out/__next._index.txt @@ -6,4 +6,4 @@ 6:I[837457,["/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js"],"default"] :HL["/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","style"] -0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","template":["$","$L6",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"qXutWsQW5C1Pf62WxTkEI"} +0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","precedence":"next"}],["$","script","script-0",{"src":"/litellm-asset-prefix/_next/static/chunks/0vggytdohwe7o.js","async":true}],["$","script","script-1",{"src":"/litellm-asset-prefix/_next/static/chunks/3c02m_kr-u94p.js","async":true}],["$","script","script-2",{"src":"/litellm-asset-prefix/_next/static/chunks/1jfookxfajkeo.js","async":true}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"children":["$","$L3",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","template":["$","$L6",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"9zJ4Kk9K1xZTYyn5792eJ"} diff --git a/litellm/proxy/_experimental/out/__next._tree.txt b/litellm/proxy/_experimental/out/__next._tree.txt index db0015f1f41..8f452a219b4 100644 --- a/litellm/proxy/_experimental/out/__next._tree.txt +++ b/litellm/proxy/_experimental/out/__next._tree.txt @@ -1,4 +1,4 @@ :HL["/litellm-asset-prefix/_next/static/chunks/1kid9zr1--h6y.css","style"] :HL["/litellm-asset-prefix/_next/static/chunks/3254j4ut19q6_.css","style"] :HL["/litellm-asset-prefix/_next/static/media/83afe278b6a6bb3c-s.p.2bn3s6zvc0dyp.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"(dashboard)","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"qXutWsQW5C1Pf62WxTkEI"} +0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"(dashboard)","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"9zJ4Kk9K1xZTYyn5792eJ"} diff --git a/litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_buildManifest.js b/litellm/proxy/_experimental/out/_next/static/9zJ4Kk9K1xZTYyn5792eJ/_buildManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_buildManifest.js rename to litellm/proxy/_experimental/out/_next/static/9zJ4Kk9K1xZTYyn5792eJ/_buildManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_clientMiddlewareManifest.js b/litellm/proxy/_experimental/out/_next/static/9zJ4Kk9K1xZTYyn5792eJ/_clientMiddlewareManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_clientMiddlewareManifest.js rename to litellm/proxy/_experimental/out/_next/static/9zJ4Kk9K1xZTYyn5792eJ/_clientMiddlewareManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_ssgManifest.js b/litellm/proxy/_experimental/out/_next/static/9zJ4Kk9K1xZTYyn5792eJ/_ssgManifest.js similarity index 100% rename from litellm/proxy/_experimental/out/_next/static/qXutWsQW5C1Pf62WxTkEI/_ssgManifest.js rename to litellm/proxy/_experimental/out/_next/static/9zJ4Kk9K1xZTYyn5792eJ/_ssgManifest.js diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js b/litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js deleted file mode 100644 index fe0f6e8e79a..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/007c8g8hmd9qz.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={},i=!0)=>{let{accessToken:d}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(d,e,a,s),enabled:!!d&&i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',l,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js b/litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js deleted file mode 100644 index 248cab25929..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/00g6xfr4yow7h.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,263005,e=>{"use strict";var t=e.i(843476);e.s(["PageHeader",0,function({title:e,subtitle:a,icon:l,actions:i}){return(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[null!=l&&(0,t.jsx)("span",{className:"flex flex-none items-center text-foreground",children:l}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-foreground",children:e}),null!=a&&(0,t.jsx)("p",{className:"mt-0.5 text-sm text-muted-foreground",children:a})]})]}),null!=i&&(0,t.jsx)("div",{className:"flex items-center gap-2",children:i})]})}])},655063,e=>{"use strict";var t=e.i(399029),a=e.i(271645);e.s(["useDebouncedValue",0,function(e,l,i){let[r,s,n]=(0,t.useDebouncedState)(e,l,i);return(0,a.useEffect)(()=>{s(e)},[e,s]),[r,n]}])},624687,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(115504);let i=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,l.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(115504),i=e.i(519455),r=e.i(793479),s=e.i(624687);let n=(0,l.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,l.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=a.forwardRef(({className:e,type:a="button",variant:r="ghost",size:s="xs",...n},d)=>(0,t.jsx)(i.Button,{ref:d,type:a,"data-size":s,variant:r,className:(0,l.cn)(o({size:s}),e),...n}));d.displayName="InputGroupButton";let u=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Input,{ref:i,"data-slot":"input-group-control",className:(0,l.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a}));u.displayName="InputGroupInput",a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(s.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,l.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,l.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})},"InputGroupAddon",0,function({className:e,align:a="inline-start",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:(0,l.cn)(n({align:a}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...a}){return(0,t.jsx)("span",{className:(0,l.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}])},552546,e=>{"use strict";var t=e.i(843476),a=e.i(131792);let l=(e,t)=>{let a=t.trim().toLowerCase();return!a||e.label.toLowerCase().includes(a)||(e.sublabel?.toLowerCase().includes(a)??!1)};e.s(["SearchSelect",0,function({options:e,value:i,onValueChange:r,placeholder:s="Select…",emptyText:n="No results",disabled:o=!1,className:d}){let u=e.find(e=>e.value===i)??null;return(0,t.jsxs)(a.Combobox,{items:e,value:u,onValueChange:e=>r(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:l,disabled:o,children:[(0,t.jsx)(a.ComboboxInput,{placeholder:s,showClear:null!=i&&""!==i,className:`w-full ${d??""}`}),(0,t.jsxs)(a.ComboboxContent,{children:[(0,t.jsx)(a.ComboboxEmpty,{children:n}),(0,t.jsx)(a.ComboboxList,{children:e=>(0,t.jsx)(a.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},611363,e=>{"use strict";e.s(["navigateWithParams",0,function(e){let t=new URLSearchParams(window.location.search);e(t);let a=t.toString(),l=a?`${window.location.pathname}?${a}`:window.location.pathname;window.history.pushState(null,"",l)}])},502501,e=>{"use strict";var t=e.i(843476),a=e.i(785242),l=e.i(135214),i=e.i(268004),r=e.i(309426),s=e.i(350967),n=e.i(947293),o=e.i(271645),d=e.i(602869);let u=async(e,t,a,l,i)=>{i("Admin"!=a&&"Admin Viewer"!=a?await (0,d.teamListCall)(e,l?.organization_id||null,t):await (0,d.teamListCall)(e,l?.organization_id||null))};var c=e.i(702597),m=e.i(618566),g=e.i(611363),p=e.i(266027),x=e.i(207082),h=e.i(109799),f=e.i(741466);e.i(707701);var b=e.i(807235),v=e.i(981080),y=e.i(531649),_=e.i(552546),w=e.i(263005),k=e.i(793479),j=e.i(655063),S=e.i(465261),C=e.i(20147),I=e.i(827252),N=e.i(282786),z=e.i(898586),D=e.i(494862),T=e.i(302747);e.i(622826);var U=e.i(200208),E=e.i(399536),A=e.i(997422),R=e.i(547227),K=e.i(630500),V=e.i(112179),M=e.i(304911);let L=[{id:"spend",label:"Spend"},{id:"max_budget",label:"Budget"}],P=({userAlias:e,userEmail:a,userId:l,width:i})=>{let r=e||a||l,s="default_user_id"===l,n=(0,t.jsx)("div",{className:"flex flex-col gap-2 text-xs min-w-[200px] max-w-[300px]",children:[{label:"User Alias",value:e},{label:"User Email",value:a},{label:"User ID",value:l}].map(({label:e,value:a})=>(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-gray-400",children:e}),a?(0,t.jsx)(z.Typography.Text,{className:"font-mono text-xs",ellipsis:{tooltip:a},copyable:!0,children:a}):(0,t.jsx)("span",{className:"font-mono",children:"-"})]},e))});return!s||e||a?(0,t.jsx)(N.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"font-mono text-xs truncate block cursor-default",style:{maxWidth:i,overflow:"hidden"},children:r||"-"})}):(0,t.jsx)(N.Popover,{content:n,trigger:"hover",placement:"bottomLeft",children:(0,t.jsx)("span",{className:"cursor-default",children:(0,t.jsx)(M.default,{userId:l})})})},B=({label:e,tooltip:a})=>(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[e,(0,t.jsx)(N.Popover,{content:a,trigger:"hover",children:(0,t.jsx)(I.InfoCircleOutlined,{className:"text-gray-400 text-xs cursor-help"})})]}),O={token:!1,organization_alias:!1,created_by:!1,updated_at:!1,expires:!1,rate_limits:!1},F=[{id:"created_at",desc:!0}],G={team_id:"Team",org_id:"Organization",user_id:"User ID",key_hash:"Key ID"};function H({headerActions:e}){let i,r,s,{data:n}=(0,h.useOrganizations)(),u=(0,o.useMemo)(()=>n??[],[n]),{data:c}=(0,a.useAllTeams)(),I=(0,o.useMemo)(()=>c??[],[c]),{keyId:N,openKey:z,close:M}=(i=(0,m.useSearchParams)(),r=(0,o.useCallback)(e=>{(0,g.navigateWithParams)(t=>{t.set("key",e)})},[]),s=(0,o.useCallback)(()=>{(0,g.navigateWithParams)(e=>{e.delete("key")})},[]),{keyId:i?.get("key")??null,openKey:r,close:s}),[W,q]=(0,o.useState)(F),[$,J]=(0,o.useState)({pageIndex:0,pageSize:50}),[Q,X]=(0,o.useState)([]),[Y,Z]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(""),[ea]=(0,j.useDebouncedValue)(ee,{wait:f.DEBOUNCE_WAIT_MS}),el=(0,o.useCallback)(e=>{let t=Q.find(t=>t.id===e);return"string"==typeof t?.value&&t.value.trim()?t.value.trim():void 0},[Q]),ei=W[0]?.id,er=(e=>{let t=e[0];if(t)return t.desc?"desc":"asc"})(W),es={teamID:el("team_id"),organizationID:el("org_id"),selectedKeyAlias:ea.trim()||void 0,userID:el("user_id"),keyHash:el("key_hash"),sortBy:ei,sortOrder:er,expand:"user"},{data:en,isPending:eo,isFetching:ed,refetch:eu}=(0,x.useKeys)($.pageIndex+1,$.pageSize,es),ec=(0,o.useMemo)(()=>en?.keys??[],[en]),em=en?.total_count??0,eg=(0,o.useCallback)(e=>{et(e),J(e=>({...e,pageIndex:0}))},[]),ep=(0,o.useCallback)(e=>{q(e),J(e=>({...e,pageIndex:0}))},[]),ex=(0,o.useCallback)(e=>{X(e),J(e=>({...e,pageIndex:0}))},[]),eh=(0,o.useMemo)(()=>(({allTeams:e,organizations:a,onSelectKey:l})=>[{id:"key_alias",accessorKey:"key_alias",meta:{title:"Key",renderSkeleton:()=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,t.jsx)(T.Skeleton,{className:"h-4 w-32"}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(T.Skeleton,{className:"h-3 w-20"}),(0,t.jsx)(T.Skeleton,{className:"h-5 w-16 rounded-full"})]})]})},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Key",variant:"header-cycle"}),size:260,enableSorting:!0,cell:({row:e})=>{let a=(e=>{if(!0===e.blocked)return{tone:"error",label:"Blocked",tooltip:e.metadata?.scim_blocked===!0?"Blocked by SCIM (external identity provider deactivated or deleted the owning user).":"Blocked. Requests using this key will be rejected with 401."};let t=e.expires?Date.parse(e.expires):NaN;return!Number.isNaN(t)&&tl(e.original)})}},{id:"token",accessorKey:"token",meta:{title:"Key ID"},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Key ID",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(E.IdCell,{value:e.getValue(),onClick:()=>l(e.row.original)})},{id:"team_alias",accessorKey:"team_id",meta:{title:"Team"},header:"Team",size:120,enableSorting:!1,cell:a=>{let l=a.getValue();if(!l)return"-";let i=e.find(e=>e.team_id===l),r=i?.team_alias||l,s=a.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:r})}},{id:"organization_alias",accessorKey:"org_id",meta:{title:"Organization"},header:"Organization",size:140,enableSorting:!1,cell:e=>{let l=e.getValue();if(!l)return"-";let i=a.find(e=>e.organization_id===l),r=i?.organization_alias||l,s=e.cell.column.getSize();return(0,t.jsx)("span",{className:"font-mono text-xs truncate block",style:{maxWidth:s,overflow:"hidden"},children:r})}},{id:"user",accessorKey:"user",meta:{title:"User"},header:()=>(0,t.jsx)(B,{label:"User",tooltip:"Displays the first available value: User Alias, User Email, or User ID."}),size:160,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsx)(P,{userAlias:a.user?.user_alias??null,userEmail:a.user?.user_email??a.user_email??null,userId:a.user_id??null,width:160})}},{id:"created_at",accessorKey:"created_at",meta:{title:"Created At"},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Created At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date"})},{id:"created_by",accessorKey:"created_by",meta:{title:"Created By"},header:"Created By",size:160,enableSorting:!1,cell:e=>{let a=e.getValue();if(!a)return"-";let l=e.row.original.created_by_user;return(0,t.jsx)(P,{userAlias:l?.user_alias??null,userEmail:l?.user_email??null,userId:a,width:160})}},{id:"updated_at",accessorKey:"updated_at",meta:{title:"Updated At"},header:({column:e})=>(0,t.jsx)(D.DataTableSortHeader,{column:e,title:"Updated At",variant:"header-cycle"}),size:120,enableSorting:!0,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"last_active",accessorKey:"last_active",meta:{title:"Last Active"},header:()=>(0,t.jsx)(B,{label:"Last Active",tooltip:"This is a new field and is not backfilled. Only new key usage will update this value."}),size:130,enableSorting:!1,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date",fallback:"Unknown"})},{id:"expires",accessorKey:"expires",meta:{title:"Expires"},header:"Expires",size:120,enableSorting:!1,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),precision:"date",fallback:"Never"})},{id:"spend",accessorKey:"spend",meta:{title:"Spend / Budget",skeleton:"meter"},header:({table:e})=>(0,t.jsx)(D.DataTableMultiSortHeader,{table:e,fields:L}),size:180,enableSorting:!0,cell:({row:a})=>{let l=a.original.team_id,i=e.find(e=>e.team_id===l);return(0,t.jsx)(K.SpendBudgetCell,{spend:a.original.spend,maxBudget:a.original.max_budget,teamMaxBudget:i?.max_budget??null})}},{id:"budget_reset_at",accessorKey:"budget_reset_at",meta:{title:"Budget Reset"},header:"Budget Reset",size:130,enableSorting:!1,cell:e=>(0,t.jsx)(U.DateCell,{value:e.getValue(),fallback:"Never"})},{id:"models",accessorKey:"models",meta:{title:"Models",skeleton:"chips"},header:"Models",size:220,enableSorting:!1,cell:e=>(0,t.jsx)(R.ModelsCell,{models:e.getValue(),allowedRoutes:e.row.original.allowed_routes,keyType:e.row.original.key_type})},{id:"rate_limits",meta:{title:"Rate Limits"},header:"Rate Limits",size:140,enableSorting:!1,cell:({row:e})=>{let a=e.original;return(0,t.jsxs)("div",{className:"text-xs",children:[(0,t.jsxs)("div",{children:["TPM: ",null!==a.tpm_limit?a.tpm_limit:"Unlimited"]}),(0,t.jsxs)("div",{children:["RPM: ",null!==a.rpm_limit?a.rpm_limit:"Unlimited"]})]})}}])({allTeams:I,organizations:u,onSelectKey:e=>z(e.token)}),[I,u,z]),ef=(0,o.useMemo)(()=>ec.find(e=>e.token===N),[ec,N]),{data:eb,isError:ev}=function(e,t){let{accessToken:a}=(0,l.default)();return(0,p.useQuery)({queryKey:[...x.keyKeys.detail(e??""),a],queryFn:async()=>{if(!a||!e)throw Error("Missing access token or key id");return{...(await (0,d.keyInfoV1Call)(a,e)).info,token:e,api_key:e}},enabled:!!(a&&e)&&(t?.enabled??!0)})}(N,{enabled:!ef}),ey=ef??eb,e_=(0,o.useMemo)(()=>I.map(e=>({label:e.team_alias||e.team_id,value:e.team_id,sublabel:e.team_alias?e.team_id:void 0})),[I]),ew=(0,o.useMemo)(()=>u.filter(e=>e.organization_id).map(e=>{let t=e.organization_id;return{label:e.organization_alias||t,value:t,sublabel:e.organization_alias?t:void 0}}),[u]),ek=(0,o.useCallback)((e,t)=>{let a=String(t);return"team_id"===e?I.find(e=>e.team_id===a)?.team_alias||a:"org_id"===e&&u.find(e=>e.organization_id===a)?.organization_alias||a},[I,u]);return N?ey||ev?(0,t.jsx)("div",{className:"w-full h-full overflow-hidden",children:(0,t.jsx)(C.default,{keyId:N,onClose:M,keyData:ey,teams:I,onDelete:eu})}):(0,t.jsx)("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading key..."}):(0,t.jsxs)("div",{className:"flex h-full flex-col gap-4 overflow-hidden py-2",children:[(0,t.jsx)(w.PageHeader,{icon:(0,t.jsx)(S.KeyRound,{className:"size-5"}),title:"Virtual Keys",subtitle:"Every key that authenticates requests to the gateway."}),e,(0,t.jsx)(b.DataTable,{data:ec,columns:eh,getRowId:e=>e.token,defaultColumnVisibility:O,sortingMode:"server",sorting:W,onSortingChange:ep,paginationMode:"server",pagination:$,onPaginationChange:J,rowCount:em,filterMode:"server",columnFilters:Q,onColumnFiltersChange:ex,enableColumnResizing:!0,columnResizeMode:"onChange",isLoading:eo,loadingMessage:"Loading keys...",noDataMessage:"No keys found",maxBodyHeight:"calc(75vh - 210px)",size:"compact",toolbar:e=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.DataTableToolbar,{table:e,searchValue:ee,onSearchChange:eg,searchPlaceholder:"Search by key alias…",onRefresh:()=>eu?.(),isRefreshing:ed,onOpenFilters:()=>Z(!0),filterLabels:G,formatFilterValue:ek}),(0,t.jsx)(v.DataTableFilterDrawer,{table:e,open:Y,onOpenChange:Z,title:"Filters",description:"Narrow down virtual keys",children:({get:e,set:a})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.DataTableFilterField,{label:"Team",children:(0,t.jsx)(_.SearchSelect,{options:e_,value:e("team_id")||void 0,onValueChange:e=>a("team_id",e),placeholder:"Select a team…",emptyText:"No teams found"})}),(0,t.jsx)(v.DataTableFilterField,{label:"Organization",children:(0,t.jsx)(_.SearchSelect,{options:ew,value:e("org_id")||void 0,onValueChange:e=>a("org_id",e),placeholder:"Select an organization…",emptyText:"No organizations found"})}),(0,t.jsx)(v.DataTableFilterField,{label:"User ID",children:(0,t.jsx)(k.Input,{value:e("user_id")??"",onChange:e=>a("user_id",e.target.value),placeholder:"Enter User ID…"})}),(0,t.jsx)(v.DataTableFilterField,{label:"Key ID",children:(0,t.jsx)(k.Input,{value:e("key_hash")??"",onChange:e=>a("key_hash",e.target.value),placeholder:"Enter Key ID…"})})]})})]})})]})}let W=({userID:e,userRole:a,teams:l,keys:m,setUserRole:g,userEmail:p,setUserEmail:x,setTeams:h,setKeys:f,premiumUser:b,addKey:v,createClicked:y,autoOpenCreate:_,prefillData:w})=>{let[k,j]=(0,o.useState)(null),[S,C]=(0,o.useState)(null),I=(0,i.getCookie)("token"),[N,z]=(0,o.useState)(null),[D,T]=(0,o.useState)(null),[U,E]=(0,o.useState)([]),[A,R]=(0,o.useState)(null),[K,V]=(0,o.useState)(null);function M(){(0,i.clearTokenCookies)();let e=(0,d.getProxyBaseUrl)(),t=e?`${e}/sso/key/generate`:"/sso/key/generate";return window.location.href=t,null}if((0,o.useEffect)(()=>{let e=()=>{let e=sessionStorage.getItem("token");sessionStorage.clear(),e&&sessionStorage.setItem("token",e)};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[]),(0,o.useEffect)(()=>{if(I){let e=(0,n.jwtDecode)(I);e&&(z(e.key),e.user_role&&g(function(e){if(!e)return"Undefined Role";switch(e.toLowerCase()){case"app_owner":case"demo_app_owner":return"App Owner";case"app_admin":case"proxy_admin":return"Admin";case"proxy_admin_viewer":return"Admin Viewer";case"app_user":return"App User";case"internal_user":return"Internal User";case"internal_user_viewer":return"Internal Viewer";default:return"Unknown Role"}}(e.user_role)),e.user_email&&x(e.user_email))}if(e&&N&&a&&!k){let t=sessionStorage.getItem("userModels"+e);t?E(JSON.parse(t)):((async()=>{try{let t=await (0,d.getProxyUISettings)(N);R(t);let l=await (0,d.userGetInfoV2)(N,e);j(l),sessionStorage.setItem("userSpendData"+e,JSON.stringify(l));let i=(await (0,d.modelAvailableCall)(N,e,a)).data.map(e=>e.id);E(i),sessionStorage.setItem("userModels"+e,JSON.stringify(i))}catch(e){console.error("There was an error fetching the data",e),e.message.includes("Invalid proxy server token passed")&&M()}})(),u(N,e,a,S,h))}},[e,I,N,a]),(0,o.useEffect)(()=>{N&&(async()=>{try{await (0,d.keyInfoCall)(N,[N])}catch(e){e.message.includes("Invalid proxy server token passed")&&M()}})()},[N]),(0,o.useEffect)(()=>{N&&u(N,e,a,S,h)},[S]),(0,o.useEffect)(()=>{if(null!==m&&null!=K&&null!==K.team_id){let e=0;for(let t of m)K.hasOwnProperty("team_id")&&null!==t.team_id&&t.team_id===K.team_id&&(e+=t.spend);T(e)}else if(null!==m){let e=0;for(let t of m)e+=t.spend;T(e)}},[K]),null==I)return M(),null;try{let e=(0,n.jwtDecode)(I).exp,t=Math.floor(Date.now()/1e3);if(e&&t>=e)return M(),null}catch(e){return console.error("Error decoding token:",e),(0,i.clearTokenCookies)(),M(),null}if(null==N)return null;if(null==e)return(0,t.jsx)("h1",{children:"User ID is not set"});null==a&&g("App Owner");let L="Admin Viewer"!==a&&"proxy_admin_viewer"!==a;return(0,t.jsx)("div",{className:"mx-4 h-[75vh]",children:(0,t.jsx)(s.Grid,{numItems:1,className:"gap-2 p-8 w-full mt-2",children:(0,t.jsx)(r.Col,{numColSpan:1,className:"flex flex-col gap-2",children:(0,t.jsx)(H,{headerActions:L?(0,t.jsx)(c.default,{team:K,teams:l,data:m,addKey:v,autoOpenCreate:_,prefillData:w},K?K.team_id:null):void 0})})})})};var q=e.i(557951);e.s(["default",0,function(){let{userId:e,userRole:i,userEmail:r,accessToken:s,premiumUser:n}=(0,l.default)(),{setUserRole:d,setUserEmail:u}=(0,q.useAuth)(),c=(0,m.useSearchParams)(),[g,p]=(0,o.useState)(null),[x,h]=(0,o.useState)([]),[f,b]=(0,o.useState)(!1),v="true"===c.get("create"),y=(0,o.useMemo)(()=>{if(!v)return;let e=c.get("owned_by"),t=c.get("team_id"),a=c.get("key_alias"),l=c.get("models"),i=c.get("key_type");if(!e&&!t&&!a&&!l&&!i)return;let r=e&&["you","service_account","another_user"].includes(e)?e:void 0,s=i&&["default","llm_api","management"].includes(i)?i:void 0,n=a?a.trim().slice(0,256):void 0,o=l?l.split(",").slice(0,100).map(e=>e.trim().slice(0,256)).filter(e=>e.length>0):void 0;return{owned_by:r,team_id:t?.trim()||void 0,key_alias:n,models:o&&o.length>0?o:void 0,key_type:s}},[c,v]);return(0,o.useEffect)(()=>{s&&e&&i&&(0,a.teamListCall)(s,1,100,{userID:"Admin"!==i&&"Admin Viewer"!==i?e:null}).then(e=>p(e.teams??[])).catch(console.error)},[s,e,i]),(0,t.jsx)(W,{userID:e,userRole:i,premiumUser:n??!1,teams:g,keys:x,setUserRole:d,userEmail:r,setUserEmail:u,setTeams:p,setKeys:h,addKey:e=>{h(t=>t?[...t,e]:[e]),b(e=>!e)},createClicked:f,autoOpenCreate:v,prefillData:y})}],502501)},871135,e=>{"use strict";var t=e.i(843476),a=e.i(502501),l=e.i(936578),i=e.i(602869),r=e.i(207082),s=e.i(708347),n=e.i(557951),o=e.i(321836),d=e.i(571353),u=e.i(618566),c=e.i(271645);function m(){let{authLoading:e,token:m,userRole:g,userID:p}=(0,n.useAuth)(),x=(0,u.useRouter)(),h=(0,u.useSearchParams)(),f=h.get("page"),b=(0,c.useRef)(!1),v=(0,c.useRef)(!1),y=!1===e&&null===m;(0,c.useEffect)(()=>{if(y){(0,o.storeReturnUrl)();let e=(0,o.getLoginUrl)(i.proxyBaseUrl||""),t=(0,o.buildLoginUrlWithReturn)(e);window.location.replace(t)}},[y]);let _=null!==f&&f in d.MIGRATED_PAGES;(0,c.useEffect)(()=>{!e&&_&&x.replace((0,d.migratedHref)(d.MIGRATED_PAGES[f]))},[e,_,f,x]),(0,c.useEffect)(()=>{if(e||!m||b.current)return;b.current=!0;let t=(0,o.consumeReturnUrl)();if(t&&(0,o.isValidReturnUrl)(t)){let e=new URL(t,window.location.origin);if(e.origin!==window.location.origin)return;let a=window.location.href;(0,o.normalizeUrlForCompare)(t)!==(0,o.normalizeUrlForCompare)(a)&&(v.current=!0,window.location.replace(e.href))}},[e,m]),(0,c.useEffect)(()=>{m||(b.current=!1,v.current=!1)},[m]);let w="success"===h.get("login"),k=!e&&!!m,j=w&&k&&""===g,S=w&&k&&s.internalUserRoles.includes(g),{data:C,isLoading:I}=(0,r.useKeys)(1,1,{userID:p},S),N=S&&!I&&C?.keys?.length===0,z=S&&I||N;(0,c.useEffect)(()=>{N&&!v.current&&x.replace((0,d.migratedHref)("connect"))},[N,x]);let D=y||_||j||z;return e||D?(0,t.jsx)(l.default,{}):(0,t.jsx)(a.default,{})}e.s(["default",0,function(){return(0,t.jsx)(c.Suspense,{fallback:(0,t.jsx)(l.default,{}),children:(0,t.jsx)(m,{})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05gtohlbmxr4-.js b/litellm/proxy/_experimental/out/_next/static/chunks/05gtohlbmxr4-.js new file mode 100644 index 00000000000..ad0923204f0 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/05gtohlbmxr4-.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,111672,858488,625005,e=>{"use strict";var a=e.i(843476),l=e.i(109799),r=e.i(785242),t=e.i(135214),s=e.i(143488),i=e.i(268004),o=e.i(321836),n=e.i(592392),d=e.i(602869),c=e.i(275144),p=e.i(487486),u=e.i(519455),x=e.i(759684),g=e.i(271645),m=e.i(527930),h=e.i(115504);let b=g.createContext({collapsed:!1}),f=g.forwardRef(({className:e,collapsed:l=!1,children:r,...t},s)=>(0,a.jsx)(b.Provider,{value:{collapsed:l},children:(0,a.jsx)("aside",{ref:s,"data-slot":"sidebar","data-collapsed":l,className:(0,h.cn)("group/sidebar flex h-full flex-none flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-in-out",l?"w-[72px]":"w-[280px]",e),...t,children:r})}));f.displayName="Sidebar";let y=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-header",className:(0,h.cn)("flex flex-none flex-col gap-2 p-3",e),...l}));y.displayName="SidebarHeader",g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("nav",{ref:r,"data-slot":"sidebar-content",className:(0,h.cn)("flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-3 pb-3",e),...l})).displayName="SidebarContent";let k=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-footer",className:(0,h.cn)("flex flex-none flex-col gap-2.5 border-t border-sidebar-border p-3",e),...l}));k.displayName="SidebarFooter";let j=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-group",className:(0,h.cn)("flex flex-col gap-0.5 py-1",e),...l}));j.displayName="SidebarGroup";let v=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-group-label",className:(0,h.cn)("px-2 pt-3 pb-1.5 text-[11px] font-semibold tracking-wider text-muted-foreground uppercase group-data-[collapsed=true]/sidebar:hidden",e),...l}));v.displayName="SidebarGroupLabel";let w=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("ul",{ref:r,"data-slot":"sidebar-menu",className:(0,h.cn)("flex w-full flex-col gap-0.5",e),...l}));w.displayName="SidebarMenu";let N=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("li",{ref:r,"data-slot":"sidebar-menu-item",className:(0,h.cn)("relative",e),...l}));N.displayName="SidebarMenuItem";let _=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("ul",{ref:r,"data-slot":"sidebar-menu-sub",className:(0,h.cn)("mx-3.5 my-0.5 flex min-w-0 flex-col gap-0.5 border-l border-sidebar-border py-0.5 pl-3 group-data-[collapsed=true]/sidebar:hidden",e),...l}));_.displayName="SidebarMenuSub",g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("span",{ref:r,"data-slot":"sidebar-menu-badge",className:(0,h.cn)("ml-auto flex-none rounded-full bg-sidebar-primary/10 px-1.5 py-px text-[10px] font-semibold text-sidebar-primary tabular-nums group-data-[collapsed=true]/sidebar:hidden",e),...l})).displayName="SidebarMenuBadge";let S=(0,h.cva)({base:"group/menu-btn relative flex w-full items-center gap-2.5 overflow-hidden rounded-md px-2.5 text-left text-[13px] font-medium no-underline text-sidebar-foreground/70 outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring disabled:pointer-events-none disabled:opacity-50 [&>svg]:size-[18px] [&>svg]:shrink-0 group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-9 group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:gap-0 group-data-[collapsed=true]/sidebar:px-0",variants:{isActive:{true:"bg-sidebar-accent text-sidebar-accent-foreground before:absolute before:inset-y-1.5 before:left-0 before:w-[3px] before:rounded-r-full before:bg-sidebar-primary group-data-[collapsed=true]/sidebar:before:hidden",false:""},size:{default:"h-[34px]",sub:"h-[34px]"}},defaultVariants:{isActive:!1,size:"default"}}),L=g.forwardRef(({className:e,isActive:l,size:r,...t},s)=>(0,a.jsx)(m.Button,{ref:s,"data-slot":"sidebar-menu-button","data-active":l||void 0,className:(0,h.cn)(S({isActive:l,size:r,className:e})),...t}));L.displayName="SidebarMenuButton";let C=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-separator",className:(0,h.cn)("mx-2 my-2 h-px bg-sidebar-border",e),...l}));C.displayName="SidebarSeparator";var T=e.i(475254);let A=(0,T.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var M=e.i(217923);let B=(0,T.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),R=(0,T.default)("blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);var z=e.i(531245);let P=(0,T.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);var U=e.i(607486);let D=(0,T.default)("boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);var E=e.i(463059),I=e.i(997625),O=e.i(658041),H=e.i(778917),V=e.i(178583),G=e.i(38982);let q=(0,T.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var $=e.i(61574),W=e.i(465261),F=e.i(373264);let K=(0,T.default)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),Z=(0,T.default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]),Y=(0,T.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),Q=(0,T.default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var X=e.i(487074),J=e.i(875475),J=J;let ee=(0,T.default)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);var ea=e.i(176516),el=e.i(555436),er=e.i(618393),et=e.i(239616),es=e.i(98919),ei=e.i(581418);let eo=(0,T.default)("tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);var en=e.i(868054),ed=e.i(284614),ec=e.i(761911);let ep=(0,T.default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);var eu=e.i(195116);let ex=(0,T.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var eg=e.i(522016),em=e.i(708347),eh=e.i(906579),eb=e.i(814431);function ef({children:e,dot:l=!1}){return(0,eb.useDisableShowNewBadge)()?e?(0,a.jsx)(a.Fragment,{children:e}):null:e?(0,a.jsx)(eh.Badge,{color:"blue",count:l?void 0:"Beta",dot:l,children:e}):(0,a.jsx)(eh.Badge,{color:"blue",count:l?void 0:"Beta",dot:l})}var ey=e.i(844444),ek=e.i(731565),ej=e.i(912089),ev=e.i(636772),ew=e.i(115571),eN=e.i(222038),e_=e.i(922407),eS=e.i(799676),eL=e.i(337822),eC=e.i(772436),eT=e.i(699375),eA=e.i(344523);let eM=(0,T.default)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]),eB=(0,T.default)("id-card",[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]]),eR=(0,T.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),ez=(0,T.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),eP=({icon:e,label:l,children:r})=>(0,a.jsxs)("div",{className:"flex min-h-[34px] items-center justify-between gap-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[e,l]}),r]}),eU=({value:e,copyLabel:l})=>(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[(0,a.jsx)("span",{className:"max-w-[150px] truncate font-mono text-[13px] font-medium text-foreground",title:e||"-",children:e||"-"}),(0,a.jsx)(e_.default,{value:e,label:l})]}),eD=({onLogout:e,collapsed:l=!1})=>{let{userId:r,userEmail:i,userRole:o,premiumUser:n,accessToken:d}=(0,t.default)(),{data:c}=(0,s.useHealthReadinessDetails)(d),x=c?.litellm_version,g=(0,ev.useDisableShowPrompts)(),m=(0,ek.useDisableBlogPosts)(),b=(0,ej.useDisableBouncingIcon)(),f=(0,eb.useDisableShowNewBadge)(),y=(e,a)=>{a?(0,ew.setLocalStorageItem)(e,"true"):(0,ew.removeLocalStorageItem)(e),(0,ew.emitLocalStorageChange)(e)},k=[{key:"disableShowNewBadge",label:"Hide New Feature Indicators",ariaLabel:"Toggle hide new feature indicators",checked:f,onCheckedChange:e=>y("disableShowNewBadge",e)},{key:"disableShowPrompts",label:"Hide All Prompts",ariaLabel:"Toggle hide all prompts",checked:g,onCheckedChange:e=>y("disableShowPrompts",e)},{key:"disableBlogPosts",label:"Hide Blog Posts",ariaLabel:"Toggle hide blog posts",checked:m,onCheckedChange:e=>y("disableBlogPosts",e)},{key:"disableBouncingIcon",label:"Hide Bouncing Icon",ariaLabel:"Toggle hide bouncing icon",checked:b,onCheckedChange:e=>y("disableBouncingIcon",e)}],j=i||r||"user",v=function(e,a){let l=e?.split("@")[0]?.trim();if(l){let e=l.replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean);if(e.length>=2)return`${e[0].charAt(0)}${e[1].charAt(0)}`.toUpperCase();if(1===e.length){let a=e[0];return a.length>=2?a.slice(0,2).toUpperCase():`${a.charAt(0)}`.toUpperCase()}}return a&&a.length>=2?a.slice(0,2).toUpperCase():a&&1===a.length?`${a.toUpperCase()}•`:"?"}(i,r),w=function(e){let a=0;for(let l=0;l(0,a.jsxs)("div",{className:"flex h-[38px] items-center justify-between gap-3 px-3",children:[(0,a.jsx)("span",{className:"text-[13px] text-foreground",children:e.label}),(0,a.jsx)(eT.Switch,{size:"sm",checked:e.checked,onCheckedChange:e.onCheckedChange,"aria-label":e.ariaLabel})]},e.key))}),(0,a.jsx)(eC.Separator,{}),(0,a.jsxs)(u.Button,{variant:"ghost",onClick:e,className:"h-[42px] w-full justify-start gap-2.5 rounded-none px-3 text-sm font-medium text-foreground",children:[(0,a.jsx)(eR,{className:"size-[19px] text-muted-foreground"}),"Logout"]})]})]})};var eE=e.i(266027);let eI=(0,e.i(243652).createQueryKeys)("licenseInfo"),eO=e=>{let a={queryKey:eI.detail("license"),queryFn:()=>(0,d.getLicenseInfo)(e),enabled:!!e,staleTime:3e5,retry:!1};return(0,eE.useQuery)(a)};e.s(["useLicenseInfo",0,eO],858488);let eH=(e,a=new Date)=>{if(!e)return null;let l=new Date(`${e}T00:00:00Z`);if(Number.isNaN(l.getTime()))return null;let r=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate());return Math.ceil((l.getTime()-r)/864e5)},eV={year:"numeric",month:"short",day:"numeric",timeZone:"UTC"},eG=e=>{let a=new Date(`${e}T00:00:00Z`);return Number.isNaN(a.getTime())?e:a.toLocaleDateString("en-US",eV)},eq=(e,a=new Date)=>{let l=eH(e,a);return null===e||null===l?"No expiration":l<0?`Expired ${eG(e)}`:`Expires ${eG(e)}`};e.s(["formatExpirationStatus",0,eq,"formatExpiryDate",0,eG,"getDaysUntilExpiration",0,eH,"getLicenseExpiryTier",0,(e,a=new Date)=>{let l=eH(e,a);return null===l?"none":l<0?"expired":l<=7?"critical":l<=30?"warning":"none"}],625005);var e$=e.i(204258),eW=e.i(944835);let eF=(0,T.default)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);var eK=e.i(664659),eZ=e.i(531278);let eY=({label:e,used:l,total:r})=>{let t=r>0?l/r*100:0;return(0,a.jsxs)(eW.Meter,{value:l,max:r,"aria-valuetext":`${l.toLocaleString()} of ${r.toLocaleString()}`,children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)(eW.MeterLabel,{children:e}),(0,a.jsxs)("span",{className:"text-xs font-medium tabular-nums",children:[(0,a.jsx)("span",{className:"text-foreground",children:l.toLocaleString()}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" / ",r.toLocaleString()]})]})]}),(0,a.jsx)(eW.MeterTrack,{children:(0,a.jsx)(eW.MeterIndicator,{tone:t>100?"over":t>=80?"warning":"default"})})]})};function eQ({accessToken:e,collapsed:l,onExpandRail:r}){let t=eO(e).data??null,{data:s,isLoading:i}=(0,eE.useQuery)({queryKey:["sidebarRemainingUsers",e],queryFn:()=>(0,d.getRemainingUsers)(e),enabled:!!e,retry:!1,staleTime:3e5}),o=s??null,n=null!==o&&(null!==o.total_users||null!==o.total_teams),c=!t?.has_license||!i&&!n;if(!e||c)return null;if(l)return(0,a.jsx)(u.Button,{variant:"outline",onClick:r,title:"Enterprise usage",className:"h-9 w-full rounded-lg border-sidebar-border bg-sidebar text-sidebar-primary shadow-none hover:bg-sidebar-accent hover:text-sidebar-primary",children:(0,a.jsx)(eF,{className:"size-[18px]",strokeWidth:1.75})});let p=t?.expiration_date?eq(t.expiration_date):"Active plan",x=o?[...null!=o.total_users?[{label:"Seats",used:o.total_users_used,total:o.total_users}]:[],...null!=o.total_teams?[{label:"Teams",used:o.total_teams_used,total:o.total_teams}]:[]]:[];return(0,a.jsxs)(e$.Collapsible,{defaultOpen:!0,className:"overflow-hidden rounded-xl border border-sidebar-border bg-sidebar",children:[(0,a.jsxs)(e$.CollapsibleTrigger,{className:"group/usage flex w-full items-center gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-sidebar-accent",children:[(0,a.jsx)("span",{className:"flex size-[26px] flex-none items-center justify-center rounded-md bg-sidebar-primary/10 text-sidebar-primary",children:(0,a.jsx)(eF,{className:"size-4",strokeWidth:1.75})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 leading-tight",children:[(0,a.jsx)("span",{className:"block text-[13px] font-semibold text-foreground",children:"Enterprise usage"}),(0,a.jsx)("span",{className:"block truncate text-[11px] text-muted-foreground",children:p})]}),(0,a.jsx)(eK.ChevronDown,{className:"size-4 flex-none -rotate-90 text-muted-foreground transition-transform group-data-[panel-open]/usage:rotate-0"})]}),(0,a.jsx)(e$.CollapsibleContent,{className:"flex flex-col gap-3 px-3 pt-0.5 pb-3",children:i&&0===x.length?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-1 text-xs text-muted-foreground",children:[(0,a.jsx)(eZ.Loader2,{className:"size-3.5 animate-spin"})," Loading…"]}):x.map(e=>(0,a.jsx)(eY,{...e},e.label))})]})}var eX=e.i(571353);let eJ={strokeWidth:1.75},e0=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(W.KeyRound,{...eJ})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(J.default,{...eJ}),roles:em.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(K,{...eJ}),roles:em.rolesAllowedToViewWriteScopedPages},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(z.Bot,{...eJ}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(z.Bot,{...eJ}),roles:em.rolesAllowedToViewWriteScopedPages},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(ex,{...eJ})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(O.Database,{...eJ})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(er.Server,{...eJ})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(R,{...eJ}),roles:em.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(es.Shield,{...eJ})},{key:"policies",page:"policies",label:"Policies",icon:(0,a.jsx)(ea.ScrollText,{...eJ}),roles:em.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(eu.Wrench,{...eJ}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(el.Search,{...eJ})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(O.Database,{...eJ})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(ei.ShieldCheck,{...eJ})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(M.BarChart3,{...eJ}),roles:[...em.all_admin_roles,...em.internalUserRoles],label:"Usage"},{key:"cost-optimization",page:"cost-optimization",icon:(0,a.jsx)(X.PiggyBank,{...eJ}),roles:[...em.all_admin_roles,...em.internalUserRoles],label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Cost Optimization ",(0,a.jsx)(ef,{})]})},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(A,{...eJ})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)($.HeartPulse,{...eJ}),roles:[...em.all_admin_roles,...em.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(ec.Users,{...eJ})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(ef,{})]}),icon:(0,a.jsx)(q,{...eJ}),roles:em.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(ed.User,{...eJ}),roles:em.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(U.Building2,{...eJ}),roles:em.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(D,{...eJ}),roles:em.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(ep,{...eJ}),roles:em.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api_ref",page:"api_ref",label:"API Reference",icon:(0,a.jsx)(I.Code2,{...eJ})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(F.LayoutGrid,{...eJ})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(P,{...eJ}),external_url:"https://models.litellm.ai/cookbook"},{key:"caching",page:"caching",label:"Response Cache",icon:(0,a.jsx)(O.Database,{...eJ}),roles:em.all_admin_roles},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(G.FlaskConical,{...eJ}),children:[{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(V.FileText,{...eJ}),roles:em.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(en.Terminal,{...eJ}),roles:[...em.all_admin_roles,...em.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(eo,{...eJ}),roles:em.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(M.BarChart3,{...eJ})}]}]},{groupLabel:"SETTINGS",roles:em.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(ey.default,{})]}),icon:(0,a.jsx)(et.Settings,{...eJ}),roles:em.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(ee,{...eJ}),roles:em.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(B,{...eJ}),roles:em.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings"," ",(0,a.jsx)(ey.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(et.Settings,{...eJ}),roles:em.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(M.BarChart3,{...eJ}),roles:em.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(Z,{...eJ}),roles:em.all_admin_roles}]}]}],e1=e=>{for(let a of e0)for(let l of a.items)if(l.children?.some(a=>a.page===e||a.key===e))return l.key;return null},e2={"AI GATEWAY":"AI Gateway",OBSERVABILITY:"Observability","ACCESS CONTROL":"Access Control","DEVELOPER TOOLS":"Developer Tools",SETTINGS:"Settings"},e5=e=>e.split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),e3=e=>"string"==typeof e.label?e.label:e5(e.key);e.s(["default",0,({setPage:e,defaultSelectedKey:m,collapsed:b=!1,onToggleCollapsed:T,enabledPagesInternalUsers:A,enableProjectsUI:M,disableAgentsForInternalUsers:B,allowAgentsForTeamAdmins:R,disableVectorStoresForInternalUsers:z,allowVectorStoresForTeamAdmins:P})=>{let U,{userId:D,accessToken:I,userRole:O}=(0,t.default)(),{data:V}=(0,l.useOrganizations)(),{data:G}=(0,r.useTeams)(),{logoUrl:q}=(0,c.useTheme)(),{data:$}=(0,s.useHealthReadinessDetails)(I),W=(U=(0,n.default)(I),()=>{(0,i.clearTokenCookies)(),(0,o.clearStoredReturnUrl)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=U.PROXY_LOGOUT_URL||""}),F=(0,d.getProxyBaseUrl)(),K=$?.litellm_version,Z=(e=>{for(let a of e0)for(let l of a.items){if(l.page===e)return l.key;let a=l.children?.find(a=>a.page===e);if(a)return a.key}return"api-keys"})(m),[X,J]=(0,g.useState)(()=>{let e=e1(m);return new Set(e?[e]:[])}),[ee,ea]=(0,g.useState)(m);if(m!==ee){ea(m);let e=e1(m);e&&!X.has(e)&&J(a=>new Set(a).add(e))}let el=(0,g.useMemo)(()=>!!D&&!!V&&V.some(e=>e.members?.some(e=>e.user_id===D&&"org_admin"===e.user_role)),[D,V]),er=(0,g.useMemo)(()=>(0,em.isUserTeamAdminForAnyTeam)(G??null,D??""),[G,D]),et=e=>{let a=(0,em.isAdminRole)(O);return e.map(e=>({...e,children:e.children?et(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key)return!!(!e.roles||e.roles.includes(O)||el)&&(!!a||null==A||A.includes(e.page));if("projects"===e.key&&!M||!a&&"agents"===e.key&&B&&!(R&&er)||!a&&"vector-stores"===e.key&&z&&!(P&&er)||e.roles&&!e.roles.includes(O))return!1;if(!a&&null!=A)return!!(e.children&&e.children.length>0&&e.children.some(e=>A.includes(e.page)))||A.includes(e.page);return!0})},es=e0.filter(e=>!e.roles||e.roles.includes(O)).map(e=>({groupLabel:e.groupLabel,items:et(e.items)})).filter(e=>e.items.length>0),ei=(l,r)=>{let t=Z===l.key,s=r?"sub":"default",i=(0,a.jsx)("span",{className:"flex-1 truncate group-data-[collapsed=true]/sidebar:hidden",children:l.label});if(l.external_url)return(0,a.jsxs)("a",{href:l.external_url,target:"_blank",rel:"noopener noreferrer",title:b?e3(l):void 0,"data-active":t||void 0,className:(0,h.cn)(S({isActive:t,size:s})),children:[l.icon,i,(0,a.jsx)(H.ExternalLink,{className:"size-3.5 shrink-0 opacity-70 group-data-[collapsed=true]/sidebar:hidden"})]},l.key);let o=eX.MIGRATED_PAGES[l.page]?(0,eX.migratedHref)(eX.MIGRATED_PAGES[l.page]):(0,eX.legacyPageHref)(l.page);return(0,a.jsxs)("a",{href:o,onClick:a=>{l.external_url||!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&1!==a.button&&(a.preventDefault(),e(l.page))},title:b?e3(l):void 0,"data-active":t||void 0,className:(0,h.cn)(S({isActive:t,size:s})),children:[l.icon,i]},l.key)},eo=q||`${F}/get_image`;return(0,a.jsxs)(f,{collapsed:b,children:[(0,a.jsx)(y,{className:"h-14 border-b border-border group-data-[collapsed=true]/sidebar:h-auto",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 group-data-[collapsed=true]/sidebar:flex-col",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(eg.default,{href:F||"/",className:"flex min-w-0 items-center","aria-label":"LiteLLM home",children:(0,a.jsx)("img",{src:eo,alt:"LiteLLM",className:"h-7 w-auto max-w-[150px] object-contain group-data-[collapsed=true]/sidebar:w-7"})}),K&&(0,a.jsxs)(p.Badge,{variant:"outline",render:(0,a.jsx)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer"}),className:"px-1.5 py-0 font-mono text-[10px] font-medium text-muted-foreground group-data-[collapsed=true]/sidebar:hidden",children:["v",K]})]}),T&&(0,a.jsx)(u.Button,{variant:"ghost",size:"icon-sm",onClick:T,"aria-label":b?"Expand sidebar":"Collapse sidebar",className:"flex-none text-muted-foreground",children:b?(0,a.jsx)(Q,{}):(0,a.jsx)(Y,{})})]})}),(0,a.jsx)(x.ScrollArea,{className:"min-h-0 flex-1",children:(0,a.jsx)("nav",{className:"flex flex-col gap-0.5 px-3 pb-3",children:es.map((e,l)=>(0,a.jsxs)(j,{children:[l>0&&(0,a.jsx)(C,{className:"hidden group-data-[collapsed=true]/sidebar:block"}),(0,a.jsx)(v,{children:e.groupLabel}),(0,a.jsx)(w,{children:e.items.map(e=>(e=>{if(!(e.children&&e.children.length>0))return(0,a.jsx)(N,{children:ei(e,!1)},e.key);let l=Z===e.key,r=X.has(e.key);return(0,a.jsxs)(N,{children:[(0,a.jsxs)(L,{isActive:l,onClick:()=>(e=>{if(b){T?.(),J(a=>new Set(a).add(e));return}J(a=>{let l=new Set(a);return l.has(e)?l.delete(e):l.add(e),l})})(e.key),title:b?e3(e):void 0,children:[e.icon,(0,a.jsx)("span",{className:"flex-1 truncate group-data-[collapsed=true]/sidebar:hidden",children:e.label}),(0,a.jsx)(E.ChevronRight,{className:(0,h.cn)("size-4 shrink-0 transition-transform group-data-[collapsed=true]/sidebar:hidden",r&&"rotate-90")})]}),r&&(0,a.jsx)(_,{children:e.children.map(e=>(0,a.jsx)(N,{children:ei(e,!0)},e.key))})]},e.key)})(e))})]},e.groupLabel))})}),(0,a.jsxs)(k,{children:[(0,em.isAdminRole)(O)&&(0,a.jsx)(eQ,{accessToken:I,collapsed:b,onExpandRail:()=>T?.()}),(0,a.jsx)(eD,{onLogout:W,collapsed:b})]})]})},"getBreadcrumb",0,e=>{for(let a of e0)for(let l of a.items){let r=e2[a.groupLabel]??a.groupLabel;if(l.page===e)return{section:r,title:"string"==typeof l.label?l.label:e5(l.key)};let t=l.children?.find(a=>a.page===e);if(t)return{section:r,title:"string"==typeof t.label?t.label:e5(t.key)}}return{section:null,title:e5(e)}},"menuGroups",0,e0],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js b/litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js deleted file mode 100644 index 9c60665515a..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/05id71gg6oywc.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={},i=!0)=>{let{accessToken:d}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(d,e,a,s),enabled:!!d&&i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',l,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js b/litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js deleted file mode 100644 index 251a9ba7430..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/06q8aep867ss7.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,size:r="default",...n},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n}));n.displayName="Card";let o=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));o.displayName="CardHeader";let s=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));s.displayName="CardTitle";let i=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));i.displayName="CardDescription";let l=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));l.displayName="CardAction";let d=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));u.displayName="CardFooter",e.s(["Card",0,n,"CardAction",0,l,"CardContent",0,d,"CardDescription",0,i,"CardFooter",0,u,"CardHeader",0,o,"CardTitle",0,s])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:n=0,side:o="bottom",sideOffset:s=4,className:i,...l}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:o,sideOffset:s,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...l})})})},"DropdownMenuItem",0,function({className:e,inset:n,variant:o="default",...s}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...s})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[n,o]=(0,t.useState)(e);return[a?r:n,e=>{a||o(e)}]}])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},768371,e=>{"use strict";let t,r;var a=e.i(247167);let n=/\{[^{}]+\}/g;function o(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function s(e,t,r){if(!t||"object"!=typeof t)return"";let a=[],n={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)a.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let n=a.join(",");switch(r.style){case"form":return`${e}=${n}`;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return n}}for(let n in t){let s="deepObject"===r.style?`${e}[${n}]`:n;a.push(o(s,t[n],r))}let s=a.join(n);return"label"===r.style||"matrix"===r.style?`${n}${s}`:s}function i(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",n=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(a);switch(r.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return`${e}=${n}`}}let a={simple:",",label:".",matrix:";"}[r.style]||"&",n=[];for(let a of t)"simple"===r.style||"label"===r.style?n.push(!0===r.allowReserved?a:encodeURIComponent(a)):n.push(o(e,a,r));return"label"===r.style||"matrix"===r.style?`${a}${n.join(a)}`:n.join(a)}function l(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let a in t){let n=t[a];if(null!=n){if(Array.isArray(n)){if(0===n.length)continue;r.push(i(a,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof n){r.push(s(a,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(o(a,n,e))}}return r.join("&")}}function d(e,t){let r=e;for(let a of e.match(n)??[]){let e=a.substring(1,a.length-1),n=!1,l="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(l="label",e=e.substring(1)):e.startsWith(";")&&(l="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let d=t[e];if(Array.isArray(d)){r=r.replace(a,i(e,d,{style:l,explode:n}));continue}if("object"==typeof d){r=r.replace(a,s(e,d,{style:l,explode:n}));continue}if("matrix"===l){r=r.replace(a,`;${o(e,d)}`);continue}r=r.replace(a,"label"===l?`.${encodeURIComponent(d)}`:encodeURIComponent(d))}return r}function u(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function c(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,a]of r instanceof Headers?r.entries():Object.entries(r))if(null===a)t.delete(e);else if(Array.isArray(a))for(let r of a)t.append(e,r);else void 0!==a&&t.set(e,a);return t}function p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var f=e.i(954616),m=e.i(621482),h=e.i(869230),g=e.i(469637),b=e.i(254440),x=e.i(266027),v=e.i(431703),y=e.i(97198);let w=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),j=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:o,bodySerializer:s,pathSerializer:i,headers:f,requestInitExt:m,...h}={...e};m="object"==typeof a.default&&Number.parseInt(a.default?.versions?.node?.substring(0,2))>=18&&a.default.versions.undici?m:void 0,t=p(t);let g=[];async function b(e,a){var b,x;let v,y,w,j,C,{baseUrl:k,fetch:N=n,Request:R=r,headers:T,params:E={},parseAs:M="json",querySerializer:S,bodySerializer:z=s??u,pathSerializer:I,body:O,middleware:$=[],...A}=a||{},q=t;k&&(q=p(k)??t);let P="function"==typeof o?o:l(o);S&&(P="function"==typeof S?S:l({..."object"==typeof o?o:{},...S}));let U=I||i||d,D=void 0===O?void 0:z(O,c(f,T,E.header)),L=c(void 0===D||D instanceof FormData?{}:{"Content-Type":"application/json"},f,T,E.header),H=[...g,...$],V={redirect:"follow",...h,...A,body:D,headers:L},_=new R((b=e,x={baseUrl:q,params:E,querySerializer:P,pathSerializer:U},v=`${x.baseUrl}${b}`,x.params?.path&&(v=x.pathSerializer(v,x.params.path)),(y=x.querySerializer(x.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(v+=`?${y}`),v),V);for(let e in A)e in _||(_[e]=A[e]);if(H.length){for(let t of(w=Math.random().toString(36).slice(2,11),j=Object.freeze({baseUrl:q,fetch:N,parseAs:M,querySerializer:P,bodySerializer:z,pathSerializer:U}),H))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:_,schemaPath:e,params:E,options:j,id:w});if(r)if(r instanceof R)_=r;else if(r instanceof Response){C=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!C){try{C=await N(_,m)}catch(r){let t=r;if(H.length)for(let r=H.length-1;r>=0;r--){let a=H[r];if(a&&"object"==typeof a&&"function"==typeof a.onError){let r=await a.onError({request:_,error:t,schemaPath:e,params:E,options:j,id:w});if(r){if(r instanceof Response){t=void 0,C=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(H.length)for(let t=H.length-1;t>=0;t--){let r=H[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:_,response:C,schemaPath:e,params:E,options:j,id:w});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");C=t}}}}let B=C.headers.get("Content-Length");if(204===C.status||"HEAD"===_.method||"0"===B&&!C.headers.get("Transfer-Encoding")?.includes("chunked"))return C.ok?{data:void 0,response:C}:{error:void 0,response:C};if(C.ok){let e=async()=>{if("stream"===M)return C.body;if("json"===M&&!B){let e=await C.text();return e?JSON.parse(e):void 0}return await C[M]()};return{data:await e(),response:C}}let G=await C.text();try{G=JSON.parse(G)}catch{}return{error:G,response:C}}return{request:(e,t,r)=>b(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>b(e,{...t,method:"GET"}),PUT:(e,t)=>b(e,{...t,method:"PUT"}),POST:(e,t)=>b(e,{...t,method:"POST"}),DELETE:(e,t)=>b(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>b(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>b(e,{...t,method:"HEAD"}),PATCH:(e,t)=>b(e,{...t,method:"PATCH"}),TRACE:(e,t)=>b(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");g.push(t)}},eject(...e){for(let t of e){let e=g.indexOf(t);-1!==e&&g.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});j.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await w(e,((e,t)=>{let{pathname:r,search:a}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${a}`})(e.url,t)):e,a=(0,y.getAuthToken)();return a&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${a}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),a=r;try{a=JSON.parse(r),t=(0,v.deriveErrorMessage)(a)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new v.ApiError(t,e.status,a)}});let C=(t=async({queryKey:[e,t,r],signal:a})=>{let n=j[e.toUpperCase()],{data:o,error:s,response:i}=await n(t,{signal:a,...r});if(s)throw s;return 204===i.status||"0"===i.headers.get("Content-Length")?o??null:o},{queryOptions:r=(e,r,...[a,n])=>({queryKey:void 0===a?[e,r]:[e,r,a],queryFn:t,...n}),useQuery:(e,t,...[a,n,o])=>(0,x.useQuery)(r(e,t,a,n),o),useSuspenseQuery:(e,t,...[a,n,o])=>{var s;return s=r(e,t,a,n),(0,g.useBaseQuery)({...s,enabled:!0,suspense:!0,throwOnError:b.defaultThrowOnError,placeholderData:void 0},h.QueryObserver,o)},useInfiniteQuery:(e,t,a,n,o)=>{let{pageParamName:s="cursor",...i}=n,{queryKey:l}=r(e,t,a);return(0,m.useInfiniteQuery)({queryKey:l,queryFn:async({queryKey:[e,t,r],pageParam:a=0,signal:n})=>{let o=j[e.toUpperCase()],i={...r,signal:n,params:{...r?.params||{},query:{...r?.params?.query,[s]:a}}},{data:l,error:d}=await o(t,i);if(d)throw d;return l},...i},o)},useMutation:(e,t,r,a)=>(0,f.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let a=j[e.toUpperCase()],{data:n,error:o}=await a(t,r);if(o)throw o;return n},...r},a)});e.s(["$api",0,C,"fetchClient",0,j],768371)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),a=e.i(266027);let n=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:o}=(0,t.default)();return(0,a.useQuery)({queryKey:n.detail(o),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&o)})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),n=e.i(785242),o=e.i(738014),s=e.i(199133),i=e.i(981339),l=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},u={label:"No Default Models",value:"no-default-models"},c=[d,u],p={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["MODEL_SENTINEL_OPTIONS",0,c,"ModelSelect",0,e=>{let{teamID:f,organizationID:m,options:h,context:g,dataTestId:b,value:x=[],onChange:v,style:y}=e,{includeUserModels:w,showAllTeamModelsOption:j,showAllProxyModelsOverride:C,includeSpecialOptions:k}=h||{},{data:N,isLoading:R}=(0,r.useAllProxyModels)(),{data:T,isLoading:E}=(0,n.useTeam)(f),{data:M,isLoading:S}=(0,a.useOrganization)(m),{data:z,isLoading:I}=(0,o.useCurrentUser)(),O=e=>c.some(t=>t.value===e),$=x.some(O),A=M?.models.includes(d.value)||M?.models.length===0;if(R||E||S||I)return(0,t.jsx)(i.Skeleton.Input,{active:!0,block:!0});let{wildcard:q,regular:P}=(e=>{let t=[],r=[];for(let a of e)a.endsWith("/*")?t.push(a):r.push(a);return{wildcard:t,regular:r}})(((e,t,r)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let n=p[t.context];return n?n({allProxyModels:a,...r,options:t.options}):[]})(N?.data??[],e,{selectedTeam:T,selectedOrganization:M,userModels:z?.models}));return(0,t.jsx)(s.Select,{"data-testid":b,value:x,onChange:e=>{let t=e.filter(O);v(t.length>0?[t[t.length-1]]:e)},style:y,options:[...k?[{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||A&&k||"global"===g?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>O(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:u.value,disabled:x.length>0&&x.some(e=>O(e)&&e!==u.value),key:u.value}]}]:[],...q.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:q.map(e=>{let r=e.replace("/*",""),a=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:$}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:P.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:$}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(l.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,a,n){let[o,s,i]=(0,t.useDebouncedState)(e,a,n);return(0,r.useEffect)(()=>{s(e)},[e,s]),[o,i]}])},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("textarea",{ref:n,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));n.displayName="Textarea",e.s(["Textarea",0,n])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),n=e.i(519455),o=e.i(793479),s=e.i(624687);let i=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),l=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:o="ghost",size:s="xs",...i},d)=>(0,t.jsx)(n.Button,{ref:d,type:r,"data-size":s,variant:o,className:(0,a.cn)(l({size:s}),e),...i}));d.displayName="InputGroupButton";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(o.Input,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));u.displayName="InputGroupInput",r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(s.Textarea,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(i({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let a=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:n,onValueChange:o,placeholder:s="Select…",emptyText:i="No results",disabled:l=!1,className:d}){let u=e.find(e=>e.value===n)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:u,onValueChange:e=>o(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:a,disabled:l,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:s,showClear:null!=n&&""!==n,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:i}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},78085,e=>{"use strict";var t=e.i(290571),r=e.i(103471),a=e.i(888288),n=e.i(271645),o=e.i(444755),s=e.i(673706);let i=(0,s.makeClassName)("Textarea"),l=n.default.forwardRef((e,l)=>{let{value:d,defaultValue:u="",placeholder:c="Type...",error:p=!1,errorMessage:f,disabled:m=!1,className:h,onChange:g,onValueChange:b,autoHeight:x=!1}=e,v=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[y,w]=(0,a.default)(u,d),j=(0,n.useRef)(null),C=(0,r.hasValue)(y);return(0,n.useEffect)(()=>{let e=j.current;if(x&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[x,j,y]),n.default.createElement(n.default.Fragment,null,n.default.createElement("textarea",Object.assign({ref:(0,s.mergeRefs)([j,l]),value:y,placeholder:c,disabled:m,className:(0,o.tremorTwMerge)(i("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,r.getSelectButtonColors)(C,m,p),m?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",h),"data-testid":"text-area",onChange:e=>{null==g||g(e),w(e.target.value),null==b||b(e.target.value)}},v)),p&&f?n.default.createElement("p",{className:(0,o.tremorTwMerge)(i("errorMessage"),"text-sm text-red-500 mt-1")},f):null)});l.displayName="Textarea",e.s(["Textarea",0,l],78085)},744582,e=>{"use strict";var t=e.i(843476),r=e.i(343488),a=e.i(531278),n=e.i(271645),o=e.i(131792),s=e.i(741466);let i=new Set(["input-change","input-clear","clear-press"]);e.s(["PaginatedSearchSelect",0,function({options:e,value:l,onValueChange:d,onSearchChange:u,onLoadMore:c,hasNextPage:p=!1,isLoading:f=!1,isFetchingNextPage:m=!1,placeholder:h="Search…",emptyText:g="No results",loadingText:b="Loading…",disabled:x=!1,className:v,inputId:y,"aria-invalid":w,"aria-describedby":j}){let C=(0,n.useMemo)(()=>void 0===l||""===l?null:e.find(e=>e.value===l)??{label:l,value:l},[e,l]),k=(0,n.useMemo)(()=>null===C||e.some(e=>e.value===C.value)?e:[C,...e],[e,C]),N=(0,r.useDebouncedCallback)(u,{wait:s.DEBOUNCE_WAIT_MS});return(0,t.jsxs)(o.Combobox,{items:k,value:C,onValueChange:e=>d(e?.value??""),onInputValueChange:(e,t)=>{var r;return r=t.reason,void(i.has(r)&&N(e))},isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:null,disabled:x,children:[(0,t.jsx)(o.ComboboxInput,{id:y,"aria-invalid":w,"aria-describedby":j,placeholder:h,showClear:void 0!==l&&""!==l,className:`w-full ${v??""}`}),(0,t.jsxs)(o.ComboboxContent,{children:[(0,t.jsx)(o.ComboboxEmpty,{children:f?b:g}),(0,t.jsx)(o.ComboboxList,{onScroll:e=>{let t=e.currentTarget;0===t.scrollHeight||(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!m&&c()},"data-testid":"paginated-search-select-list",children:e=>(0,t.jsx)(o.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)}),m&&(0,t.jsx)("div",{className:"flex justify-center py-2","data-testid":"paginated-search-select-loading-more",children:(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-muted-foreground"})})]})]})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js b/litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js deleted file mode 100644 index 5a875678fe6..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0dh09yfknpuy3.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,793479,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,type:a,...s},l)=>(0,t.jsx)("input",{type:a,"data-slot":"input",className:(0,r.cn)("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),ref:l,...s}));s.displayName="Input",e.s(["Input",0,s])},110204,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("label",{ref:s,"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a}));s.displayName="Label",e.s(["Label",0,s])},515288,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,size:a="default",...s},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s}));s.displayName="Card";let l=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));l.displayName="CardHeader";let i=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-title",className:(0,r.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));i.displayName="CardTitle";let o=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a}));o.displayName="CardDescription";let d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));d.displayName="CardAction";let n=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a}));n.displayName="CardContent";let c=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));c.displayName="CardFooter",e.s(["Card",0,s,"CardAction",0,d,"CardContent",0,n,"CardDescription",0,o,"CardFooter",0,c,"CardHeader",0,l,"CardTitle",0,i])},312130,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(519455),s=e.i(515288),l=e.i(793479),i=e.i(110204),o=e.i(571303),d=e.i(275144),n=e.i(602869),c=e.i(727749);let u=({userID:e,userRole:u,accessToken:m})=>{let{logoUrl:f,setLogoUrl:p,faviconUrl:g,setFaviconUrl:h}=(0,d.useTheme)(),[x,v]=(0,a.useState)(""),[b,y]=(0,a.useState)(""),[j,C]=(0,a.useState)(!1);(0,a.useEffect)(()=>{m&&N()},[m]);let N=async()=>{try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/get/ui_theme_settings`:"/get/ui_theme_settings",a=await fetch(t,{method:"GET",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"}});if(a.ok){let e=await a.json();v(e.values?.logo_url||""),y(e.values?.favicon_url||""),p(e.values?.logo_url||null),h(e.values?.favicon_url||null)}}catch(e){console.error("Error fetching theme settings:",e)}},w=async()=>{C(!0);try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:x||null,favicon_url:b||null})})).ok)c.default.success("Theme settings updated successfully!"),p(x||null),h(b||null);else throw Error("Failed to update settings")}catch(e){console.error("Error updating theme settings:",e),c.default.fromBackend("Failed to update theme settings")}finally{C(!1)}},_=async()=>{v(""),y(""),p(null),h(null),C(!0);try{let e=(0,n.getProxyBaseUrl)(),t=e?`${e}/update/ui_theme_settings`:"/update/ui_theme_settings";if((await fetch(t,{method:"PATCH",headers:{[(0,n.getGlobalLitellmHeaderName)()]:`Bearer ${m}`,"Content-Type":"application/json"},body:JSON.stringify({logo_url:null,favicon_url:null})})).ok)c.default.success("Theme settings reset to default!");else throw Error("Failed to reset")}catch(e){console.error("Error resetting theme settings:",e),c.default.fromBackend("Failed to reset theme settings")}finally{C(!1)}};return m?(0,t.jsxs)("div",{className:"w-full mx-auto max-w-4xl px-6 py-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h1",{className:"mb-2 text-2xl font-bold",children:"UI Theme Customization"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Customize your LiteLLM admin dashboard with a custom logo and favicon."})]}),(0,t.jsx)(s.Card,{children:(0,t.jsxs)(s.CardContent,{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Label,{htmlFor:"ui-theme-logo-url",className:"mb-2",children:"Custom Logo URL"}),(0,t.jsx)(l.Input,{id:"ui-theme-logo-url",placeholder:"https://example.com/logo.png",value:x,onChange:e=>{v(e.target.value),p(e.target.value||null)}}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter a URL for your custom logo or leave empty for default"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(i.Label,{htmlFor:"ui-theme-favicon-url",className:"mb-2",children:"Custom Favicon URL"}),(0,t.jsx)(l.Input,{id:"ui-theme-favicon-url",placeholder:"https://example.com/favicon.ico",value:b,onChange:e=>{y(e.target.value),h(e.target.value||null)}}),(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter a URL for your custom favicon (.ico, .png, or .svg) or leave empty for default"})]}),(0,t.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,t.jsxs)(r.Button,{onClick:w,disabled:j,children:[j&&(0,t.jsx)(o.UiLoadingSpinner,{className:"size-4"}),"Save Changes"]}),(0,t.jsxs)(r.Button,{variant:"outline",onClick:_,disabled:j,children:[j&&(0,t.jsx)(o.UiLoadingSpinner,{className:"size-4"}),"Reset to Default"]})]})]})})]}):null};var m=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userRole:a,userId:r}=(0,m.default)();return(0,t.jsx)(u,{userID:r,userRole:a,accessToken:e})}],312130)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0ekppsigd1c7x.js b/litellm/proxy/_experimental/out/_next/static/chunks/0ekppsigd1c7x.js new file mode 100644 index 00000000000..ed19e3a2912 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0ekppsigd1c7x.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let n=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));i.displayName="CardTitle";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));s.displayName="CardAction";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let u=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));u.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,s,"CardContent",0,d,"CardDescription",0,l,"CardFooter",0,u,"CardHeader",0,n,"CardTitle",0,i])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:o=0,side:n="bottom",sideOffset:i=4,className:l,...s}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:n,sideOffset:i,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...s})})})},"DropdownMenuItem",0,function({className:e,inset:o,variant:n="default",...i}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})},"DropdownMenuSeparator",0,function({className:e,...o}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...o})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,a,o=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),i=e.i(951437),l=e.i(146376),s=e.i(667865),d=e.i(552245),u=e.i(53687),c=e.i(733332);let f=n.createContext(void 0);function g(){let e=n.useContext(f);if(void 0===e)throw Error((0,c.default)(64));return e}let p=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),b={tabActivationDirection:e=>({[p.activationDirection]:e})};var m=e.i(675606),h=e.i(56434);let v=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:c,orientation:g="horizontal",render:p,value:v,style:C,...y}=e,k=void 0!==e.defaultValue,w=n.useRef([]),[R,N]=n.useState(()=>new Map),[T,S]=(0,i.useControlled)({controlled:v,default:a,name:"Tabs",state:"value"}),E=void 0!==v,[M,I]=n.useState(()=>new Map),j=n.useRef(void 0),A=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of M.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[M]),[D,O]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:_}=D,z=_,P=!1;L!==T&&(z=x(L,T,g,M),P=null!=L&&null!=T&&null==A(T));let H=P?L:T,W=L!==H||_!==z;(0,l.useIsoLayoutEffect)(()=>{W&&O({previousValue:H,tabActivationDirection:z})},[H,W,z]);let V=(0,s.useStableCallback)((e,t)=>{t.activationDirection=x(T,e,g,M),c?.(e,t),t.isCanceled||S(e)}),Y=(0,s.useStableCallback)((e,t)=>{c?.(e,(0,m.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),B=(0,s.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),K=(0,s.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),F=n.useCallback(e=>R.get(e),[R]),X=n.useCallback(e=>{for(let t of M.values())if(e===t?.value)return t?.id},[M]),$=n.useMemo(()=>({getTabElementBySelectedValue:A,getTabIdByPanelValue:X,getTabPanelIdByValue:F,onValueChange:V,orientation:g,registerMountedTabPanel:B,setTabMap:I,unregisterMountedTabPanel:K,tabActivationDirection:z,value:T}),[A,X,F,V,g,B,I,K,z,T]),U=n.useMemo(()=>{for(let e of M.values())if(null!=e&&e.value===T)return e},[M,T]),q=n.useMemo(()=>{for(let e of M.values())if(null!=e&&!e.disabled)return e.value},[M]),G=n.useRef(!k),Z=n.useRef(a),J=n.useRef(k),Q=n.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(E)return;function e(e,t){S(e),O(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),Y(e,t),G.current=!1}if(0===M.size){Q.current&&null!==T&&!j.current?.isConnected&&e(null,h.REASONS.missing);return}Q.current=!0,j.current=M.keys().next().value;let t=U?.disabled,r=null==U&&null!==T;if(t||T!==Z.current||(J.current=!1),J.current&&t&&T===Z.current)return;let a=G.current;if(t||r){let r=q??null;if(T===r){G.current=!1;return}let o=h.REASONS.missing;a?o=h.REASONS.initial:t&&(o=h.REASONS.disabled),e(r,o);return}a&&null!=U&&(Y(T,h.REASONS.initial),G.current=!1)},[q,E,Y,U,S,M,T]);let ee={orientation:g,tabActivationDirection:z},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:b});return(0,o.jsx)(f.Provider,{value:$,children:(0,o.jsx)(u.CompositeList,{elementsRef:w,children:et})})});function x(e,t,r,a){if(null==e||null==t)return"none";let o=null,n=null;for(let[r,i]of a.entries()){if(null==i)continue;let a=i.value??i.index;if(e===a&&(o=r),t===a&&(n=r),null!=o&&null!=n)break}if(null==o||null==n)return o!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let i=o.getBoundingClientRect(),l=n.getBoundingClientRect();if("horizontal"===r){if(l.lefti.left)return"right"}else{if(l.topi.top)return"down"}return"none"}var C=e.i(108868),y=e.i(788015),k=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var R=e.i(395530);let N=n.createContext(void 0);function T(){let e=n.useContext(N);if(void 0===e)throw Error((0,c.default)(65));return e}var S=e.i(647554);let E=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:o,value:i,id:s,nativeButton:u=!0,style:c,...f}=e,{value:p,getTabPanelIdByValue:v,orientation:x,tabActivationDirection:N}=g(),{activateOnFocus:E,highlightedTabIndex:M,onTabActivation:I,registerTabResizeObserverElement:j,setHighlightedTabIndex:A,tabsListElement:D}=T(),O=(0,y.useBaseUiId)(s),L=n.useMemo(()=>({disabled:a,id:O,value:i}),[a,O,i]),{compositeProps:_,compositeRef:z,index:P}=(0,R.useCompositeItem)({metadata:L}),H=i===p,W=n.useRef(!1),V=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=V.current;if(e)return j(e)},[j]),(0,l.useIsoLayoutEffect)(()=>{if(W.current){W.current=!1;return}if(H&&P>-1&&M!==P){if(null!=D){let e=(0,S.activeElement)((0,C.ownerDocument)(D));if(e&&(0,S.contains)(D,e))return}a||A(P)}},[H,P,M,A,a,D]);let{getButtonProps:Y,buttonRef:B}=(0,k.useButton)({disabled:a,native:u,focusableWhenDisabled:!0}),K=v(i),F=n.useRef(!1),X=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:H,orientation:x,tabActivationDirection:N},ref:[t,B,z,V],props:[_,{role:"tab","aria-controls":K,"aria-selected":H,id:O,onClick:function(e){H||a||I(i,(0,m.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){H||(P>-1&&!a&&A(P),!a&&E&&(!F.current||F.current&&X.current)&&I(i,(0,m.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){H||a||(F.current=!0,e.button&&0!==e.button||(X.current=!0,(0,C.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){F.current=!1,X.current=!1},{once:!0})))},[w]:H?"":void 0,onKeyDownCapture(){W.current=!0}},f,Y],stateAttributesMapping:b})});var M=e.i(73364),I=e.i(802239),j=e.i(956789);function A(){return j.NOOP}function D(){return!1}function O(){return!0}let L=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var _=e.i(172410);let z={...b,activeTabPosition:()=>null,activeTabSize:()=>null},P=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:i=!1,style:l,...s}=e,{nonce:u}=(0,_.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:p,value:b}=g(),{tabsListElement:m,registerIndicatorUpdateListener:h}=T(),v=(0,I.useSyncExternalStore)(A,D,O),x=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>h(x),[h,x]);let C=0,y=0,k=0,w=0,R=0,N=0,S=!1;if(null!=b&&null!=m){let e=c(b);if(null!=e){S=!0;let{width:t,height:r}=(0,M.getCssDimensions)(e),{width:a,height:o}=(0,M.getCssDimensions)(m),n=e.getBoundingClientRect(),i=m.getBoundingClientRect(),l=a>0?i.width/a:1,s=o>0?i.height/o:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=n.left-i.left,t=n.top-i.top;C=e/l+m.scrollLeft-m.clientLeft,k=t/s+m.scrollTop-m.clientTop}else C=e.offsetLeft,k=e.offsetTop;R=t,N=r,y=m.scrollWidth-C-R,w=m.scrollHeight-k-N}}let E=S?{left:C,right:y,top:k,bottom:w}:null,j=S?{width:R,height:N}:null,P=S?{[L.activeTabLeft]:`${C}px`,[L.activeTabRight]:`${y}px`,[L.activeTabTop]:`${k}px`,[L.activeTabBottom]:`${w}px`,[L.activeTabWidth]:`${R}px`,[L.activeTabHeight]:`${N}px`}:void 0,H=S&&R>0&&N>0,W=(0,d.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:E,activeTabSize:j,tabActivationDirection:p},ref:t,props:[{role:"presentation",style:P,hidden:!H},s,{suppressHydrationWarning:!0}],stateAttributesMapping:z});return null==b?null:(0,o.jsxs)(n.Fragment,{children:[W,v&&i&&(0,o.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var H=e.i(144394),W=e.i(209407),V=e.i(137584),Y=e.i(223910),B=e.i(673553);let K=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=W.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=W.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),F={...b,...W.transitionStatusMapping},X=n.forwardRef(function(e,t){let{className:r,value:a,render:o,keepMounted:i=!1,style:s,...u}=e,{value:c,getTabIdByPanelValue:f,orientation:p,tabActivationDirection:b,registerMountedTabPanel:m,unregisterMountedTabPanel:h}=g(),v=(0,y.useBaseUiId)(),x=n.useMemo(()=>({id:v,value:a}),[v,a]),{ref:C,index:k}=(0,B.useCompositeListItem)({metadata:x}),w=a===c,{mounted:R,transitionStatus:N,setMounted:T}=(0,Y.useTransitionStatus)(w),S=!R,E=f(a),M=n.useRef(null),I=(0,d.useRenderElement)("div",e,{state:{hidden:S,orientation:p,tabActivationDirection:b,transitionStatus:N},ref:[t,C,M],props:[{"aria-labelledby":E,hidden:S,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:(0,H.inertValue)(!w),[K.index]:k},u],stateAttributesMapping:F});return((0,V.useOpenChangeComplete)({open:w,ref:M,onComplete(){w||T(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!S||i)&&null!=v)return m(a,v),()=>{h(a,v)}},[S,i,a,v,m,h]),i||R)?I:null});var $=e.i(590803),U=e.i(828918),q=e.i(673327),G=e.i(621082);let Z=[];var J=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:i=j.EMPTY_ARRAY,props:c=j.EMPTY_ARRAY,state:f=j.EMPTY_OBJECT,stateAttributesMapping:g,highlightedIndex:p,onHighlightedIndexChange:b,orientation:m,grid:h,loopFocus:v,onLoop:x,enableHomeAndEndKeys:C,onMapChange:y,stopEventPropagation:k=!0,rootRef:R,disabledIndices:N,modifierKeys:T,highlightItemOnHover:E=!1,tag:M="div",...I}=e,{props:A,highlightedIndex:D,onHighlightedIndexChange:O,elementsRef:L,onMapChange:_,relayKeyboardEvent:z}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:o,direction:i,highlightedIndex:d,onHighlightedIndexChange:u,rootRef:c,enableHomeAndEndKeys:f=!1,stopEventPropagation:g=!1,disabledIndices:p,modifierKeys:b=Z}=e,[m,h]=n.useState(0),v=null!=a,x=n.useRef(null),C=(0,U.useMergedRefs)(x,c),y=n.useRef([]),k=n.useRef(!1),R=d??m,N=(0,s.useStableCallback)((e,t=!1)=>{if((u??h)(e),t){let t=y.current[e];(0,q.scrollIntoViewIfNeeded)(x.current,t,i,r)}}),T=(0,s.useStableCallback)(e=>{if(0===e.size||k.current)return;k.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(w))??null,o=a?t.indexOf(a):-1;if(-1!==o)N(o);else if((0,G.isListIndexDisabled)(t,R,p)){let e=(0,G.findNonDisabledListIndex)(t,{disabledIndices:p});(0,G.isIndexOutOfListBounds)(t,e)||N(e)}(0,q.scrollIntoViewIfNeeded)(x.current,a,i,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==p||null!=d||!k.current)return;let e=y.current;if((0,G.isListIndexDisabled)(e,R,p)){let t=(0,G.findNonDisabledListIndex)(e,{disabledIndices:p});(0,G.isIndexOutOfListBounds)(e,t)||N(t)}},[p,d,R,y,N]);let E=(0,s.useStableCallback)((e,t,r)=>o?o(e,t,r,y):r),M=(0,s.useStableCallback)(e=>{let n=f?q.COMPOSITE_KEYS:q.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of q.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,b)||!x.current)return;let l="rtl"===i,s=l?q.ARROW_LEFT:q.ARROW_RIGHT,d={horizontal:s,vertical:q.ARROW_DOWN,both:s}[r],u=l?q.ARROW_RIGHT:q.ARROW_LEFT,c={horizontal:u,vertical:q.ARROW_UP,both:u}[r],m=(0,S.getTarget)(e.nativeEvent);if(null!=m&&(0,q.isNativeInput)(m)&&!(0,$.isElementDisabled)(m)){let t=m.selectionStart,r=m.selectionEnd,a=m.value??"";if(null==t||e.shiftKey||t!==r||e.key!==c&&t0)return}let h=R,C=(0,G.getMinListIndex)(y,p),k=(0,G.getMaxListIndex)(y,p);null!=a&&(h=a({disabledIndices:p,elementsRef:y,event:e,highlightedIndex:R,loopFocus:t,maxIndex:k,minIndex:C,onLoop:E,orientation:r,rtl:l}));let w={horizontal:[s],vertical:[q.ARROW_DOWN],both:[s,q.ARROW_DOWN]}[r],T={horizontal:[u],vertical:[q.ARROW_UP],both:[u,q.ARROW_UP]}[r],M=v?n:({horizontal:f?q.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:q.HORIZONTAL_KEYS,vertical:f?q.VERTICAL_KEYS_WITH_EXTRA_KEYS:q.VERTICAL_KEYS,both:n})[r];f&&(e.key===q.HOME?h=C:e.key===q.END&&(h=k)),h===R&&(w.includes(e.key)||T.includes(e.key))&&(t&&h===k&&w.includes(e.key)?(h=C,o&&(h=o(e,R,h,y))):t&&h===C&&T.includes(e.key)?(h=k,o&&(h=o(e,R,h,y))):h=(0,G.findNonDisabledListIndex)(y.current,{startingIndex:h,decrement:T.includes(e.key),disabledIndices:p})),h===R||(0,G.isIndexOutOfListBounds)(y.current,h)||(g&&e.stopPropagation(),M.has(e.key)&&e.preventDefault(),N(h,!0),queueMicrotask(()=>{y.current[h]?.focus()}))});return{props:{ref:C,onFocus(e){let t=x.current,r=(0,S.getTarget)(e.nativeEvent);t&&null!=r&&(0,q.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:M},highlightedIndex:R,onHighlightedIndexChange:N,elementsRef:y,disabledIndices:p,onMapChange:T,relayKeyboardEvent:M}}({grid:h,loopFocus:v,onLoop:x,orientation:m,highlightedIndex:p,onHighlightedIndexChange:b,rootRef:R,stopEventPropagation:k,enableHomeAndEndKeys:C,direction:(0,Q.useDirection)(),disabledIndices:N,modifierKeys:T}),P=(0,d.useRenderElement)(M,e,{state:f,ref:i,props:[A,...c,I],stateAttributesMapping:g}),H=n.useMemo(()=>({highlightedIndex:D,onHighlightedIndexChange:O,highlightItemOnHover:E,relayKeyboardEvent:z}),[D,O,E,z]);return(0,o.jsx)(J.CompositeRootContext.Provider,{value:H,children:(0,o.jsx)(u.CompositeList,{elementsRef:L,onMapChange:e=>{y?.(e),_(e)},children:P})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:i=!0,render:d,style:u,...c}=e,{onValueChange:f,orientation:p,value:m,setTabMap:h,tabActivationDirection:v}=g(),[x,C]=n.useState(0),[y,k]=n.useState(null),w=n.useRef(new Set),R=n.useRef(new Set),T=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return T.current=e,y&&e.observe(y),R.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[y]);let S=(0,s.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),E=(0,s.useStableCallback)(e=>(R.current.add(e),T.current?.observe(e),()=>{R.current.delete(e),T.current?.unobserve(e)})),M=(0,s.useStableCallback)((e,t)=>{e!==m&&f(e,t)}),I=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:E,onTabActivation:M,setHighlightedTabIndex:C,tabsListElement:y}),[r,x,S,E,M,C,y]);return(0,o.jsx)(N.Provider,{value:I,children:(0,o.jsx)(ee,{render:d,className:a,style:u,state:{orientation:p,tabActivationDirection:v},refs:[t,k],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:b,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:i,orientation:p,onHighlightedIndexChange:C,onMapChange:h,disabledIndices:j.EMPTY_ARRAY})})});e.s(["Indicator",0,P,"List",0,et,"Panel",0,X,"Root",0,v,"Tab",0,E],69281);var er=e.i(69281),er=er,ea=e.i(115504);let eo=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,o.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,o.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,o.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(eo({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,o.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),n=e.i(444755),i=e.i(673706),l=e.i(95779);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},u={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},c=(0,i.makeClassName)("Icon"),f=r.default.forwardRef((e,f)=>{let{icon:g,variant:p="simple",tooltip:b,size:m=o.Sizes.SM,color:h,className:v}=e,x=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),C=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(p,h),{tooltipProps:y,getReferenceProps:k}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([f,y.refs.setReference]),className:(0,n.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",C.bgColor,C.textColor,C.borderColor,C.ringColor,u[p].rounded,u[p].border,u[p].shadow,u[p].ring,s[m].paddingX,s[m].paddingY,v)},k,x),r.default.createElement(a.default,Object.assign({text:b},y)),r.default.createElement(g,{className:(0,n.tremorTwMerge)(c("icon"),"shrink-0",d[m].height,d[m].width)}))});f.displayName="Icon",e.s(["default",0,f],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[o,n]=(0,t.useState)(e);return[a?r:o,e=>{a||n(e)}]}])},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let a=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:o,onValueChange:n,placeholder:i="Select…",emptyText:l="No results",disabled:s=!1,className:d}){let u=e.find(e=>e.value===o)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:u,onValueChange:e=>n(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:a,disabled:s,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:i,showClear:null!=o&&""!==o,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:l}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(353753),a=e.i(115504),o=e.i(519455),n=e.i(995926);function i({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...o}){return(0,t.jsx)(r.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...o})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:s,showCloseButton:d=!0,...u}){return(0,t.jsxs)(i,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(r.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[s,d&&(0,t.jsxs)(r.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(o.Button,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...o}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...o})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:i,...l}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...l,children:[i,n&&(0,t.jsx)(r.Dialog.Close,{render:(0,t.jsx)(o.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2",e),...r})},"DialogTitle",0,function({className:e,...o}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.cn)("leading-none font-medium",e),...o})}])},439573,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=(0,a.cva)({base:"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:r,...n},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"alert",role:"alert",className:(0,a.cn)(o({variant:r}),e),...n}));n.displayName="Alert";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-title",className:(0,a.cn)("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...r}));i.displayName="AlertTitle";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r}));l.displayName="AlertDescription";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-action",className:(0,a.cn)("absolute top-2.5 right-3",e),...r}));s.displayName="AlertAction",e.s(["Alert",0,n,"AlertAction",0,s,"AlertDescription",0,l,"AlertTitle",0,i])},123287,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},595468,e=>{"use strict";var t=e.i(123287);e.s(["CheckCircle2",()=>t.default])},582458,e=>{"use strict";let t=(0,e.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},878894,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default])},89128,e=>{"use strict";var t=e.i(582458);e.s(["TriangleAlert",()=>t.default])},373884,e=>{"use strict";let t=(0,e.i(475254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],373884)},78085,e=>{"use strict";var t=e.i(290571),r=e.i(103471),a=e.i(888288),o=e.i(271645),n=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Textarea"),s=o.default.forwardRef((e,s)=>{let{value:d,defaultValue:u="",placeholder:c="Type...",error:f=!1,errorMessage:g,disabled:p=!1,className:b,onChange:m,onValueChange:h,autoHeight:v=!1}=e,x=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[C,y]=(0,a.default)(u,d),k=(0,o.useRef)(null),w=(0,r.hasValue)(C);return(0,o.useEffect)(()=>{let e=k.current;if(v&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[v,k,C]),o.default.createElement(o.default.Fragment,null,o.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([k,s]),value:C,placeholder:c,disabled:p,className:(0,n.tremorTwMerge)(l("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,r.getSelectButtonColors)(w,p,f),p?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",b),"data-testid":"text-area",onChange:e=>{null==m||m(e),y(e.target.value),null==h||h(e.target.value)}},x)),f&&g?o.default.createElement("p",{className:(0,n.tremorTwMerge)(l("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});s.displayName="Textarea",e.s(["Textarea",0,s],78085)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js b/litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js deleted file mode 100644 index fc1511d3d2a..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0i25zatajbma2.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let n=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));l.displayName="CardTitle";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));s.displayName="CardDescription";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));i.displayName="CardAction";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,i,"CardContent",0,d,"CardDescription",0,s,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,l])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:o=0,side:n="bottom",sideOffset:l=4,className:s,...i}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:n,sideOffset:l,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...i})})})},"DropdownMenuItem",0,function({className:e,inset:o,variant:n="default",...l}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...l})},"DropdownMenuSeparator",0,function({className:e,...o}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...o})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},677572,370359,405934,e=>{"use strict";var t,r,a,o=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),l=e.i(951437),s=e.i(146376),i=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let m=n.createContext(void 0);function h(){let e=n.useContext(m);if(void 0===e)throw Error((0,u.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),p={tabActivationDirection:e=>({[g.activationDirection]:e})};var f=e.i(675606),b=e.i(56434);let x=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:h="horizontal",render:g,value:x,style:k,...y}=e,C=void 0!==e.defaultValue,w=n.useRef([]),[j,N]=n.useState(()=>new Map),[T,S]=(0,l.useControlled)({controlled:x,default:a,name:"Tabs",state:"value"}),M=void 0!==x,[R,_]=n.useState(()=>new Map),D=n.useRef(void 0),E=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of R.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[R]),[L,P]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:O}=L,z=O,A=!1;I!==T&&(z=v(I,T,h,R),A=null!=I&&null!=T&&null==E(T));let Y=A?I:T,H=I!==Y||O!==z;(0,s.useIsoLayoutEffect)(()=>{H&&P({previousValue:Y,tabActivationDirection:z})},[Y,H,z]);let F=(0,i.useStableCallback)((e,t)=>{t.activationDirection=v(T,e,h,R),u?.(e,t),t.isCanceled||S(e)}),B=(0,i.useStableCallback)((e,t)=>{u?.(e,(0,f.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,i.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),W=(0,i.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),$=n.useCallback(e=>j.get(e),[j]),q=n.useCallback(e=>{for(let t of R.values())if(e===t?.value)return t?.id},[R]),K=n.useMemo(()=>({getTabElementBySelectedValue:E,getTabIdByPanelValue:q,getTabPanelIdByValue:$,onValueChange:F,orientation:h,registerMountedTabPanel:V,setTabMap:_,unregisterMountedTabPanel:W,tabActivationDirection:z,value:T}),[E,q,$,F,h,V,_,W,z,T]),U=n.useMemo(()=>{for(let e of R.values())if(null!=e&&e.value===T)return e},[R,T]),G=n.useMemo(()=>{for(let e of R.values())if(null!=e&&!e.disabled)return e.value},[R]),X=n.useRef(!C),J=n.useRef(a),Q=n.useRef(C),Z=n.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(M)return;function e(e,t){S(e),P(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),X.current=!1}if(0===R.size){Z.current&&null!==T&&!D.current?.isConnected&&e(null,b.REASONS.missing);return}Z.current=!0,D.current=R.keys().next().value;let t=U?.disabled,r=null==U&&null!==T;if(t||T!==J.current||(Q.current=!1),Q.current&&t&&T===J.current)return;let a=X.current;if(t||r){let r=G??null;if(T===r){X.current=!1;return}let o=b.REASONS.missing;a?o=b.REASONS.initial:t&&(o=b.REASONS.disabled),e(r,o);return}a&&null!=U&&(B(T,b.REASONS.initial),X.current=!1)},[G,M,B,U,S,R,T]);let ee={orientation:h,tabActivationDirection:z},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:p});return(0,o.jsx)(m.Provider,{value:K,children:(0,o.jsx)(c.CompositeList,{elementsRef:w,children:et})})});function v(e,t,r,a){if(null==e||null==t)return"none";let o=null,n=null;for(let[r,l]of a.entries()){if(null==l)continue;let a=l.value??l.index;if(e===a&&(o=r),t===a&&(n=r),null!=o&&null!=n)break}if(null==o||null==n)return o!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let l=o.getBoundingClientRect(),s=n.getBoundingClientRect();if("horizontal"===r){if(s.leftl.left)return"right"}else{if(s.topl.top)return"down"}return"none"}var k=e.i(108868),y=e.i(788015),C=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var j=e.i(395530);let N=n.createContext(void 0);function T(){let e=n.useContext(N);if(void 0===e)throw Error((0,u.default)(65));return e}var S=e.i(647554);let M=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:o,value:l,id:i,nativeButton:c=!0,style:u,...m}=e,{value:g,getTabPanelIdByValue:x,orientation:v,tabActivationDirection:N}=h(),{activateOnFocus:M,highlightedTabIndex:R,onTabActivation:_,registerTabResizeObserverElement:D,setHighlightedTabIndex:E,tabsListElement:L}=T(),P=(0,y.useBaseUiId)(i),I=n.useMemo(()=>({disabled:a,id:P,value:l}),[a,P,l]),{compositeProps:O,compositeRef:z,index:A}=(0,j.useCompositeItem)({metadata:I}),Y=l===g,H=n.useRef(!1),F=n.useRef(null);(0,s.useIsoLayoutEffect)(()=>{let e=F.current;if(e)return D(e)},[D]),(0,s.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(Y&&A>-1&&R!==A){if(null!=L){let e=(0,S.activeElement)((0,k.ownerDocument)(L));if(e&&(0,S.contains)(L,e))return}a||E(A)}},[Y,A,R,E,a,L]);let{getButtonProps:B,buttonRef:V}=(0,C.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),W=x(l),$=n.useRef(!1),q=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:Y,orientation:v,tabActivationDirection:N},ref:[t,V,z,F],props:[O,{role:"tab","aria-controls":W,"aria-selected":Y,id:P,onClick:function(e){Y||a||_(l,(0,f.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){Y||(A>-1&&!a&&E(A),!a&&M&&(!$.current||$.current&&q.current)&&_(l,(0,f.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){Y||a||($.current=!0,e.button&&0!==e.button||(q.current=!0,(0,k.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){$.current=!1,q.current=!1},{once:!0})))},[w]:Y?"":void 0,onKeyDownCapture(){H.current=!0}},m,B],stateAttributesMapping:p})});var R=e.i(73364),_=e.i(802239),D=e.i(956789);function E(){return D.NOOP}function L(){return!1}function P(){return!0}let I=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var O=e.i(172410);let z={...p,activeTabPosition:()=>null,activeTabSize:()=>null},A=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:l=!1,style:s,...i}=e,{nonce:c}=(0,O.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:m,tabActivationDirection:g,value:p}=h(),{tabsListElement:f,registerIndicatorUpdateListener:b}=T(),x=(0,_.useSyncExternalStore)(E,L,P),v=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>b(v),[b,v]);let k=0,y=0,C=0,w=0,j=0,N=0,S=!1;if(null!=p&&null!=f){let e=u(p);if(null!=e){S=!0;let{width:t,height:r}=(0,R.getCssDimensions)(e),{width:a,height:o}=(0,R.getCssDimensions)(f),n=e.getBoundingClientRect(),l=f.getBoundingClientRect(),s=a>0?l.width/a:1,i=o>0?l.height/o:1;if(Math.abs(s)>Number.EPSILON&&Math.abs(i)>Number.EPSILON){let e=n.left-l.left,t=n.top-l.top;k=e/s+f.scrollLeft-f.clientLeft,C=t/i+f.scrollTop-f.clientTop}else k=e.offsetLeft,C=e.offsetTop;j=t,N=r,y=f.scrollWidth-k-j,w=f.scrollHeight-C-N}}let M=S?{left:k,right:y,top:C,bottom:w}:null,D=S?{width:j,height:N}:null,A=S?{[I.activeTabLeft]:`${k}px`,[I.activeTabRight]:`${y}px`,[I.activeTabTop]:`${C}px`,[I.activeTabBottom]:`${w}px`,[I.activeTabWidth]:`${j}px`,[I.activeTabHeight]:`${N}px`}:void 0,Y=S&&j>0&&N>0,H=(0,d.useRenderElement)("span",e,{state:{orientation:m,activeTabPosition:M,activeTabSize:D,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:A,hidden:!Y},i,{suppressHydrationWarning:!0}],stateAttributesMapping:z});return null==p?null:(0,o.jsxs)(n.Fragment,{children:[H,x&&l&&(0,o.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var Y=e.i(144394),H=e.i(209407),F=e.i(137584),B=e.i(223910),V=e.i(673553);let W=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),$={...p,...H.transitionStatusMapping},q=n.forwardRef(function(e,t){let{className:r,value:a,render:o,keepMounted:l=!1,style:i,...c}=e,{value:u,getTabIdByPanelValue:m,orientation:g,tabActivationDirection:p,registerMountedTabPanel:f,unregisterMountedTabPanel:b}=h(),x=(0,y.useBaseUiId)(),v=n.useMemo(()=>({id:x,value:a}),[x,a]),{ref:k,index:C}=(0,V.useCompositeListItem)({metadata:v}),w=a===u,{mounted:j,transitionStatus:N,setMounted:T}=(0,B.useTransitionStatus)(w),S=!j,M=m(a),R=n.useRef(null),_=(0,d.useRenderElement)("div",e,{state:{hidden:S,orientation:g,tabActivationDirection:p,transitionStatus:N},ref:[t,k,R],props:[{"aria-labelledby":M,hidden:S,id:x,role:"tabpanel",tabIndex:w?0:-1,inert:(0,Y.inertValue)(!w),[W.index]:C},c],stateAttributesMapping:$});return((0,F.useOpenChangeComplete)({open:w,ref:R,onComplete(){w||T(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if((!S||l)&&null!=x)return f(a,x),()=>{b(a,x)}},[S,l,a,x,f,b]),l||j)?_:null});var K=e.i(590803),U=e.i(828918),G=e.i(673327),X=e.i(621082);let J=[];var Q=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:l=D.EMPTY_ARRAY,props:u=D.EMPTY_ARRAY,state:m=D.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:g,onHighlightedIndexChange:p,orientation:f,grid:b,loopFocus:x,onLoop:v,enableHomeAndEndKeys:k,onMapChange:y,stopEventPropagation:C=!0,rootRef:j,disabledIndices:N,modifierKeys:T,highlightItemOnHover:M=!1,tag:R="div",..._}=e,{props:E,highlightedIndex:L,onHighlightedIndexChange:P,elementsRef:I,onMapChange:O,relayKeyboardEvent:z}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:o,direction:l,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:m=!1,stopEventPropagation:h=!1,disabledIndices:g,modifierKeys:p=J}=e,[f,b]=n.useState(0),x=null!=a,v=n.useRef(null),k=(0,U.useMergedRefs)(v,u),y=n.useRef([]),C=n.useRef(!1),j=d??f,N=(0,i.useStableCallback)((e,t=!1)=>{if((c??b)(e),t){let t=y.current[e];(0,G.scrollIntoViewIfNeeded)(v.current,t,l,r)}}),T=(0,i.useStableCallback)(e=>{if(0===e.size||C.current)return;C.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(w))??null,o=a?t.indexOf(a):-1;if(-1!==o)N(o);else if((0,X.isListIndexDisabled)(t,j,g)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,G.scrollIntoViewIfNeeded)(v.current,a,l,r)});(0,s.useIsoLayoutEffect)(()=>{if(null==g||null!=d||!C.current)return;let e=y.current;if((0,X.isListIndexDisabled)(e,j,g)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[g,d,j,y,N]);let M=(0,i.useStableCallback)((e,t,r)=>o?o(e,t,r,y):r),R=(0,i.useStableCallback)(e=>{let n=m?G.COMPOSITE_KEYS:G.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of G.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,p)||!v.current)return;let s="rtl"===l,i=s?G.ARROW_LEFT:G.ARROW_RIGHT,d={horizontal:i,vertical:G.ARROW_DOWN,both:i}[r],c=s?G.ARROW_RIGHT:G.ARROW_LEFT,u={horizontal:c,vertical:G.ARROW_UP,both:c}[r],f=(0,S.getTarget)(e.nativeEvent);if(null!=f&&(0,G.isNativeInput)(f)&&!(0,K.isElementDisabled)(f)){let t=f.selectionStart,r=f.selectionEnd,a=f.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let b=j,k=(0,X.getMinListIndex)(y,g),C=(0,X.getMaxListIndex)(y,g);null!=a&&(b=a({disabledIndices:g,elementsRef:y,event:e,highlightedIndex:j,loopFocus:t,maxIndex:C,minIndex:k,onLoop:M,orientation:r,rtl:s}));let w={horizontal:[i],vertical:[G.ARROW_DOWN],both:[i,G.ARROW_DOWN]}[r],T={horizontal:[c],vertical:[G.ARROW_UP],both:[c,G.ARROW_UP]}[r],R=x?n:({horizontal:m?G.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:G.HORIZONTAL_KEYS,vertical:m?G.VERTICAL_KEYS_WITH_EXTRA_KEYS:G.VERTICAL_KEYS,both:n})[r];m&&(e.key===G.HOME?b=k:e.key===G.END&&(b=C)),b===j&&(w.includes(e.key)||T.includes(e.key))&&(t&&b===C&&w.includes(e.key)?(b=k,o&&(b=o(e,j,b,y))):t&&b===k&&T.includes(e.key)?(b=C,o&&(b=o(e,j,b,y))):b=(0,X.findNonDisabledListIndex)(y.current,{startingIndex:b,decrement:T.includes(e.key),disabledIndices:g})),b===j||(0,X.isIndexOutOfListBounds)(y.current,b)||(h&&e.stopPropagation(),R.has(e.key)&&e.preventDefault(),N(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:k,onFocus(e){let t=v.current,r=(0,S.getTarget)(e.nativeEvent);t&&null!=r&&(0,G.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:R},highlightedIndex:j,onHighlightedIndexChange:N,elementsRef:y,disabledIndices:g,onMapChange:T,relayKeyboardEvent:R}}({grid:b,loopFocus:x,onLoop:v,orientation:f,highlightedIndex:g,onHighlightedIndexChange:p,rootRef:j,stopEventPropagation:C,enableHomeAndEndKeys:k,direction:(0,Z.useDirection)(),disabledIndices:N,modifierKeys:T}),A=(0,d.useRenderElement)(R,e,{state:m,ref:l,props:[E,...u,_],stateAttributesMapping:h}),Y=n.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:P,highlightItemOnHover:M,relayKeyboardEvent:z}),[L,P,M,z]);return(0,o.jsx)(Q.CompositeRootContext.Provider,{value:Y,children:(0,o.jsx)(c.CompositeList,{elementsRef:I,onMapChange:e=>{y?.(e),O(e)},children:A})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:l=!0,render:d,style:c,...u}=e,{onValueChange:m,orientation:g,value:f,setTabMap:b,tabActivationDirection:x}=h(),[v,k]=n.useState(0),[y,C]=n.useState(null),w=n.useRef(new Set),j=n.useRef(new Set),T=n.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return T.current=e,y&&e.observe(y),j.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[y]);let S=(0,i.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),M=(0,i.useStableCallback)(e=>(j.current.add(e),T.current?.observe(e),()=>{j.current.delete(e),T.current?.unobserve(e)})),R=(0,i.useStableCallback)((e,t)=>{e!==f&&m(e,t)}),_=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:v,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:M,onTabActivation:R,setHighlightedTabIndex:k,tabsListElement:y}),[r,v,S,M,R,k,y]);return(0,o.jsx)(N.Provider,{value:_,children:(0,o.jsx)(ee,{render:d,className:a,style:c,state:{orientation:g,tabActivationDirection:x},refs:[t,C],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:p,highlightedIndex:v,enableHomeAndEndKeys:!0,loopFocus:l,orientation:g,onHighlightedIndexChange:k,onMapChange:b,disabledIndices:D.EMPTY_ARRAY})})});e.s(["Indicator",0,A,"List",0,et,"Panel",0,q,"Root",0,x,"Tab",0,M],69281);var er=e.i(69281),er=er,ea=e.i(115504);let eo=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,o.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,o.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,o.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(eo({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,o.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},466828,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(678784);let o=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var n=e.i(650056);let l={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:s})=>{let[i,d]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:i?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(o,{size:16})}),(0,t.jsx)(n.Prism,{language:s,style:l,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],466828)},972520,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],972520)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),n=e.i(444755),l=e.i(673706),s=e.i(95779);let i={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},u=(0,l.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:h,variant:g="simple",tooltip:p,size:f=o.Sizes.SM,color:b,className:x}=e,v=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),k=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(g,b),{tooltipProps:y,getReferenceProps:C}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([m,y.refs.setReference]),className:(0,n.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,c[g].rounded,c[g].border,c[g].shadow,c[g].ring,i[f].paddingX,i[f].paddingY,x)},C,v),r.default.createElement(a.default,Object.assign({text:p},y)),r.default.createElement(h,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[f].height,d[f].width)}))});m.displayName="Icon",e.s(["default",0,m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[o,n]=(0,t.useState)(e);return[a?r:o,e=>{a||n(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),a=e.i(433336),o=e.i(271645),n=e.i(394487),l=e.i(503269),s=e.i(214520),i=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),f=e.i(694421),b=e.i(700020),x=e.i(35889),v=e.i(998348),k=e.i(722678);let y=(0,o.createContext)(null);y.displayName="GroupContext";let C=o.Fragment,w=Object.assign((0,b.forwardRefWithAs)(function(e,t){var C;let w=(0,o.useId)(),j=(0,g.useProvidedId)(),N=(0,m.useDisabled)(),{id:T=j||`headlessui-switch-${w}`,disabled:S=N||!1,checked:M,defaultChecked:R,onChange:_,name:D,value:E,form:L,autoFocus:P=!1,...I}=e,O=(0,o.useContext)(y),[z,A]=(0,o.useState)(null),Y=(0,o.useRef)(null),H=(0,u.useSyncRefs)(Y,t,null===O?null:O.setSwitch,A),F=(0,s.useDefaultValue)(R),[B,V]=(0,l.useControllable)(M,_,null!=F&&F),W=(0,i.useDisposables)(),[$,q]=(0,o.useState)(!1),K=(0,d.useEvent)(()=>{q(!0),null==V||V(!B),W.nextFrame(()=>{q(!1)})}),U=(0,d.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),K()}),G=(0,d.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),K()):e.key===v.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),X=(0,d.useEvent)(e=>e.preventDefault()),J=(0,k.useLabelledBy)(),Q=(0,x.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:P}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:eo}=(0,n.useActivePress)({disabled:S}),en=(0,o.useMemo)(()=>({checked:B,disabled:S,hover:et,focus:Z,active:ea,autofocus:P,changing:$}),[B,et,Z,ea,S,$,P]),el=(0,b.mergeProps)({id:T,ref:H,role:"switch",type:(0,c.useResolveButtonType)(e,z),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":J,"aria-describedby":Q,disabled:S||void 0,autoFocus:P,onClick:U,onKeyUp:G,onKeyPress:X},ee,er,eo),es=(0,o.useCallback)(()=>{if(void 0!==F)return null==V?void 0:V(F)},[V,F]),ei=(0,b.useRender)();return o.default.createElement(o.default.Fragment,null,null!=D&&o.default.createElement(h.FormFields,{disabled:S,data:{[D]:E||"on"},overrides:{type:"checkbox",checked:B},form:L,onReset:es}),ei({ourProps:el,theirProps:I,slot:en,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,o.useState)(null),[n,l]=(0,k.useLabels)(),[s,i]=(0,x.useDescriptions)(),d=(0,o.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,b.useRender)();return o.default.createElement(i,{name:"Switch.Description",value:s},o.default.createElement(l,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},o.default.createElement(y.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:k.Label,Description:x.Description});var j=e.i(888288),N=e.i(95779),T=e.i(444755),S=e.i(673706),M=e.i(829087);let R=(0,S.makeClassName)("Switch"),_=o.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:n=!1,onChange:l,color:s,name:i,error:d,errorMessage:c,disabled:u,required:m,tooltip:h,id:g}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:s?(0,S.getColorClassNames)(s,N.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,S.getColorClassNames)(s,N.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,x]=(0,j.default)(n,a),[v,k]=(0,o.useState)(!1),{tooltipProps:y,getReferenceProps:C}=(0,M.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement(M.default,Object.assign({text:h},y)),o.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([r,y.refs.setReference]),className:(0,T.tremorTwMerge)(R("root"),"flex flex-row relative h-5")},p,C),o.default.createElement("input",{type:"checkbox",className:(0,T.tremorTwMerge)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:i,required:m,checked:b,onChange:e=>{e.preventDefault()}}),o.default.createElement(w,{checked:b,onChange:e=>{x(e),null==l||l(e)},disabled:u,className:(0,T.tremorTwMerge)(R("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>k(!0),onBlur:()=>k(!1),id:g},o.default.createElement("span",{className:(0,T.tremorTwMerge)(R("sr-only"),"sr-only")},"Switch ",b?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(R("background"),b?f.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),o.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(R("round"),b?(0,T.tremorTwMerge)(f.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",v?(0,T.tremorTwMerge)("ring-2",f.ringColor):"")}))),d&&c?o.default.createElement("p",{className:(0,T.tremorTwMerge)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});_.displayName="Switch",e.s(["Switch",0,_],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(174553);e.s(["ProviderLogo",0,({provider:e,className:a="w-4 h-4"})=>(0,t.jsx)(r.Logo,{provider:e,className:a})])},368670,e=>{"use strict";var t=e.i(602869),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},973706,e=>{"use strict";var t=e.i(843476),r=e.i(72713),a=e.i(637235),o=e.i(994388),n=e.i(599724),l=e.i(166540),s=e.i(271645);let i=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,l.default)().startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,l.default)().subtract(7,"days").startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,l.default)().subtract(30,"days").startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,l.default)().startOf("month").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,l.default)().startOf("year").toDate(),to:(0,l.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:d,label:c="Select Time Range",showTimeRange:u=!0})=>{let[m,h]=(0,s.useState)(!1),[g,p]=(0,s.useState)(e),[f,b]=(0,s.useState)(null),[x,v]=(0,s.useState)(""),[k,y]=(0,s.useState)(""),C=(0,s.useRef)(null),w=(0,s.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of i){let r=t.getValue(),a=(0,l.default)(e.from).isSame((0,l.default)(r.from),"day"),o=(0,l.default)(e.to).isSame((0,l.default)(r.to),"day");if(a&&o)return t.shortLabel}return null},[]);(0,s.useEffect)(()=>{b(w(e))},[e,w]);let j=(0,s.useCallback)(()=>{if(!x||!k)return{isValid:!0,error:""};let e=(0,l.default)(x,"YYYY-MM-DD"),t=(0,l.default)(k,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[x,k])();(0,s.useEffect)(()=>{e.from&&v((0,l.default)(e.from).format("YYYY-MM-DD")),e.to&&y((0,l.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,s.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&h(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let N=(0,s.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let r=e=>(0,l.default)(e).format("D MMM, HH:mm");return`${r(e)} - ${r(t)}`},[]),T=(0,s.useCallback)(e=>{let t;if(!e.from)return e;let r={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),r.from=a,r.to=t,r},[]),S=(0,s.useCallback)(()=>{try{if(x&&k&&j.isValid){let e=(0,l.default)(x,"YYYY-MM-DD").startOf("day"),t=(0,l.default)(k,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let r={from:e.toDate(),to:t.toDate()};p(r);let a=w(r);b(a)}}}catch(e){console.warn("Invalid date format:",e)}},[x,k,j.isValid,w]);return(0,s.useEffect)(()=>{S()},[S]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[c&&(0,t.jsx)(n.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:c}),(0,t.jsxs)("div",{className:"relative",ref:C,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>h(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:N(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-9999 min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:i.map(e=>{let r=f===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${r?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:r}=e.getValue();p({from:t,to:r}),b(e.shortLabel),v((0,l.default)(t).format("YYYY-MM-DD")),y((0,l.default)(r).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${r?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${r?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:x,onChange:e=>v(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!j.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:k,onChange:e=>y(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!j.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!j.isValid&&j.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:j.error})]})}),g.from&&g.to&&j.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,l.default)(g.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,l.default)(g.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(o.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&v((0,l.default)(e.from).format("YYYY-MM-DD")),e.to&&y((0,l.default)(e.to).format("YYYY-MM-DD")),b(w(e)),h(!1)},children:"Cancel"}),(0,t.jsx)(o.Button,{onClick:()=>{g.from&&g.to&&j.isValid&&(d(g),requestIdleCallback(()=>{d(T(g))},{timeout:100}),h(!1))},disabled:!g.from||!g.to||!j.isValid,children:"Apply"})]})})]})]})})]})]})}])},567425,e=>{"use strict";var t=e.i(271645);let r=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],a={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};e.s(["usePaginatedDailyActivity",0,function({fetchFn:e,args:o,enabled:n}){let[l,s]=(0,t.useState)(a),[i,d]=(0,t.useState)(!1),[c,u]=(0,t.useState)(!1),[m,h]=(0,t.useState)({currentPage:0,totalPages:0}),[g,p]=(0,t.useState)(!1),f=(0,t.useRef)(0),b=(0,t.useRef)(!1),x=(0,t.useRef)(null),v=(0,t.useRef)(o);v.current=o;let k=JSON.stringify(o),y=(0,t.useCallback)(()=>{b.current=!0,p(!0),u(!1),null!==x.current&&(clearTimeout(x.current),x.current=null)},[]);return(0,t.useEffect)(()=>{if(!n){s(a),d(!1),u(!1),h({currentPage:0,totalPages:0}),p(!1);return}let t=++f.current;b.current=!1,p(!1);let o=()=>f.current!==t||b.current,l=e=>new Promise(t=>{x.current=setTimeout(()=>{x.current=null,t()},e)});return(async()=>{let t=v.current;d(!0),u(!1),h({currentPage:1,totalPages:1});try{let a=[...t.slice(0,3),1,...t.slice(3)],n=await e(...a);if(o())return;s(n);let i=n.metadata?.total_pages||1;if(h({currentPage:1,totalPages:i}),i<=1)return void d(!1);d(!1),u(!0);let c=[...n.results],m={...n.metadata};for(let a=2;a<=i;a++){if(o()||(await l(300),o()))return;let n=[...t.slice(0,3),a,...t.slice(3)],d=await e(...n);if(o())return;c=[...c,...d.results],(m=function(e,t){let a={...e};for(let o of r)a[o]=(e[o]||0)+(t[o]||0);return a}(m,d.metadata)).total_pages=i,m.has_more=a{f.current++,null!==x.current&&(clearTimeout(x.current),x.current=null)}},[n,e,k]),{data:l,loading:i,isFetchingMore:c,progress:m,cancelled:g,cancel:y}}])},992156,e=>{"use strict";var t=e.i(843476),r=e.i(487074),a=e.i(560445),o=e.i(653496),n=e.i(271645),l=e.i(952571);e.i(32117);var s=e.i(591025),i=e.i(343053),d=e.i(594772),c=e.i(325738),u=e.i(973499),m=e.i(973706),h=e.i(515288),g=e.i(337822),p=e.i(677572),f=e.i(602869),b=e.i(500330);let x=e=>`$${(0,b.formatNumberWithCommas)(e,e>0&&e<1?4:2)}`,v=e=>/claude|anthropic/i.test(e),k=()=>({alias:null,teamId:null,promptTokens:0,cacheReadTokens:0,cacheCreationTokens:0,realizedCachingSavings:0}),y=(e,t,r,a)=>({alias:e.alias??r,teamId:e.teamId??a,promptTokens:e.promptTokens+(t.prompt_tokens??0),cacheReadTokens:e.cacheReadTokens+(t.cache_read_input_tokens??0),cacheCreationTokens:e.cacheCreationTokens+(t.cache_creation_input_tokens??0),realizedCachingSavings:e.realizedCachingSavings+(t.prompt_caching_savings_spend??0)}),C=(e,t)=>t.reduce((e,t)=>({...e,[t]:0}),{date:e}),w=["Compression","Prompt caching"],j={by_tool:[],daily:[],start_date:null,end_date:null},N=["emerald","blue"],T=e=>new Date(`${e}T00:00:00`).toLocaleDateString("en-US",{month:"short",day:"numeric"}),S=e=>e.toISOString().slice(0,10),M=({label:e,value:r,hint:a,info:o})=>(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{className:"flex flex-row items-center justify-between space-y-0",children:[(0,t.jsx)(h.CardTitle,{className:"text-sm font-medium text-muted-foreground",children:e}),o&&(0,t.jsxs)(g.Popover,{children:[(0,t.jsx)(g.PopoverTrigger,{"aria-label":`How ${e.toLowerCase()} is calculated`,"data-testid":`summary-card-info-${e.toLowerCase().replace(/\s+/g,"-")}`,className:"cursor-pointer text-muted-foreground hover:text-foreground",children:(0,t.jsx)(l.Info,{className:"size-3.5"})}),(0,t.jsx)(g.PopoverContent,{align:"end",className:"w-64 text-sm text-muted-foreground",children:o})]})]}),(0,t.jsxs)(h.CardContent,{children:[(0,t.jsx)("p",{className:"text-2xl font-semibold text-foreground",children:r}),a&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a})]})]}),R=({accessToken:e,activity:r})=>{let{dateValue:a,onDateChange:o,results:l,loading:g,isFetchingMore:v}=r,k=a.from??null,y=a.to??null,R=!!e&&!!k&&!!y,_=k&&y?`${S(k)}|${S(y)}`:"",[D,E]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!e||!k||!y)return;let t=!1;return(0,f.getToolSpend)(e,S(k),S(y)).then(e=>{t||E({key:_,data:e})}).catch(()=>{t||E({key:_,data:j})}),()=>{t=!0}},[e,k,y,_]);let L=D?.key===_?D.data:null,P=R&&null===L,I=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.compression_savings_spend??0),0),[l]),O=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.prompt_caching_savings_spend??0),0),[l]),z=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.compression_saved_tokens??0),0),[l]),A=I+O,[Y,H]=(0,n.useState)("cumulative"),F=(0,n.useMemo)(()=>[...l].sort((e,t)=>e.date.localeCompare(t.date)).map(e=>({date:T(e.date),Compression:e.metrics.compression_savings_spend??0,"Prompt caching":e.metrics.prompt_caching_savings_spend??0})),[l]),B=(0,n.useMemo)(()=>{let e;if("cumulative"!==Y)return F;let t=k?T(`${k.getFullYear()}-${String(k.getMonth()+1).padStart(2,"0")}-${String(k.getDate()).padStart(2,"0")}`):"";return e=F.reduce((e,t)=>{let r=e[e.length-1];return[...e,{date:t.date,Compression:(r?.Compression??0)+t.Compression,"Prompt caching":(r?.["Prompt caching"]??0)+t["Prompt caching"]}]},[]),0===e.length?[...e]:[{date:t,Compression:0,"Prompt caching":0},...e]},[Y,F,k]),V="Per day",W=((e,t)=>{if(!e||!t)return"";let r=e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric"}),a=r(e),o=r(t);return a===o?a:`${a} – ${o}`})(k??void 0,y??void 0),$=["cumulative"===Y?"Running total saved":`Saved ${V.toLowerCase()}`,W].filter(Boolean).join(" · "),q=(0,n.useMemo)(()=>[{driver:"Compression",usd:I},{driver:"Prompt caching",usd:O}].filter(e=>e.usd>0),[I,O]),K=(0,n.useMemo)(()=>((e,t=8)=>[...e].sort((e,t)=>t.spend-e.spend).slice(0,t))(L?.by_tool??[]),[L]),U=(0,n.useMemo)(()=>K.map(e=>e.tool_name),[K]),G=(0,n.useMemo)(()=>K.map(e=>({tool_name:e.tool_name,spend:e.spend})),[K]),X=(0,n.useMemo)(()=>((e,t)=>{let r=new Set(t),a=new Map;for(let o of e){if(!r.has(o.tool_name))continue;let e=a.get(o.date)??C(o.date,t);e[o.tool_name]=(Number(e[o.tool_name])||0)+o.spend,a.set(o.date,e)}return[...a.values()].sort((e,t)=>e.date.localeCompare(t.date))})(L?.daily??[],U).map(e=>({...e,date:T(String(e.date))})),[L,U]),J=(0,n.useMemo)(()=>u.SEQUENTIAL_COLOR_RAMP.slice(0,Math.max(U.length,1)),[U]);return(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-4",children:(0,t.jsx)(m.default,{value:a,onValueChange:o})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[(0,t.jsx)(M,{label:"Total saved",value:x(A),hint:g||v?"Loading...":"Compression + prompt caching"}),(0,t.jsx)(M,{label:"Compression savings",value:x(I),hint:`${(0,b.formatNumberWithCommas)(z)} tokens compressed`,info:"Tokens Headroom removed before the call, priced at the model's input rate."}),(0,t.jsx)(M,{label:"Prompt caching savings",value:x(O),hint:"Cache read discount",info:"Tokens the provider served from cache, priced at the discount between the input and cache-read rates."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,t.jsxs)(h.Card,{className:"lg:col-span-2",children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(h.CardTitle,{children:"Savings"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:$})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(d.CustomLegend,{categories:w,colors:N}),(0,t.jsx)(p.Tabs,{value:Y,onValueChange:e=>H(e),children:(0,t.jsxs)(p.TabsList,{children:[(0,t.jsx)(p.TabsTrigger,{value:"cumulative",children:"Cumulative"}),(0,t.jsx)(p.TabsTrigger,{value:"per-interval",children:V})]})})]})]})}),(0,t.jsx)(h.CardContent,{children:"cumulative"===Y?(0,t.jsx)(s.AreaChart,{data:B,index:"date",categories:w,colors:N,valueFormatter:x,showLegend:!1,showDots:B.length<=31}):(0,t.jsx)(i.BarChart,{data:B,index:"date",categories:w,colors:N,stack:!0,valueFormatter:x,showLegend:!1})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Savings by driver"})}),(0,t.jsx)(h.CardContent,{children:(0,t.jsx)(c.DonutChart,{className:"h-80",data:q,index:"driver",category:"usd",colors:["emerald","blue"],valueFormatter:x,showLabel:!0,label:x(A)})})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{children:[(0,t.jsx)(h.CardTitle,{children:"Spend by tool"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Spend on requests that invoked each tool (MCP and client-side tools); declaring a tool without invoking it does not count. A request that invoked multiple tools counts its full spend toward each, so this attributes rather than partitions spend."})]}),(0,t.jsx)(h.CardContent,{children:0===K.length?(0,t.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:P?"Loading...":"No tool usage in this range."}):(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Total by tool"}),(0,t.jsx)(i.BarChart,{data:G,index:"tool_name",categories:["spend"],colors:J,colorByDatum:!0,layout:"vertical",yAxisWidth:140,maxBarSize:64,showLegend:!1,valueFormatter:x})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Daily spend by tool"}),(0,t.jsx)(d.CustomLegend,{categories:U,colors:J}),(0,t.jsx)(i.BarChart,{data:X,index:"date",categories:U,colors:J,stack:!0,maxBarSize:64,valueFormatter:x,showLegend:!1})]})]})})]})]})};var _=e.i(464571),D=e.i(808613),E=e.i(311451),L=e.i(790848),P=e.i(727749);let I="headroom",O=e=>(e.litellm_params?.guardrail??"").toLowerCase()===I,z=({accessToken:e})=>{let[r]=D.Form.useForm(),[a,o]=(0,n.useState)([]),[l,s]=(0,n.useState)(!0),[i,d]=(0,n.useState)(!1),c=(0,n.useCallback)(()=>{e&&(0,f.getGuardrailsList)(e).then(e=>o((e.guardrails??[]).filter(O))).catch(e=>{console.error("Failed to load compression guardrails:",e),P.default.fromBackend("Failed to load compression guardrails")}).finally(()=>s(!1))},[e]);(0,n.useEffect)(()=>{c()},[c]);let u=async t=>{if(e){d(!0);try{let a;await (0,f.createGuardrailCall)(e,{guardrail_name:(a={name:t.name,apiBase:t.apiBase,defaultOn:t.defaultOn??!0}).name.trim(),litellm_params:{guardrail:I,mode:"pre_call",api_base:a.apiBase.trim(),default_on:a.defaultOn}}),P.default.success("Compression guardrail created"),r.resetFields(),await c()}catch(e){console.error("Failed to create compression guardrail:",e),P.default.fromBackend("Failed to create compression guardrail")}finally{d(!1)}}};return(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Headroom prompt compression"})}),(0,t.jsxs)(h.CardContent,{children:[(0,t.jsxs)("p",{className:"mb-4 text-sm text-muted-foreground",children:["Headroom is a native LiteLLM guardrail that compresses your prompts before they reach the model, so you pay for fewer input tokens. The tokens it removes are priced and shown on the Usage tab as compression savings."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/headroom",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Headroom setup docs"})]}),l&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),!l&&0===a.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No prompt compression guardrails configured yet. Add one below to start saving on input tokens"}),!l&&a.length>0&&(0,t.jsx)("ul",{className:"divide-y divide-gray-200",children:a.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.guardrail_name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.litellm_params?.api_base??""})]}),(0,t.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${e.litellm_params?.default_on?"bg-emerald-100 text-emerald-800":"bg-gray-100 text-gray-600"}`,children:e.litellm_params?.default_on?"Always on":"Opt-in"})]},e.guardrail_id))})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Add Headroom compression guardrail"})}),(0,t.jsx)(h.CardContent,{children:(0,t.jsxs)(D.Form,{form:r,layout:"vertical",requiredMark:!1,onFinish:u,initialValues:{defaultOn:!0},children:[(0,t.jsx)(D.Form.Item,{name:"name",label:"Name",rules:[{required:!0,message:"Name is required"}],children:(0,t.jsx)(E.Input,{placeholder:"headroom-compression"})}),(0,t.jsx)(D.Form.Item,{name:"apiBase",label:"Headroom API base",tooltip:"Base URL of your Headroom compression service (LiteLLM calls its /v1/compress endpoint)",extra:"The URL where your Headroom compression service is hosted",rules:[{required:!0,message:"API base is required"}],children:(0,t.jsx)(E.Input,{placeholder:"https://your-headroom-endpoint"})}),(0,t.jsx)(D.Form.Item,{name:"defaultOn",label:"Apply to all requests",valuePropName:"checked",children:(0,t.jsx)(L.Switch,{})}),(0,t.jsx)("div",{className:"mb-4 rounded-lg border border-yellow-200 bg-yellow-50 p-3",children:(0,t.jsxs)("p",{className:"text-sm text-yellow-800",children:["Applying compression to all requests is available to all users. Enabling it selectively per key or team is a LiteLLM Enterprise feature. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"})]})}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(_.Button,{type:"primary",htmlType:"submit",loading:i,children:"Add guardrail"})})]})})]})]})};var A=e.i(69509);let Y=({accessToken:e,userRole:r})=>{let[a]=D.Form.useForm();return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(A.default,{form:a,handleOk:()=>a.resetFields(),accessToken:e,userRole:r})}):null};var H=e.i(863679),F=e.i(425063),B=e.i(475254);let V=(0,B.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),W=(0,B.default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);var $=e.i(784774),q=e.i(746798);let K={uncachedPromptTokens:"desc",cacheHitRatio:"asc",potentialSavings:"desc"},U=({info:e})=>(0,t.jsxs)(q.Tooltip,{children:[(0,t.jsx)(q.TooltipTrigger,{render:(0,t.jsx)("span",{className:"inline-flex","aria-label":e}),children:(0,t.jsx)(l.Info,{className:"h-3 w-3 text-gray-400"})}),(0,t.jsx)(q.TooltipContent,{className:"max-w-xs",children:e})]}),G=({column:e,label:r,info:a,sort:o,onSort:n})=>{let l=o.column===e,s="asc"===o.dir?V:F.ArrowDown;return(0,t.jsx)($.TableHead,{className:"text-right",children:(0,t.jsxs)("span",{className:"inline-flex items-center justify-end gap-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),"aria-label":`Sort by ${r}`,className:"inline-flex items-center gap-1 font-medium hover:text-foreground",children:[r,(0,t.jsx)(l?s:W,{className:`h-3 w-3 ${l?"text-foreground":"text-gray-400"}`})]}),(0,t.jsx)(U,{info:a})]})})},X=({activity:e})=>{let{dateValue:r,onDateChange:a,results:o,loading:l,isFetchingMore:s}=e,[i,d]=(0,n.useState)("key"),[c,u]=(0,n.useState)({column:"potentialSavings",dir:"desc"}),g=(0,n.useMemo)(()=>((e,t="key",r=10)=>{let a="model"===t?(e=>{let t=new Map;for(let r of e)for(let[e,a]of Object.entries(r.breakdown?.models??{})){if(!v(e))continue;let r=t.get(e)??k();t.set(e,y(r,a.metrics,null,null))}return t})(e):(e=>{let t=new Map;for(let r of e)for(let[e,a]of Object.entries(r.breakdown?.api_keys??{})){let r=t.get(e)??k();t.set(e,y(r,a.metrics,a.metadata?.key_alias??null,a.metadata?.team_id??null))}return t})(e),o=[...a.values()].reduce((e,t)=>({cacheReadTokens:e.cacheReadTokens+t.cacheReadTokens,realizedCachingSavings:e.realizedCachingSavings+t.realizedCachingSavings}),{cacheReadTokens:0,realizedCachingSavings:0}),n=o.cacheReadTokens>0?o.realizedCachingSavings/o.cacheReadTokens:null;return{rows:[...a.entries()].map(([e,r])=>{let a=Math.max(0,r.promptTokens-r.cacheReadTokens-r.cacheCreationTokens);return{id:e,label:"model"===t?e:r.alias??`${e.slice(0,8)}...`,sublabel:"model"===t?null:r.teamId,uncachedPromptTokens:a,cacheHitRatio:r.promptTokens>0?r.cacheReadTokens/r.promptTokens:0,potentialSavings:null!=n?a*n:null}}).filter(e=>e.uncachedPromptTokens>0).sort((e,t)=>null!=n?(t.potentialSavings??0)-(e.potentialSavings??0):t.uncachedPromptTokens-e.uncachedPromptTokens).slice(0,r),discountPerToken:n}})(o,i),[o,i]),f=(0,n.useMemo)(()=>[...g.rows].sort((e,t)=>{let r,a;return r=e[c.column],a=t[c.column],null==r&&null==a?0:null==r?1:null==a?-1:"asc"===c.dir?r-a:a-r}),[g.rows,c]),C=e=>u(t=>t.column===e?{column:e,dir:"asc"===t.dir?"desc":"asc"}:{column:e,dir:K[e]}),w="model"===i?"Models":"Keys",j="model"===i?"Model":"Key",N="model"===i?"model":"key";return(0,t.jsx)(q.TooltipProvider,{delay:300,children:(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)(h.CardTitle,{children:["Cache leakage by ","model"===i?"model":"virtual key"]}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:[w," sending large volumes of uncached input with a low cache hit rate are likely missing prompt caching. Potential savings is approximate: uncached input priced at the realized cache-read discount.","model"===i?" Limited to Anthropic (Claude) models, which support prompt caching.":""]})]}),(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(m.default,{value:r,onValueChange:a})})]}),(0,t.jsx)(p.Tabs,{value:i,onValueChange:e=>d("model"===e?"model":"key"),className:"mt-3",children:(0,t.jsxs)(p.TabsList,{children:[(0,t.jsx)(p.TabsTrigger,{value:"key",children:"By virtual key"}),(0,t.jsx)(p.TabsTrigger,{value:"model",children:"By model"})]})})]}),(0,t.jsx)(h.CardContent,{children:0===f.length?(0,t.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:l||s?"Loading...":`No ${N} usage in this range.`}):(0,t.jsxs)($.Table,{children:[(0,t.jsx)($.TableHeader,{children:(0,t.jsxs)($.TableRow,{children:[(0,t.jsx)($.TableHead,{children:j}),(0,t.jsx)(G,{column:"uncachedPromptTokens",label:"Uncached input tokens",info:"Input tokens you sent in this range that weren't served from or written to the cache",sort:c,onSort:C}),(0,t.jsx)(G,{column:"cacheHitRatio",label:"Cache hit rate",info:"Share of your input tokens that were served from the cache",sort:c,onSort:C}),(0,t.jsx)(G,{column:"potentialSavings",label:"Potential savings",info:"About how much you'd save if this uncached input used prompt caching. Estimated as uncached input tokens times the per-token discount your cached traffic already gets (realized cache savings ÷ cache-read tokens).",sort:c,onSort:C})]})}),(0,t.jsx)($.TableBody,{children:f.map(e=>{let r;return(0,t.jsxs)($.TableRow,{children:[(0,t.jsxs)($.TableCell,{className:"font-medium",children:[e.label,e.sublabel&&(0,t.jsxs)("span",{className:"ml-1 text-xs text-muted-foreground",children:["(",e.sublabel,")"]})]}),(0,t.jsx)($.TableCell,{className:"text-right",children:(0,b.formatNumberWithCommas)(e.uncachedPromptTokens)}),(0,t.jsx)($.TableCell,{className:"text-right",children:(r=e.cacheHitRatio,`${(0,b.formatNumberWithCommas)(100*r,1)}%`)}),(0,t.jsx)($.TableCell,{className:"text-right",children:null==e.potentialSavings?"—":x(e.potentialSavings)})]},e.id)})})]})})]})})},J=({accessToken:e,activity:r})=>{let[a,o]=(0,n.useState)([]),l=(0,n.useCallback)(()=>{e&&(0,f.getGeneralSettingsCall)(e).then(e=>o(e)).catch(e=>{console.error("Failed to load prompt caching settings:",e),P.default.fromBackend("Failed to load prompt caching settings")})},[e]);return((0,n.useEffect)(()=>{l()},[l]),e)?(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsx)(H.PromptCachingPanel,{accessToken:e,settings:a,onChange:(e,t)=>{o(r=>r.map(r=>r.field_name===e?{...r,field_value:t}:r))}}),(0,t.jsx)(X,{activity:r})]}):null};var Q=e.i(708347),Z=e.i(567425);let ee=({accessToken:e,userId:l,userRole:s})=>{let i=((e,t,r)=>{let a=(0,n.useMemo)(()=>new Date(new Date().getTime()-2592e6),[]),o=(0,n.useMemo)(()=>new Date,[]),[l,s]=(0,n.useState)({from:a,to:o}),i=l.from??null,d=l.to??null,c=Q.all_admin_roles.includes(r)?null:t,{data:u,loading:m,isFetchingMore:h}=(0,Z.usePaginatedDailyActivity)({fetchFn:f.userDailyActivityCall,args:[e,i,d,c],enabled:!!e&&!!i&&!!d});return{dateValue:l,onDateChange:s,results:u.results,loading:m,isFetchingMore:h}})(e,l,s),d=[{key:"usage",label:"Usage",children:(0,t.jsx)(R,{accessToken:e,activity:i})},{key:"compression",label:"Prompt Compression",children:(0,t.jsx)(z,{accessToken:e})},{key:"autorouter",label:"Autorouter",children:(0,t.jsx)(Y,{accessToken:e,userId:l,userRole:s})},{key:"caching",label:"Prompt Caching",children:(0,t.jsx)(J,{accessToken:e,activity:i})}];return(0,t.jsxs)("div",{className:"w-full space-y-6 p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.PiggyBank,{className:"size-6 text-emerald-600",strokeWidth:1.75}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground",children:"Cost Optimization"})]}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Track and configure the mechanisms that save you money: prompt compression, prompt caching, and auto routing"})]}),(0,t.jsx)(a.Alert,{type:"info",showIcon:!0,message:"This is an experimental dashboard",description:(0,t.jsxs)("span",{children:["Have feedback? Join the discussion"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/discussions/32172",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"here"})]})}),(0,t.jsx)(o.Tabs,{defaultActiveKey:"usage",items:d})]})};var et=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userId:r,userRole:a}=(0,et.default)();return(0,t.jsx)(ee,{accessToken:e,userId:r,userRole:a})}],992156)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0jc5k1aju4npz.js b/litellm/proxy/_experimental/out/_next/static/chunks/0jc5k1aju4npz.js new file mode 100644 index 00000000000..e8e44e4ef7e --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0jc5k1aju4npz.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,size:r="default",...n},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n}));n.displayName="Card";let o=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));o.displayName="CardHeader";let s=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));s.displayName="CardTitle";let i=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));i.displayName="CardDescription";let l=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));l.displayName="CardAction";let d=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));u.displayName="CardFooter",e.s(["Card",0,n,"CardAction",0,l,"CardContent",0,d,"CardDescription",0,i,"CardFooter",0,u,"CardHeader",0,o,"CardTitle",0,s])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:n=0,side:o="bottom",sideOffset:s=4,className:i,...l}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:n,side:o,sideOffset:s,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...l})})})},"DropdownMenuItem",0,function({className:e,inset:n,variant:o="default",...s}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...s})},"DropdownMenuSeparator",0,function({className:e,...n}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...n})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[n,o]=(0,t.useState)(e);return[a?r:n,e=>{a||o(e)}]}])},118366,e=>{"use strict";var t=e.i(991124);e.s(["CopyIcon",()=>t.default])},768371,e=>{"use strict";let t,r;var a=e.i(247167);let n=/\{[^{}]+\}/g;function o(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function s(e,t,r){if(!t||"object"!=typeof t)return"";let a=[],n={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)a.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let n=a.join(",");switch(r.style){case"form":return`${e}=${n}`;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return n}}for(let n in t){let s="deepObject"===r.style?`${e}[${n}]`:n;a.push(o(s,t[n],r))}let s=a.join(n);return"label"===r.style||"matrix"===r.style?`${n}${s}`:s}function i(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",n=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(a);switch(r.style){case"simple":return n;case"label":return`.${n}`;case"matrix":return`;${e}=${n}`;default:return`${e}=${n}`}}let a={simple:",",label:".",matrix:";"}[r.style]||"&",n=[];for(let a of t)"simple"===r.style||"label"===r.style?n.push(!0===r.allowReserved?a:encodeURIComponent(a)):n.push(o(e,a,r));return"label"===r.style||"matrix"===r.style?`${a}${n.join(a)}`:n.join(a)}function l(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let a in t){let n=t[a];if(null!=n){if(Array.isArray(n)){if(0===n.length)continue;r.push(i(a,n,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof n){r.push(s(a,n,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(o(a,n,e))}}return r.join("&")}}function d(e,t){let r=e;for(let a of e.match(n)??[]){let e=a.substring(1,a.length-1),n=!1,l="simple";if(e.endsWith("*")&&(n=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(l="label",e=e.substring(1)):e.startsWith(";")&&(l="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let d=t[e];if(Array.isArray(d)){r=r.replace(a,i(e,d,{style:l,explode:n}));continue}if("object"==typeof d){r=r.replace(a,s(e,d,{style:l,explode:n}));continue}if("matrix"===l){r=r.replace(a,`;${o(e,d)}`);continue}r=r.replace(a,"label"===l?`.${encodeURIComponent(d)}`:encodeURIComponent(d))}return r}function u(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function c(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,a]of r instanceof Headers?r.entries():Object.entries(r))if(null===a)t.delete(e);else if(Array.isArray(a))for(let r of a)t.append(e,r);else void 0!==a&&t.set(e,a);return t}function p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var f=e.i(954616),m=e.i(621482),h=e.i(869230),g=e.i(469637),b=e.i(254440),x=e.i(266027),v=e.i(431703),y=e.i(97198);let w=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),j=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:n=globalThis.fetch,querySerializer:o,bodySerializer:s,pathSerializer:i,headers:f,requestInitExt:m,...h}={...e};m="object"==typeof a.default&&Number.parseInt(a.default?.versions?.node?.substring(0,2))>=18&&a.default.versions.undici?m:void 0,t=p(t);let g=[];async function b(e,a){var b,x;let v,y,w,j,C,{baseUrl:k,fetch:N=n,Request:R=r,headers:T,params:E={},parseAs:M="json",querySerializer:S,bodySerializer:z=s??u,pathSerializer:I,body:O,middleware:$=[],...A}=a||{},q=t;k&&(q=p(k)??t);let P="function"==typeof o?o:l(o);S&&(P="function"==typeof S?S:l({..."object"==typeof o?o:{},...S}));let U=I||i||d,D=void 0===O?void 0:z(O,c(f,T,E.header)),L=c(void 0===D||D instanceof FormData?{}:{"Content-Type":"application/json"},f,T,E.header),H=[...g,...$],V={redirect:"follow",...h,...A,body:D,headers:L},_=new R((b=e,x={baseUrl:q,params:E,querySerializer:P,pathSerializer:U},v=`${x.baseUrl}${b}`,x.params?.path&&(v=x.pathSerializer(v,x.params.path)),(y=x.querySerializer(x.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(v+=`?${y}`),v),V);for(let e in A)e in _||(_[e]=A[e]);if(H.length){for(let t of(w=Math.random().toString(36).slice(2,11),j=Object.freeze({baseUrl:q,fetch:N,parseAs:M,querySerializer:P,bodySerializer:z,pathSerializer:U}),H))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:_,schemaPath:e,params:E,options:j,id:w});if(r)if(r instanceof R)_=r;else if(r instanceof Response){C=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!C){try{C=await N(_,m)}catch(r){let t=r;if(H.length)for(let r=H.length-1;r>=0;r--){let a=H[r];if(a&&"object"==typeof a&&"function"==typeof a.onError){let r=await a.onError({request:_,error:t,schemaPath:e,params:E,options:j,id:w});if(r){if(r instanceof Response){t=void 0,C=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(H.length)for(let t=H.length-1;t>=0;t--){let r=H[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:_,response:C,schemaPath:e,params:E,options:j,id:w});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");C=t}}}}let B=C.headers.get("Content-Length");if(204===C.status||"HEAD"===_.method||"0"===B&&!C.headers.get("Transfer-Encoding")?.includes("chunked"))return C.ok?{data:void 0,response:C}:{error:void 0,response:C};if(C.ok){let e=async()=>{if("stream"===M)return C.body;if("json"===M&&!B){let e=await C.text();return e?JSON.parse(e):void 0}return await C[M]()};return{data:await e(),response:C}}let G=await C.text();try{G=JSON.parse(G)}catch{}return{error:G,response:C}}return{request:(e,t,r)=>b(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>b(e,{...t,method:"GET"}),PUT:(e,t)=>b(e,{...t,method:"PUT"}),POST:(e,t)=>b(e,{...t,method:"POST"}),DELETE:(e,t)=>b(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>b(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>b(e,{...t,method:"HEAD"}),PATCH:(e,t)=>b(e,{...t,method:"PATCH"}),TRACE:(e,t)=>b(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");g.push(t)}},eject(...e){for(let t of e){let e=g.indexOf(t);-1!==e&&g.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});j.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await w(e,((e,t)=>{let{pathname:r,search:a}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${a}`})(e.url,t)):e,a=(0,y.getAuthToken)();return a&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${a}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),a=r;try{a=JSON.parse(r),t=(0,v.deriveErrorMessage)(a)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new v.ApiError(t,e.status,a)}});let C=(t=async({queryKey:[e,t,r],signal:a})=>{let n=j[e.toUpperCase()],{data:o,error:s,response:i}=await n(t,{signal:a,...r});if(s)throw s;return 204===i.status||"0"===i.headers.get("Content-Length")?o??null:o},{queryOptions:r=(e,r,...[a,n])=>({queryKey:void 0===a?[e,r]:[e,r,a],queryFn:t,...n}),useQuery:(e,t,...[a,n,o])=>(0,x.useQuery)(r(e,t,a,n),o),useSuspenseQuery:(e,t,...[a,n,o])=>{var s;return s=r(e,t,a,n),(0,g.useBaseQuery)({...s,enabled:!0,suspense:!0,throwOnError:b.defaultThrowOnError,placeholderData:void 0},h.QueryObserver,o)},useInfiniteQuery:(e,t,a,n,o)=>{let{pageParamName:s="cursor",...i}=n,{queryKey:l}=r(e,t,a);return(0,m.useInfiniteQuery)({queryKey:l,queryFn:async({queryKey:[e,t,r],pageParam:a=0,signal:n})=>{let o=j[e.toUpperCase()],i={...r,signal:n,params:{...r?.params||{},query:{...r?.params?.query,[s]:a}}},{data:l,error:d}=await o(t,i);if(d)throw d;return l},...i},o)},useMutation:(e,t,r,a)=>(0,f.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let a=j[e.toUpperCase()],{data:n,error:o}=await a(t,r);if(o)throw o;return n},...r},a)});e.s(["$api",0,C,"fetchClient",0,j],768371)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),a=e.i(266027);let n=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:o}=(0,t.default)();return(0,a.useQuery)({queryKey:n.detail(o),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&o)})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),n=e.i(785242),o=e.i(738014),s=e.i(199133),i=e.i(981339),l=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},u={label:"No Default Models",value:"no-default-models"},c=[d,u],p={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["MODEL_SENTINEL_OPTIONS",0,c,"ModelSelect",0,e=>{let{teamID:f,organizationID:m,options:h,context:g,dataTestId:b,value:x=[],onChange:v,style:y}=e,{includeUserModels:w,showAllTeamModelsOption:j,showAllProxyModelsOverride:C,includeSpecialOptions:k}=h||{},{data:N,isLoading:R}=(0,r.useAllProxyModels)(),{data:T,isLoading:E}=(0,n.useTeam)(f),{data:M,isLoading:S}=(0,a.useOrganization)(m),{data:z,isLoading:I}=(0,o.useCurrentUser)(),O=e=>c.some(t=>t.value===e),$=x.some(O),A=M?.models.includes(d.value)||M?.models.length===0;if(R||E||S||I)return(0,t.jsx)(i.Skeleton.Input,{active:!0,block:!0});let{wildcard:q,regular:P}=(e=>{let t=[],r=[];for(let a of e)a.endsWith("/*")?t.push(a):r.push(a);return{wildcard:t,regular:r}})(((e,t,r)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let n=p[t.context];return n?n({allProxyModels:a,...r,options:t.options}):[]})(N?.data??[],e,{selectedTeam:T,selectedOrganization:M,userModels:z?.models}));return(0,t.jsx)(s.Select,{"data-testid":b,value:x,onChange:e=>{let t=e.filter(O);v(t.length>0?[t[t.length-1]]:e)},style:y,options:[...k?[{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||A&&k||"global"===g?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:x.length>0&&x.some(e=>O(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:u.value,disabled:x.length>0&&x.some(e=>O(e)&&e!==u.value),key:u.value}]}]:[],...q.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:q.map(e=>{let r=e.replace("/*",""),a=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:$}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:P.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:$}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(l.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},655063,e=>{"use strict";var t=e.i(399029),r=e.i(271645);e.s(["useDebouncedValue",0,function(e,a,n){let[o,s,i]=(0,t.useDebouncedState)(e,a,n);return(0,r.useEffect)(()=>{s(e)},[e,s]),[o,i]}])},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let n=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)("textarea",{ref:n,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));n.displayName="Textarea",e.s(["Textarea",0,n])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),n=e.i(519455),o=e.i(793479),s=e.i(624687);let i=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),l=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:o="ghost",size:s="xs",...i},d)=>(0,t.jsx)(n.Button,{ref:d,type:r,"data-size":s,variant:o,className:(0,a.cn)(l({size:s}),e),...i}));d.displayName="InputGroupButton";let u=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(o.Input,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));u.displayName="InputGroupInput",r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(s.Textarea,{ref:n,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(i({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let a=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:n,onValueChange:o,placeholder:s="Select…",emptyText:i="No results",disabled:l=!1,className:d}){let u=e.find(e=>e.value===n)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:u,onValueChange:e=>o(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:a,disabled:l,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:s,showClear:null!=n&&""!==n,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:i}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},78085,e=>{"use strict";var t=e.i(290571),r=e.i(103471),a=e.i(888288),n=e.i(271645),o=e.i(444755),s=e.i(673706);let i=(0,s.makeClassName)("Textarea"),l=n.default.forwardRef((e,l)=>{let{value:d,defaultValue:u="",placeholder:c="Type...",error:p=!1,errorMessage:f,disabled:m=!1,className:h,onChange:g,onValueChange:b,autoHeight:x=!1}=e,v=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[y,w]=(0,a.default)(u,d),j=(0,n.useRef)(null),C=(0,r.hasValue)(y);return(0,n.useEffect)(()=>{let e=j.current;if(x&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[x,j,y]),n.default.createElement(n.default.Fragment,null,n.default.createElement("textarea",Object.assign({ref:(0,s.mergeRefs)([j,l]),value:y,placeholder:c,disabled:m,className:(0,o.tremorTwMerge)(i("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,r.getSelectButtonColors)(C,m,p),m?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",h),"data-testid":"text-area",onChange:e=>{null==g||g(e),w(e.target.value),null==b||b(e.target.value)}},v)),p&&f?n.default.createElement("p",{className:(0,o.tremorTwMerge)(i("errorMessage"),"text-sm text-red-500 mt-1")},f):null)});l.displayName="Textarea",e.s(["Textarea",0,l],78085)},744582,e=>{"use strict";var t=e.i(843476),r=e.i(343488),a=e.i(531278),n=e.i(271645),o=e.i(131792),s=e.i(741466);let i=new Set(["input-change","input-clear","clear-press"]);e.s(["PaginatedSearchSelect",0,function({options:e,value:l,onValueChange:d,onSearchChange:u,onLoadMore:c,hasNextPage:p=!1,isLoading:f=!1,isFetchingNextPage:m=!1,placeholder:h="Search…",emptyText:g="No results",loadingText:b="Loading…",disabled:x=!1,className:v,inputId:y,"aria-invalid":w,"aria-describedby":j}){let C=(0,n.useMemo)(()=>void 0===l||""===l?null:e.find(e=>e.value===l)??{label:l,value:l},[e,l]),k=(0,n.useMemo)(()=>null===C||e.some(e=>e.value===C.value)?e:[C,...e],[e,C]),N=(0,r.useDebouncedCallback)(u,{wait:s.DEBOUNCE_WAIT_MS});return(0,t.jsxs)(o.Combobox,{items:k,value:C,onValueChange:e=>d(e?.value??""),onInputValueChange:(e,t)=>{var r;return r=t.reason,void(i.has(r)&&N(e))},isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:null,disabled:x,children:[(0,t.jsx)(o.ComboboxInput,{id:y,"aria-invalid":w,"aria-describedby":j,placeholder:h,showClear:void 0!==l&&""!==l,className:`w-full ${v??""}`}),(0,t.jsxs)(o.ComboboxContent,{children:[(0,t.jsx)(o.ComboboxEmpty,{children:f?b:g}),(0,t.jsx)(o.ComboboxList,{onScroll:e=>{let t=e.currentTarget;0===t.scrollHeight||(t.scrollTop+t.clientHeight)/t.scrollHeight>=.8&&p&&!m&&c()},"data-testid":"paginated-search-select-list",children:e=>(0,t.jsx)(o.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)}),m&&(0,t.jsx)("div",{className:"flex justify-center py-2","data-testid":"paginated-search-select-loading-more",children:(0,t.jsx)(a.Loader2,{className:"size-4 animate-spin text-muted-foreground"})})]})]})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0jffxvle4fz98.js b/litellm/proxy/_experimental/out/_next/static/chunks/0jffxvle4fz98.js new file mode 100644 index 00000000000..1e8cc1f037f --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0jffxvle4fz98.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,s),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',l,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js b/litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js deleted file mode 100644 index 6684b00616e..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0nb8zgkq5nq1r.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,788699,a=>{"use strict";let e=(0,a.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);a.s(["Pencil",0,e],788699)},332102,a=>{"use strict";let e=(0,a.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);a.s(["Inbox",0,e],332102)},515288,a=>{"use strict";var e=a.i(843476),t=a.i(271645),r=a.i(115504);let d=t.forwardRef(({className:a,size:t="default",...d},s)=>(0,e.jsx)("div",{ref:s,"data-slot":"card","data-size":t,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...d}));d.displayName="Card";let s=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...t}));s.displayName="CardHeader";let i=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-title",className:(0,r.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",a),...t}));i.displayName="CardTitle";let l=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",a),...t}));l.displayName="CardDescription";let c=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...t}));c.displayName="CardAction";let o=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",a),...t}));o.displayName="CardContent";let n=t.forwardRef(({className:a,...t},d)=>(0,e.jsx)("div",{ref:d,"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",a),...t}));n.displayName="CardFooter",a.s(["Card",0,d,"CardAction",0,c,"CardContent",0,o,"CardDescription",0,l,"CardFooter",0,n,"CardHeader",0,s,"CardTitle",0,i])},879664,a=>{"use strict";let e=(0,a.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);a.s(["default",0,e])},952571,a=>{"use strict";var e=a.i(879664);a.s(["Info",()=>e.default])},180127,a=>{"use strict";let e=(0,a.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);a.s(["default",0,e])},871689,a=>{"use strict";var e=a.i(180127);a.s(["ArrowLeft",()=>e.default])},123287,a=>{"use strict";let e=(0,a.i(475254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);a.s(["default",0,e])},595468,a=>{"use strict";var e=a.i(123287);a.s(["CheckCircle2",()=>e.default])},582458,a=>{"use strict";let e=(0,a.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);a.s(["default",0,e])},878894,a=>{"use strict";var e=a.i(582458);a.s(["AlertTriangle",()=>e.default])},764453,a=>{a.q("/litellm-asset-prefix/_next/static/media/dataforseo.1g2jptyl8rcb1.png")},341367,a=>{a.q("/litellm-asset-prefix/_next/static/media/exa_ai.36h3hrkelbgj-.png")},732731,a=>{a.q("/litellm-asset-prefix/_next/static/media/google_pse.3hii8gkiytuod.png")},911676,a=>{a.q("/litellm-asset-prefix/_next/static/media/parallel_ai.0jx5g5pf0u355.png")},692745,a=>{a.q("/litellm-asset-prefix/_next/static/media/perplexity.2zhky1a8ufk3x.png")},380084,a=>{a.q("/litellm-asset-prefix/_next/static/media/tavily.15dorlkyzxydf.png")}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0puabvl8lbw4f.js b/litellm/proxy/_experimental/out/_next/static/chunks/0puabvl8lbw4f.js new file mode 100644 index 00000000000..960c95abe4a --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0puabvl8lbw4f.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,s),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',l,'"']},e))]})})]})]})}])},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0eamb3kk74kws.js b/litellm/proxy/_experimental/out/_next/static/chunks/0x0jl947h6pc2.js similarity index 59% rename from litellm/proxy/_experimental/out/_next/static/chunks/0eamb3kk74kws.js rename to litellm/proxy/_experimental/out/_next/static/chunks/0x0jl947h6pc2.js index 7e4d1f8aa3a..5f638207bc1 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/0eamb3kk74kws.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0x0jl947h6pc2.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=r.forwardRef(({className:e,size:r="default",...i},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i}));i.displayName="Card";let n=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));o.displayName="CardTitle";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";let s=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));s.displayName="CardAction";let d=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,i,"CardAction",0,s,"CardContent",0,d,"CardDescription",0,l,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,o])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),i=e.i(519455),n=e.i(793479),o=e.i(624687);let l=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),s=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:n="ghost",size:o="xs",...l},d)=>(0,t.jsx)(i.Button,{ref:d,type:r,"data-size":o,variant:n,className:(0,a.cn)(s({size:o}),e),...l}));d.displayName="InputGroupButton";let c=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Input,{ref:i,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));c.displayName="InputGroupInput",r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(o.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(l({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,d,"InputGroupInput",0,c,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:i=0,side:n="bottom",sideOffset:o=4,className:l,...s}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:i,side:n,sideOffset:o,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...s})})})},"DropdownMenuItem",0,function({className:e,inset:i,variant:n="default",...o}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})},"DropdownMenuSeparator",0,function({className:e,...i}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...i})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,a,i=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),o=e.i(951437),l=e.i(146376),s=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let f=n.createContext(void 0);function p(){let e=n.useContext(f);if(void 0===e)throw Error((0,u.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),h={tabActivationDirection:e=>({[g.activationDirection]:e})};var m=e.i(675606),v=e.i(56434);let b=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:p="horizontal",render:g,value:b,style:y,...w}=e,k=void 0!==e.defaultValue,C=n.useRef([]),[j,E]=n.useState(()=>new Map),[R,_]=(0,o.useControlled)({controlled:b,default:a,name:"Tabs",state:"value"}),S=void 0!==b,[N,O]=n.useState(()=>new Map),A=n.useRef(void 0),T=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of N.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[N]),[I,z]=n.useState(()=>({previousValue:R,tabActivationDirection:"none"})),{previousValue:M,tabActivationDirection:D}=I,$=D,P=!1;M!==R&&($=x(M,R,p,N),P=null!=M&&null!=R&&null==T(R));let L=P?M:R,H=M!==L||D!==$;(0,l.useIsoLayoutEffect)(()=>{H&&z({previousValue:L,tabActivationDirection:$})},[L,H,$]);let q=(0,s.useStableCallback)((e,t)=>{t.activationDirection=x(R,e,p,N),u?.(e,t),t.isCanceled||_(e)}),U=(0,s.useStableCallback)((e,t)=>{u?.(e,(0,m.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),B=(0,s.useStableCallback)((e,t)=>{E(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),V=(0,s.useStableCallback)((e,t)=>{E(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),W=n.useCallback(e=>j.get(e),[j]),F=n.useCallback(e=>{for(let t of N.values())if(e===t?.value)return t?.id},[N]),K=n.useMemo(()=>({getTabElementBySelectedValue:T,getTabIdByPanelValue:F,getTabPanelIdByValue:W,onValueChange:q,orientation:p,registerMountedTabPanel:B,setTabMap:O,unregisterMountedTabPanel:V,tabActivationDirection:$,value:R}),[T,F,W,q,p,B,O,V,$,R]),G=n.useMemo(()=>{for(let e of N.values())if(null!=e&&e.value===R)return e},[N,R]),Y=n.useMemo(()=>{for(let e of N.values())if(null!=e&&!e.disabled)return e.value},[N]),J=n.useRef(!k),X=n.useRef(a),Q=n.useRef(k),Z=n.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(S)return;function e(e,t){_(e),z(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),U(e,t),J.current=!1}if(0===N.size){Z.current&&null!==R&&!A.current?.isConnected&&e(null,v.REASONS.missing);return}Z.current=!0,A.current=N.keys().next().value;let t=G?.disabled,r=null==G&&null!==R;if(t||R!==X.current||(Q.current=!1),Q.current&&t&&R===X.current)return;let a=J.current;if(t||r){let r=Y??null;if(R===r){J.current=!1;return}let i=v.REASONS.missing;a?i=v.REASONS.initial:t&&(i=v.REASONS.disabled),e(r,i);return}a&&null!=G&&(U(R,v.REASONS.initial),J.current=!1)},[Y,S,U,G,_,N,R]);let ee={orientation:p,tabActivationDirection:$},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:w,stateAttributesMapping:h});return(0,i.jsx)(f.Provider,{value:K,children:(0,i.jsx)(c.CompositeList,{elementsRef:C,children:et})})});function x(e,t,r,a){if(null==e||null==t)return"none";let i=null,n=null;for(let[r,o]of a.entries()){if(null==o)continue;let a=o.value??o.index;if(e===a&&(i=r),t===a&&(n=r),null!=i&&null!=n)break}if(null==i||null==n)return i!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let o=i.getBoundingClientRect(),l=n.getBoundingClientRect();if("horizontal"===r){if(l.lefto.left)return"right"}else{if(l.topo.top)return"down"}return"none"}var y=e.i(108868),w=e.i(788015),k=e.i(540886);let C="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,C],370359);var j=e.i(395530);let E=n.createContext(void 0);function R(){let e=n.useContext(E);if(void 0===e)throw Error((0,u.default)(65));return e}var _=e.i(647554);let S=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:i,value:o,id:s,nativeButton:c=!0,style:u,...f}=e,{value:g,getTabPanelIdByValue:b,orientation:x,tabActivationDirection:E}=p(),{activateOnFocus:S,highlightedTabIndex:N,onTabActivation:O,registerTabResizeObserverElement:A,setHighlightedTabIndex:T,tabsListElement:I}=R(),z=(0,w.useBaseUiId)(s),M=n.useMemo(()=>({disabled:a,id:z,value:o}),[a,z,o]),{compositeProps:D,compositeRef:$,index:P}=(0,j.useCompositeItem)({metadata:M}),L=o===g,H=n.useRef(!1),q=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=q.current;if(e)return A(e)},[A]),(0,l.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(L&&P>-1&&N!==P){if(null!=I){let e=(0,_.activeElement)((0,y.ownerDocument)(I));if(e&&(0,_.contains)(I,e))return}a||T(P)}},[L,P,N,T,a,I]);let{getButtonProps:U,buttonRef:B}=(0,k.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),V=b(o),W=n.useRef(!1),F=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:L,orientation:x,tabActivationDirection:E},ref:[t,B,$,q],props:[D,{role:"tab","aria-controls":V,"aria-selected":L,id:z,onClick:function(e){L||a||O(o,(0,m.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){L||(P>-1&&!a&&T(P),!a&&S&&(!W.current||W.current&&F.current)&&O(o,(0,m.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){L||a||(W.current=!0,e.button&&0!==e.button||(F.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){W.current=!1,F.current=!1},{once:!0})))},[C]:L?"":void 0,onKeyDownCapture(){H.current=!0}},f,U],stateAttributesMapping:h})});var N=e.i(73364),O=e.i(802239),A=e.i(956789);function T(){return A.NOOP}function I(){return!1}function z(){return!0}let M=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var D=e.i(172410);let $={...h,activeTabPosition:()=>null,activeTabSize:()=>null},P=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:o=!1,style:l,...s}=e,{nonce:c}=(0,D.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:f,tabActivationDirection:g,value:h}=p(),{tabsListElement:m,registerIndicatorUpdateListener:v}=R(),b=(0,O.useSyncExternalStore)(T,I,z),x=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>v(x),[v,x]);let y=0,w=0,k=0,C=0,j=0,E=0,_=!1;if(null!=h&&null!=m){let e=u(h);if(null!=e){_=!0;let{width:t,height:r}=(0,N.getCssDimensions)(e),{width:a,height:i}=(0,N.getCssDimensions)(m),n=e.getBoundingClientRect(),o=m.getBoundingClientRect(),l=a>0?o.width/a:1,s=i>0?o.height/i:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=n.left-o.left,t=n.top-o.top;y=e/l+m.scrollLeft-m.clientLeft,k=t/s+m.scrollTop-m.clientTop}else y=e.offsetLeft,k=e.offsetTop;j=t,E=r,w=m.scrollWidth-y-j,C=m.scrollHeight-k-E}}let S=_?{left:y,right:w,top:k,bottom:C}:null,A=_?{width:j,height:E}:null,P=_?{[M.activeTabLeft]:`${y}px`,[M.activeTabRight]:`${w}px`,[M.activeTabTop]:`${k}px`,[M.activeTabBottom]:`${C}px`,[M.activeTabWidth]:`${j}px`,[M.activeTabHeight]:`${E}px`}:void 0,L=_&&j>0&&E>0,H=(0,d.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:S,activeTabSize:A,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:P,hidden:!L},s,{suppressHydrationWarning:!0}],stateAttributesMapping:$});return null==h?null:(0,i.jsxs)(n.Fragment,{children:[H,b&&o&&(0,i.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var L=e.i(144394),H=e.i(209407),q=e.i(137584),U=e.i(223910),B=e.i(673553);let V=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),W={...h,...H.transitionStatusMapping},F=n.forwardRef(function(e,t){let{className:r,value:a,render:i,keepMounted:o=!1,style:s,...c}=e,{value:u,getTabIdByPanelValue:f,orientation:g,tabActivationDirection:h,registerMountedTabPanel:m,unregisterMountedTabPanel:v}=p(),b=(0,w.useBaseUiId)(),x=n.useMemo(()=>({id:b,value:a}),[b,a]),{ref:y,index:k}=(0,B.useCompositeListItem)({metadata:x}),C=a===u,{mounted:j,transitionStatus:E,setMounted:R}=(0,U.useTransitionStatus)(C),_=!j,S=f(a),N=n.useRef(null),O=(0,d.useRenderElement)("div",e,{state:{hidden:_,orientation:g,tabActivationDirection:h,transitionStatus:E},ref:[t,y,N],props:[{"aria-labelledby":S,hidden:_,id:b,role:"tabpanel",tabIndex:C?0:-1,inert:(0,L.inertValue)(!C),[V.index]:k},c],stateAttributesMapping:W});return((0,q.useOpenChangeComplete)({open:C,ref:N,onComplete(){C||R(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!_||o)&&null!=b)return m(a,b),()=>{v(a,b)}},[_,o,a,b,m,v]),o||j)?O:null});var K=e.i(590803),G=e.i(828918),Y=e.i(673327),J=e.i(621082);let X=[];var Q=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:o=A.EMPTY_ARRAY,props:u=A.EMPTY_ARRAY,state:f=A.EMPTY_OBJECT,stateAttributesMapping:p,highlightedIndex:g,onHighlightedIndexChange:h,orientation:m,grid:v,loopFocus:b,onLoop:x,enableHomeAndEndKeys:y,onMapChange:w,stopEventPropagation:k=!0,rootRef:j,disabledIndices:E,modifierKeys:R,highlightItemOnHover:S=!1,tag:N="div",...O}=e,{props:T,highlightedIndex:I,onHighlightedIndexChange:z,elementsRef:M,onMapChange:D,relayKeyboardEvent:$}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:i,direction:o,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:h=X}=e,[m,v]=n.useState(0),b=null!=a,x=n.useRef(null),y=(0,G.useMergedRefs)(x,u),w=n.useRef([]),k=n.useRef(!1),j=d??m,E=(0,s.useStableCallback)((e,t=!1)=>{if((c??v)(e),t){let t=w.current[e];(0,Y.scrollIntoViewIfNeeded)(x.current,t,o,r)}}),R=(0,s.useStableCallback)(e=>{if(0===e.size||k.current)return;k.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(C))??null,i=a?t.indexOf(a):-1;if(-1!==i)E(i);else if((0,J.isListIndexDisabled)(t,j,g)){let e=(0,J.findNonDisabledListIndex)(t,{disabledIndices:g});(0,J.isIndexOutOfListBounds)(t,e)||E(e)}(0,Y.scrollIntoViewIfNeeded)(x.current,a,o,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==g||null!=d||!k.current)return;let e=w.current;if((0,J.isListIndexDisabled)(e,j,g)){let t=(0,J.findNonDisabledListIndex)(e,{disabledIndices:g});(0,J.isIndexOutOfListBounds)(e,t)||E(t)}},[g,d,j,w,E]);let S=(0,s.useStableCallback)((e,t,r)=>i?i(e,t,r,w):r),N=(0,s.useStableCallback)(e=>{let n=f?Y.COMPOSITE_KEYS:Y.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of Y.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,h)||!x.current)return;let l="rtl"===o,s=l?Y.ARROW_LEFT:Y.ARROW_RIGHT,d={horizontal:s,vertical:Y.ARROW_DOWN,both:s}[r],c=l?Y.ARROW_RIGHT:Y.ARROW_LEFT,u={horizontal:c,vertical:Y.ARROW_UP,both:c}[r],m=(0,_.getTarget)(e.nativeEvent);if(null!=m&&(0,Y.isNativeInput)(m)&&!(0,K.isElementDisabled)(m)){let t=m.selectionStart,r=m.selectionEnd,a=m.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let v=j,y=(0,J.getMinListIndex)(w,g),k=(0,J.getMaxListIndex)(w,g);null!=a&&(v=a({disabledIndices:g,elementsRef:w,event:e,highlightedIndex:j,loopFocus:t,maxIndex:k,minIndex:y,onLoop:S,orientation:r,rtl:l}));let C={horizontal:[s],vertical:[Y.ARROW_DOWN],both:[s,Y.ARROW_DOWN]}[r],R={horizontal:[c],vertical:[Y.ARROW_UP],both:[c,Y.ARROW_UP]}[r],N=b?n:({horizontal:f?Y.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:Y.HORIZONTAL_KEYS,vertical:f?Y.VERTICAL_KEYS_WITH_EXTRA_KEYS:Y.VERTICAL_KEYS,both:n})[r];f&&(e.key===Y.HOME?v=y:e.key===Y.END&&(v=k)),v===j&&(C.includes(e.key)||R.includes(e.key))&&(t&&v===k&&C.includes(e.key)?(v=y,i&&(v=i(e,j,v,w))):t&&v===y&&R.includes(e.key)?(v=k,i&&(v=i(e,j,v,w))):v=(0,J.findNonDisabledListIndex)(w.current,{startingIndex:v,decrement:R.includes(e.key),disabledIndices:g})),v===j||(0,J.isIndexOutOfListBounds)(w.current,v)||(p&&e.stopPropagation(),N.has(e.key)&&e.preventDefault(),E(v,!0),queueMicrotask(()=>{w.current[v]?.focus()}))});return{props:{ref:y,onFocus(e){let t=x.current,r=(0,_.getTarget)(e.nativeEvent);t&&null!=r&&(0,Y.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:N},highlightedIndex:j,onHighlightedIndexChange:E,elementsRef:w,disabledIndices:g,onMapChange:R,relayKeyboardEvent:N}}({grid:v,loopFocus:b,onLoop:x,orientation:m,highlightedIndex:g,onHighlightedIndexChange:h,rootRef:j,stopEventPropagation:k,enableHomeAndEndKeys:y,direction:(0,Z.useDirection)(),disabledIndices:E,modifierKeys:R}),P=(0,d.useRenderElement)(N,e,{state:f,ref:o,props:[T,...u,O],stateAttributesMapping:p}),L=n.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:z,highlightItemOnHover:S,relayKeyboardEvent:$}),[I,z,S,$]);return(0,i.jsx)(Q.CompositeRootContext.Provider,{value:L,children:(0,i.jsx)(c.CompositeList,{elementsRef:M,onMapChange:e=>{w?.(e),D(e)},children:P})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:o=!0,render:d,style:c,...u}=e,{onValueChange:f,orientation:g,value:m,setTabMap:v,tabActivationDirection:b}=p(),[x,y]=n.useState(0),[w,k]=n.useState(null),C=n.useRef(new Set),j=n.useRef(new Set),R=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{C.current.forEach(e=>{e()})});return R.current=e,w&&e.observe(w),j.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),R.current=null}},[w]);let _=(0,s.useStableCallback)(e=>(C.current.add(e),()=>{C.current.delete(e)})),S=(0,s.useStableCallback)(e=>(j.current.add(e),R.current?.observe(e),()=>{j.current.delete(e),R.current?.unobserve(e)})),N=(0,s.useStableCallback)((e,t)=>{e!==m&&f(e,t)}),O=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:_,registerTabResizeObserverElement:S,onTabActivation:N,setHighlightedTabIndex:y,tabsListElement:w}),[r,x,_,S,N,y,w]);return(0,i.jsx)(E.Provider,{value:O,children:(0,i.jsx)(ee,{render:d,className:a,style:c,state:{orientation:g,tabActivationDirection:b},refs:[t,k],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:h,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:o,orientation:g,onHighlightedIndexChange:y,onMapChange:v,disabledIndices:A.EMPTY_ARRAY})})});e.s(["Indicator",0,P,"List",0,et,"Panel",0,F,"Root",0,b,"Tab",0,S],69281);var er=e.i(69281),er=er,ea=e.i(115504);let ei=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,i.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,i.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,i.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(ei({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,i.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["CheckCircleOutlined",0,n],245704)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),i=e.i(392221),n=e.i(703923),o=e.i(343794),l=e.i(914949),s=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,s.forwardRef)(function(e,c){var u=e.prefixCls,f=void 0===u?"rc-checkbox":u,p=e.className,g=e.style,h=e.checked,m=e.disabled,v=e.defaultChecked,b=e.type,x=void 0===b?"checkbox":b,y=e.title,w=e.onChange,k=(0,n.default)(e,d),C=(0,s.useRef)(null),j=(0,s.useRef)(null),E=(0,l.default)(void 0!==v&&v,{value:h}),R=(0,i.default)(E,2),_=R[0],S=R[1];(0,s.useImperativeHandle)(c,function(){return{focus:function(e){var t;null==(t=C.current)||t.focus(e)},blur:function(){var e;null==(e=C.current)||e.blur()},input:C.current,nativeElement:j.current}});var N=(0,o.default)(f,p,(0,a.default)((0,a.default)({},"".concat(f,"-checked"),_),"".concat(f,"-disabled"),m));return s.createElement("span",{className:N,title:y,style:g,ref:j},s.createElement("input",(0,t.default)({},k,{className:"".concat(f,"-input"),ref:C,onChange:function(t){m||("checked"in e||S(t.target.checked),null==w||w({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:m,checked:!!_,type:x})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,c],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=s.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),i=e.i(611935),n=e.i(121872),o=e.i(26905),l=e.i(242064),s=e.i(937328),d=e.i(321883),c=e.i(62139);let u=t.default.createContext(null);e.i(296059);var f=e.i(915654),p=e.i(183293),g=e.i(246422),h=e.i(838378);function m(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,p.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,f.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=r.forwardRef(({className:e,size:r="default",...i},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i}));i.displayName="Card";let n=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let o=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));o.displayName="CardTitle";let l=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";let s=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));s.displayName="CardAction";let d=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,i,"CardAction",0,s,"CardContent",0,d,"CardDescription",0,l,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,o])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let i=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,a.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504),i=e.i(519455),n=e.i(793479),o=e.i(624687);let l=(0,a.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),s=(0,a.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=r.forwardRef(({className:e,type:r="button",variant:n="ghost",size:o="xs",...l},d)=>(0,t.jsx)(i.Button,{ref:d,type:r,"data-size":o,variant:n,className:(0,a.cn)(s({size:o}),e),...l}));d.displayName="InputGroupButton";let c=r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(n.Input,{ref:i,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));c.displayName="InputGroupInput",r.forwardRef(({className:e,...r},i)=>(0,t.jsx)(o.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,a.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,a.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,a.cn)(l({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,d,"InputGroupInput",0,c,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,a.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:i=0,side:n="bottom",sideOffset:o=4,className:l,...s}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:i,side:n,sideOffset:o,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...s})})})},"DropdownMenuItem",0,function({className:e,inset:i,variant:n="default",...o}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":i,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...o})},"DropdownMenuSeparator",0,function({className:e,...i}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...i})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,a,i=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),o=e.i(951437),l=e.i(146376),s=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let f=n.createContext(void 0);function p(){let e=n.useContext(f);if(void 0===e)throw Error((0,u.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),h={tabActivationDirection:e=>({[g.activationDirection]:e})};var m=e.i(675606),v=e.i(56434);let b=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:p="horizontal",render:g,value:b,style:y,...w}=e,k=void 0!==e.defaultValue,C=n.useRef([]),[j,E]=n.useState(()=>new Map),[R,_]=(0,o.useControlled)({controlled:b,default:a,name:"Tabs",state:"value"}),S=void 0!==b,[N,O]=n.useState(()=>new Map),A=n.useRef(void 0),T=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of N.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[N]),[I,z]=n.useState(()=>({previousValue:R,tabActivationDirection:"none"})),{previousValue:M,tabActivationDirection:D}=I,$=D,P=!1;M!==R&&($=x(M,R,p,N),P=null!=M&&null!=R&&null==T(R));let L=P?M:R,H=M!==L||D!==$;(0,l.useIsoLayoutEffect)(()=>{H&&z({previousValue:L,tabActivationDirection:$})},[L,H,$]);let q=(0,s.useStableCallback)((e,t)=>{t.activationDirection=x(R,e,p,N),u?.(e,t),t.isCanceled||_(e)}),U=(0,s.useStableCallback)((e,t)=>{u?.(e,(0,m.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),B=(0,s.useStableCallback)((e,t)=>{E(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),V=(0,s.useStableCallback)((e,t)=>{E(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),W=n.useCallback(e=>j.get(e),[j]),F=n.useCallback(e=>{for(let t of N.values())if(e===t?.value)return t?.id},[N]),K=n.useMemo(()=>({getTabElementBySelectedValue:T,getTabIdByPanelValue:F,getTabPanelIdByValue:W,onValueChange:q,orientation:p,registerMountedTabPanel:B,setTabMap:O,unregisterMountedTabPanel:V,tabActivationDirection:$,value:R}),[T,F,W,q,p,B,O,V,$,R]),G=n.useMemo(()=>{for(let e of N.values())if(null!=e&&e.value===R)return e},[N,R]),Y=n.useMemo(()=>{for(let e of N.values())if(null!=e&&!e.disabled)return e.value},[N]),J=n.useRef(!k),X=n.useRef(a),Q=n.useRef(k),Z=n.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(S)return;function e(e,t){_(e),z(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),U(e,t),J.current=!1}if(0===N.size){Z.current&&null!==R&&!A.current?.isConnected&&e(null,v.REASONS.missing);return}Z.current=!0,A.current=N.keys().next().value;let t=G?.disabled,r=null==G&&null!==R;if(t||R!==X.current||(Q.current=!1),Q.current&&t&&R===X.current)return;let a=J.current;if(t||r){let r=Y??null;if(R===r){J.current=!1;return}let i=v.REASONS.missing;a?i=v.REASONS.initial:t&&(i=v.REASONS.disabled),e(r,i);return}a&&null!=G&&(U(R,v.REASONS.initial),J.current=!1)},[Y,S,U,G,_,N,R]);let ee={orientation:p,tabActivationDirection:$},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:w,stateAttributesMapping:h});return(0,i.jsx)(f.Provider,{value:K,children:(0,i.jsx)(c.CompositeList,{elementsRef:C,children:et})})});function x(e,t,r,a){if(null==e||null==t)return"none";let i=null,n=null;for(let[r,o]of a.entries()){if(null==o)continue;let a=o.value??o.index;if(e===a&&(i=r),t===a&&(n=r),null!=i&&null!=n)break}if(null==i||null==n)return i!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let o=i.getBoundingClientRect(),l=n.getBoundingClientRect();if("horizontal"===r){if(l.lefto.left)return"right"}else{if(l.topo.top)return"down"}return"none"}var y=e.i(108868),w=e.i(788015),k=e.i(540886);let C="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,C],370359);var j=e.i(395530);let E=n.createContext(void 0);function R(){let e=n.useContext(E);if(void 0===e)throw Error((0,u.default)(65));return e}var _=e.i(647554);let S=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:i,value:o,id:s,nativeButton:c=!0,style:u,...f}=e,{value:g,getTabPanelIdByValue:b,orientation:x,tabActivationDirection:E}=p(),{activateOnFocus:S,highlightedTabIndex:N,onTabActivation:O,registerTabResizeObserverElement:A,setHighlightedTabIndex:T,tabsListElement:I}=R(),z=(0,w.useBaseUiId)(s),M=n.useMemo(()=>({disabled:a,id:z,value:o}),[a,z,o]),{compositeProps:D,compositeRef:$,index:P}=(0,j.useCompositeItem)({metadata:M}),L=o===g,H=n.useRef(!1),q=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=q.current;if(e)return A(e)},[A]),(0,l.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(L&&P>-1&&N!==P){if(null!=I){let e=(0,_.activeElement)((0,y.ownerDocument)(I));if(e&&(0,_.contains)(I,e))return}a||T(P)}},[L,P,N,T,a,I]);let{getButtonProps:U,buttonRef:B}=(0,k.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),V=b(o),W=n.useRef(!1),F=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:L,orientation:x,tabActivationDirection:E},ref:[t,B,$,q],props:[D,{role:"tab","aria-controls":V,"aria-selected":L,id:z,onClick:function(e){L||a||O(o,(0,m.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){L||(P>-1&&!a&&T(P),!a&&S&&(!W.current||W.current&&F.current)&&O(o,(0,m.createChangeEventDetails)(v.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){L||a||(W.current=!0,e.button&&0!==e.button||(F.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){W.current=!1,F.current=!1},{once:!0})))},[C]:L?"":void 0,onKeyDownCapture(){H.current=!0}},f,U],stateAttributesMapping:h})});var N=e.i(73364),O=e.i(802239),A=e.i(956789);function T(){return A.NOOP}function I(){return!1}function z(){return!0}let M=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var D=e.i(172410);let $={...h,activeTabPosition:()=>null,activeTabSize:()=>null},P=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:o=!1,style:l,...s}=e,{nonce:c}=(0,D.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:f,tabActivationDirection:g,value:h}=p(),{tabsListElement:m,registerIndicatorUpdateListener:v}=R(),b=(0,O.useSyncExternalStore)(T,I,z),x=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>v(x),[v,x]);let y=0,w=0,k=0,C=0,j=0,E=0,_=!1;if(null!=h&&null!=m){let e=u(h);if(null!=e){_=!0;let{width:t,height:r}=(0,N.getCssDimensions)(e),{width:a,height:i}=(0,N.getCssDimensions)(m),n=e.getBoundingClientRect(),o=m.getBoundingClientRect(),l=a>0?o.width/a:1,s=i>0?o.height/i:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=n.left-o.left,t=n.top-o.top;y=e/l+m.scrollLeft-m.clientLeft,k=t/s+m.scrollTop-m.clientTop}else y=e.offsetLeft,k=e.offsetTop;j=t,E=r,w=m.scrollWidth-y-j,C=m.scrollHeight-k-E}}let S=_?{left:y,right:w,top:k,bottom:C}:null,A=_?{width:j,height:E}:null,P=_?{[M.activeTabLeft]:`${y}px`,[M.activeTabRight]:`${w}px`,[M.activeTabTop]:`${k}px`,[M.activeTabBottom]:`${C}px`,[M.activeTabWidth]:`${j}px`,[M.activeTabHeight]:`${E}px`}:void 0,L=_&&j>0&&E>0,H=(0,d.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:S,activeTabSize:A,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:P,hidden:!L},s,{suppressHydrationWarning:!0}],stateAttributesMapping:$});return null==h?null:(0,i.jsxs)(n.Fragment,{children:[H,b&&o&&(0,i.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var L=e.i(144394),H=e.i(209407),q=e.i(137584),U=e.i(223910),B=e.i(673553);let V=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),W={...h,...H.transitionStatusMapping},F=n.forwardRef(function(e,t){let{className:r,value:a,render:i,keepMounted:o=!1,style:s,...c}=e,{value:u,getTabIdByPanelValue:f,orientation:g,tabActivationDirection:h,registerMountedTabPanel:m,unregisterMountedTabPanel:v}=p(),b=(0,w.useBaseUiId)(),x=n.useMemo(()=>({id:b,value:a}),[b,a]),{ref:y,index:k}=(0,B.useCompositeListItem)({metadata:x}),C=a===u,{mounted:j,transitionStatus:E,setMounted:R}=(0,U.useTransitionStatus)(C),_=!j,S=f(a),N=n.useRef(null),O=(0,d.useRenderElement)("div",e,{state:{hidden:_,orientation:g,tabActivationDirection:h,transitionStatus:E},ref:[t,y,N],props:[{"aria-labelledby":S,hidden:_,id:b,role:"tabpanel",tabIndex:C?0:-1,inert:(0,L.inertValue)(!C),[V.index]:k},c],stateAttributesMapping:W});return((0,q.useOpenChangeComplete)({open:C,ref:N,onComplete(){C||R(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!_||o)&&null!=b)return m(a,b),()=>{v(a,b)}},[_,o,a,b,m,v]),o||j)?O:null});var K=e.i(590803),G=e.i(828918),Y=e.i(673327),J=e.i(621082);let X=[];var Q=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:o=A.EMPTY_ARRAY,props:u=A.EMPTY_ARRAY,state:f=A.EMPTY_OBJECT,stateAttributesMapping:p,highlightedIndex:g,onHighlightedIndexChange:h,orientation:m,grid:v,loopFocus:b,onLoop:x,enableHomeAndEndKeys:y,onMapChange:w,stopEventPropagation:k=!0,rootRef:j,disabledIndices:E,modifierKeys:R,highlightItemOnHover:S=!1,tag:N="div",...O}=e,{props:T,highlightedIndex:I,onHighlightedIndexChange:z,elementsRef:M,onMapChange:D,relayKeyboardEvent:$}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:i,direction:o,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:h=X}=e,[m,v]=n.useState(0),b=null!=a,x=n.useRef(null),y=(0,G.useMergedRefs)(x,u),w=n.useRef([]),k=n.useRef(!1),j=d??m,E=(0,s.useStableCallback)((e,t=!1)=>{if((c??v)(e),t){let t=w.current[e];(0,Y.scrollIntoViewIfNeeded)(x.current,t,o,r)}}),R=(0,s.useStableCallback)(e=>{if(0===e.size||k.current)return;k.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(C))??null,i=a?t.indexOf(a):-1;if(-1!==i)E(i);else if((0,J.isListIndexDisabled)(t,j,g)){let e=(0,J.findNonDisabledListIndex)(t,{disabledIndices:g});(0,J.isIndexOutOfListBounds)(t,e)||E(e)}(0,Y.scrollIntoViewIfNeeded)(x.current,a,o,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==g||null!=d||!k.current)return;let e=w.current;if((0,J.isListIndexDisabled)(e,j,g)){let t=(0,J.findNonDisabledListIndex)(e,{disabledIndices:g});(0,J.isIndexOutOfListBounds)(e,t)||E(t)}},[g,d,j,w,E]);let S=(0,s.useStableCallback)((e,t,r)=>i?i(e,t,r,w):r),N=(0,s.useStableCallback)(e=>{let n=f?Y.COMPOSITE_KEYS:Y.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of Y.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,h)||!x.current)return;let l="rtl"===o,s=l?Y.ARROW_LEFT:Y.ARROW_RIGHT,d={horizontal:s,vertical:Y.ARROW_DOWN,both:s}[r],c=l?Y.ARROW_RIGHT:Y.ARROW_LEFT,u={horizontal:c,vertical:Y.ARROW_UP,both:c}[r],m=(0,_.getTarget)(e.nativeEvent);if(null!=m&&(0,Y.isNativeInput)(m)&&!(0,K.isElementDisabled)(m)){let t=m.selectionStart,r=m.selectionEnd,a=m.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let v=j,y=(0,J.getMinListIndex)(w,g),k=(0,J.getMaxListIndex)(w,g);null!=a&&(v=a({disabledIndices:g,elementsRef:w,event:e,highlightedIndex:j,loopFocus:t,maxIndex:k,minIndex:y,onLoop:S,orientation:r,rtl:l}));let C={horizontal:[s],vertical:[Y.ARROW_DOWN],both:[s,Y.ARROW_DOWN]}[r],R={horizontal:[c],vertical:[Y.ARROW_UP],both:[c,Y.ARROW_UP]}[r],N=b?n:({horizontal:f?Y.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:Y.HORIZONTAL_KEYS,vertical:f?Y.VERTICAL_KEYS_WITH_EXTRA_KEYS:Y.VERTICAL_KEYS,both:n})[r];f&&(e.key===Y.HOME?v=y:e.key===Y.END&&(v=k)),v===j&&(C.includes(e.key)||R.includes(e.key))&&(t&&v===k&&C.includes(e.key)?(v=y,i&&(v=i(e,j,v,w))):t&&v===y&&R.includes(e.key)?(v=k,i&&(v=i(e,j,v,w))):v=(0,J.findNonDisabledListIndex)(w.current,{startingIndex:v,decrement:R.includes(e.key),disabledIndices:g})),v===j||(0,J.isIndexOutOfListBounds)(w.current,v)||(p&&e.stopPropagation(),N.has(e.key)&&e.preventDefault(),E(v,!0),queueMicrotask(()=>{w.current[v]?.focus()}))});return{props:{ref:y,onFocus(e){let t=x.current,r=(0,_.getTarget)(e.nativeEvent);t&&null!=r&&(0,Y.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:N},highlightedIndex:j,onHighlightedIndexChange:E,elementsRef:w,disabledIndices:g,onMapChange:R,relayKeyboardEvent:N}}({grid:v,loopFocus:b,onLoop:x,orientation:m,highlightedIndex:g,onHighlightedIndexChange:h,rootRef:j,stopEventPropagation:k,enableHomeAndEndKeys:y,direction:(0,Z.useDirection)(),disabledIndices:E,modifierKeys:R}),P=(0,d.useRenderElement)(N,e,{state:f,ref:o,props:[T,...u,O],stateAttributesMapping:p}),L=n.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:z,highlightItemOnHover:S,relayKeyboardEvent:$}),[I,z,S,$]);return(0,i.jsx)(Q.CompositeRootContext.Provider,{value:L,children:(0,i.jsx)(c.CompositeList,{elementsRef:M,onMapChange:e=>{w?.(e),D(e)},children:P})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:o=!0,render:d,style:c,...u}=e,{onValueChange:f,orientation:g,value:m,setTabMap:v,tabActivationDirection:b}=p(),[x,y]=n.useState(0),[w,k]=n.useState(null),C=n.useRef(new Set),j=n.useRef(new Set),R=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{C.current.forEach(e=>{e()})});return R.current=e,w&&e.observe(w),j.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),R.current=null}},[w]);let _=(0,s.useStableCallback)(e=>(C.current.add(e),()=>{C.current.delete(e)})),S=(0,s.useStableCallback)(e=>(j.current.add(e),R.current?.observe(e),()=>{j.current.delete(e),R.current?.unobserve(e)})),N=(0,s.useStableCallback)((e,t)=>{e!==m&&f(e,t)}),O=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:_,registerTabResizeObserverElement:S,onTabActivation:N,setHighlightedTabIndex:y,tabsListElement:w}),[r,x,_,S,N,y,w]);return(0,i.jsx)(E.Provider,{value:O,children:(0,i.jsx)(ee,{render:d,className:a,style:c,state:{orientation:g,tabActivationDirection:b},refs:[t,k],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:h,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:o,orientation:g,onHighlightedIndexChange:y,onMapChange:v,disabledIndices:A.EMPTY_ARRAY})})});e.s(["Indicator",0,P,"List",0,et,"Panel",0,F,"Root",0,b,"Tab",0,S],69281);var er=e.i(69281),er=er,ea=e.i(115504);let ei=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,i.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,i.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,i.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(ei({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,i.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var i=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(i.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["CheckCircleOutlined",0,n],245704)},91874,681216,e=>{"use strict";var t=e.i(931067),r=e.i(209428),a=e.i(211577),i=e.i(392221),n=e.i(703923),o=e.i(343794),l=e.i(914949),s=e.i(271645),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],c=(0,s.forwardRef)(function(e,c){var u=e.prefixCls,f=void 0===u?"rc-checkbox":u,p=e.className,g=e.style,h=e.checked,m=e.disabled,v=e.defaultChecked,b=e.type,x=void 0===b?"checkbox":b,y=e.title,w=e.onChange,k=(0,n.default)(e,d),C=(0,s.useRef)(null),j=(0,s.useRef)(null),E=(0,l.default)(void 0!==v&&v,{value:h}),R=(0,i.default)(E,2),_=R[0],S=R[1];(0,s.useImperativeHandle)(c,function(){return{focus:function(e){var t;null==(t=C.current)||t.focus(e)},blur:function(){var e;null==(e=C.current)||e.blur()},input:C.current,nativeElement:j.current}});var N=(0,o.default)(f,p,(0,a.default)((0,a.default)({},"".concat(f,"-checked"),_),"".concat(f,"-disabled"),m));return s.createElement("span",{className:N,title:y,style:g,ref:j},s.createElement("input",(0,t.default)({},k,{className:"".concat(f,"-input"),ref:C,onChange:function(t){m||("checked"in e||S(t.target.checked),null==w||w({target:(0,r.default)((0,r.default)({},e),{},{type:x,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:m,checked:!!_,type:x})),s.createElement("span",{className:"".concat(f,"-inner")}))});e.s(["default",0,c],91874);var u=e.i(963188);e.s(["default",0,function(e){let t=s.default.useRef(null),r=()=>{u.default.cancel(t.current),t.current=null};return[()=>{r(),t.current=(0,u.default)(()=>{t.current=null})},a=>{t.current&&(a.stopPropagation(),r()),null==e||e(a)}]}],681216)},374276,236836,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(91874),i=e.i(611935),n=e.i(121872),o=e.i(26905),l=e.i(242064),s=e.i(937328),d=e.i(321883),c=e.i(62139);let u=t.default.createContext(null);e.i(296059);var f=e.i(915654),p=e.i(183293),g=e.i(246422),h=e.i(838378);function m(e,t){return(e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},(0,p.resetComponent)(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:(0,p.genFocusOutline)(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${(0,f.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${(0,f.unit)(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` ${r}:not(${r}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/0xma3x__xf0bc.js b/litellm/proxy/_experimental/out/_next/static/chunks/0xma3x__xf0bc.js new file mode 100644 index 00000000000..383ea09d28b --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/0xma3x__xf0bc.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,s),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',l,'"']},e))]})})]})]})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1-xfgtefesa0q.js b/litellm/proxy/_experimental/out/_next/static/chunks/1-xfgtefesa0q.js new file mode 100644 index 00000000000..89141857756 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1-xfgtefesa0q.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let n=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));l.displayName="CardTitle";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));s.displayName="CardDescription";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));i.displayName="CardAction";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,i,"CardContent",0,d,"CardDescription",0,s,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,l])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:o=0,side:n="bottom",sideOffset:l=4,className:s,...i}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:n,sideOffset:l,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",s),...i})})})},"DropdownMenuItem",0,function({className:e,inset:o,variant:n="default",...l}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...l})},"DropdownMenuSeparator",0,function({className:e,...o}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...o})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},677572,370359,405934,e=>{"use strict";var t,r,a,o=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),l=e.i(951437),s=e.i(146376),i=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let m=n.createContext(void 0);function h(){let e=n.useContext(m);if(void 0===e)throw Error((0,u.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),p={tabActivationDirection:e=>({[g.activationDirection]:e})};var f=e.i(675606),b=e.i(56434);let x=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:h="horizontal",render:g,value:x,style:k,...y}=e,C=void 0!==e.defaultValue,w=n.useRef([]),[j,N]=n.useState(()=>new Map),[T,S]=(0,l.useControlled)({controlled:x,default:a,name:"Tabs",state:"value"}),M=void 0!==x,[R,_]=n.useState(()=>new Map),D=n.useRef(void 0),E=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of R.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[R]),[L,P]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:I,tabActivationDirection:O}=L,z=O,A=!1;I!==T&&(z=v(I,T,h,R),A=null!=I&&null!=T&&null==E(T));let Y=A?I:T,H=I!==Y||O!==z;(0,s.useIsoLayoutEffect)(()=>{H&&P({previousValue:Y,tabActivationDirection:z})},[Y,H,z]);let F=(0,i.useStableCallback)((e,t)=>{t.activationDirection=v(T,e,h,R),u?.(e,t),t.isCanceled||S(e)}),B=(0,i.useStableCallback)((e,t)=>{u?.(e,(0,f.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,i.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),W=(0,i.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),$=n.useCallback(e=>j.get(e),[j]),q=n.useCallback(e=>{for(let t of R.values())if(e===t?.value)return t?.id},[R]),K=n.useMemo(()=>({getTabElementBySelectedValue:E,getTabIdByPanelValue:q,getTabPanelIdByValue:$,onValueChange:F,orientation:h,registerMountedTabPanel:V,setTabMap:_,unregisterMountedTabPanel:W,tabActivationDirection:z,value:T}),[E,q,$,F,h,V,_,W,z,T]),U=n.useMemo(()=>{for(let e of R.values())if(null!=e&&e.value===T)return e},[R,T]),G=n.useMemo(()=>{for(let e of R.values())if(null!=e&&!e.disabled)return e.value},[R]),X=n.useRef(!C),J=n.useRef(a),Q=n.useRef(C),Z=n.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(M)return;function e(e,t){S(e),P(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),X.current=!1}if(0===R.size){Z.current&&null!==T&&!D.current?.isConnected&&e(null,b.REASONS.missing);return}Z.current=!0,D.current=R.keys().next().value;let t=U?.disabled,r=null==U&&null!==T;if(t||T!==J.current||(Q.current=!1),Q.current&&t&&T===J.current)return;let a=X.current;if(t||r){let r=G??null;if(T===r){X.current=!1;return}let o=b.REASONS.missing;a?o=b.REASONS.initial:t&&(o=b.REASONS.disabled),e(r,o);return}a&&null!=U&&(B(T,b.REASONS.initial),X.current=!1)},[G,M,B,U,S,R,T]);let ee={orientation:h,tabActivationDirection:z},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:p});return(0,o.jsx)(m.Provider,{value:K,children:(0,o.jsx)(c.CompositeList,{elementsRef:w,children:et})})});function v(e,t,r,a){if(null==e||null==t)return"none";let o=null,n=null;for(let[r,l]of a.entries()){if(null==l)continue;let a=l.value??l.index;if(e===a&&(o=r),t===a&&(n=r),null!=o&&null!=n)break}if(null==o||null==n)return o!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let l=o.getBoundingClientRect(),s=n.getBoundingClientRect();if("horizontal"===r){if(s.leftl.left)return"right"}else{if(s.topl.top)return"down"}return"none"}var k=e.i(108868),y=e.i(788015),C=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var j=e.i(395530);let N=n.createContext(void 0);function T(){let e=n.useContext(N);if(void 0===e)throw Error((0,u.default)(65));return e}var S=e.i(647554);let M=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:o,value:l,id:i,nativeButton:c=!0,style:u,...m}=e,{value:g,getTabPanelIdByValue:x,orientation:v,tabActivationDirection:N}=h(),{activateOnFocus:M,highlightedTabIndex:R,onTabActivation:_,registerTabResizeObserverElement:D,setHighlightedTabIndex:E,tabsListElement:L}=T(),P=(0,y.useBaseUiId)(i),I=n.useMemo(()=>({disabled:a,id:P,value:l}),[a,P,l]),{compositeProps:O,compositeRef:z,index:A}=(0,j.useCompositeItem)({metadata:I}),Y=l===g,H=n.useRef(!1),F=n.useRef(null);(0,s.useIsoLayoutEffect)(()=>{let e=F.current;if(e)return D(e)},[D]),(0,s.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(Y&&A>-1&&R!==A){if(null!=L){let e=(0,S.activeElement)((0,k.ownerDocument)(L));if(e&&(0,S.contains)(L,e))return}a||E(A)}},[Y,A,R,E,a,L]);let{getButtonProps:B,buttonRef:V}=(0,C.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),W=x(l),$=n.useRef(!1),q=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:Y,orientation:v,tabActivationDirection:N},ref:[t,V,z,F],props:[O,{role:"tab","aria-controls":W,"aria-selected":Y,id:P,onClick:function(e){Y||a||_(l,(0,f.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){Y||(A>-1&&!a&&E(A),!a&&M&&(!$.current||$.current&&q.current)&&_(l,(0,f.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){Y||a||($.current=!0,e.button&&0!==e.button||(q.current=!0,(0,k.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){$.current=!1,q.current=!1},{once:!0})))},[w]:Y?"":void 0,onKeyDownCapture(){H.current=!0}},m,B],stateAttributesMapping:p})});var R=e.i(73364),_=e.i(802239),D=e.i(956789);function E(){return D.NOOP}function L(){return!1}function P(){return!0}let I=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var O=e.i(172410);let z={...p,activeTabPosition:()=>null,activeTabSize:()=>null},A=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:l=!1,style:s,...i}=e,{nonce:c}=(0,O.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:m,tabActivationDirection:g,value:p}=h(),{tabsListElement:f,registerIndicatorUpdateListener:b}=T(),x=(0,_.useSyncExternalStore)(E,L,P),v=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>b(v),[b,v]);let k=0,y=0,C=0,w=0,j=0,N=0,S=!1;if(null!=p&&null!=f){let e=u(p);if(null!=e){S=!0;let{width:t,height:r}=(0,R.getCssDimensions)(e),{width:a,height:o}=(0,R.getCssDimensions)(f),n=e.getBoundingClientRect(),l=f.getBoundingClientRect(),s=a>0?l.width/a:1,i=o>0?l.height/o:1;if(Math.abs(s)>Number.EPSILON&&Math.abs(i)>Number.EPSILON){let e=n.left-l.left,t=n.top-l.top;k=e/s+f.scrollLeft-f.clientLeft,C=t/i+f.scrollTop-f.clientTop}else k=e.offsetLeft,C=e.offsetTop;j=t,N=r,y=f.scrollWidth-k-j,w=f.scrollHeight-C-N}}let M=S?{left:k,right:y,top:C,bottom:w}:null,D=S?{width:j,height:N}:null,A=S?{[I.activeTabLeft]:`${k}px`,[I.activeTabRight]:`${y}px`,[I.activeTabTop]:`${C}px`,[I.activeTabBottom]:`${w}px`,[I.activeTabWidth]:`${j}px`,[I.activeTabHeight]:`${N}px`}:void 0,Y=S&&j>0&&N>0,H=(0,d.useRenderElement)("span",e,{state:{orientation:m,activeTabPosition:M,activeTabSize:D,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:A,hidden:!Y},i,{suppressHydrationWarning:!0}],stateAttributesMapping:z});return null==p?null:(0,o.jsxs)(n.Fragment,{children:[H,x&&l&&(0,o.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var Y=e.i(144394),H=e.i(209407),F=e.i(137584),B=e.i(223910),V=e.i(673553);let W=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),$={...p,...H.transitionStatusMapping},q=n.forwardRef(function(e,t){let{className:r,value:a,render:o,keepMounted:l=!1,style:i,...c}=e,{value:u,getTabIdByPanelValue:m,orientation:g,tabActivationDirection:p,registerMountedTabPanel:f,unregisterMountedTabPanel:b}=h(),x=(0,y.useBaseUiId)(),v=n.useMemo(()=>({id:x,value:a}),[x,a]),{ref:k,index:C}=(0,V.useCompositeListItem)({metadata:v}),w=a===u,{mounted:j,transitionStatus:N,setMounted:T}=(0,B.useTransitionStatus)(w),S=!j,M=m(a),R=n.useRef(null),_=(0,d.useRenderElement)("div",e,{state:{hidden:S,orientation:g,tabActivationDirection:p,transitionStatus:N},ref:[t,k,R],props:[{"aria-labelledby":M,hidden:S,id:x,role:"tabpanel",tabIndex:w?0:-1,inert:(0,Y.inertValue)(!w),[W.index]:C},c],stateAttributesMapping:$});return((0,F.useOpenChangeComplete)({open:w,ref:R,onComplete(){w||T(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if((!S||l)&&null!=x)return f(a,x),()=>{b(a,x)}},[S,l,a,x,f,b]),l||j)?_:null});var K=e.i(590803),U=e.i(828918),G=e.i(673327),X=e.i(621082);let J=[];var Q=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:l=D.EMPTY_ARRAY,props:u=D.EMPTY_ARRAY,state:m=D.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:g,onHighlightedIndexChange:p,orientation:f,grid:b,loopFocus:x,onLoop:v,enableHomeAndEndKeys:k,onMapChange:y,stopEventPropagation:C=!0,rootRef:j,disabledIndices:N,modifierKeys:T,highlightItemOnHover:M=!1,tag:R="div",..._}=e,{props:E,highlightedIndex:L,onHighlightedIndexChange:P,elementsRef:I,onMapChange:O,relayKeyboardEvent:z}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:o,direction:l,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:m=!1,stopEventPropagation:h=!1,disabledIndices:g,modifierKeys:p=J}=e,[f,b]=n.useState(0),x=null!=a,v=n.useRef(null),k=(0,U.useMergedRefs)(v,u),y=n.useRef([]),C=n.useRef(!1),j=d??f,N=(0,i.useStableCallback)((e,t=!1)=>{if((c??b)(e),t){let t=y.current[e];(0,G.scrollIntoViewIfNeeded)(v.current,t,l,r)}}),T=(0,i.useStableCallback)(e=>{if(0===e.size||C.current)return;C.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(w))??null,o=a?t.indexOf(a):-1;if(-1!==o)N(o);else if((0,X.isListIndexDisabled)(t,j,g)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,G.scrollIntoViewIfNeeded)(v.current,a,l,r)});(0,s.useIsoLayoutEffect)(()=>{if(null==g||null!=d||!C.current)return;let e=y.current;if((0,X.isListIndexDisabled)(e,j,g)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[g,d,j,y,N]);let M=(0,i.useStableCallback)((e,t,r)=>o?o(e,t,r,y):r),R=(0,i.useStableCallback)(e=>{let n=m?G.COMPOSITE_KEYS:G.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of G.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,p)||!v.current)return;let s="rtl"===l,i=s?G.ARROW_LEFT:G.ARROW_RIGHT,d={horizontal:i,vertical:G.ARROW_DOWN,both:i}[r],c=s?G.ARROW_RIGHT:G.ARROW_LEFT,u={horizontal:c,vertical:G.ARROW_UP,both:c}[r],f=(0,S.getTarget)(e.nativeEvent);if(null!=f&&(0,G.isNativeInput)(f)&&!(0,K.isElementDisabled)(f)){let t=f.selectionStart,r=f.selectionEnd,a=f.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let b=j,k=(0,X.getMinListIndex)(y,g),C=(0,X.getMaxListIndex)(y,g);null!=a&&(b=a({disabledIndices:g,elementsRef:y,event:e,highlightedIndex:j,loopFocus:t,maxIndex:C,minIndex:k,onLoop:M,orientation:r,rtl:s}));let w={horizontal:[i],vertical:[G.ARROW_DOWN],both:[i,G.ARROW_DOWN]}[r],T={horizontal:[c],vertical:[G.ARROW_UP],both:[c,G.ARROW_UP]}[r],R=x?n:({horizontal:m?G.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:G.HORIZONTAL_KEYS,vertical:m?G.VERTICAL_KEYS_WITH_EXTRA_KEYS:G.VERTICAL_KEYS,both:n})[r];m&&(e.key===G.HOME?b=k:e.key===G.END&&(b=C)),b===j&&(w.includes(e.key)||T.includes(e.key))&&(t&&b===C&&w.includes(e.key)?(b=k,o&&(b=o(e,j,b,y))):t&&b===k&&T.includes(e.key)?(b=C,o&&(b=o(e,j,b,y))):b=(0,X.findNonDisabledListIndex)(y.current,{startingIndex:b,decrement:T.includes(e.key),disabledIndices:g})),b===j||(0,X.isIndexOutOfListBounds)(y.current,b)||(h&&e.stopPropagation(),R.has(e.key)&&e.preventDefault(),N(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:k,onFocus(e){let t=v.current,r=(0,S.getTarget)(e.nativeEvent);t&&null!=r&&(0,G.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:R},highlightedIndex:j,onHighlightedIndexChange:N,elementsRef:y,disabledIndices:g,onMapChange:T,relayKeyboardEvent:R}}({grid:b,loopFocus:x,onLoop:v,orientation:f,highlightedIndex:g,onHighlightedIndexChange:p,rootRef:j,stopEventPropagation:C,enableHomeAndEndKeys:k,direction:(0,Z.useDirection)(),disabledIndices:N,modifierKeys:T}),A=(0,d.useRenderElement)(R,e,{state:m,ref:l,props:[E,...u,_],stateAttributesMapping:h}),Y=n.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:P,highlightItemOnHover:M,relayKeyboardEvent:z}),[L,P,M,z]);return(0,o.jsx)(Q.CompositeRootContext.Provider,{value:Y,children:(0,o.jsx)(c.CompositeList,{elementsRef:I,onMapChange:e=>{y?.(e),O(e)},children:A})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:l=!0,render:d,style:c,...u}=e,{onValueChange:m,orientation:g,value:f,setTabMap:b,tabActivationDirection:x}=h(),[v,k]=n.useState(0),[y,C]=n.useState(null),w=n.useRef(new Set),j=n.useRef(new Set),T=n.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return T.current=e,y&&e.observe(y),j.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[y]);let S=(0,i.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),M=(0,i.useStableCallback)(e=>(j.current.add(e),T.current?.observe(e),()=>{j.current.delete(e),T.current?.unobserve(e)})),R=(0,i.useStableCallback)((e,t)=>{e!==f&&m(e,t)}),_=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:v,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:M,onTabActivation:R,setHighlightedTabIndex:k,tabsListElement:y}),[r,v,S,M,R,k,y]);return(0,o.jsx)(N.Provider,{value:_,children:(0,o.jsx)(ee,{render:d,className:a,style:c,state:{orientation:g,tabActivationDirection:x},refs:[t,C],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:p,highlightedIndex:v,enableHomeAndEndKeys:!0,loopFocus:l,orientation:g,onHighlightedIndexChange:k,onMapChange:b,disabledIndices:D.EMPTY_ARRAY})})});e.s(["Indicator",0,A,"List",0,et,"Panel",0,q,"Root",0,x,"Tab",0,M],69281);var er=e.i(69281),er=er,ea=e.i(115504);let eo=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,o.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,o.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,o.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(eo({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,o.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},928685,e=>{"use strict";var t=e.i(38953);e.s(["SearchOutlined",()=>t.default])},466828,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(678784);let o=(0,e.i(475254).default)("clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);var n=e.i(650056);let l={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};e.s(["default",0,({code:e,language:s})=>{let[i,d]=(0,r.useState)(!1);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 overflow-hidden",children:[(0,t.jsx)("button",{onClick:()=>{navigator.clipboard.writeText(e),d(!0),setTimeout(()=>d(!1),2e3)},className:"absolute top-3 right-3 p-2 rounded-md bg-gray-100 hover:bg-gray-200 text-gray-600 z-10","aria-label":"Copy code",children:i?(0,t.jsx)(a.CheckIcon,{size:16}):(0,t.jsx)(o,{size:16})}),(0,t.jsx)(n.Prism,{language:s,style:l,customStyle:{margin:0,padding:"1.5rem",borderRadius:"0.5rem",fontSize:"0.9rem",backgroundColor:"#fafafa"},showLineNumbers:!0,children:e})]})}],466828)},972520,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],972520)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),n=e.i(444755),l=e.i(673706),s=e.i(95779);let i={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},u=(0,l.makeClassName)("Icon"),m=r.default.forwardRef((e,m)=>{let{icon:h,variant:g="simple",tooltip:p,size:f=o.Sizes.SM,color:b,className:x}=e,v=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),k=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,l.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(g,b),{tooltipProps:y,getReferenceProps:C}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([m,y.refs.setReference]),className:(0,n.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",k.bgColor,k.textColor,k.borderColor,k.ringColor,c[g].rounded,c[g].border,c[g].shadow,c[g].ring,i[f].paddingX,i[f].paddingY,x)},C,v),r.default.createElement(a.default,Object.assign({text:p},y)),r.default.createElement(h,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[f].height,d[f].width)}))});m.displayName="Icon",e.s(["default",0,m],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},91979,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};var o=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(o.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["ReloadOutlined",0,n],91979)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[o,n]=(0,t.useState)(e);return[a?r:o,e=>{a||n(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),a=e.i(433336),o=e.i(271645),n=e.i(394487),l=e.i(503269),s=e.i(214520),i=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),h=e.i(140721),g=e.i(942803),p=e.i(233538),f=e.i(694421),b=e.i(700020),x=e.i(35889),v=e.i(998348),k=e.i(722678);let y=(0,o.createContext)(null);y.displayName="GroupContext";let C=o.Fragment,w=Object.assign((0,b.forwardRefWithAs)(function(e,t){var C;let w=(0,o.useId)(),j=(0,g.useProvidedId)(),N=(0,m.useDisabled)(),{id:T=j||`headlessui-switch-${w}`,disabled:S=N||!1,checked:M,defaultChecked:R,onChange:_,name:D,value:E,form:L,autoFocus:P=!1,...I}=e,O=(0,o.useContext)(y),[z,A]=(0,o.useState)(null),Y=(0,o.useRef)(null),H=(0,u.useSyncRefs)(Y,t,null===O?null:O.setSwitch,A),F=(0,s.useDefaultValue)(R),[B,V]=(0,l.useControllable)(M,_,null!=F&&F),W=(0,i.useDisposables)(),[$,q]=(0,o.useState)(!1),K=(0,d.useEvent)(()=>{q(!0),null==V||V(!B),W.nextFrame(()=>{q(!1)})}),U=(0,d.useEvent)(e=>{if((0,p.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),K()}),G=(0,d.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),K()):e.key===v.Keys.Enter&&(0,f.attemptSubmit)(e.currentTarget)}),X=(0,d.useEvent)(e=>e.preventDefault()),J=(0,k.useLabelledBy)(),Q=(0,x.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:P}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:S}),{pressed:ea,pressProps:eo}=(0,n.useActivePress)({disabled:S}),en=(0,o.useMemo)(()=>({checked:B,disabled:S,hover:et,focus:Z,active:ea,autofocus:P,changing:$}),[B,et,Z,ea,S,$,P]),el=(0,b.mergeProps)({id:T,ref:H,role:"switch",type:(0,c.useResolveButtonType)(e,z),tabIndex:-1===e.tabIndex?0:null!=(C=e.tabIndex)?C:0,"aria-checked":B,"aria-labelledby":J,"aria-describedby":Q,disabled:S||void 0,autoFocus:P,onClick:U,onKeyUp:G,onKeyPress:X},ee,er,eo),es=(0,o.useCallback)(()=>{if(void 0!==F)return null==V?void 0:V(F)},[V,F]),ei=(0,b.useRender)();return o.default.createElement(o.default.Fragment,null,null!=D&&o.default.createElement(h.FormFields,{disabled:S,data:{[D]:E||"on"},overrides:{type:"checkbox",checked:B},form:L,onReset:es}),ei({ourProps:el,theirProps:I,slot:en,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,o.useState)(null),[n,l]=(0,k.useLabels)(),[s,i]=(0,x.useDescriptions)(),d=(0,o.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,b.useRender)();return o.default.createElement(i,{name:"Switch.Description",value:s},o.default.createElement(l,{name:"Switch.Label",value:n,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},o.default.createElement(y.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:C,name:"Switch.Group"}))))},Label:k.Label,Description:x.Description});var j=e.i(888288),N=e.i(95779),T=e.i(444755),S=e.i(673706),M=e.i(829087);let R=(0,S.makeClassName)("Switch"),_=o.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:n=!1,onChange:l,color:s,name:i,error:d,errorMessage:c,disabled:u,required:m,tooltip:h,id:g}=e,p=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),f={bgColor:s?(0,S.getColorClassNames)(s,N.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:s?(0,S.getColorClassNames)(s,N.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,x]=(0,j.default)(n,a),[v,k]=(0,o.useState)(!1),{tooltipProps:y,getReferenceProps:C}=(0,M.useTooltip)(300);return o.default.createElement("div",{className:"flex flex-row items-center justify-start"},o.default.createElement(M.default,Object.assign({text:h},y)),o.default.createElement("div",Object.assign({ref:(0,S.mergeRefs)([r,y.refs.setReference]),className:(0,T.tremorTwMerge)(R("root"),"flex flex-row relative h-5")},p,C),o.default.createElement("input",{type:"checkbox",className:(0,T.tremorTwMerge)(R("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:i,required:m,checked:b,onChange:e=>{e.preventDefault()}}),o.default.createElement(w,{checked:b,onChange:e=>{x(e),null==l||l(e)},disabled:u,className:(0,T.tremorTwMerge)(R("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>k(!0),onBlur:()=>k(!1),id:g},o.default.createElement("span",{className:(0,T.tremorTwMerge)(R("sr-only"),"sr-only")},"Switch ",b?"on":"off"),o.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(R("background"),b?f.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),o.default.createElement("span",{"aria-hidden":"true",className:(0,T.tremorTwMerge)(R("round"),b?(0,T.tremorTwMerge)(f.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",v?(0,T.tremorTwMerge)("ring-2",f.ringColor):"")}))),d&&c?o.default.createElement("p",{className:(0,T.tremorTwMerge)(R("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});_.displayName="Switch",e.s(["Switch",0,_],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(174553);e.s(["ProviderLogo",0,({provider:e,className:a="w-4 h-4"})=>(0,t.jsx)(r.Logo,{provider:e,className:a})])},368670,e=>{"use strict";var t=e.i(602869),r=e.i(266027);let a=(0,e.i(243652).createQueryKeys)("modelCostMap");e.s(["useModelCostMap",0,()=>(0,r.useQuery)({queryKey:a.list({}),queryFn:async()=>await (0,t.modelCostMap)(),staleTime:6e4,gcTime:6e4})])},973706,e=>{"use strict";var t=e.i(843476),r=e.i(72713),a=e.i(637235),o=e.i(994388),n=e.i(599724),l=e.i(166540),s=e.i(271645);let i=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,l.default)().startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,l.default)().subtract(7,"days").startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,l.default)().subtract(30,"days").startOf("day").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,l.default)().startOf("month").toDate(),to:(0,l.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,l.default)().startOf("year").toDate(),to:(0,l.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:d,label:c="Select Time Range",showTimeRange:u=!0})=>{let[m,h]=(0,s.useState)(!1),[g,p]=(0,s.useState)(e),[f,b]=(0,s.useState)(null),[x,v]=(0,s.useState)(""),[k,y]=(0,s.useState)(""),C=(0,s.useRef)(null),w=(0,s.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of i){let r=t.getValue(),a=(0,l.default)(e.from).isSame((0,l.default)(r.from),"day"),o=(0,l.default)(e.to).isSame((0,l.default)(r.to),"day");if(a&&o)return t.shortLabel}return null},[]);(0,s.useEffect)(()=>{b(w(e))},[e,w]);let j=(0,s.useCallback)(()=>{if(!x||!k)return{isValid:!0,error:""};let e=(0,l.default)(x,"YYYY-MM-DD"),t=(0,l.default)(k,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[x,k])();(0,s.useEffect)(()=>{e.from&&v((0,l.default)(e.from).format("YYYY-MM-DD")),e.to&&y((0,l.default)(e.to).format("YYYY-MM-DD")),p(e)},[e]),(0,s.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&h(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let N=(0,s.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let r=e=>(0,l.default)(e).format("D MMM, HH:mm");return`${r(e)} - ${r(t)}`},[]),T=(0,s.useCallback)(e=>{let t;if(!e.from)return e;let r={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),r.from=a,r.to=t,r},[]),S=(0,s.useCallback)(()=>{try{if(x&&k&&j.isValid){let e=(0,l.default)(x,"YYYY-MM-DD").startOf("day"),t=(0,l.default)(k,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let r={from:e.toDate(),to:t.toDate()};p(r);let a=w(r);b(a)}}}catch(e){console.warn("Invalid date format:",e)}},[x,k,j.isValid,w]);return(0,s.useEffect)(()=>{S()},[S]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[c&&(0,t.jsx)(n.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:c}),(0,t.jsxs)("div",{className:"relative",ref:C,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>h(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:N(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-9999 min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:i.map(e=>{let r=f===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${r?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:r}=e.getValue();p({from:t,to:r}),b(e.shortLabel),v((0,l.default)(t).format("YYYY-MM-DD")),y((0,l.default)(r).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${r?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${r?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:x,onChange:e=>v(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!j.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:k,onChange:e=>y(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!j.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!j.isValid&&j.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:j.error})]})}),g.from&&g.to&&j.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,l.default)(g.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,l.default)(g.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(o.Button,{variant:"secondary",onClick:()=>{p(e),e.from&&v((0,l.default)(e.from).format("YYYY-MM-DD")),e.to&&y((0,l.default)(e.to).format("YYYY-MM-DD")),b(w(e)),h(!1)},children:"Cancel"}),(0,t.jsx)(o.Button,{onClick:()=>{g.from&&g.to&&j.isValid&&(d(g),requestIdleCallback(()=>{d(T(g))},{timeout:100}),h(!1))},disabled:!g.from||!g.to||!j.isValid,children:"Apply"})]})})]})]})})]})]})}])},567425,e=>{"use strict";var t=e.i(271645);let r=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],a={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};e.s(["usePaginatedDailyActivity",0,function({fetchFn:e,args:o,enabled:n}){let[l,s]=(0,t.useState)(a),[i,d]=(0,t.useState)(!1),[c,u]=(0,t.useState)(!1),[m,h]=(0,t.useState)({currentPage:0,totalPages:0}),[g,p]=(0,t.useState)(!1),f=(0,t.useRef)(0),b=(0,t.useRef)(!1),x=(0,t.useRef)(null),v=(0,t.useRef)(o);v.current=o;let k=JSON.stringify(o),y=(0,t.useCallback)(()=>{b.current=!0,p(!0),u(!1),null!==x.current&&(clearTimeout(x.current),x.current=null)},[]);return(0,t.useEffect)(()=>{if(!n){s(a),d(!1),u(!1),h({currentPage:0,totalPages:0}),p(!1);return}let t=++f.current;b.current=!1,p(!1);let o=()=>f.current!==t||b.current,l=e=>new Promise(t=>{x.current=setTimeout(()=>{x.current=null,t()},e)});return(async()=>{let t=v.current;d(!0),u(!1),h({currentPage:1,totalPages:1});try{let a=[...t.slice(0,3),1,...t.slice(3)],n=await e(...a);if(o())return;s(n);let i=n.metadata?.total_pages||1;if(h({currentPage:1,totalPages:i}),i<=1)return void d(!1);d(!1),u(!0);let c=[...n.results],m={...n.metadata};for(let a=2;a<=i;a++){if(o()||(await l(300),o()))return;let n=[...t.slice(0,3),a,...t.slice(3)],d=await e(...n);if(o())return;c=[...c,...d.results],(m=function(e,t){let a={...e};for(let o of r)a[o]=(e[o]||0)+(t[o]||0);return a}(m,d.metadata)).total_pages=i,m.has_more=a{f.current++,null!==x.current&&(clearTimeout(x.current),x.current=null)}},[n,e,k]),{data:l,loading:i,isFetchingMore:c,progress:m,cancelled:g,cancel:y}}])},992156,e=>{"use strict";var t=e.i(843476),r=e.i(487074),a=e.i(560445),o=e.i(653496),n=e.i(271645),l=e.i(952571);e.i(32117);var s=e.i(591025),i=e.i(343053),d=e.i(594772),c=e.i(325738),u=e.i(973499),m=e.i(973706),h=e.i(515288),g=e.i(337822),p=e.i(677572),f=e.i(602869),b=e.i(500330);let x=e=>`$${(0,b.formatNumberWithCommas)(e,e>0&&e<1?4:2)}`,v=e=>/claude|anthropic/i.test(e),k=()=>({alias:null,teamId:null,promptTokens:0,cacheReadTokens:0,cacheCreationTokens:0,realizedCachingSavings:0}),y=(e,t,r,a)=>({alias:e.alias??r,teamId:e.teamId??a,promptTokens:e.promptTokens+(t.prompt_tokens??0),cacheReadTokens:e.cacheReadTokens+(t.cache_read_input_tokens??0),cacheCreationTokens:e.cacheCreationTokens+(t.cache_creation_input_tokens??0),realizedCachingSavings:e.realizedCachingSavings+(t.prompt_caching_savings_spend??0)}),C=(e,t)=>t.reduce((e,t)=>({...e,[t]:0}),{date:e}),w=["Compression","Prompt caching"],j={by_tool:[],daily:[],start_date:null,end_date:null},N=["emerald","blue"],T=e=>new Date(`${e}T00:00:00`).toLocaleDateString("en-US",{month:"short",day:"numeric"}),S=e=>e.toISOString().slice(0,10),M=({label:e,value:r,hint:a,info:o})=>(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{className:"flex flex-row items-center justify-between space-y-0",children:[(0,t.jsx)(h.CardTitle,{className:"text-sm font-medium text-muted-foreground",children:e}),o&&(0,t.jsxs)(g.Popover,{children:[(0,t.jsx)(g.PopoverTrigger,{"aria-label":`How ${e.toLowerCase()} is calculated`,"data-testid":`summary-card-info-${e.toLowerCase().replace(/\s+/g,"-")}`,className:"cursor-pointer text-muted-foreground hover:text-foreground",children:(0,t.jsx)(l.Info,{className:"size-3.5"})}),(0,t.jsx)(g.PopoverContent,{align:"end",className:"w-64 text-sm text-muted-foreground",children:o})]})]}),(0,t.jsxs)(h.CardContent,{children:[(0,t.jsx)("p",{className:"text-2xl font-semibold text-foreground",children:r}),a&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a})]})]}),R=({accessToken:e,activity:r})=>{let{dateValue:a,onDateChange:o,results:l,loading:g,isFetchingMore:v}=r,k=a.from??null,y=a.to??null,R=!!e&&!!k&&!!y,_=k&&y?`${S(k)}|${S(y)}`:"",[D,E]=(0,n.useState)(null);(0,n.useEffect)(()=>{if(!e||!k||!y)return;let t=!1;return(0,f.getToolSpend)(e,S(k),S(y)).then(e=>{t||E({key:_,data:e})}).catch(()=>{t||E({key:_,data:j})}),()=>{t=!0}},[e,k,y,_]);let L=D?.key===_?D.data:null,P=R&&null===L,I=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.compression_savings_spend??0),0),[l]),O=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.prompt_caching_savings_spend??0),0),[l]),z=(0,n.useMemo)(()=>l.reduce((e,t)=>e+(t.metrics.compression_saved_tokens??0),0),[l]),A=I+O,[Y,H]=(0,n.useState)("cumulative"),F=(0,n.useMemo)(()=>[...l].sort((e,t)=>e.date.localeCompare(t.date)).map(e=>({date:T(e.date),Compression:e.metrics.compression_savings_spend??0,"Prompt caching":e.metrics.prompt_caching_savings_spend??0})),[l]),B=(0,n.useMemo)(()=>{let e;if("cumulative"!==Y)return F;let t=k?T(`${k.getFullYear()}-${String(k.getMonth()+1).padStart(2,"0")}-${String(k.getDate()).padStart(2,"0")}`):"";return e=F.reduce((e,t)=>{let r=e[e.length-1];return[...e,{date:t.date,Compression:(r?.Compression??0)+t.Compression,"Prompt caching":(r?.["Prompt caching"]??0)+t["Prompt caching"]}]},[]),0===e.length?[...e]:[{date:t,Compression:0,"Prompt caching":0},...e]},[Y,F,k]),V="Per day",W=((e,t)=>{if(!e||!t)return"";let r=e=>e.toLocaleDateString("en-US",{month:"short",day:"numeric"}),a=r(e),o=r(t);return a===o?a:`${a} – ${o}`})(k??void 0,y??void 0),$=["cumulative"===Y?"Running total saved":`Saved ${V.toLowerCase()}`,W].filter(Boolean).join(" · "),q=(0,n.useMemo)(()=>[{driver:"Compression",usd:I},{driver:"Prompt caching",usd:O}].filter(e=>e.usd>0),[I,O]),K=(0,n.useMemo)(()=>((e,t=8)=>[...e].sort((e,t)=>t.spend-e.spend).slice(0,t))(L?.by_tool??[]),[L]),U=(0,n.useMemo)(()=>K.map(e=>e.tool_name),[K]),G=(0,n.useMemo)(()=>K.map(e=>({tool_name:e.tool_name,spend:e.spend})),[K]),X=(0,n.useMemo)(()=>((e,t)=>{let r=new Set(t),a=new Map;for(let o of e){if(!r.has(o.tool_name))continue;let e=a.get(o.date)??C(o.date,t);e[o.tool_name]=(Number(e[o.tool_name])||0)+o.spend,a.set(o.date,e)}return[...a.values()].sort((e,t)=>e.date.localeCompare(t.date))})(L?.daily??[],U).map(e=>({...e,date:T(String(e.date))})),[L,U]),J=(0,n.useMemo)(()=>u.SEQUENTIAL_COLOR_RAMP.slice(0,Math.max(U.length,1)),[U]);return(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-4",children:(0,t.jsx)(m.default,{value:a,onValueChange:o})}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3",children:[(0,t.jsx)(M,{label:"Total saved",value:x(A),hint:g||v?"Loading...":"Compression + prompt caching"}),(0,t.jsx)(M,{label:"Compression savings",value:x(I),hint:`${(0,b.formatNumberWithCommas)(z)} tokens compressed`,info:"Tokens Headroom removed before the call, priced at the model's input rate."}),(0,t.jsx)(M,{label:"Prompt caching savings",value:x(O),hint:"Cache read discount",info:"Tokens the provider served from cache, priced at the discount between the input and cache-read rates."})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,t.jsxs)(h.Card,{className:"lg:col-span-2",children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(h.CardTitle,{children:"Savings"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:$})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)(d.CustomLegend,{categories:w,colors:N}),(0,t.jsx)(p.Tabs,{value:Y,onValueChange:e=>H(e),children:(0,t.jsxs)(p.TabsList,{children:[(0,t.jsx)(p.TabsTrigger,{value:"cumulative",children:"Cumulative"}),(0,t.jsx)(p.TabsTrigger,{value:"per-interval",children:V})]})})]})]})}),(0,t.jsx)(h.CardContent,{children:"cumulative"===Y?(0,t.jsx)(s.AreaChart,{data:B,index:"date",categories:w,colors:N,valueFormatter:x,showLegend:!1,showDots:B.length<=31}):(0,t.jsx)(i.BarChart,{data:B,index:"date",categories:w,colors:N,stack:!0,valueFormatter:x,showLegend:!1})})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Savings by driver"})}),(0,t.jsx)(h.CardContent,{children:(0,t.jsx)(c.DonutChart,{className:"h-80",data:q,index:"driver",category:"usd",colors:["emerald","blue"],valueFormatter:x,showLabel:!0,label:x(A)})})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{children:[(0,t.jsx)(h.CardTitle,{children:"Spend by tool"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Spend on requests that invoked each tool (MCP and client-side tools); declaring a tool without invoking it does not count. A request that invoked multiple tools counts its full spend toward each, so this attributes rather than partitions spend."})]}),(0,t.jsx)(h.CardContent,{children:0===K.length?(0,t.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:P?"Loading...":"No tool usage in this range."}):(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Total by tool"}),(0,t.jsx)(i.BarChart,{data:G,index:"tool_name",categories:["spend"],colors:J,colorByDatum:!0,layout:"vertical",yAxisWidth:140,maxBarSize:64,showLegend:!1,valueFormatter:x})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"mb-2 text-sm font-medium text-muted-foreground",children:"Daily spend by tool"}),(0,t.jsx)(d.CustomLegend,{categories:U,colors:J}),(0,t.jsx)(i.BarChart,{data:X,index:"date",categories:U,colors:J,stack:!0,maxBarSize:64,valueFormatter:x,showLegend:!1})]})]})})]})]})};var _=e.i(464571),D=e.i(808613),E=e.i(311451),L=e.i(790848),P=e.i(727749);let I="headroom",O=e=>(e.litellm_params?.guardrail??"").toLowerCase()===I,z=({accessToken:e})=>{let[r]=D.Form.useForm(),[a,o]=(0,n.useState)([]),[l,s]=(0,n.useState)(!0),[i,d]=(0,n.useState)(!1),c=(0,n.useCallback)(()=>{e&&(0,f.getGuardrailsList)(e).then(e=>o((e.guardrails??[]).filter(O))).catch(e=>{console.error("Failed to load compression guardrails:",e),P.default.fromBackend("Failed to load compression guardrails")}).finally(()=>s(!1))},[e]);(0,n.useEffect)(()=>{c()},[c]);let u=async t=>{if(e){d(!0);try{let a;await (0,f.createGuardrailCall)(e,{guardrail_name:(a={name:t.name,apiBase:t.apiBase,defaultOn:t.defaultOn??!0}).name.trim(),litellm_params:{guardrail:I,mode:"pre_call",api_base:a.apiBase.trim(),default_on:a.defaultOn}}),P.default.success("Compression guardrail created"),r.resetFields(),await c()}catch(e){console.error("Failed to create compression guardrail:",e),P.default.fromBackend("Failed to create compression guardrail")}finally{d(!1)}}};return(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Headroom prompt compression"})}),(0,t.jsxs)(h.CardContent,{children:[(0,t.jsxs)("p",{className:"mb-4 text-sm text-muted-foreground",children:["Headroom is a native LiteLLM guardrail that compresses your prompts before they reach the model, so you pay for fewer input tokens. The tokens it removes are priced and shown on the Usage tab as compression savings."," ",(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/headroom",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"Headroom setup docs"})]}),l&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),!l&&0===a.length&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No prompt compression guardrails configured yet. Add one below to start saving on input tokens"}),!l&&a.length>0&&(0,t.jsx)("ul",{className:"divide-y divide-gray-200",children:a.map(e=>(0,t.jsxs)("li",{className:"flex items-center justify-between py-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-foreground",children:e.guardrail_name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.litellm_params?.api_base??""})]}),(0,t.jsx)("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${e.litellm_params?.default_on?"bg-emerald-100 text-emerald-800":"bg-gray-100 text-gray-600"}`,children:e.litellm_params?.default_on?"Always on":"Opt-in"})]},e.guardrail_id))})]})]}),(0,t.jsxs)(h.Card,{children:[(0,t.jsx)(h.CardHeader,{children:(0,t.jsx)(h.CardTitle,{children:"Add Headroom compression guardrail"})}),(0,t.jsx)(h.CardContent,{children:(0,t.jsxs)(D.Form,{form:r,layout:"vertical",requiredMark:!1,onFinish:u,initialValues:{defaultOn:!0},children:[(0,t.jsx)(D.Form.Item,{name:"name",label:"Name",rules:[{required:!0,message:"Name is required"}],children:(0,t.jsx)(E.Input,{placeholder:"headroom-compression"})}),(0,t.jsx)(D.Form.Item,{name:"apiBase",label:"Headroom API base",tooltip:"Base URL of your Headroom compression service (LiteLLM calls its /v1/compress endpoint)",extra:"The URL where your Headroom compression service is hosted",rules:[{required:!0,message:"API base is required"}],children:(0,t.jsx)(E.Input,{placeholder:"https://your-headroom-endpoint"})}),(0,t.jsx)(D.Form.Item,{name:"defaultOn",label:"Apply to all requests",valuePropName:"checked",children:(0,t.jsx)(L.Switch,{})}),(0,t.jsx)("div",{className:"mb-4 rounded-lg border border-yellow-200 bg-yellow-50 p-3",children:(0,t.jsxs)("p",{className:"text-sm text-yellow-800",children:["Applying compression to all requests is available to all users. Enabling it selectively per key or team is a LiteLLM Enterprise feature. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"})]})}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(_.Button,{type:"primary",htmlType:"submit",loading:i,children:"Add guardrail"})})]})})]})]})};var A=e.i(69509);let Y=({accessToken:e,userRole:r})=>{let[a]=D.Form.useForm();return e?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)(A.default,{form:a,handleOk:()=>a.resetFields(),accessToken:e,userRole:r})}):null};var H=e.i(863679),F=e.i(425063),B=e.i(475254);let V=(0,B.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]),W=(0,B.default)("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);var $=e.i(784774),q=e.i(746798);let K={uncachedPromptTokens:"desc",cacheHitRatio:"asc",potentialSavings:"desc"},U=({info:e})=>(0,t.jsxs)(q.Tooltip,{children:[(0,t.jsx)(q.TooltipTrigger,{render:(0,t.jsx)("span",{className:"inline-flex","aria-label":e}),children:(0,t.jsx)(l.Info,{className:"h-3 w-3 text-gray-400"})}),(0,t.jsx)(q.TooltipContent,{className:"max-w-xs",children:e})]}),G=({column:e,label:r,info:a,sort:o,onSort:n})=>{let l=o.column===e,s="asc"===o.dir?V:F.ArrowDown;return(0,t.jsx)($.TableHead,{className:"text-right",children:(0,t.jsxs)("span",{className:"inline-flex items-center justify-end gap-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),"aria-label":`Sort by ${r}`,className:"inline-flex items-center gap-1 font-medium hover:text-foreground",children:[r,(0,t.jsx)(l?s:W,{className:`h-3 w-3 ${l?"text-foreground":"text-gray-400"}`})]}),(0,t.jsx)(U,{info:a})]})})},X=({activity:e})=>{let{dateValue:r,onDateChange:a,results:o,loading:l,isFetchingMore:s}=e,[i,d]=(0,n.useState)("key"),[c,u]=(0,n.useState)({column:"potentialSavings",dir:"desc"}),g=(0,n.useMemo)(()=>((e,t="key",r=10)=>{let a="model"===t?(e=>{let t=new Map;for(let r of e)for(let[e,a]of Object.entries(r.breakdown?.models??{})){if(!v(e))continue;let r=t.get(e)??k();t.set(e,y(r,a.metrics,null,null))}return t})(e):(e=>{let t=new Map;for(let r of e)for(let[e,a]of Object.entries(r.breakdown?.api_keys??{})){let r=t.get(e)??k();t.set(e,y(r,a.metrics,a.metadata?.key_alias??null,a.metadata?.team_id??null))}return t})(e),o=[...a.values()].reduce((e,t)=>({cacheReadTokens:e.cacheReadTokens+t.cacheReadTokens,realizedCachingSavings:e.realizedCachingSavings+t.realizedCachingSavings}),{cacheReadTokens:0,realizedCachingSavings:0}),n=o.cacheReadTokens>0?o.realizedCachingSavings/o.cacheReadTokens:null;return{rows:[...a.entries()].map(([e,r])=>{let a=Math.max(0,r.promptTokens-r.cacheReadTokens-r.cacheCreationTokens);return{id:e,label:"model"===t?e:r.alias??`${e.slice(0,8)}...`,sublabel:"model"===t?null:r.teamId,uncachedPromptTokens:a,cacheHitRatio:r.promptTokens>0?r.cacheReadTokens/r.promptTokens:0,potentialSavings:null!=n?a*n:null}}).filter(e=>e.uncachedPromptTokens>0).sort((e,t)=>null!=n?(t.potentialSavings??0)-(e.potentialSavings??0):t.uncachedPromptTokens-e.uncachedPromptTokens).slice(0,r),discountPerToken:n}})(o,i),[o,i]),f=(0,n.useMemo)(()=>[...g.rows].sort((e,t)=>{let r,a;return r=e[c.column],a=t[c.column],null==r&&null==a?0:null==r?1:null==a?-1:"asc"===c.dir?r-a:a-r}),[g.rows,c]),C=e=>u(t=>t.column===e?{column:e,dir:"asc"===t.dir?"desc":"asc"}:{column:e,dir:K[e]}),w="model"===i?"Models":"Keys",j="model"===i?"Model":"Key",N="model"===i?"model":"key";return(0,t.jsx)(q.TooltipProvider,{delay:300,children:(0,t.jsxs)(h.Card,{children:[(0,t.jsxs)(h.CardHeader,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-start md:justify-between",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)(h.CardTitle,{children:["Cache leakage by ","model"===i?"model":"virtual key"]}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground line-clamp-2",children:[w," sending large volumes of uncached input with a low cache hit rate are likely missing prompt caching. Potential savings is approximate: uncached input priced at the realized cache-read discount."]})]}),(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(m.default,{value:r,onValueChange:a})})]}),(0,t.jsx)(p.Tabs,{value:i,onValueChange:e=>d("model"===e?"model":"key"),children:(0,t.jsxs)(p.TabsList,{children:[(0,t.jsx)(p.TabsTrigger,{value:"key",children:"By virtual key"}),(0,t.jsx)(p.TabsTrigger,{value:"model",children:"By model"})]})})]}),(0,t.jsx)(h.CardContent,{children:0===f.length?(0,t.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:l||s?"Loading...":`No ${N} usage in this range.`}):(0,t.jsxs)($.Table,{children:[(0,t.jsx)($.TableHeader,{children:(0,t.jsxs)($.TableRow,{children:[(0,t.jsx)($.TableHead,{children:j}),(0,t.jsx)(G,{column:"uncachedPromptTokens",label:"Uncached input tokens",info:"Input tokens you sent in this range that weren't served from or written to the cache",sort:c,onSort:C}),(0,t.jsx)(G,{column:"cacheHitRatio",label:"Cache hit rate",info:"Share of your input tokens that were served from the cache",sort:c,onSort:C}),(0,t.jsx)(G,{column:"potentialSavings",label:"Potential savings",info:"About how much you'd save if this uncached input used prompt caching. Estimated as uncached input tokens times the per-token discount your cached traffic already gets (realized cache savings ÷ cache-read tokens).",sort:c,onSort:C})]})}),(0,t.jsx)($.TableBody,{children:f.map(e=>{let r;return(0,t.jsxs)($.TableRow,{children:[(0,t.jsxs)($.TableCell,{className:"font-medium",children:[e.label,e.sublabel&&(0,t.jsxs)("span",{className:"ml-1 text-xs text-muted-foreground",children:["(",e.sublabel,")"]})]}),(0,t.jsx)($.TableCell,{className:"text-right",children:(0,b.formatNumberWithCommas)(e.uncachedPromptTokens)}),(0,t.jsx)($.TableCell,{className:"text-right",children:(r=e.cacheHitRatio,`${(0,b.formatNumberWithCommas)(100*r,1)}%`)}),(0,t.jsx)($.TableCell,{className:"text-right",children:null==e.potentialSavings?"—":x(e.potentialSavings)})]},e.id)})})]})})]})})},J=({accessToken:e,activity:r})=>{let[a,o]=(0,n.useState)([]),l=(0,n.useCallback)(()=>{e&&(0,f.getGeneralSettingsCall)(e).then(e=>o(e)).catch(e=>{console.error("Failed to load prompt caching settings:",e),P.default.fromBackend("Failed to load prompt caching settings")})},[e]);return((0,n.useEffect)(()=>{l()},[l]),e)?(0,t.jsxs)("div",{className:"w-full space-y-6",children:[(0,t.jsx)(H.PromptCachingPanel,{accessToken:e,settings:a,onChange:(e,t)=>{o(r=>r.map(r=>r.field_name===e?{...r,field_value:t}:r))}}),(0,t.jsx)(X,{activity:r})]}):null};var Q=e.i(708347),Z=e.i(567425);let ee=({accessToken:e,userId:l,userRole:s})=>{let i=((e,t,r)=>{let a=(0,n.useMemo)(()=>new Date(new Date().getTime()-2592e6),[]),o=(0,n.useMemo)(()=>new Date,[]),[l,s]=(0,n.useState)({from:a,to:o}),i=l.from??null,d=l.to??null,c=Q.all_admin_roles.includes(r)?null:t,{data:u,loading:m,isFetchingMore:h}=(0,Z.usePaginatedDailyActivity)({fetchFn:f.userDailyActivityCall,args:[e,i,d,c],enabled:!!e&&!!i&&!!d});return{dateValue:l,onDateChange:s,results:u.results,loading:m,isFetchingMore:h}})(e,l,s),d=[{key:"usage",label:"Usage",children:(0,t.jsx)(R,{accessToken:e,activity:i})},{key:"compression",label:"Prompt Compression",children:(0,t.jsx)(z,{accessToken:e})},{key:"autorouter",label:"Autorouter",children:(0,t.jsx)(Y,{accessToken:e,userId:l,userRole:s})},{key:"caching",label:"Prompt Caching",children:(0,t.jsx)(J,{accessToken:e,activity:i})}];return(0,t.jsxs)("div",{className:"w-full space-y-6 p-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.PiggyBank,{className:"size-6 text-emerald-600",strokeWidth:1.75}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-foreground",children:"Cost Optimization"})]}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"Track and configure the mechanisms that save you money: prompt compression, prompt caching, and auto routing"})]}),(0,t.jsx)(a.Alert,{type:"info",showIcon:!0,message:"This is an experimental dashboard",description:(0,t.jsxs)("span",{children:["Have feedback? Join the discussion"," ",(0,t.jsx)("a",{href:"https://github.com/BerriAI/litellm/discussions/32172",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline",children:"here"})]})}),(0,t.jsx)(o.Tabs,{defaultActiveKey:"usage",items:d})]})};var et=e.i(135214);e.s(["default",0,function(){let{accessToken:e,userId:r,userRole:a}=(0,et.default)();return(0,t.jsx)(ee,{accessToken:e,userId:r,userRole:a})}],992156)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/11f7pk3f8kvvz.js b/litellm/proxy/_experimental/out/_next/static/chunks/11f7pk3f8kvvz.js new file mode 100644 index 00000000000..ee754fcf6fe --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/11f7pk3f8kvvz.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let l=r.forwardRef(({className:e,size:r="default",...l},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...l}));l.displayName="Card";let o=r.forwardRef(({className:e,...r},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));o.displayName="CardHeader";let s=r.forwardRef(({className:e,...r},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));s.displayName="CardTitle";let n=r.forwardRef(({className:e,...r},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));n.displayName="CardDescription";let i=r.forwardRef(({className:e,...r},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));i.displayName="CardAction";let d=r.forwardRef(({className:e,...r},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,l,"CardAction",0,i,"CardContent",0,d,"CardDescription",0,n,"CardFooter",0,c,"CardHeader",0,o,"CardTitle",0,s])},362024,e=>{"use strict";var t=e.i(988122);e.s(["Collapse",()=>t.default])},240647,e=>{"use strict";var t=e.i(286612);e.s(["RightOutlined",()=>t.default])},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},768371,e=>{"use strict";let t,r;var a=e.i(247167);let l=/\{[^{}]+\}/g;function o(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function s(e,t,r){if(!t||"object"!=typeof t)return"";let a=[],l={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)a.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let l=a.join(",");switch(r.style){case"form":return`${e}=${l}`;case"label":return`.${l}`;case"matrix":return`;${e}=${l}`;default:return l}}for(let l in t){let s="deepObject"===r.style?`${e}[${l}]`:l;a.push(o(s,t[l],r))}let s=a.join(l);return"label"===r.style||"matrix"===r.style?`${l}${s}`:s}function n(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",l=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(a);switch(r.style){case"simple":return l;case"label":return`.${l}`;case"matrix":return`;${e}=${l}`;default:return`${e}=${l}`}}let a={simple:",",label:".",matrix:";"}[r.style]||"&",l=[];for(let a of t)"simple"===r.style||"label"===r.style?l.push(!0===r.allowReserved?a:encodeURIComponent(a)):l.push(o(e,a,r));return"label"===r.style||"matrix"===r.style?`${a}${l.join(a)}`:l.join(a)}function i(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let a in t){let l=t[a];if(null!=l){if(Array.isArray(l)){if(0===l.length)continue;r.push(n(a,l,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof l){r.push(s(a,l,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(o(a,l,e))}}return r.join("&")}}function d(e,t){let r=e;for(let a of e.match(l)??[]){let e=a.substring(1,a.length-1),l=!1,i="simple";if(e.endsWith("*")&&(l=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(i="label",e=e.substring(1)):e.startsWith(";")&&(i="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let d=t[e];if(Array.isArray(d)){r=r.replace(a,n(e,d,{style:i,explode:l}));continue}if("object"==typeof d){r=r.replace(a,s(e,d,{style:i,explode:l}));continue}if("matrix"===i){r=r.replace(a,`;${o(e,d)}`);continue}r=r.replace(a,"label"===i?`.${encodeURIComponent(d)}`:encodeURIComponent(d))}return r}function c(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function u(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,a]of r instanceof Headers?r.entries():Object.entries(r))if(null===a)t.delete(e);else if(Array.isArray(a))for(let r of a)t.append(e,r);else void 0!==a&&t.set(e,a);return t}function m(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var f=e.i(954616),h=e.i(621482),g=e.i(869230),p=e.i(469637),b=e.i(254440),x=e.i(266027),v=e.i(431703),y=e.i(97198);let w=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),j=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:l=globalThis.fetch,querySerializer:o,bodySerializer:s,pathSerializer:n,headers:f,requestInitExt:h,...g}={...e};h="object"==typeof a.default&&Number.parseInt(a.default?.versions?.node?.substring(0,2))>=18&&a.default.versions.undici?h:void 0,t=m(t);let p=[];async function b(e,a){var b,x;let v,y,w,j,N,{baseUrl:C,fetch:k=l,Request:S=r,headers:R,params:M={},parseAs:E="json",querySerializer:$,bodySerializer:T=s??c,pathSerializer:D,body:_,middleware:O=[],...P}=a||{},H=t;C&&(H=m(C)??t);let z="function"==typeof o?o:i(o);$&&(z="function"==typeof $?$:i({..."object"==typeof o?o:{},...$}));let L=D||n||d,Y=void 0===_?void 0:T(_,u(f,R,M.header)),A=u(void 0===Y||Y instanceof FormData?{}:{"Content-Type":"application/json"},f,R,M.header),V=[...p,...O],I={redirect:"follow",...g,...P,body:Y,headers:A},q=new S((b=e,x={baseUrl:H,params:M,querySerializer:z,pathSerializer:L},v=`${x.baseUrl}${b}`,x.params?.path&&(v=x.pathSerializer(v,x.params.path)),(y=x.querySerializer(x.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(v+=`?${y}`),v),I);for(let e in P)e in q||(q[e]=P[e]);if(V.length){for(let t of(w=Math.random().toString(36).slice(2,11),j=Object.freeze({baseUrl:H,fetch:k,parseAs:E,querySerializer:z,bodySerializer:T,pathSerializer:L}),V))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:q,schemaPath:e,params:M,options:j,id:w});if(r)if(r instanceof S)q=r;else if(r instanceof Response){N=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!N){try{N=await k(q,h)}catch(r){let t=r;if(V.length)for(let r=V.length-1;r>=0;r--){let a=V[r];if(a&&"object"==typeof a&&"function"==typeof a.onError){let r=await a.onError({request:q,error:t,schemaPath:e,params:M,options:j,id:w});if(r){if(r instanceof Response){t=void 0,N=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(V.length)for(let t=V.length-1;t>=0;t--){let r=V[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:q,response:N,schemaPath:e,params:M,options:j,id:w});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");N=t}}}}let B=N.headers.get("Content-Length");if(204===N.status||"HEAD"===q.method||"0"===B&&!N.headers.get("Transfer-Encoding")?.includes("chunked"))return N.ok?{data:void 0,response:N}:{error:void 0,response:N};if(N.ok){let e=async()=>{if("stream"===E)return N.body;if("json"===E&&!B){let e=await N.text();return e?JSON.parse(e):void 0}return await N[E]()};return{data:await e(),response:N}}let F=await N.text();try{F=JSON.parse(F)}catch{}return{error:F,response:N}}return{request:(e,t,r)=>b(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>b(e,{...t,method:"GET"}),PUT:(e,t)=>b(e,{...t,method:"PUT"}),POST:(e,t)=>b(e,{...t,method:"POST"}),DELETE:(e,t)=>b(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>b(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>b(e,{...t,method:"HEAD"}),PATCH:(e,t)=>b(e,{...t,method:"PATCH"}),TRACE:(e,t)=>b(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");p.push(t)}},eject(...e){for(let t of e){let e=p.indexOf(t);-1!==e&&p.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});j.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await w(e,((e,t)=>{let{pathname:r,search:a}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${a}`})(e.url,t)):e,a=(0,y.getAuthToken)();return a&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${a}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),a=r;try{a=JSON.parse(r),t=(0,v.deriveErrorMessage)(a)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new v.ApiError(t,e.status,a)}});let N=(t=async({queryKey:[e,t,r],signal:a})=>{let l=j[e.toUpperCase()],{data:o,error:s,response:n}=await l(t,{signal:a,...r});if(s)throw s;return 204===n.status||"0"===n.headers.get("Content-Length")?o??null:o},{queryOptions:r=(e,r,...[a,l])=>({queryKey:void 0===a?[e,r]:[e,r,a],queryFn:t,...l}),useQuery:(e,t,...[a,l,o])=>(0,x.useQuery)(r(e,t,a,l),o),useSuspenseQuery:(e,t,...[a,l,o])=>{var s;return s=r(e,t,a,l),(0,p.useBaseQuery)({...s,enabled:!0,suspense:!0,throwOnError:b.defaultThrowOnError,placeholderData:void 0},g.QueryObserver,o)},useInfiniteQuery:(e,t,a,l,o)=>{let{pageParamName:s="cursor",...n}=l,{queryKey:i}=r(e,t,a);return(0,h.useInfiniteQuery)({queryKey:i,queryFn:async({queryKey:[e,t,r],pageParam:a=0,signal:l})=>{let o=j[e.toUpperCase()],n={...r,signal:l,params:{...r?.params||{},query:{...r?.params?.query,[s]:a}}},{data:i,error:d}=await o(t,n);if(d)throw d;return i},...n},o)},useMutation:(e,t,r,a)=>(0,f.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let a=j[e.toUpperCase()],{data:l,error:o}=await a(t,r);if(o)throw o;return l},...r},a)});e.s(["$api",0,N,"fetchClient",0,j],768371)},560025,e=>{"use strict";e.i(247167);var t=e.i(271645),r=e.i(343794),a=e.i(931067),l=e.i(392221),o=e.i(703923),s=e.i(211577),n=e.i(209428),i=e.i(410160),d=e.i(914949),c=e.i(529681),u=e.i(611935),m=e.i(361275),f=e.i(174428),h=function(e,t){if(!e)return null;var r={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:r.top,bottom:r.bottom,height:r.height}:{left:r.left,right:r.right,width:r.width,top:0,bottom:0,height:0}},g=function(e){return void 0!==e?"".concat(e,"px"):void 0};function p(e){var a=e.prefixCls,o=e.containerRef,s=e.value,i=e.getValueIndex,d=e.motionName,c=e.onMotionStart,p=e.onMotionEnd,b=e.direction,x=e.vertical,v=void 0!==x&&x,y=t.useRef(null),w=t.useState(s),j=(0,l.default)(w,2),N=j[0],C=j[1],k=function(e){var t,r=i(e),l=null==(t=o.current)?void 0:t.querySelectorAll(".".concat(a,"-item"))[r];return(null==l?void 0:l.offsetParent)&&l},S=t.useState(null),R=(0,l.default)(S,2),M=R[0],E=R[1],$=t.useState(null),T=(0,l.default)($,2),D=T[0],_=T[1];(0,f.default)(function(){if(N!==s){var e=k(N),t=k(s),r=h(e,v),a=h(t,v);C(s),E(r),_(a),e&&t?c():p()}},[s]);var O=t.useMemo(function(){if(v){var e;return g(null!=(e=null==M?void 0:M.top)?e:0)}return"rtl"===b?g(-(null==M?void 0:M.right)):g(null==M?void 0:M.left)},[v,b,M]),P=t.useMemo(function(){if(v){var e;return g(null!=(e=null==D?void 0:D.top)?e:0)}return"rtl"===b?g(-(null==D?void 0:D.right)):g(null==D?void 0:D.left)},[v,b,D]);return M&&D?t.createElement(m.default,{visible:!0,motionName:d,motionAppear:!0,onAppearStart:function(){return v?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},onAppearActive:function(){return v?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},onVisibleChanged:function(){E(null),_(null),p()}},function(e,l){var o=e.className,s=e.style,i=(0,n.default)((0,n.default)({},s),{},{"--thumb-start-left":O,"--thumb-start-width":g(null==M?void 0:M.width),"--thumb-active-left":P,"--thumb-active-width":g(null==D?void 0:D.width),"--thumb-start-top":O,"--thumb-start-height":g(null==M?void 0:M.height),"--thumb-active-top":P,"--thumb-active-height":g(null==D?void 0:D.height)}),d={ref:(0,u.composeRef)(y,l),style:i,className:(0,r.default)("".concat(a,"-thumb"),o)};return t.createElement("div",d)}):null}var b=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"],x=function(e){var a=e.prefixCls,l=e.className,o=e.disabled,n=e.checked,i=e.label,d=e.title,c=e.value,u=e.name,m=e.onChange,f=e.onFocus,h=e.onBlur,g=e.onKeyDown,p=e.onKeyUp,b=e.onMouseDown;return t.createElement("label",{className:(0,r.default)(l,(0,s.default)({},"".concat(a,"-item-disabled"),o)),onMouseDown:b},t.createElement("input",{name:u,className:"".concat(a,"-item-input"),type:"radio",disabled:o,checked:n,onChange:function(e){o||m(e,c)},onFocus:f,onBlur:h,onKeyDown:g,onKeyUp:p}),t.createElement("div",{className:"".concat(a,"-item-label"),title:d},i))},v=t.forwardRef(function(e,m){var f,h=e.prefixCls,g=void 0===h?"rc-segmented":h,v=e.direction,y=e.vertical,w=e.options,j=void 0===w?[]:w,N=e.disabled,C=e.defaultValue,k=e.value,S=e.name,R=e.onChange,M=e.className,E=e.motionName,$=(0,o.default)(e,b),T=t.useRef(null),D=t.useMemo(function(){return(0,u.composeRef)(T,m)},[T,m]),_=t.useMemo(function(){return j.map(function(e){if("object"===(0,i.default)(e)&&null!==e){var t=function(e){if(void 0!==e.title)return e.title;if("object"!==(0,i.default)(e.label)){var t;return null==(t=e.label)?void 0:t.toString()}}(e);return(0,n.default)((0,n.default)({},e),{},{title:t})}return{label:null==e?void 0:e.toString(),title:null==e?void 0:e.toString(),value:e}})},[j]),O=(0,d.default)(null==(f=_[0])?void 0:f.value,{value:k,defaultValue:C}),P=(0,l.default)(O,2),H=P[0],z=P[1],L=t.useState(!1),Y=(0,l.default)(L,2),A=Y[0],V=Y[1],I=function(e,t){z(t),null==R||R(t)},q=(0,c.default)($,["children"]),B=t.useState(!1),F=(0,l.default)(B,2),U=F[0],K=F[1],W=t.useState(!1),G=(0,l.default)(W,2),Q=G[0],X=G[1],J=function(){X(!0)},Z=function(){X(!1)},ee=function(){K(!1)},et=function(e){"Tab"===e.key&&K(!0)},er=function(e){var t=_.findIndex(function(e){return e.value===H}),r=_.length,a=_[(t+e+r)%r];a&&(z(a.value),null==R||R(a.value))},ea=function(e){switch(e.key){case"ArrowLeft":case"ArrowUp":er(-1);break;case"ArrowRight":case"ArrowDown":er(1)}};return t.createElement("div",(0,a.default)({role:"radiogroup","aria-label":"segmented control",tabIndex:N?void 0:0,"aria-orientation":y?"vertical":"horizontal"},q,{className:(0,r.default)(g,(0,s.default)((0,s.default)((0,s.default)({},"".concat(g,"-rtl"),"rtl"===v),"".concat(g,"-disabled"),N),"".concat(g,"-vertical"),y),void 0===M?"":M),ref:D}),t.createElement("div",{className:"".concat(g,"-group")},t.createElement(p,{vertical:y,prefixCls:g,value:H,containerRef:T,motionName:"".concat(g,"-").concat(void 0===E?"thumb-motion":E),direction:v,getValueIndex:function(e){return _.findIndex(function(t){return t.value===e})},onMotionStart:function(){V(!0)},onMotionEnd:function(){V(!1)}}),_.map(function(e){return t.createElement(x,(0,a.default)({},e,{name:S,key:e.value,prefixCls:g,className:(0,r.default)(e.className,"".concat(g,"-item"),(0,s.default)((0,s.default)({},"".concat(g,"-item-selected"),e.value===H&&!A),"".concat(g,"-item-focused"),Q&&U&&e.value===H)),checked:e.value===H,onChange:I,onFocus:J,onBlur:Z,onKeyDown:ea,onKeyUp:et,onMouseDown:ee,disabled:!!N||!!e.disabled}))})))}),y=e.i(981444),w=e.i(242064),j=e.i(517455);e.i(296059);var N=e.i(915654),C=e.i(183293),k=e.i(246422),S=e.i(838378);function R(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function M(e){return{background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}let E=Object.assign({overflow:"hidden"},C.textEllipsis),$=(0,k.genStyleHooks)("Segmented",e=>{let{lineWidth:t,calc:r}=e;return(e=>{let{componentCls:t}=e,r=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),a=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),l=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,C.resetComponent)(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`}),(0,C.genFocusStyle)(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,N.unit)(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},M(e)),{color:e.itemSelectedColor}),"&-focused":(0,C.genFocusOutline)(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:r,lineHeight:(0,N.unit)(r),padding:`0 ${(0,N.unit)(e.segmentedPaddingHorizontal)}`},E),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},M(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,N.unit)(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:a,lineHeight:(0,N.unit)(a),padding:`0 ${(0,N.unit)(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:l,lineHeight:(0,N.unit)(l),padding:`0 ${(0,N.unit)(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),R(`&-disabled ${t}-item`,e)),R(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}})((0,S.mergeToken)(e,{segmentedPaddingHorizontal:r(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:r(e.controlPaddingHorizontalSM).sub(t).equal()}))},e=>{let{colorTextLabel:t,colorText:r,colorFillSecondary:a,colorBgElevated:l,colorFill:o,lineWidthBold:s,colorBgLayout:n}=e;return{trackPadding:s,trackBg:n,itemColor:t,itemHoverColor:r,itemHoverBg:a,itemSelectedBg:l,itemActiveBg:o,itemSelectedColor:r}});var T=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&0>t.indexOf(a)&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var l=0,a=Object.getOwnPropertySymbols(e);lt.indexOf(a[l])&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(r[a[l]]=e[a[l]]);return r};let D=t.forwardRef((e,a)=>{let l=(0,y.default)(),{prefixCls:o,className:s,rootClassName:n,block:i,options:d=[],size:c="middle",style:u,vertical:m,shape:f="default",name:h=l}=e,g=T(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:p,direction:b,className:x,style:N}=(0,w.useComponentConfig)("segmented"),C=p("segmented",o),[k,S,R]=$(C),M=(0,j.default)(c),E=t.useMemo(()=>d.map(e=>{if("object"==typeof e&&(null==e?void 0:e.icon)){let{icon:r,label:a}=e;return Object.assign(Object.assign({},T(e,["icon","label"])),{label:t.createElement(t.Fragment,null,t.createElement("span",{className:`${C}-item-icon`},r),a&&t.createElement("span",null,a))})}return e}),[d,C]),D=(0,r.default)(s,n,x,{[`${C}-block`]:i,[`${C}-sm`]:"small"===M,[`${C}-lg`]:"large"===M,[`${C}-vertical`]:m,[`${C}-shape-${f}`]:"round"===f},S,R),_=Object.assign(Object.assign({},N),u);return k(t.createElement(v,Object.assign({},g,{name:h,className:D,style:_,options:E,ref:a,prefixCls:C,direction:b,vertical:m})))});e.s(["Segmented",0,D],560025)},872934,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["ExportOutlined",0,o],872934)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[l,o]=(0,t.useState)(e);return[a?r:l,e=>{a||o(e)}]}])},793130,e=>{"use strict";var t=e.i(290571),r=e.i(783222),a=e.i(433336),l=e.i(271645),o=e.i(394487),s=e.i(503269),n=e.i(214520),i=e.i(746725),d=e.i(914189),c=e.i(144279),u=e.i(294316),m=e.i(601893),f=e.i(140721),h=e.i(942803),g=e.i(233538),p=e.i(694421),b=e.i(700020),x=e.i(35889),v=e.i(998348),y=e.i(722678);let w=(0,l.createContext)(null);w.displayName="GroupContext";let j=l.Fragment,N=Object.assign((0,b.forwardRefWithAs)(function(e,t){var j;let N=(0,l.useId)(),C=(0,h.useProvidedId)(),k=(0,m.useDisabled)(),{id:S=C||`headlessui-switch-${N}`,disabled:R=k||!1,checked:M,defaultChecked:E,onChange:$,name:T,value:D,form:_,autoFocus:O=!1,...P}=e,H=(0,l.useContext)(w),[z,L]=(0,l.useState)(null),Y=(0,l.useRef)(null),A=(0,u.useSyncRefs)(Y,t,null===H?null:H.setSwitch,L),V=(0,n.useDefaultValue)(E),[I,q]=(0,s.useControllable)(M,$,null!=V&&V),B=(0,i.useDisposables)(),[F,U]=(0,l.useState)(!1),K=(0,d.useEvent)(()=>{U(!0),null==q||q(!I),B.nextFrame(()=>{U(!1)})}),W=(0,d.useEvent)(e=>{if((0,g.isDisabledReactIssue7711)(e.currentTarget))return e.preventDefault();e.preventDefault(),K()}),G=(0,d.useEvent)(e=>{e.key===v.Keys.Space?(e.preventDefault(),K()):e.key===v.Keys.Enter&&(0,p.attemptSubmit)(e.currentTarget)}),Q=(0,d.useEvent)(e=>e.preventDefault()),X=(0,y.useLabelledBy)(),J=(0,x.useDescribedBy)(),{isFocusVisible:Z,focusProps:ee}=(0,r.useFocusRing)({autoFocus:O}),{isHovered:et,hoverProps:er}=(0,a.useHover)({isDisabled:R}),{pressed:ea,pressProps:el}=(0,o.useActivePress)({disabled:R}),eo=(0,l.useMemo)(()=>({checked:I,disabled:R,hover:et,focus:Z,active:ea,autofocus:O,changing:F}),[I,et,Z,ea,R,F,O]),es=(0,b.mergeProps)({id:S,ref:A,role:"switch",type:(0,c.useResolveButtonType)(e,z),tabIndex:-1===e.tabIndex?0:null!=(j=e.tabIndex)?j:0,"aria-checked":I,"aria-labelledby":X,"aria-describedby":J,disabled:R||void 0,autoFocus:O,onClick:W,onKeyUp:G,onKeyPress:Q},ee,er,el),en=(0,l.useCallback)(()=>{if(void 0!==V)return null==q?void 0:q(V)},[q,V]),ei=(0,b.useRender)();return l.default.createElement(l.default.Fragment,null,null!=T&&l.default.createElement(f.FormFields,{disabled:R,data:{[T]:D||"on"},overrides:{type:"checkbox",checked:I},form:_,onReset:en}),ei({ourProps:es,theirProps:P,slot:eo,defaultTag:"button",name:"Switch"}))}),{Group:function(e){var t;let[r,a]=(0,l.useState)(null),[o,s]=(0,y.useLabels)(),[n,i]=(0,x.useDescriptions)(),d=(0,l.useMemo)(()=>({switch:r,setSwitch:a}),[r,a]),c=(0,b.useRender)();return l.default.createElement(i,{name:"Switch.Description",value:n},l.default.createElement(s,{name:"Switch.Label",value:o,props:{htmlFor:null==(t=d.switch)?void 0:t.id,onClick(e){r&&(e.currentTarget instanceof HTMLLabelElement&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},l.default.createElement(w.Provider,{value:d},c({ourProps:{},theirProps:e,slot:{},defaultTag:j,name:"Switch.Group"}))))},Label:y.Label,Description:x.Description});var C=e.i(888288),k=e.i(95779),S=e.i(444755),R=e.i(673706),M=e.i(829087);let E=(0,R.makeClassName)("Switch"),$=l.default.forwardRef((e,r)=>{let{checked:a,defaultChecked:o=!1,onChange:s,color:n,name:i,error:d,errorMessage:c,disabled:u,required:m,tooltip:f,id:h}=e,g=(0,t.__rest)(e,["checked","defaultChecked","onChange","color","name","error","errorMessage","disabled","required","tooltip","id"]),p={bgColor:n?(0,R.getColorClassNames)(n,k.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",ringColor:n?(0,R.getColorClassNames)(n,k.colorPalette.ring).ringColor:"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"},[b,x]=(0,C.default)(o,a),[v,y]=(0,l.useState)(!1),{tooltipProps:w,getReferenceProps:j}=(0,M.useTooltip)(300);return l.default.createElement("div",{className:"flex flex-row items-center justify-start"},l.default.createElement(M.default,Object.assign({text:f},w)),l.default.createElement("div",Object.assign({ref:(0,R.mergeRefs)([r,w.refs.setReference]),className:(0,S.tremorTwMerge)(E("root"),"flex flex-row relative h-5")},g,j),l.default.createElement("input",{type:"checkbox",className:(0,S.tremorTwMerge)(E("input"),"absolute w-5 h-5 cursor-pointer left-0 top-0 opacity-0"),name:i,required:m,checked:b,onChange:e=>{e.preventDefault()}}),l.default.createElement(N,{checked:b,onChange:e=>{x(e),null==s||s(e)},disabled:u,className:(0,S.tremorTwMerge)(E("switch"),"w-10 h-5 group relative inline-flex shrink-0 cursor-pointer items-center justify-center rounded-tremor-full","focus:outline-none",u?"cursor-not-allowed":""),onFocus:()=>y(!0),onBlur:()=>y(!1),id:h},l.default.createElement("span",{className:(0,S.tremorTwMerge)(E("sr-only"),"sr-only")},"Switch ",b?"on":"off"),l.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(E("background"),b?p.bgColor:"bg-tremor-border dark:bg-dark-tremor-border","pointer-events-none absolute mx-auto h-3 w-9 rounded-tremor-full transition-colors duration-100 ease-in-out")}),l.default.createElement("span",{"aria-hidden":"true",className:(0,S.tremorTwMerge)(E("round"),b?(0,S.tremorTwMerge)(p.bgColor,"translate-x-5 border-tremor-background dark:border-dark-tremor-background"):"translate-x-0 bg-tremor-border dark:bg-dark-tremor-border border-tremor-background dark:border-dark-tremor-background","pointer-events-none absolute left-0 inline-block h-5 w-5 transform rounded-tremor-full border-2 shadow-tremor-input duration-100 ease-in-out transition",v?(0,S.tremorTwMerge)("ring-2",p.ringColor):"")}))),d&&c?l.default.createElement("p",{className:(0,S.tremorTwMerge)(E("errorMessage"),"text-sm text-red-500 mt-1 ")},c):null)});$.displayName="Switch",e.s(["Switch",0,$],793130)},418371,e=>{"use strict";var t=e.i(843476),r=e.i(174553);e.s(["ProviderLogo",0,({provider:e,className:a="w-4 h-4"})=>(0,t.jsx)(r.Logo,{provider:e,className:a})])},497650,e=>{"use strict";var t=e.i(309821);e.s(["Progress",()=>t.default])},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let r=t.find(t=>t.team_id===e);return r?r.team_alias:null}])},289793,e=>{"use strict";var t=e.i(602869),r=e.i(266027),a=e.i(243652),l=e.i(708347),o=e.i(135214);let s=(0,a.createQueryKeys)("agents");e.s(["useAgents",0,()=>{let{accessToken:e,userRole:a}=(0,o.default)();return(0,r.useQuery)({queryKey:s.list({}),queryFn:async()=>await (0,t.getAgentsList)(e),enabled:!!e&&l.all_admin_roles.includes(a||"")})}])},366283,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(95779),l=e.i(444755),o=e.i(673706);let s=(0,o.makeClassName)("Callout"),n=r.default.forwardRef((e,n)=>{let{title:i,icon:d,color:c,className:u,children:m}=e,f=(0,t.__rest)(e,["title","icon","color","className","children"]);return r.default.createElement("div",Object.assign({ref:n,className:(0,l.tremorTwMerge)(s("root"),"flex flex-col overflow-hidden rounded-tremor-default text-tremor-default border-l-4 py-3 pr-3 pl-4",c?(0,l.tremorTwMerge)((0,o.getColorClassNames)(c,a.colorPalette.background).bgColor,(0,o.getColorClassNames)(c,a.colorPalette.darkBorder).borderColor,(0,o.getColorClassNames)(c,a.colorPalette.darkText).textColor,"dark:bg-opacity-10 bg-opacity-10"):(0,l.tremorTwMerge)("bg-tremor-brand-faint border-tremor-brand-emphasis text-tremor-brand-emphasis","dark:bg-dark-tremor-brand-muted/70 dark:border-dark-tremor-brand-emphasis dark:text-dark-tremor-brand-emphasis"),u)},f),r.default.createElement("div",{className:(0,l.tremorTwMerge)(s("header"),"flex items-start")},d?r.default.createElement(d,{className:(0,l.tremorTwMerge)(s("icon"),"flex-none h-5 w-5 mr-1.5")}):null,r.default.createElement("h4",{className:(0,l.tremorTwMerge)(s("title"),"font-semibold")},i)),r.default.createElement("p",{className:(0,l.tremorTwMerge)(s("body"),"overflow-y-auto",m?"mt-2":"")},m))});n.displayName="Callout",e.s(["Callout",0,n],366283)},232164,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M483.2 790.3L861.4 412c1.7-1.7 2.5-4 2.3-6.3l-25.5-301.4c-.7-7.8-6.8-13.9-14.6-14.6L522.2 64.3c-2.3-.2-4.7.6-6.3 2.3L137.7 444.8a8.03 8.03 0 000 11.3l334.2 334.2c3.1 3.2 8.2 3.2 11.3 0zm62.6-651.7l224.6 19 19 224.6L477.5 694 233.9 450.5l311.9-311.9zm60.16 186.23a48 48 0 1067.88-67.89 48 48 0 10-67.88 67.89zM889.7 539.8l-39.6-39.5a8.03 8.03 0 00-11.3 0l-362 361.3-237.6-237a8.03 8.03 0 00-11.3 0l-39.6 39.5a8.03 8.03 0 000 11.3l243.2 242.8 39.6 39.5c3.1 3.1 8.2 3.1 11.3 0l407.3-406.6c3.1-3.1 3.1-8.2 0-11.3z"}}]},name:"tags",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["TagsOutlined",0,o],232164)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),a=e.i(266027);let l=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:o}=(0,t.default)();return(0,a.useQuery)({queryKey:l.detail(o),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&o)})}])},160818,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.4 800.9c.2-.3.5-.6.7-.9C920.6 722.1 960 621.7 960 512s-39.4-210.1-104.8-288c-.2-.3-.5-.5-.7-.8-1.1-1.3-2.1-2.5-3.2-3.7-.4-.5-.8-.9-1.2-1.4l-4.1-4.7-.1-.1c-1.5-1.7-3.1-3.4-4.6-5.1l-.1-.1c-3.2-3.4-6.4-6.8-9.7-10.1l-.1-.1-4.8-4.8-.3-.3c-1.5-1.5-3-2.9-4.5-4.3-.5-.5-1-1-1.6-1.5-1-1-2-1.9-3-2.8-.3-.3-.7-.6-1-1C736.4 109.2 629.5 64 512 64s-224.4 45.2-304.3 119.2c-.3.3-.7.6-1 1-1 .9-2 1.9-3 2.9-.5.5-1 1-1.6 1.5-1.5 1.4-3 2.9-4.5 4.3l-.3.3-4.8 4.8-.1.1c-3.3 3.3-6.5 6.7-9.7 10.1l-.1.1c-1.6 1.7-3.1 3.4-4.6 5.1l-.1.1c-1.4 1.5-2.8 3.1-4.1 4.7-.4.5-.8.9-1.2 1.4-1.1 1.2-2.1 2.5-3.2 3.7-.2.3-.5.5-.7.8C103.4 301.9 64 402.3 64 512s39.4 210.1 104.8 288c.2.3.5.6.7.9l3.1 3.7c.4.5.8.9 1.2 1.4l4.1 4.7c0 .1.1.1.1.2 1.5 1.7 3 3.4 4.6 5l.1.1c3.2 3.4 6.4 6.8 9.6 10.1l.1.1c1.6 1.6 3.1 3.2 4.7 4.7l.3.3c3.3 3.3 6.7 6.5 10.1 9.6 80.1 74 187 119.2 304.5 119.2s224.4-45.2 304.3-119.2a300 300 0 0010-9.6l.3-.3c1.6-1.6 3.2-3.1 4.7-4.7l.1-.1c3.3-3.3 6.5-6.7 9.6-10.1l.1-.1c1.5-1.7 3.1-3.3 4.6-5 0-.1.1-.1.1-.2 1.4-1.5 2.8-3.1 4.1-4.7.4-.5.8-.9 1.2-1.4a99 99 0 003.3-3.7zm4.1-142.6c-13.8 32.6-32 62.8-54.2 90.2a444.07 444.07 0 00-81.5-55.9c11.6-46.9 18.8-98.4 20.7-152.6H887c-3 40.9-12.6 80.6-28.5 118.3zM887 484H743.5c-1.9-54.2-9.1-105.7-20.7-152.6 29.3-15.6 56.6-34.4 81.5-55.9A373.86 373.86 0 01887 484zM658.3 165.5c39.7 16.8 75.8 40 107.6 69.2a394.72 394.72 0 01-59.4 41.8c-15.7-45-35.8-84.1-59.2-115.4 3.7 1.4 7.4 2.9 11 4.4zm-90.6 700.6c-9.2 7.2-18.4 12.7-27.7 16.4V697a389.1 389.1 0 01115.7 26.2c-8.3 24.6-17.9 47.3-29 67.8-17.4 32.4-37.8 58.3-59 75.1zm59-633.1c11 20.6 20.7 43.3 29 67.8A389.1 389.1 0 01540 327V141.6c9.2 3.7 18.5 9.1 27.7 16.4 21.2 16.7 41.6 42.6 59 75zM540 640.9V540h147.5c-1.6 44.2-7.1 87.1-16.3 127.8l-.3 1.2A445.02 445.02 0 00540 640.9zm0-156.9V383.1c45.8-2.8 89.8-12.5 130.9-28.1l.3 1.2c9.2 40.7 14.7 83.5 16.3 127.8H540zm-56 56v100.9c-45.8 2.8-89.8 12.5-130.9 28.1l-.3-1.2c-9.2-40.7-14.7-83.5-16.3-127.8H484zm-147.5-56c1.6-44.2 7.1-87.1 16.3-127.8l.3-1.2c41.1 15.6 85 25.3 130.9 28.1V484H336.5zM484 697v185.4c-9.2-3.7-18.5-9.1-27.7-16.4-21.2-16.7-41.7-42.7-59.1-75.1-11-20.6-20.7-43.3-29-67.8 37.2-14.6 75.9-23.3 115.8-26.1zm0-370a389.1 389.1 0 01-115.7-26.2c8.3-24.6 17.9-47.3 29-67.8 17.4-32.4 37.8-58.4 59.1-75.1 9.2-7.2 18.4-12.7 27.7-16.4V327zM365.7 165.5c3.7-1.5 7.3-3 11-4.4-23.4 31.3-43.5 70.4-59.2 115.4-21-12-40.9-26-59.4-41.8 31.8-29.2 67.9-52.4 107.6-69.2zM165.5 365.7c13.8-32.6 32-62.8 54.2-90.2 24.9 21.5 52.2 40.3 81.5 55.9-11.6 46.9-18.8 98.4-20.7 152.6H137c3-40.9 12.6-80.6 28.5-118.3zM137 540h143.5c1.9 54.2 9.1 105.7 20.7 152.6a444.07 444.07 0 00-81.5 55.9A373.86 373.86 0 01137 540zm228.7 318.5c-39.7-16.8-75.8-40-107.6-69.2 18.5-15.8 38.4-29.7 59.4-41.8 15.7 45 35.8 84.1 59.2 115.4-3.7-1.4-7.4-2.9-11-4.4zm292.6 0c-3.7 1.5-7.3 3-11 4.4 23.4-31.3 43.5-70.4 59.2-115.4 21 12 40.9 26 59.4 41.8a373.81 373.81 0 01-107.6 69.2z"}}]},name:"global",theme:"outlined"};var l=e.i(9583),o=r.forwardRef(function(e,o){return r.createElement(l.default,(0,t.default)({},e,{ref:o,icon:a}))});e.s(["GlobalOutlined",0,o],160818)},37091,e=>{"use strict";var t=e.i(290571),r=e.i(95779),a=e.i(444755),l=e.i(673706),o=e.i(271645);let s=o.default.forwardRef((e,s)=>{let{color:n,children:i,className:d}=e,c=(0,t.__rest)(e,["color","children","className"]);return o.default.createElement("p",Object.assign({ref:s,className:(0,a.tremorTwMerge)(n?(0,l.getColorClassNames)(n,r.colorPalette.lightText).textColor:"text-tremor-content-emphasis dark:text-dark-tremor-content-emphasis",d)},c),i)});s.displayName="Subtitle",e.s(["Subtitle",0,s],37091)},617802,149121,1023,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(602869),l=e.i(500330),o=e.i(135214);e.s(["default",0,({userSpend:e,userMaxBudget:s,selectedTeam:n})=>{let{accessToken:i,userRole:d,userId:c}=(0,o.default)(),[u,m]=(0,r.useState)(null!==e?e:0),[f,h]=(0,r.useState)(n?Number((0,l.formatNumberWithCommas)(n.max_budget,4)):null);(0,r.useEffect)(()=>{if(n)if("Default Team"===n.team_alias)h(s);else{let e=!1;if(n.team_memberships)for(let t of n.team_memberships)t.user_id===c&&"max_budget"in t.litellm_budget_table&&null!==t.litellm_budget_table.max_budget&&(h(t.litellm_budget_table.max_budget),e=!0);e||h(n.max_budget)}else h(s)},[n,s]);let[g,p]=(0,r.useState)([]);(0,r.useEffect)(()=>{let e=async()=>{if(!i||!c||!d)return};(async()=>{try{if(null===c||null===d)return;if(null!==i){let e=(await (0,a.modelAvailableCall)(i,c,d)).data.map(e=>e.id);p(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[d,i,c]),(0,r.useEffect)(()=>{null!==e&&m(e)},[e]);let b=[];n&&n.models&&(b=n.models),b&&b.includes("all-proxy-models")?b=g:b&&b.includes("all-team-models")?b=n.models:b&&0===b.length&&(b=g);let x=null!==f?`$${(0,l.formatNumberWithCommas)(Number(f),4)} limit`:"No limit",v=void 0!==u?(0,l.formatNumberWithCommas)(u,4):null;return(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,t.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",v]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,t.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:x})]})]})})}],617802),e.i(32117);var s=e.i(343053);e.i(622826);var n=e.i(399536),i=e.i(964471),d=e.i(871943),c=e.i(360820),u=e.i(560025),m=e.i(592968),f=e.i(20147),h=e.i(152990),g=e.i(682830),p=e.i(784774);function b({data:e=[],columns:a,getRowId:l,onRowClick:o,renderSubComponent:s,getRowCanExpand:n,isLoading:i=!1,loadingMessage:d="Loading...",noDataMessage:c="No results",enableSorting:u=!1}){let m=!!s&&!!n,f=a.some(e=>void 0!==e.size),[x,v]=(0,r.useState)([]),y=(0,h.useReactTable)({data:e,columns:a,...u&&{state:{sorting:x},onSortingChange:v,enableSortingRemoval:!1},...m&&{getRowCanExpand:n},...l&&{getRowId:l},getCoreRowModel:(0,g.getCoreRowModel)(),...u&&{getSortedRowModel:(0,g.getSortedRowModel)()},...m&&{getExpandedRowModel:(0,g.getExpandedRowModel)()}}),w=f?{minWidth:y.getCenterTotalSize()}:{minWidth:"400px"};return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-hidden w-full max-w-full box-border",children:(0,t.jsxs)(p.Table,{className:f?"table-fixed":"table-fixed w-full box-border",style:w,children:[(0,t.jsx)(p.TableHeader,{children:y.getHeaderGroups().map(e=>(0,t.jsx)(p.TableRow,{className:"bg-muted/50 hover:bg-muted/50",children:e.headers.map(e=>{let r=u&&e.column.getCanSort(),a=e.column.getIsSorted(),l=e.column.columnDef.meta?.numeric;return(0,t.jsx)(p.TableHead,{className:`py-1 h-8 text-xs font-medium text-muted-foreground first:pl-4 last:pr-4 ${r?"cursor-pointer select-none hover:bg-muted":""}`,style:f?{width:e.getSize()}:void 0,onClick:r?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:`flex items-center gap-1 ${l?"justify-end":""}`,children:[(0,h.flexRender)(e.column.columnDef.header,e.getContext()),r&&(0,t.jsx)("span",{className:"text-muted-foreground",children:"asc"===a?"↑":"desc"===a?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(p.TableBody,{children:i?(0,t.jsx)(p.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(p.TableCell,{colSpan:a.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-muted-foreground",children:(0,t.jsx)("p",{children:d})})})}):y.getRowModel().rows.length>0?y.getRowModel().rows.map(e=>(0,t.jsxs)(r.Fragment,{children:[(0,t.jsx)(p.TableRow,{className:`h-8 ${o?"cursor-pointer":""}`,onClick:()=>o?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap first:pl-4 last:pr-4 ${e.column.columnDef.meta?.numeric?"text-right tabular-nums":""}`,style:f?{width:e.column.getSize()}:void 0,children:(0,h.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),m&&e.getIsExpanded()&&s&&(0,t.jsx)(p.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(p.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:s({row:e})})})})]},e.id)):(0,t.jsx)(p.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(p.TableCell,{colSpan:a.length,className:"h-24 text-center align-middle",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:c})})})})]})})}e.s(["DataTable",0,b],149121),e.s(["default",0,({topKeys:e,teams:h,showTags:g=!1,topKeysLimit:p,setTopKeysLimit:x})=>{let{accessToken:v,userRole:y,userId:w,premiumUser:j}=(0,o.default)(),[N,C]=(0,r.useState)(!1),[k,S]=(0,r.useState)(null),[R,M]=(0,r.useState)(void 0),[E,$]=(0,r.useState)("table"),[T,D]=(0,r.useState)(new Set),_=async e=>{if(v)try{let t=await (0,a.keyInfoV1Call)(v,e.api_key),r=(e=>{let{key:t,info:r}=e;return{token:t,...r}})(t);M(r),S(e.api_key),C(!0)}catch(e){console.error("Error fetching key info:",e)}},O=()=>{C(!1),S(null),M(void 0)};r.default.useEffect(()=>{let e=e=>{"Escape"===e.key&&N&&O()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[N]);let P=[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,t.jsx)(n.IdCell,{value:e.getValue(),onClick:()=>_(e.row.original)})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"}],H={header:"Spend (USD)",accessorKey:"spend",meta:{numeric:!0},cell:e=>(0,t.jsx)(i.MoneyCell,{value:e.getValue(),decimals:2})},z=g?[...P,{header:"Tags",accessorKey:"tags",cell:e=>{let r=e.getValue(),a=e.row.original.api_key,o=T.has(a);if(!r||0===r.length)return"-";let s=r.sort((e,t)=>t.usage-e.usage),n=o?s:s.slice(0,2),i=r.length>2;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[n.map((e,r)=>(0,t.jsx)(m.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Tag Name:"})," ",e.tag]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Spend:"})," ",e.usage>0&&e.usage<.01?"<$0.01":`$${(0,l.formatNumberWithCommas)(e.usage,2)}`]})]}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[e.tag.slice(0,7),"..."]})},r)),i&&(0,t.jsx)("button",{onClick:()=>{D(e=>{let t=new Set(e);return t.has(a)?t.delete(a):t.add(a),t})},className:"ml-1 p-1 hover:bg-gray-200 rounded-full transition-colors",title:o?"Show fewer tags":"Show all tags",children:o?(0,t.jsx)(c.ChevronUpIcon,{className:"h-3 w-3 text-gray-500"}):(0,t.jsx)(d.ChevronDownIcon,{className:"h-3 w-3 text-gray-500"})})]})})}},H]:[...P,H],L=e.map(e=>({...e,display_key_alias:e.key_alias&&e.key_alias.length>10?`${e.key_alias.slice(0,10)}...`:e.key_alias||"-"}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(u.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:p,onChange:e=>x(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>$("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>$("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===E?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(s.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(L.length,p)},data:L,index:"display_key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:120,tickGap:5,layout:"vertical",showLegend:!1,valueFormatter:e=>`$${(0,l.formatNumberWithCommas)(e,2)}`,onValueChange:e=>_(e),showTooltip:!0,customTooltip:e=>{let r=e.payload?.[0]?.payload;return(0,t.jsx)("div",{className:"relative z-50 p-3 bg-black/90 shadow-lg rounded-lg text-white max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Key Alias: "}),(0,t.jsx)("span",{className:"font-mono text-gray-100 break-all",children:r?.key_alias})]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Key ID: "}),(0,t.jsx)("span",{className:"font-mono text-gray-100 break-all",children:r?.api_key})]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,t.jsxs)("span",{className:"text-white font-medium",children:["$",(0,l.formatNumberWithCommas)(r?.spend,2)]})]})]})})}})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(b,{columns:z,data:e,isLoading:!1})}),N&&k&&R&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&O()},children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl relative w-11/12 max-w-6xl max-h-[90vh] overflow-y-auto min-h-[750px]",children:[(0,t.jsx)("button",{onClick:O,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-hidden","aria-label":"Close",children:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,t.jsx)("div",{className:"p-6 h-full",children:(0,t.jsx)(f.default,{keyId:k,onClose:O,keyData:R,teams:h})})]})})]})}],1023)},973706,e=>{"use strict";var t=e.i(843476),r=e.i(72713),a=e.i(637235),l=e.i(994388),o=e.i(599724),s=e.i(166540),n=e.i(271645);let i=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,s.default)().startOf("day").toDate(),to:(0,s.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,s.default)().subtract(7,"days").startOf("day").toDate(),to:(0,s.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,s.default)().subtract(30,"days").startOf("day").toDate(),to:(0,s.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,s.default)().startOf("month").toDate(),to:(0,s.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,s.default)().startOf("year").toDate(),to:(0,s.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:d,label:c="Select Time Range",showTimeRange:u=!0})=>{let[m,f]=(0,n.useState)(!1),[h,g]=(0,n.useState)(e),[p,b]=(0,n.useState)(null),[x,v]=(0,n.useState)(""),[y,w]=(0,n.useState)(""),j=(0,n.useRef)(null),N=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of i){let r=t.getValue(),a=(0,s.default)(e.from).isSame((0,s.default)(r.from),"day"),l=(0,s.default)(e.to).isSame((0,s.default)(r.to),"day");if(a&&l)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{b(N(e))},[e,N]);let C=(0,n.useCallback)(()=>{if(!x||!y)return{isValid:!0,error:""};let e=(0,s.default)(x,"YYYY-MM-DD"),t=(0,s.default)(y,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[x,y])();(0,n.useEffect)(()=>{e.from&&v((0,s.default)(e.from).format("YYYY-MM-DD")),e.to&&w((0,s.default)(e.to).format("YYYY-MM-DD")),g(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&f(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let k=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let r=e=>(0,s.default)(e).format("D MMM, HH:mm");return`${r(e)} - ${r(t)}`},[]),S=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let r={...e},a=new Date(e.from);return t=new Date(e.to?e.to:e.from),a.toDateString()===t.toDateString(),a.setHours(0,0,0,0),t.setHours(23,59,59,999),r.from=a,r.to=t,r},[]),R=(0,n.useCallback)(()=>{try{if(x&&y&&C.isValid){let e=(0,s.default)(x,"YYYY-MM-DD").startOf("day"),t=(0,s.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let r={from:e.toDate(),to:t.toDate()};g(r);let a=N(r);b(a)}}}catch(e){console.warn("Invalid date format:",e)}},[x,y,C.isValid,N]);return(0,n.useEffect)(()=>{R()},[R]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[c&&(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:c}),(0,t.jsxs)("div",{className:"relative",ref:j,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>f(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:k(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-9999 min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:i.map(e=>{let r=p===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${r?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:r}=e.getValue();g({from:t,to:r}),b(e.shortLabel),v((0,s.default)(t).format("YYYY-MM-DD")),w((0,s.default)(r).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${r?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${r?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:x,onChange:e=>v(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!C.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:y,onChange:e=>w(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!C.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!C.isValid&&C.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:C.error})]})}),h.from&&h.to&&C.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,s.default)(h.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,s.default)(h.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(l.Button,{variant:"secondary",onClick:()=>{g(e),e.from&&v((0,s.default)(e.from).format("YYYY-MM-DD")),e.to&&w((0,s.default)(e.to).format("YYYY-MM-DD")),b(N(e)),f(!1)},children:"Cancel"}),(0,t.jsx)(l.Button,{onClick:()=>{h.from&&h.to&&C.isValid&&(d(h),requestIdleCallback(()=>{d(S(h))},{timeout:100}),f(!1))},disabled:!h.from||!h.to||!C.isValid,children:"Apply"})]})})]})]})})]})]})}])},567425,e=>{"use strict";var t=e.i(271645);let r=["total_spend","total_prompt_tokens","total_completion_tokens","total_tokens","total_api_requests","total_successful_requests","total_failed_requests","total_cache_read_input_tokens","total_cache_creation_input_tokens"],a={results:[],metadata:{total_spend:0,total_prompt_tokens:0,total_completion_tokens:0,total_tokens:0,total_api_requests:0,total_successful_requests:0,total_failed_requests:0,total_cache_read_input_tokens:0,total_cache_creation_input_tokens:0,total_pages:1,has_more:!1,page:1}};e.s(["usePaginatedDailyActivity",0,function({fetchFn:e,args:l,enabled:o}){let[s,n]=(0,t.useState)(a),[i,d]=(0,t.useState)(!1),[c,u]=(0,t.useState)(!1),[m,f]=(0,t.useState)({currentPage:0,totalPages:0}),[h,g]=(0,t.useState)(!1),p=(0,t.useRef)(0),b=(0,t.useRef)(!1),x=(0,t.useRef)(null),v=(0,t.useRef)(l);v.current=l;let y=JSON.stringify(l),w=(0,t.useCallback)(()=>{b.current=!0,g(!0),u(!1),null!==x.current&&(clearTimeout(x.current),x.current=null)},[]);return(0,t.useEffect)(()=>{if(!o){n(a),d(!1),u(!1),f({currentPage:0,totalPages:0}),g(!1);return}let t=++p.current;b.current=!1,g(!1);let l=()=>p.current!==t||b.current,s=e=>new Promise(t=>{x.current=setTimeout(()=>{x.current=null,t()},e)});return(async()=>{let t=v.current;d(!0),u(!1),f({currentPage:1,totalPages:1});try{let a=[...t.slice(0,3),1,...t.slice(3)],o=await e(...a);if(l())return;n(o);let i=o.metadata?.total_pages||1;if(f({currentPage:1,totalPages:i}),i<=1)return void d(!1);d(!1),u(!0);let c=[...o.results],m={...o.metadata};for(let a=2;a<=i;a++){if(l()||(await s(300),l()))return;let o=[...t.slice(0,3),a,...t.slice(3)],d=await e(...o);if(l())return;c=[...c,...d.results],(m=function(e,t){let a={...e};for(let l of r)a[l]=(e[l]||0)+(t[l]||0);return a}(m,d.metadata)).total_pages=i,m.has_more=a{p.current++,null!==x.current&&(clearTimeout(x.current),x.current=null)}},[o,e,y]),{data:s,loading:i,isFetchingMore:c,progress:m,cancelled:h,cancel:w}}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/149mkwj8vvf2d.js b/litellm/proxy/_experimental/out/_next/static/chunks/149mkwj8vvf2d.js new file mode 100644 index 00000000000..56ec085aac2 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/149mkwj8vvf2d.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9314,645526,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(981339);e.i(247167);var s=e.i(931067),i=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"}}]},name:"team",theme:"outlined"};var n=e.i(9583),o=i.forwardRef(function(e,t){return i.createElement(n.default,(0,s.default)({},e,{ref:t,icon:r}))});e.s(["TeamOutlined",0,o],645526);var d=e.i(599724),c=e.i(263147);e.s(["default",0,({value:e,onChange:s,placeholder:i="Select access groups",disabled:r=!1,style:n,className:u,showLabel:m=!1,labelText:g="Access Group",allowClear:p=!0})=>{let{data:h,isLoading:x,isError:y}=(0,c.useAccessGroups)();if(x)return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(a.Skeleton.Input,{active:!0,block:!0,style:{height:32,...n}})]});let f=(h??[]).map(e=>({label:(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.access_group_name})," ",(0,t.jsxs)("span",{className:"text-gray-400 text-xs",children:["(",e.access_group_id,")"]})]}),value:e.access_group_id,selectedLabel:e.access_group_name,searchText:`${e.access_group_name} ${e.access_group_id}`}));return(0,t.jsxs)("div",{children:[m&&(0,t.jsxs)(d.Text,{className:"font-medium block mb-2 text-gray-700 flex items-center",children:[(0,t.jsx)(o,{className:"mr-2"})," ",g]}),(0,t.jsx)(l.Select,{mode:"multiple",value:e,placeholder:i,onChange:s,disabled:r,allowClear:p,showSearch:!0,style:{width:"100%",...n},className:`rounded-md ${u??""}`,notFoundContent:y?(0,t.jsx)("span",{className:"text-red-500",children:"Failed to load access groups"}):"No access groups found",filterOption:(e,t)=>(f.find(e=>e.value===t?.value)?.searchText??"").toLowerCase().includes(e.toLowerCase()),optionLabelProp:"selectedLabel",options:f.map(e=>({label:e.label,value:e.value,selectedLabel:e.selectedLabel}))})]})}],9314)},533882,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(250980),s=e.i(797672),i=e.i(68155),r=e.i(304967),n=e.i(629569),o=e.i(599724),d=e.i(269200),c=e.i(427612),u=e.i(64848),m=e.i(942232),g=e.i(496020),p=e.i(977572),h=e.i(992619),x=e.i(727749);e.s(["default",0,({accessToken:e,initialModelAliases:y={},onAliasUpdate:f,showExampleConfig:b=!0})=>{let[j,_]=(0,l.useState)([]),[v,A]=(0,l.useState)({aliasName:"",targetModel:""}),[w,k]=(0,l.useState)(null);(0,l.useEffect)(()=>{_(Object.entries(y).map(([e,t],l)=>({id:`${l}-${e}`,aliasName:e,targetModel:t})))},[y]);let N=()=>{if(!w)return;if(!w.aliasName||!w.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.id!==w.id&&e.aliasName===w.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=j.map(e=>e.id===w.id?w:e);_(e),k(null);let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias updated successfully")},S=()=>{k(null)},C=j.reduce((e,t)=>(e[t.aliasName]=t.targetModel,e),{});return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Add New Alias"}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Alias Name"}),(0,t.jsx)("input",{type:"text",value:v.aliasName,onChange:e=>A({...v,aliasName:e.target.value}),placeholder:"e.g., gpt-4o",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs text-gray-500 mb-1",children:"Target Model"}),(0,t.jsx)(h.default,{accessToken:e,value:v.targetModel,placeholder:"Select target model",onChange:e=>A({...v,targetModel:e}),showLabel:!1})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsxs)("button",{onClick:()=>{if(!v.aliasName||!v.targetModel)return void x.default.fromBackend("Please provide both alias name and target model");if(j.some(e=>e.aliasName===v.aliasName))return void x.default.fromBackend("An alias with this name already exists");let e=[...j,{id:`${Date.now()}-${v.aliasName}`,aliasName:v.aliasName,targetModel:v.targetModel}];_(e),A({aliasName:"",targetModel:""});let t={};e.forEach(e=>{t[e.aliasName]=e.targetModel}),f&&f(t),x.default.success("Alias added successfully")},disabled:!v.aliasName||!v.targetModel,className:`flex items-center px-4 py-2 rounded-md text-sm ${!v.aliasName||!v.targetModel?"bg-gray-300 text-gray-500 cursor-not-allowed":"bg-green-600 text-white hover:bg-green-700"}`,children:[(0,t.jsx)(a.PlusCircleIcon,{className:"w-4 h-4 mr-1"}),"Add Alias"]})})]})]}),(0,t.jsx)(o.Text,{className:"text-sm font-medium text-gray-700 mb-2",children:"Manage Existing Aliases"}),(0,t.jsx)("div",{className:"rounded-lg custom-border relative mb-6",children:(0,t.jsx)("div",{className:"overflow-x-auto",children:(0,t.jsxs)(d.Table,{className:"[&_td]:py-0.5 [&_th]:py-1",children:[(0,t.jsx)(c.TableHead,{children:(0,t.jsxs)(g.TableRow,{children:[(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Alias Name"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Target Model"}),(0,t.jsx)(u.TableHeaderCell,{className:"py-1 h-8",children:"Actions"})]})}),(0,t.jsxs)(m.TableBody,{children:[j.map(l=>(0,t.jsx)(g.TableRow,{className:"h-8",children:w&&w.id===l.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)("input",{type:"text",value:w.aliasName,onChange:e=>k({...w,aliasName:e.target.value}),className:"w-full px-2 py-1 border border-gray-300 rounded-md text-sm"})}),(0,t.jsx)(p.TableCell,{className:"py-0.5",children:(0,t.jsx)(h.default,{accessToken:e,value:w.targetModel,onChange:e=>k({...w,targetModel:e}),showLabel:!1,style:{height:"32px"}})}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:N,className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:"Save"}),(0,t.jsx)("button",{onClick:S,className:"text-xs bg-gray-50 text-gray-600 px-2 py-1 rounded-sm hover:bg-gray-100",children:"Cancel"})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-900",children:l.aliasName}),(0,t.jsx)(p.TableCell,{className:"py-0.5 text-sm text-gray-500",children:l.targetModel}),(0,t.jsx)(p.TableCell,{className:"py-0.5 whitespace-nowrap",children:(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>{k({...l})},className:"text-xs bg-blue-50 text-blue-600 px-2 py-1 rounded-sm hover:bg-blue-100",children:(0,t.jsx)(s.PencilIcon,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>{var e;let t,a;return e=l.id,_(t=j.filter(t=>t.id!==e)),a={},void(t.forEach(e=>{a[e.aliasName]=e.targetModel}),f&&f(a),x.default.success("Alias deleted successfully"))},className:"text-xs bg-red-50 text-red-600 px-2 py-1 rounded-sm hover:bg-red-100",children:(0,t.jsx)(i.TrashIcon,{className:"w-3 h-3"})})]})})]})},l.id)),0===j.length&&(0,t.jsx)(g.TableRow,{children:(0,t.jsx)(p.TableCell,{colSpan:3,className:"py-0.5 text-sm text-gray-500 text-center",children:"No aliases added yet. Add a new alias above."})})]})]})})}),b&&(0,t.jsxs)(r.Card,{children:[(0,t.jsx)(n.Title,{className:"mb-4",children:"Configuration Example"}),(0,t.jsx)(o.Text,{className:"text-gray-600 mb-4",children:"Here's how your current aliases would look in the config:"}),(0,t.jsx)("div",{className:"bg-gray-100 rounded-lg p-4 font-mono text-sm",children:(0,t.jsxs)("div",{className:"text-gray-700",children:["model_aliases:",0===Object.keys(C).length?(0,t.jsxs)("span",{className:"text-gray-500",children:[(0,t.jsx)("br",{}),"  # No aliases configured yet"]}):Object.entries(C).map(([e,l])=>(0,t.jsxs)("span",{children:[(0,t.jsx)("br",{}),'  "',e,'": "',l,'"']},e))]})})]})]})}])},552130,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select agents",disabled:d=!1})=>{let[c,u]=(0,l.useState)([]),[m,g]=(0,l.useState)([]),[p,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{(async()=>{if(n){h(!0);try{let e=await (0,s.getAgentsList)(n),t=e?.agents||[];u(t);let l=new Set;t.forEach(e=>{let t=e.agent_access_groups;t&&Array.isArray(t)&&t.forEach(e=>l.add(e))}),g(Array.from(l))}catch(e){console.error("Error fetching agents:",e)}finally{h(!1)}}})()},[n]);let x=[...m.map(e=>({label:e,value:`group:${e}`,isAccessGroup:!0,searchText:`${e} Access Group`})),...c.map(e=>({label:`${e.agent_name||e.agent_id}`,value:e.agent_id,isAccessGroup:!1,searchText:`${e.agent_name||e.agent_id} ${e.agent_id} Agent`}))],y=[...i?.agents||[],...(i?.accessGroups||[]).map(e=>`group:${e}`)];return(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:t=>{e({agents:t.filter(e=>!e.startsWith("group:")),accessGroups:t.filter(e=>e.startsWith("group:")).map(e=>e.replace("group:",""))})},value:y,loading:p,className:r,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:d,filterOption:(e,t)=>(x.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:x.map(e=>(0,t.jsx)(a.Select.Option,{value:e.value,label:e.label,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:e.isAccessGroup?"#52c41a":"#722ed1",flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:e.isAccessGroup?"#52c41a":"#722ed1",fontSize:"12px",fontWeight:500,opacity:.8},children:e.isAccessGroup?"Access Group":"Agent"})]})},e.value))})})}])},844565,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:i,className:r,accessToken:n,placeholder:o="Select pass through routes",disabled:d=!1,teamId:c})=>{let[u,m]=(0,l.useState)([]),[g,p]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{(async()=>{if(n){p(!0);try{let e=await (0,s.getPassThroughEndpointsCall)(n,c);if(e.endpoints){let t=e.endpoints.flatMap(e=>{let t=e.path,l=e.methods;return l&&l.length>0?l.map(e=>({label:`${e} ${t}`,value:t})):[{label:t,value:t}]});m(t)}}catch(e){console.error("Error fetching pass through routes:",e)}finally{p(!1)}}})()},[n,c]),(0,t.jsx)(a.Select,{mode:"tags",placeholder:o,onChange:e,value:i,loading:g,className:r,allowClear:!0,options:u,optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})}])},810757,477386,e=>{"use strict";var t=e.i(271645);let l=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}))});e.s(["CogIcon",0,l],810757);let a=t.forwardRef(function(e,l){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:l},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"}))});e.s(["BanIcon",0,a],477386)},557662,e=>{"use strict";let t={src:e.i(196361).default,width:823,height:807,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABCUlEQVR42k2Ov0sCYRjH3/f09c68NOuiLg+NvMM6qIaIhgKDlgbBBiH7ARbkFAr+wEFwUBzUSRwUN3+Am4Kbg4sIIg4iOugiguDm5F/gvaLiF57l83yf5/sFYC0VQdJJnS0bObUkSCgnwa4ggPD94O57KkYX46vw/HVftECMNzKRJ2JL8A+KekelfO6s1Y3utl6hNayWahmlznIfhQbv6V4oGP6aOrvtCIFRnH1LKQmkBC7G7BtehmZWzY0NRxEAEo7Dhz/MvrT3P6BvCk5irDVJQURhAx5aKpzh7Pkm7+2BZ1p4YeT0MYIy5Dx6/P+UrvAXFml0TyqjeVtUytsrGX6rac6ew+YNXwKfsTPy4XOyEQAAAABJRU5ErkJggg=="},l={src:e.i(614148).default,width:600,height:450,blurWidth:0,blurHeight:0},a={src:e.i(858236).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAqklEQVR42mXOzQqCQBQF4NG8PVKLalNRrxW01EgUghZm4Tu0aV3gopBCaDDoh8LMyubaCzQzLj2c1fk2h/zwyZvjI8NTmtMXHj94yfBG5JqE0WrsDWyv70eLGOkbrwJotG316lDVeJvd2pouE3YW4M4nAEBkADTD1eOvBNPUFUUpQAMwplbK7gJsa6hWVG58bXTam0OAmAjYBT63kWk4Myeke2TiJynulvsHOZp6y2XrD90AAAAASUVORK5CYII="},s={src:e.i(508296).default,width:180,height:180,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDvXivVvITItyZVvSwKFmDRbjjPYDB/SutONn6fiaaH/9k="},i={src:e.i(324755).default,width:48,height:48,blurWidth:0,blurHeight:0},r={src:e.i(475151).default,width:14,height:16,blurWidth:0,blurHeight:0},n={src:e.i(274286).default,width:256,height:256,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA/ElEQVR42m3Pz0vCUADA8ed7a3uBjb0sx5C1Ri1oIDJSKEdJgyEFtbwFgScpsGNR1CmyS0Ho0ZOggv+A4F3B30f9HwRRwYMICupNPPg5fa9fANazLQtCtC0jdGbSdFSmN6+Ry/tIHd/+w52jOwyRCDRZL+UJ6eREdXauR0dq8HtiBl7mD25r+MtyLfBO+Fpm19UXTsJ17LnPWhyf+rNvVWOiu38j+Zrgk/CNuHDYtfsiRUa1khYnpH9Y0viQtIGxf1oGfsVoFxzOYULR51f+p6lifo09wdjs0hvuvbKkAhDF7GkUFYpgnLhg8DPtOAghOfAGiWRs2KBz/dqKBVIdOzeF2+/ZAAAAAElFTkSuQmCC"},o={src:e.i(436494).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAnElEQVR42oXOsQqCUACF4ftWvUFbBFFzQSVRLQ5RmRDkUJFTIUFNEQgNDWFTNURjgyAiOgiiCF7FQRCcVFQQJ1H4t284B1gwzA0UAS/A2+N7pp8nmrne3yynJ6Cp3mBBoARZbfcqjVZ3tkSwlSw7QFHc5gitI+M1delM8LhafyhKNjCN4PPjsR2Fk8f59jDd7JnXHxp+Oh5zVsmrCGlHlzZm+jq8AAAAAElFTkSuQmCC"},d={src:e.i(204086).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAhElEQVR42oWPuw0DIRBEr6g7aIGQAAQSEiTk1EAHVILogIQAQUPOxoKT5cSfYDbYedqdOc7zfFzXhU9a3vHNfGkDhBB472GMQQgB1lo45/Z+A4wx9N6Rc8acE7VWpJRuYI0YI1prW6UUjDHAOb9fLEAIAaXUPi2lhNYalNJ3hp8h/9V8AqCAe6iqrOaAAAAAAElFTkSuQmCC"},c={src:e.i(531150).default,width:48,height:48,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA40lEQVR42lWOvesBcQDGz0/9VmUl/4lSyqaUic5gM0jKSBlISgaXwWCwGc7gFPKeIikUMXAldec9Wdx5uft+v3KFMzzL8/k89WAIIUweyLG6W9tRFNmKGUHw9wMfAvgfDBfWddWbv5aNE5Gtmr9LiBSNzgq3uQv7UKzY2tZ9uXvfl/4IxxOvyeZn/niyQkWJJkXTjB7ez2oJHk6cNpzo5ohUjeTHRICnSScEQPliGIKistef23FPYUNSo6CwJHGw6xgQggpJEBYZ12UQiY2njOnCPVSv528oCWDbNopMySIv5XkCtum3l9/HqzEAAAAASUVORK5CYII="},u=[{id:"arize",displayName:"Arize",logo:t.src,supports_key_team_logging:!0,dynamic_params:{arize_api_key:"password",arize_space_id:"password"},description:"Arize Logging Integration"},{id:"braintrust",displayName:"Braintrust",logo:a.src,supports_key_team_logging:!1,dynamic_params:{braintrust_api_key:"password",braintrust_project_name:"text"},description:"Braintrust Logging Integration"},{id:"custom_callback_api",displayName:"Custom Callback API",supports_key_team_logging:!0,dynamic_params:{custom_callback_api_url:"text",custom_callback_api_headers:"text"},description:"Custom Callback API Logging Integration"},{id:"galileo",displayName:"Galileo",logo:i.src,supports_key_team_logging:!1,dynamic_params:{GALILEO_API_KEY:"password",GALILEO_PROJECT_ID:"text",GALILEO_LOG_STREAM_ID:"text",GALILEO_BASE_URL:"text",GALILEO_USERNAME:"text",GALILEO_PASSWORD:"password"},description:"Galileo AI Observability Integration"},{id:"datadog",displayName:"Datadog",logo:s.src,supports_key_team_logging:!1,dynamic_params:{dd_api_key:"password",dd_site:"text"},description:"Datadog Logging Integration"},{id:"lago",displayName:"Lago",logo:r.src,supports_key_team_logging:!1,dynamic_params:{lago_api_url:"text",lago_api_key:"password"},description:"Lago Billing Logging Integration"},{id:"langfuse",displayName:"Langfuse",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v2 Logging Integration"},{id:"langfuse_otel",displayName:"Langfuse OTEL",logo:n.src,supports_key_team_logging:!0,dynamic_params:{langfuse_public_key:"text",langfuse_secret_key:"password",langfuse_host:"text"},description:"Langfuse v3 OTEL Logging Integration"},{id:"langsmith",displayName:"LangSmith",logo:o.src,supports_key_team_logging:!0,dynamic_params:{langsmith_api_key:"password",langsmith_project:"text",langsmith_base_url:"text",langsmith_sampling_rate:"number"},description:"Langsmith Logging Integration"},{id:"openmeter",displayName:"OpenMeter",logo:d.src,supports_key_team_logging:!1,dynamic_params:{openmeter_api_key:"password",openmeter_base_url:"text"},description:"OpenMeter Logging Integration"},{id:"otel",displayName:"Open Telemetry",logo:c.src,supports_key_team_logging:!1,dynamic_params:{otel_endpoint:"text",otel_headers:"text"},description:"OpenTelemetry Logging Integration"},{id:"s3",displayName:"S3",logo:l.src,supports_key_team_logging:!1,dynamic_params:{s3_bucket_name:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"S3 Bucket (AWS) Logging Integration"},{id:"SQS",displayName:"SQS",logo:l.src,supports_key_team_logging:!1,dynamic_params:{sqs_queue_url:"text",aws_access_key_id:"password",aws_secret_access_key:"password",aws_region:"text"},description:"SQS Queue (AWS) Logging Integration"}],m=u.reduce((e,t)=>(e[t.displayName]=t,e),{}),g=u.reduce((e,t)=>(e[t.displayName]=t.id,e),{}),p=u.reduce((e,t)=>(e[t.id]=t.displayName,e),{});e.s(["callbackInfo",0,m,"callback_map",0,g,"mapDisplayToInternalNames",0,e=>e.map(e=>g[e]||e),"mapInternalToDisplayNames",0,e=>e.map(e=>p[e]||e),"reverse_callback_map",0,p],557662)},390605,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(602869),s=e.i(599724),i=e.i(482725),r=e.i(91739),n=e.i(500727),o=e.i(531516),d=e.i(696609);e.s(["default",0,({accessToken:e,selectedServers:c,toolPermissions:u,onChange:m,disabled:g=!1})=>{let{data:p=[]}=(0,n.useMCPServers)(),[h,x]=(0,l.useState)({}),[y,f]=(0,l.useState)({}),[b,j]=(0,l.useState)({}),[_,v]=(0,l.useState)({}),A=(0,l.useRef)(u);(0,l.useEffect)(()=>{A.current=u},[u]);let w=(0,l.useMemo)(()=>0===c.length?[]:p.filter(e=>c.includes(e.server_id)),[p,c]),k=async(e,t)=>{f(t=>({...t,[e]:!0})),j(t=>({...t,[e]:""}));try{let l=await (0,a.listMCPTools)(t,e);if(l.error)j(t=>({...t,[e]:l.message||"Failed to fetch tools"})),x(t=>({...t,[e]:[]}));else{let t=l.tools||[];x(l=>({...l,[e]:t}));let a=A.current;if(!a[e]&&t.length>0){let l=t.filter(e=>"delete"!==(0,d.classifyToolOp)(e.name,e.description||"")).map(e=>e.name);m({...a,[e]:l})}}}catch(t){console.error(`Error fetching tools for server ${e}:`,t),j(t=>({...t,[e]:"Failed to fetch tools"})),x(t=>({...t,[e]:[]}))}finally{f(t=>({...t,[e]:!1}))}};(0,l.useEffect)(()=>{w.forEach(t=>{h[t.server_id]||y[t.server_id]||k(t.server_id,e)})},[w,e]);let N=(e,t)=>{m({...u,[e]:t})};return 0===c.length?null:(0,t.jsx)("div",{className:"space-y-4",children:w.map(e=>{let l=e.server_name||e.alias||e.server_id,a=h[e.server_id]||[],n=u[e.server_id]||[],d=y[e.server_id],c=b[e.server_id],p=_[e.server_id]??"crud";return(0,t.jsxs)("div",{className:"border rounded-lg bg-gray-50",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between p-4 border-b bg-white rounded-t-lg",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.Text,{className:"font-semibold text-gray-900",children:l}),e.description&&(0,t.jsx)(s.Text,{className:"text-sm text-gray-500",children:e.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[!g&&a.length>0&&(0,t.jsx)(r.Radio.Group,{value:p,onChange:t=>v(l=>({...l,[e.server_id]:t.target.value})),size:"small",optionType:"button",buttonStyle:"solid",options:[{label:"Risk Groups",value:"crud"},{label:"Flat List",value:"flat"}]}),!g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;let l;return l=h[t=e.server_id]||[],void m({...u,[t]:l.map(e=>e.name)})},disabled:d,children:"Select All"}),(0,t.jsx)("button",{type:"button",className:"text-sm text-blue-600 hover:text-blue-700 font-medium",onClick:()=>{var t;return t=e.server_id,void m({...u,[t]:[]})},disabled:d,children:"Deselect All"})]})]})]}),(0,t.jsxs)("div",{className:"p-4",children:[d&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)(i.Spin,{size:"large"}),(0,t.jsx)(s.Text,{className:"ml-3 text-gray-500",children:"Loading tools..."})]}),c&&!d&&(0,t.jsxs)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,t.jsx)(s.Text,{className:"text-red-600 font-medium",children:"Unable to load tools"}),(0,t.jsx)(s.Text,{className:"text-sm text-red-500 mt-1",children:c})]}),!d&&!c&&a.length>0&&"crud"===p&&(0,t.jsx)(o.default,{tools:a,value:u[e.server_id]?n:void 0,onChange:t=>N(e.server_id,t),readOnly:g}),!d&&!c&&a.length>0&&"flat"===p&&(0,t.jsx)("div",{className:"space-y-2",children:a.map(l=>{let a=n.includes(l.name);return(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"checkbox",checked:a,onChange:()=>{if(g)return;let t=a?n.filter(e=>e!==l.name):[...n,l.name];N(e.server_id,t)},disabled:g,className:"mt-0.5"}),(0,t.jsx)("div",{className:"flex-1 min-w-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Text,{className:"font-medium text-gray-900",children:l.name}),(0,t.jsxs)(s.Text,{className:"text-sm text-gray-500",children:["- ",l.description||"No description"]})]})})]},l.name)})}),!d&&!c&&0===a.length&&(0,t.jsx)("div",{className:"text-center py-6",children:(0,t.jsx)(s.Text,{className:"text-gray-500",children:"No tools available"})})]})]},e.server_id)})})}])},266484,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(592968),s=e.i(312361),i=e.i(827252),r=e.i(994388),n=e.i(304967),o=e.i(779241),d=e.i(988297),c=e.i(68155),u=e.i(810757),m=e.i(477386),g=e.i(557662),p=e.i(174553),h=e.i(435451);let{Option:x}=l.Select;e.s(["default",0,({value:e=[],onChange:y,disabledCallbacks:f=[],onDisabledCallbacksChange:b})=>{let j=Object.entries(g.callbackInfo).filter(([e,t])=>t.supports_key_team_logging).map(([e,t])=>e),_=Object.keys(g.callbackInfo),v=e=>{y?.(e)},A=(t,l,a)=>{let s=[...e];if("callback_name"===l){let e=g.callback_map[a]||a;s[t]={...s[t],[l]:e,callback_vars:{}}}else s[t]={...s[t],[l]:a};v(s)},w=(t,l,a)=>{let s=[...e];s[t]={...s[t],callback_vars:{...s[t].callback_vars,[l]:a}},v(s)};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(m.BanIcon,{className:"w-5 h-5 text-red-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Disabled Callbacks"}),(0,t.jsx)(a.Tooltip,{title:"Select callbacks to disable for this key. Disabled callbacks will not receive any logging data.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Disabled Callbacks"}),(0,t.jsx)(l.Select,{mode:"multiple",placeholder:"Select callbacks to disable",value:f,onChange:e=>{let t=(0,g.mapDisplayToInternalNames)(e);b?.(t)},style:{width:"100%"},optionLabelProp:"label",children:_.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Select callbacks that should be disabled for this key. These callbacks will not receive any logging data."})]})]}),(0,t.jsx)(s.Divider,{}),(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(u.CogIcon,{className:"w-5 h-5 text-blue-500"}),(0,t.jsx)("span",{className:"text-base font-semibold text-gray-800",children:"Logging Integrations"}),(0,t.jsx)(a.Tooltip,{title:"Configure callback logging integrations for this team.",children:(0,t.jsx)(i.InfoCircleOutlined,{className:"text-gray-400 cursor-help"})})]}),(0,t.jsx)(r.Button,{variant:"secondary",onClick:()=>{v([...e,{callback_name:"",callback_type:"success",callback_vars:{}}])},icon:d.PlusIcon,size:"sm",className:"hover:border-blue-400 hover:text-blue-500",type:"button",children:"Add Integration"})]}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((s,i)=>{let d=s.callback_name?Object.entries(g.callback_map).find(([e,t])=>t===s.callback_name)?.[0]:void 0;return(0,t.jsxs)(n.Card,{className:"border border-gray-200 shadow-xs hover:shadow-md transition-shadow duration-200",decoration:"top",decorationColor:"blue",children:[(0,t.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[d&&(0,t.jsx)(p.Logo,{src:g.callbackInfo[d]?.logo,label:d,className:"w-5 h-5 object-contain"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:[d||"New Integration"," Configuration"]})]}),(0,t.jsx)(r.Button,{variant:"light",onClick:()=>{v(e.filter((e,t)=>t!==i))},icon:c.TrashIcon,size:"xs",color:"red",className:"hover:bg-red-50",type:"button",children:"Remove"})]}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Integration Type"}),(0,t.jsx)(l.Select,{value:d,placeholder:"Select integration",onChange:e=>A(i,"callback_name",e),className:"w-full",optionLabelProp:"label",children:j.map(e=>{let l=g.callbackInfo[e]?.description;return(0,t.jsx)(x,{value:e,label:e,children:(0,t.jsx)(a.Tooltip,{title:l,placement:"right",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(p.Logo,{src:g.callbackInfo[e]?.logo,label:e,className:"w-4 h-4 object-contain"}),(0,t.jsx)("span",{children:e})]})})},e)})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Event Type"}),(0,t.jsxs)(l.Select,{value:s.callback_type,onChange:e=>A(i,"callback_type",e),className:"w-full",children:[(0,t.jsx)(x,{value:"success",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),(0,t.jsx)("span",{children:"Success Only"})]})}),(0,t.jsx)(x,{value:"failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-red-500 rounded-full"}),(0,t.jsx)("span",{children:"Failure Only"})]})}),(0,t.jsx)(x,{value:"success_and_failure",children:(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),(0,t.jsx)("span",{children:"Success & Failure"})]})})]})]})]}),((e,l)=>{if(!e.callback_name)return null;let a=Object.entries(g.callback_map).find(([t,l])=>l===e.callback_name)?.[0];if(!a)return null;let s=g.callbackInfo[a]?.dynamic_params||{};return 0===Object.keys(s).length?null:(0,t.jsxs)("div",{className:"mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2 mb-4",children:[(0,t.jsx)("div",{className:"w-3 h-3 bg-blue-100 rounded-full flex items-center justify-center",children:(0,t.jsx)("div",{className:"w-1.5 h-1.5 bg-blue-500 rounded-full"})}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Integration Parameters"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4",children:Object.entries(s).map(([a,s])=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 capitalize flex items-center space-x-1",children:[(0,t.jsx)("span",{children:a.replace(/_/g," ")}),"password"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Sensitive"}),"number"===s&&(0,t.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 rounded-sm text-xs font-medium bg-yellow-100 text-yellow-800",children:"Number"})]}),"number"===s&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:"Value must be between 0 and 1"}),"number"===s?(0,t.jsx)(h.default,{step:.01,width:400,placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)}):(0,t.jsx)(o.TextInput,{type:"password"===s?"password":"text",placeholder:`os.environ/${a.toUpperCase()}`,value:e.callback_vars[a]||"",onChange:e=>w(l,a,e.target.value)})]},a))})]})})(s,i)]})]},i)})}),0===e.length&&(0,t.jsxs)("div",{className:"text-center py-12 text-gray-500 border-2 border-dashed border-gray-200 rounded-lg bg-gray-50/50",children:[(0,t.jsx)(u.CogIcon,{className:"w-12 h-12 text-gray-300 mb-3 mx-auto"}),(0,t.jsx)("div",{className:"text-base font-medium mb-1",children:"No logging integrations configured"}),(0,t.jsx)("div",{className:"text-sm text-gray-400",children:'Click "Add Integration" to configure logging for this team'})]})]})}])},460285,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(404206),s=e.i(723731),i=e.i(653824),r=e.i(881073),n=e.i(197647),o=e.i(343488),d=e.i(602869),c=e.i(158392),u=e.i(419470),m=e.i(695411);let g=(0,l.forwardRef)(({accessToken:e,value:g,onChange:p,modelData:h},x)=>{let[y,f]=(0,l.useState)({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),[b,j]=(0,l.useState)([]),[_,v]=(0,l.useState)([]),[A,w]=(0,l.useState)([]),[k,N]=(0,l.useState)([]),[S,C]=(0,l.useState)({}),[T,I]=(0,l.useState)({}),L=(0,l.useRef)(!1),E=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=g?.router_settings?JSON.stringify({routing_strategy:g.router_settings.routing_strategy,fallbacks:g.router_settings.fallbacks,enable_tag_filtering:g.router_settings.enable_tag_filtering}):null;if(L.current&&e===E.current){L.current=!1;return}if(L.current&&e!==E.current&&(L.current=!1),e!==E.current)if(E.current=e,g?.router_settings){let e=g.router_settings,{fallbacks:t,...l}=e;f({routerSettings:l,selectedStrategy:e.routing_strategy||null,enableTagFiltering:e.enable_tag_filtering??!1});let a=e.fallbacks||[];j(a),v(a&&0!==a.length?a.map((e,t)=>{let[l,a]=Object.entries(e)[0];return{id:(t+1).toString(),primaryModel:l||null,fallbackModels:a||[]}}):[{id:"1",primaryModel:null,fallbackModels:[]}])}else f({routerSettings:{},selectedStrategy:null,enableTagFiltering:!1}),j([]),v([{id:"1",primaryModel:null,fallbackModels:[]}])},[g]),(0,l.useEffect)(()=>{e&&(0,d.getRouterSettingsCall)(e).then(e=>{if(e.fields){let t={};e.fields.forEach(e=>{t[e.field_name]={ui_field_name:e.ui_field_name,field_description:e.field_description,options:e.options,link:e.link}}),C(t);let l=e.fields.find(e=>"routing_strategy"===e.field_name);l?.options&&N(l.options),e.routing_strategy_descriptions&&I(e.routing_strategy_descriptions)}})},[e]),(0,l.useEffect)(()=>{e&&(async()=>{try{let t=await (0,m.fetchAvailableModels)(e);w(t)}catch(e){console.error("Error fetching model info for fallbacks:",e)}})()},[e]);let O=()=>{let e=new Set(["allowed_fails","cooldown_time","num_retries","timeout","retry_after"]),t=new Set(["model_group_alias","retry_policy"]),l=Object.fromEntries(Object.entries({...y.routerSettings,enable_tag_filtering:y.enableTagFiltering,routing_strategy:y.selectedStrategy,fallbacks:b.length>0?b:null}).map(([l,a])=>{if("routing_strategy_args"!==l&&"routing_strategy"!==l&&"enable_tag_filtering"!==l&&"fallbacks"!==l){let s=document.querySelector(`input[name="${l}"]`);if(s){if(void 0!==s.value&&""!==s.value){let i=((l,a,s)=>{if(null==a)return s;let i=String(a).trim();if(""===i||"null"===i.toLowerCase())return null;if(e.has(l)){let e=Number(i);return Number.isNaN(e)?s:e}if(t.has(l)){if(""===i)return null;try{return JSON.parse(i)}catch{return s}}return"true"===i.toLowerCase()||"false"!==i.toLowerCase()&&i})(l,s.value,a);return[l,i]}return[l,null]}}else if("routing_strategy"===l)return[l,y.selectedStrategy];else if("enable_tag_filtering"===l)return[l,y.enableTagFiltering];else if("fallbacks"===l)return[l,b.length>0?b:null];else if("routing_strategy_args"===l&&"latency-based-routing"===y.selectedStrategy){let e=document.querySelector('input[name="lowest_latency_buffer"]'),t=document.querySelector('input[name="ttl"]'),l={};return e?.value&&(l.lowest_latency_buffer=Number(e.value)),t?.value&&(l.ttl=Number(t.value)),["routing_strategy_args",Object.keys(l).length>0?l:null]}return[l,a]}).filter(e=>null!=e)),a=(e,t=!1)=>null==e||"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length||t&&("number"!=typeof e||Number.isNaN(e))?null:e;return{routing_strategy:a(l.routing_strategy),allowed_fails:a(l.allowed_fails,!0),cooldown_time:a(l.cooldown_time,!0),num_retries:a(l.num_retries,!0),timeout:a(l.timeout,!0),retry_after:a(l.retry_after,!0),fallbacks:b.length>0?b:null,context_window_fallbacks:a(l.context_window_fallbacks),retry_policy:a(l.retry_policy),model_group_alias:a(l.model_group_alias),enable_tag_filtering:y.enableTagFiltering,routing_strategy_args:a(l.routing_strategy_args)}},F=(0,o.useDebouncedCallback)(()=>{p&&(L.current=!0,p({router_settings:O()}))},{wait:100});(0,l.useEffect)(()=>{p&&F()},[y,b]);let M=Array.from(new Set(A.map(e=>e.model_group))).sort();return((0,l.useImperativeHandle)(x,()=>({getValue:()=>({router_settings:O()})})),e)?(0,t.jsx)("div",{className:"w-full",children:(0,t.jsxs)(i.TabGroup,{className:"w-full",children:[(0,t.jsxs)(r.TabList,{variant:"line",defaultValue:"1",className:"px-8 pt-4",children:[(0,t.jsx)(n.Tab,{value:"1",children:"Loadbalancing"}),(0,t.jsx)(n.Tab,{value:"2",children:"Fallbacks"})]}),(0,t.jsxs)(s.TabPanels,{className:"px-8 py-6",children:[(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(c.default,{value:y,onChange:f,routerFieldsMetadata:S,availableRoutingStrategies:k,routingStrategyDescriptions:T})}),(0,t.jsx)(a.TabPanel,{children:(0,t.jsx)(u.FallbackSelectionForm,{groups:_,onGroupsChange:e=>{v(e),j(e.filter(e=>e.primaryModel&&e.fallbackModels.length>0).map(e=>({[e.primaryModel]:e.fallbackModels})))},availableModels:M,maxGroups:5})})]})]})}):null});g.displayName="RouterSettingsAccordion",e.s(["default",0,g])},207082,e=>{"use strict";var t=e.i(619273),l=e.i(266027),a=e.i(243652),s=e.i(602869),i=e.i(431703),r=e.i(135214);let n=(0,a.createQueryKeys)("keys"),o=async(e,t,l,a={})=>{try{let r=(0,s.getProxyBaseUrl)(),n=new URLSearchParams(Object.entries({team_id:a.teamID,project_id:a.projectID,agent_id:a.agentID,organization_id:a.organizationID,key_alias:a.selectedKeyAlias,key_hash:a.keyHash,user_id:a.userID,page:t,size:l,sort_by:a.sortBy,sort_order:a.sortOrder,expand:a.expand,status:a.status,return_full_object:"true",include_team_keys:"true",include_created_by_keys:"true",substring_matching:"true"}).filter(([,e])=>null!=e).map(([e,t])=>[e,String(t)])),o=`${r?`${r}/key/list`:"/key/list"}?${n}`,d=await fetch(o,{method:"GET",headers:{[(0,s.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!d.ok){let e=await d.json(),t=(0,i.deriveErrorMessage)(e);throw(0,s.handleError)(t),Error(t)}return await d.json()}catch(e){throw console.error("Failed to list keys:",e),e}},d=(0,a.createQueryKeys)("deletedKeys");e.s(["keyKeys",0,n,"useDeletedKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:d.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,{...s,status:"deleted"}),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})},"useKeys",0,(e,a,s={})=>{let{accessToken:i}=(0,r.default)();return(0,l.useQuery)({queryKey:n.list({page:e,limit:a,...s}),queryFn:async()=>await o(i,e,a,s),enabled:!!i,staleTime:3e4,placeholderData:t.keepPreviousData})}])},510674,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(431703),i=e.i(135214),r=e.i(708347);let n=(0,l.createQueryKeys)("projects"),o=[...r.all_admin_roles,...r.internalUserRoles],d=async e=>{let t=(0,a.getProxyBaseUrl)(),l=`${t}/project/list`,i=await fetch(l,{method:"GET",headers:{[(0,a.getGlobalLitellmHeaderName)()]:`Bearer ${e}`,"Content-Type":"application/json"}});if(!i.ok){let e=await i.json(),t=(0,s.deriveErrorMessage)(e);throw(0,a.handleError)(t),Error(t)}return i.json()};e.s(["projectKeys",0,n,"useProjects",0,()=>{let{accessToken:e,userRole:l}=(0,i.default)();return(0,t.useQuery)({queryKey:n.list({}),queryFn:async()=>d(e),enabled:!!e&&o.includes(l)})}])},392110,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(199133),s=e.i(592968),i=e.i(312361),r=e.i(790848),n=e.i(536916),o=e.i(808613),d=e.i(827252),c=e.i(779241);let{Option:u}=a.Select;e.s(["default",0,({form:e,autoRotationEnabled:m,onAutoRotationChange:g,rotationInterval:p,onRotationIntervalChange:h,isCreateMode:x=!1,neverExpire:y=!1,onNeverExpireChange:f})=>{let b=p&&!["7d","30d","90d","180d","365d"].includes(p),[j,_]=(0,l.useState)(b),[v,A]=(0,l.useState)(b?p:"");return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Key Expiry Settings"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Expire Key"}),(0,t.jsx)(s.Tooltip,{title:"Set when this key should expire. Format: 30s (seconds), 30m (minutes), 30h (hours), 30d (days). Leave empty to keep the current expiry unchanged.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})}),!x&&f&&(0,t.jsx)(n.Checkbox,{checked:y,onChange:t=>{let l=t.target.checked;f(l),l&&(e&&"function"==typeof e.setFieldValue?e.setFieldValue("duration",""):e&&"function"==typeof e.setFieldsValue&&e.setFieldsValue({duration:""}))},className:"ml-2 text-sm font-normal text-gray-600",children:"Never Expire"})]}),(0,t.jsx)(o.Form.Item,{name:"duration",noStyle:!0,initialValue:"",children:(0,t.jsx)(c.TextInput,{placeholder:x?"e.g., 30d or leave empty to never expire":"e.g., 30d",className:"w-full",disabled:!x&&y})})]})]}),(0,t.jsx)(i.Divider,{}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Auto-Rotation Settings"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Enable Auto-Rotation"}),(0,t.jsx)(s.Tooltip,{title:"Key will automatically regenerate at the specified interval for enhanced security.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsx)(r.Switch,{checked:m,onChange:g,size:"default",className:m?"":"bg-gray-400"})]}),m&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"text-sm font-medium text-gray-700 flex items-center space-x-1",children:[(0,t.jsx)("span",{children:"Rotation Interval"}),(0,t.jsx)(s.Tooltip,{title:"How often the key should be automatically rotated. Choose the interval that best fits your security requirements.",children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 cursor-help text-xs"})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)(a.Select,{value:j?"custom":p,onChange:e=>{"custom"===e?_(!0):(_(!1),A(""),h(e))},className:"w-full",placeholder:"Select interval",children:[(0,t.jsx)(u,{value:"7d",children:"7 days"}),(0,t.jsx)(u,{value:"30d",children:"30 days"}),(0,t.jsx)(u,{value:"90d",children:"90 days"}),(0,t.jsx)(u,{value:"180d",children:"180 days"}),(0,t.jsx)(u,{value:"365d",children:"365 days"}),(0,t.jsx)(u,{value:"custom",children:"Custom interval"})]}),j&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(c.TextInput,{value:v,onChange:e=>{let t=e.target.value;A(t),h(t)},placeholder:"e.g., 1s, 5m, 2h, 14d"}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Supported formats: seconds (s), minutes (m), hours (h), days (d)"})]})]})]})]}),m&&(0,t.jsx)("div",{className:"bg-blue-50 p-3 rounded-md text-sm text-blue-700",children:"When rotation occurs, you'll receive a notification with the new key. The old key will be deactivated after a brief grace period."})]})]})}])},939510,e=>{"use strict";var t=e.i(843476),l=e.i(808613),a=e.i(199133),s=e.i(592968),i=e.i(827252);let{Option:r}=a.Select;e.s(["default",0,({type:e,name:n,showDetailedDescriptions:o=!0,className:d="",initialValue:c=null,form:u,onChange:m})=>{let g=e.toUpperCase(),p=e.toLowerCase(),h=`Select 'guaranteed_throughput' to prevent overallocating ${g} limit when the key belongs to a Team with specific ${g} limits.`;return(0,t.jsx)(l.Form.Item,{label:(0,t.jsxs)("span",{children:[g," Rate Limit Type"," ",(0,t.jsx)(s.Tooltip,{title:h,children:(0,t.jsx)(i.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:n,initialValue:c,className:d,children:(0,t.jsx)(a.Select,{defaultValue:o?"default":void 0,placeholder:"Select rate limit type",style:{width:"100%"},optionLabelProp:o?"label":void 0,onChange:e=>{u&&u.setFieldValue(n,e),m&&m(e)},children:o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",label:"Default",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Default"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Best effort throughput - no error if we're overallocating ",p," (Team/Key Limits checked at runtime)."]})]})}),(0,t.jsx)(r,{value:"guaranteed_throughput",label:"Guaranteed throughput",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Guaranteed throughput"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["Guaranteed throughput - raise an error if we're overallocating ",p," (also checks model-specific limits)"]})]})}),(0,t.jsx)(r,{value:"dynamic",label:"Dynamic",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)("div",{style:{fontWeight:500},children:"Dynamic"}),(0,t.jsxs)("div",{style:{fontSize:"11px",color:"#6b7280",marginTop:"2px"},children:["If the key has a set ",g," (e.g. 2 ",g,") and there are no 429 errors, it can dynamically exceed the limit when the model being called is not erroring."]})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r,{value:"best_effort_throughput",children:"Best effort throughput"}),(0,t.jsx)(r,{value:"guaranteed_throughput",children:"Guaranteed throughput"}),(0,t.jsx)(r,{value:"dynamic",children:"Dynamic"})]})})})}])},363256,e=>{"use strict";var t=e.i(843476),l=e.i(199133);let{Text:a}=e.i(898586).Typography;e.s(["default",0,({organizations:e,value:s,onChange:i,disabled:r,loading:n,style:o})=>(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"All Organizations",value:s,onChange:i,disabled:r,loading:n,allowClear:!0,style:{minWidth:280,...o},filterOption:(t,l)=>{if(!l)return!1;let a=e?.find(e=>e.organization_id===l.key);if(!a)return!1;let s=t.toLowerCase().trim(),i=(a.organization_alias||"").toLowerCase(),r=(a.organization_id||"").toLowerCase();return i.includes(s)||r.includes(s)},children:e?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.organization_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.organization_alias})," ",(0,t.jsxs)(a,{type:"secondary",children:["(",e.organization_id,")"]})]},e.organization_id))})])},128233,319312,833400,e=>{"use strict";var t=e.i(843476),l=e.i(464571),a=e.i(199133),s=e.i(592968),i=e.i(425063),r=e.i(107233),n=e.i(37727),o=e.i(271645);e.s(["BudgetFallbacksEditor",0,function({value:e,onChange:d,availableModels:c}){let[u,m]=(0,o.useState)(()=>{let t;return 0===(t=Object.keys(e)).length?[]:t.map((t,l)=>({id:String(l+1),primaryModel:t,fallbackModels:e[t]}))}),g=e=>{m(e),d(Object.fromEntries(e.filter(e=>null!==e.primaryModel&&e.fallbackModels.length>0).map(e=>[e.primaryModel,e.fallbackModels])))},p=()=>{g([...u,{id:Date.now().toString(),primaryModel:null,fallbackModels:[]}])},h=(e,t)=>{g(u.map(l=>l.id===e?{...l,...t}:l))},x=new Set(u.map(e=>e.primaryModel).filter(Boolean));return 0===u.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-xs text-gray-500 mb-2",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"When a model exceeds its per-model budget, requests automatically reroute to fallback models"}),u.map(e=>{let l=c.filter(t=>t===e.primaryModel||!x.has(t)),r=c.filter(t=>t!==e.primaryModel);return(0,t.jsxs)("div",{className:"relative rounded-lg border border-gray-200 bg-gray-50 p-4",children:[(0,t.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void g(u.filter(e=>e.id!==t))},className:"absolute top-2 right-2 text-gray-400 hover:text-red-500 transition-colors p-1",children:(0,t.jsx)(n.X,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Primary Model"}),(0,t.jsx)(a.Select,{className:"w-full",placeholder:"Select model",value:e.primaryModel,onChange:t=>{let l=e.fallbackModels.filter(e=>e!==t);h(e.id,{primaryModel:t,fallbackModels:l})},showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:l.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body})]}),(0,t.jsx)("div",{className:"flex items-center justify-center -my-1 mb-2",children:(0,t.jsxs)("div",{className:"bg-amber-50 text-amber-600 px-3 py-0.5 rounded-full text-[10px] font-bold border border-amber-100 flex items-center gap-1",children:[(0,t.jsx)(i.ArrowDown,{className:"w-3 h-3"}),"IF BUDGET EXCEEDED, TRY"]})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Fallback Models"}),(0,t.jsx)(a.Select,{mode:"multiple",className:"w-full",placeholder:e.primaryModel?"Select fallback models":"Select a primary model first",value:e.fallbackModels,onChange:t=>h(e.id,{fallbackModels:t}),disabled:!e.primaryModel,showSearch:!0,filterOption:(e,t)=>(t?.label??"").toLowerCase().includes(e.toLowerCase()),options:r.map(e=>({label:e,value:e})),getPopupContainer:e=>e.parentElement||document.body,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(s.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})}),e.fallbackModels.length>1&&(0,t.jsx)("div",{className:"text-[10px] text-gray-400 mt-1 ml-1",children:"Tried in order; first model still within its own budget is used"})]})]},e.id)}),(0,t.jsx)(l.Button,{size:"small",onClick:p,icon:(0,t.jsx)(r.Plus,{className:"w-3 h-3"}),children:"Add Budget Fallback"})]})}],128233);var d=e.i(28651);let c=[{value:"1h",label:"Hourly",resetHint:"Resets every hour"},{value:"24h",label:"Daily",resetHint:"Resets daily at midnight UTC"},{value:"7d",label:"Weekly",resetHint:"Resets every Sunday at midnight UTC"},{value:"30d",label:"Monthly",resetHint:"Resets on the 1st of every month at midnight UTC"}];e.s(["BudgetWindowsEditor",0,function({value:e,onChange:s}){let i=(t,l,a)=>{s(e.map((e,s)=>s===t?{...e,[l]:a}:e))};return(0,t.jsxs)("div",{children:[e.map((r,n)=>{let o=c.find(e=>e.value===r.budget_duration)?.resetHint;return(0,t.jsxs)("div",{style:{marginBottom:12},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,t.jsx)(a.Select,{value:r.budget_duration,onChange:e=>i(n,"budget_duration",e),style:{width:130},options:c.map(e=>({value:e.value,label:e.label}))}),(0,t.jsx)(d.InputNumber,{step:.01,min:0,precision:2,value:r.max_budget??void 0,onChange:e=>i(n,"max_budget",e??null),placeholder:"Max spend ($)",style:{width:160},prefix:"$"}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{s(e.filter((e,t)=>t!==n))},style:{padding:"0 4px"},children:"✕"})]}),o&&(0,t.jsxs)("div",{style:{fontSize:11,color:"#888",marginTop:3,marginLeft:2},children:["↻ ",o]})]},n)}),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),s([...e,{budget_duration:"24h",max_budget:null}])},children:"+ Add Budget Window"})]})}],319312);var u=e.i(311451);let m=0,g=()=>`tag-row-${m++}`;e.s(["TagRateLimitEditor",0,function({value:e,onChange:a}){let s=(t,l,s)=>{a(e.map((e,a)=>a===t?{...e,[l]:s}:e))};return(0,t.jsxs)("div",{children:[e.map((i,r)=>(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,t.jsx)(u.Input,{value:i.tag,onChange:e=>s(r,"tag",e.target.value),placeholder:"Tag (e.g. cell-1)",style:{width:180}}),(0,t.jsx)(d.InputNumber,{min:0,value:i.rpm_limit??void 0,onChange:e=>s(r,"rpm_limit",e??null),placeholder:"RPM",style:{width:120}}),(0,t.jsx)(l.Button,{type:"text",danger:!0,size:"small",onClick:()=>{a(e.filter((e,t)=>t!==r))},style:{padding:"0 4px"},children:"✕"})]},i.id)),(0,t.jsx)(l.Button,{size:"small",onClick:t=>{t.preventDefault(),a([...e,{id:g(),tag:"",rpm_limit:null}])},children:"+ Add Tag Limit"})]})},"tagLimitsToRows",0,e=>{let t=(e=>{if(!e||"object"!=typeof e)return{};let t={};return Object.entries(e).forEach(([e,l])=>{"number"==typeof l&&(t[e]=l)}),t})(e);return Object.keys(t).map(e=>({id:g(),tag:e,rpm_limit:t[e]}))},"tagRowsToLimits",0,e=>{let t={};return e.forEach(({tag:e,rpm_limit:l})=>{let a=e.trim();a&&"number"==typeof l&&(t[a]=l)}),{tag_rpm_limit:t}}],833400)},109034,e=>{"use strict";var t=e.i(266027),l=e.i(243652),a=e.i(602869),s=e.i(135214);let i=(0,l.createQueryKeys)("tags");e.s(["useTags",0,()=>{let{accessToken:e,userId:l,userRole:r}=(0,s.default)();return(0,t.useQuery)({queryKey:i.list({}),queryFn:async()=>await (0,a.tagListCall)(e),enabled:!!(e&&l&&r)})}])},309426,e=>{"use strict";var t=e.i(290571),l=e.i(444755),a=e.i(673706),s=e.i(271645),i=e.i(46757);let r=(0,a.makeClassName)("Col"),n=s.default.forwardRef((e,a)=>{let n,o,d,c,{numColSpan:u=1,numColSpanSm:m,numColSpanMd:g,numColSpanLg:p,children:h,className:x}=e,y=(0,t.__rest)(e,["numColSpan","numColSpanSm","numColSpanMd","numColSpanLg","children","className"]),f=(e,t)=>e&&Object.keys(t).includes(String(e))?t[e]:"";return s.default.createElement("div",Object.assign({ref:a,className:(0,l.tremorTwMerge)(r("root"),(n=f(u,i.colSpan),o=f(m,i.colSpanSm),d=f(g,i.colSpanMd),c=f(p,i.colSpanLg),(0,l.tremorTwMerge)(n,o,d,c)),x)},y),h)});n.displayName="Col",e.s(["Col",0,n],309426)},651904,e=>{"use strict";var t=e.i(843476),l=e.i(599724),a=e.i(266484);e.s(["default",0,function({value:e,onChange:s,premiumUser:i=!1,disabledCallbacks:r=[],onDisabledCallbacksChange:n}){return i?(0,t.jsx)(a.default,{value:e,onChange:s,disabledCallbacks:r,onDisabledCallbacksChange:n}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ langfuse-logging"}),(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-green-50 border border-green-200 text-green-800 text-sm font-medium opacity-50",children:"✨ datadog-logging"})]}),(0,t.jsx)("div",{className:"p-3 bg-yellow-50 border border-yellow-200 rounded-lg",children:(0,t.jsxs)(l.Text,{className:"text-sm text-yellow-800",children:["Setting Key/Team logging settings is a LiteLLM Enterprise feature. Global Logging Settings are available for all free users. Get a trial key"," ",(0,t.jsx)("a",{href:"https://www.litellm.ai/#pricing",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"here"}),"."]})})]})}])},575260,e=>{"use strict";var t=e.i(843476),l=e.i(199133),a=e.i(482725),s=e.i(56456);e.s(["default",0,({projects:e,value:i,onChange:r,disabled:n,loading:o,teamId:d})=>{let c=d?e?.filter(e=>e.team_id===d):e;return(0,t.jsx)(l.Select,{showSearch:!0,placeholder:"Search or select a project",value:i,onChange:r,disabled:n,loading:o,allowClear:!0,notFoundContent:o?(0,t.jsx)(a.Spin,{indicator:(0,t.jsx)(s.LoadingOutlined,{spin:!0}),size:"small"}):void 0,filterOption:(e,t)=>{if(!t)return!1;let l=c?.find(e=>e.project_id===t.key);if(!l)return!1;let a=e.toLowerCase().trim(),s=(l.project_alias||"").toLowerCase(),i=(l.project_id||"").toLowerCase();return s.includes(a)||i.includes(a)},optionFilterProp:"children",children:!o&&c?.map(e=>(0,t.jsxs)(l.Select.Option,{value:e.project_id,children:[(0,t.jsx)("span",{className:"font-medium",children:e.project_alias||e.project_id})," ",(0,t.jsxs)("span",{className:"text-gray-500",children:["(",e.project_id,")"]})]},e.project_id))})}])},364769,e=>{"use strict";var t=e.i(843476),l=e.i(271645),a=e.i(237016),s=e.i(464571),i=e.i(888259);e.s(["default",0,({apiKey:e})=>{let[r,n]=(0,l.useState)(!1);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"mb-2",children:["Please save this secret key somewhere safe and accessible. For security reasons,"," ",(0,t.jsx)("b",{children:"you will not be able to view it again"})," through your LiteLLM account. If you lose this secret key, you will need to generate a new one."]}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-3 mb-1",children:"Virtual Key:"}),(0,t.jsx)("div",{style:{background:"#f8f8f8",padding:"10px",borderRadius:"5px",marginBottom:"10px"},children:(0,t.jsx)("pre",{style:{wordWrap:"break-word",whiteSpace:"normal",margin:0},children:e})}),(0,t.jsx)(a.CopyToClipboard,{text:e,onCopy:()=>{n(!0),i.default.success("Key copied to clipboard"),setTimeout(()=>n(!1),2e3)},children:(0,t.jsx)(s.Button,{type:"primary",style:{marginTop:12},children:r?"Copied!":"Copy Virtual Key"})})]})}])},702597,e=>{"use strict";var t=e.i(843476),l=e.i(207082),a=e.i(109799),s=e.i(510674),i=e.i(109034),r=e.i(292639),n=e.i(135214),o=e.i(500330),d=e.i(827252),c=e.i(912598),u=e.i(677667),m=e.i(130643),g=e.i(898667),p=e.i(994388),h=e.i(309426),x=e.i(350967),y=e.i(599724),f=e.i(779241),b=e.i(629569),j=e.i(464571),_=e.i(808613),v=e.i(311451),A=e.i(212931),w=e.i(91739),k=e.i(199133),N=e.i(790848),S=e.i(262218),C=e.i(592968),T=e.i(898586),I=e.i(343488),L=e.i(741466),E=e.i(271645),O=e.i(708347),F=e.i(552130),M=e.i(557662),R=e.i(9314),B=e.i(860585),P=e.i(82946),D=e.i(392110),U=e.i(533882),z=e.i(844565),V=e.i(651904),K=e.i(939510),G=e.i(460285),Q=e.i(663435),W=e.i(363256),H=e.i(575260),q=e.i(371455),J=e.i(128233),$=e.i(319312),Y=e.i(833400),X=e.i(355619),Z=e.i(75921),ee=e.i(234713),et=e.i(390605),el=e.i(727749),ea=e.i(602869),es=e.i(364769),ei=e.i(435451),er=e.i(916940);let{Option:en}=k.Select,eo=async(e,t,l,a)=>{try{if(null===e||null===t)return[];if(null!==l)return(await (0,ea.modelAvailableCall)(l,e,t,!0,a,!0)).data.map(e=>e.id);return[]}catch(e){return console.error("Error fetching user models:",e),[]}},ed=async(e,t,l,a)=>{try{if(null===e||null===t)return;if(null!==l){let s=(await (0,ea.modelAvailableCall)(l,e,t)).data.map(e=>e.id);a(s)}}catch(e){console.error("Error fetching user models:",e)}};e.s(["default",0,({team:e,teams:ec,data:eu,addKey:em,autoOpenCreate:eg,prefillData:ep})=>{let{accessToken:eh,userId:ex,userRole:ey,premiumUser:ef}=(0,n.default)(),eb=ef||null!=ey&&O.rolesWithWriteAccess.includes(ey),{data:ej,isLoading:e_}=(0,a.useOrganizations)(),{data:ev,isLoading:eA}=(0,s.useProjects)(),{data:ew}=(0,r.useUISettings)(),{data:ek}=(0,i.useTags)(),eN=!!ew?.values?.enable_projects_ui,eS=!!ew?.values?.disable_custom_api_keys,eC=ek?Object.values(ek).map(e=>({value:e.name,label:e.name})):[],eT=(0,c.useQueryClient)(),[eI]=_.Form.useForm(),[eL,eE]=(0,E.useState)(!1),[eO,eF]=(0,E.useState)(null),[eM,eR]=(0,E.useState)(null),[eB,eP]=(0,E.useState)([]),[eD,eU]=(0,E.useState)([]),[ez,eV]=(0,E.useState)("you"),[eK,eG]=(0,E.useState)(!1),[eQ,eW]=(0,E.useState)(null),[eH,eq]=(0,E.useState)([]),[eJ,e$]=(0,E.useState)([]),[eY,eX]=(0,E.useState)([]),[eZ,e0]=(0,E.useState)([]),[e1,e4]=(0,E.useState)(e),[e2,e3]=(0,E.useState)(null),[e6,e5]=(0,E.useState)(null),[e7,e8]=(0,E.useState)(!1),[e9,te]=(0,E.useState)(null),[tt,tl]=(0,E.useState)({}),[ta,ts]=(0,E.useState)([]),[ti,tr]=(0,E.useState)(!1),[tn,to]=(0,E.useState)([]),[td,tc]=(0,E.useState)([]),[tu,tm]=(0,E.useState)("llm_api"),[tg,tp]=(0,E.useState)({}),[th,tx]=(0,E.useState)(!1),[ty,tf]=(0,E.useState)("30d"),[tb,tj]=(0,E.useState)(null),[t_,tv]=(0,E.useState)([]),[tA,tw]=(0,E.useState)([]),[tk,tN]=(0,E.useState)({}),[tS,tC]=(0,E.useState)(0),[tT,tI]=(0,E.useState)(0),[tL,tE]=(0,E.useState)([]),[tO,tF]=(0,E.useState)(null),tM=_.Form.useWatch("models",eI)??[],tR=()=>{eE(!1),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)},tB=()=>{eE(!1),eF(null),e4(null),eI.resetFields(),e0([]),tc([]),tm("llm_api"),tp({}),tx(!1),tf("30d"),tj(null),tI(e=>e+1),tF(null),e3(null),e5(null),tv([]),tw([]),tN({}),tC(e=>e+1)};(0,E.useEffect)(()=>{ex&&ey&&eh&&ed(ex,ey,eh,eP)},[eh,ex,ey]),(0,E.useEffect)(()=>{eh&&(0,ea.getAgentsList)(eh).then(e=>tE(e?.agents||[])).catch(()=>tE([]))},[eh]),(0,E.useEffect)(()=>{let e=async()=>{try{let e=(await (0,ea.getPoliciesList)(eh)).policies.map(e=>e.policy_name);e$(e)}catch(e){console.error("Failed to fetch policies:",e)}},t=async()=>{try{let e=await (0,ea.getPromptsList)(eh);eX(e.prompts.map(e=>e.prompt_id))}catch(e){console.error("Failed to fetch prompts:",e)}};(async()=>{try{let e=(await (0,ea.getGuardrailsList)(eh)).guardrails.map(e=>e.guardrail_name);eq(e)}catch(e){console.error("Failed to fetch guardrails:",e)}})(),e(),t()},[eh]),(0,E.useEffect)(()=>{(async()=>{try{if(eh){let e=sessionStorage.getItem("possibleUserRoles");if(e)tl(JSON.parse(e));else{let e=await (0,ea.getPossibleUserRoles)(eh);sessionStorage.setItem("possibleUserRoles",JSON.stringify(e)),tl(e)}}}catch(e){console.error("Error fetching possible user roles:",e)}})()},[eh]),(0,E.useEffect)(()=>{if(eg&&!eK&&ec&&ey&&O.rolesWithWriteAccess.includes(ey)&&(eE(!0),eG(!0),ep)){if(ep.owned_by&&("another_user"===ep.owned_by&&"Admin"!==ey?eV("you"):eV(ep.owned_by)),ep.team_id){let e=ec?.find(e=>e.team_id===ep.team_id)||null;e&&(e4(e),eI.setFieldsValue({team_id:ep.team_id}))}ep.key_alias&&eI.setFieldsValue({key_alias:ep.key_alias}),ep.models&&ep.models.length>0&&eW(ep.models),ep.key_type&&(tm(ep.key_type),eI.setFieldsValue({key_type:ep.key_type}))}},[eg,ep,ec,eK,eI,ey]);let tP=eD.includes("no-default-models")&&!e1,tD=async e=>{try{let t,a=e?.key_alias??"",s=e?.team_id??null;if((eu?.filter(e=>e.team_id===s).map(e=>e.key_alias)??[]).includes(a))throw Error(`Key alias ${a} already exists for team with ID ${s}, please provide another key alias`);if(el.default.info("Making API Call"),eE(!0),"you"===ez)e.user_id=ex;else if("agent"===ez){if(!tO)return void el.default.fromBackend("Please select an agent");e.agent_id=tO}let i={};try{i=JSON.parse(e.metadata||"{}")}catch(e){console.error("Error parsing metadata:",e)}if("service_account"===ez&&(i.service_account_id=e.key_alias),eZ.length>0&&(i={...i,logging:eZ.filter(e=>e.callback_name)}),td.length>0){let e=(0,M.mapDisplayToInternalNames)(td);i={...i,litellm_disabled_callbacks:e}}if(th&&(e.auto_rotate=!0,e.rotation_interval=ty),e.duration&&""!==e.duration.trim()||(e.duration=null),e.metadata=JSON.stringify(i),e.disable_global_guardrails||delete e.disable_global_guardrails,e.allowed_vector_store_ids&&e.allowed_vector_store_ids.length>0&&(e.object_permission={vector_stores:e.allowed_vector_store_ids},delete e.allowed_vector_store_ids),e.allowed_mcp_servers_and_groups&&(e.allowed_mcp_servers_and_groups.servers?.length>0||e.allowed_mcp_servers_and_groups.accessGroups?.length>0||e.allowed_mcp_servers_and_groups.toolsets?.length>0)){e.object_permission||(e.object_permission={});let{servers:t,accessGroups:l,toolsets:a}=e.allowed_mcp_servers_and_groups;t&&t.length>0&&(e.object_permission.mcp_servers=t),l&&l.length>0&&(e.object_permission.mcp_access_groups=l),a&&a.length>0&&(e.object_permission.mcp_toolsets=a),delete e.allowed_mcp_servers_and_groups}let r=e.mcp_tool_permissions||{};if(Object.keys(r).length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_tool_permissions=r),delete e.mcp_tool_permissions,e.allowed_mcp_access_groups&&e.allowed_mcp_access_groups.length>0&&(e.object_permission||(e.object_permission={}),e.object_permission.mcp_access_groups=e.allowed_mcp_access_groups,delete e.allowed_mcp_access_groups),e.allowed_agents_and_groups&&(e.allowed_agents_and_groups.agents?.length>0||e.allowed_agents_and_groups.accessGroups?.length>0)){e.object_permission||(e.object_permission={});let{agents:t,accessGroups:l}=e.allowed_agents_and_groups;t&&t.length>0&&(e.object_permission.agents=t),l&&l.length>0&&(e.object_permission.agent_access_groups=l),delete e.allowed_agents_and_groups}Object.keys(tg).length>0&&(e.aliases=JSON.stringify(tg)),tb?.router_settings&&Object.values(tb.router_settings).some(e=>null!=e&&""!==e)&&(e.router_settings=tb.router_settings);let n=t_.filter(e=>e.budget_duration&&null!==e.max_budget&&void 0!==e.max_budget);n.length>0&&(e.budget_limits=n);let{tag_rpm_limit:o}=(0,Y.tagRowsToLimits)(tA);Object.keys(o).length>0&&(e.tag_rpm_limit=o),Object.keys(tk).length>0&&(e.budget_fallbacks=tk),t="service_account"===ez?await (0,ea.keyCreateServiceAccountCall)(eh,e):await (0,ea.keyCreateCall)(eh,ex,e),em(t),eT.invalidateQueries({queryKey:l.keyKeys.lists()}),eF(t.key),eR(t.soft_budget),el.default.success("Virtual Key Created"),eI.resetFields(),tv([]),tw([]),tN({}),tC(e=>e+1),localStorage.removeItem("userData"+ex)}catch(t){let e=(e=>{let t;if(!(t=!e||"object"!=typeof e||e instanceof Error?String(e):JSON.stringify(e)).includes("/key/generate")&&!t.includes("KeyManagementRoutes.KEY_GENERATE"))return`Error creating the key: ${e}`;let l=t;try{if(!e||"object"!=typeof e||e instanceof Error){let e=t.match(/\{[\s\S]*\}/);if(e){let t=JSON.parse(e[0]),a=t?.error||t;a?.message&&(l=a.message)}}else{let t=e?.error||e;t?.message&&(l=t.message)}}catch(e){}return t.includes("team_member_permission_error")||l.includes("Team member does not have permissions")?"Team member does not have permission to generate key for this team. Ask your proxy admin to configure the team member permission settings.":`Error creating the key: ${e}`})(t);el.default.fromBackend(e)}};(0,E.useEffect)(()=>{if(e6){let e=ev?.find(e=>e.project_id===e6);eU(e?.models??[]),eI.setFieldValue("models",[]);return}ex&&ey&&eh&&eo(ex,ey,eh,e1?.team_id??null).then(e=>{eU((0,X.excludeProxyWideSentinel)(Array.from(new Set([...e1?.models??[],...e]))))}),eQ||eI.setFieldValue("models",[]),eI.setFieldValue("allowed_mcp_servers_and_groups",{servers:[],accessGroups:[]})},[e1,e6,eh,ex,ey,eI]),(0,E.useEffect)(()=>{if(!eQ||0===eQ.length||!eD||0===eD.length)return;let e=eQ.filter(e=>eD.includes(e));e.length>0&&eI.setFieldsValue({models:e}),eW(null)},[eQ,eD,eI]),(0,E.useEffect)(()=>{if(!e6||!ec)return;let e=ev?.find(e=>e.project_id===e6);if(!e?.team_id||e1?.team_id===e.team_id)return;let t=ec.find(t=>t.team_id===e.team_id)||null;t&&(e4(t),eI.setFieldValue("team_id",t.team_id))},[ec,e6,ev]);let tU=async e=>{if(!e)return void ts([]);tr(!0);try{let t=new URLSearchParams;if(t.append("user_email",e),null==eh)return;let l=(await (0,ea.userFilterUICall)(eh,t)).map(e=>({label:`${e.user_email} (${e.user_id})`,value:e.user_id,user:e}));ts(l)}catch(e){console.error("Error fetching users:",e),el.default.fromBackend("Failed to search for users")}finally{tr(!1)}},tz=(0,I.useDebouncedCallback)(e=>tU(e),{wait:L.DEBOUNCE_WAIT_MS});return(0,t.jsxs)("div",{children:[ey&&O.rolesWithWriteAccess.includes(ey)&&(0,t.jsx)(p.Button,{className:"mx-auto",onClick:()=>eE(!0),"data-testid":"create-key-button",children:"+ Create New Key"}),(0,t.jsx)(A.Modal,{open:eL,width:1e3,footer:null,onOk:tR,onCancel:tB,children:(0,t.jsxs)(_.Form,{form:eI,onFinish:tD,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Ownership"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Owned By"," ",(0,t.jsx)(C.Tooltip,{title:"Select who will own this Virtual Key",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),className:"mb-4",children:(0,t.jsxs)(w.Radio.Group,{onChange:e=>eV(e.target.value),value:ez,children:[(0,t.jsx)(w.Radio,{value:"you",children:"You"}),(0,t.jsx)(w.Radio,{value:"service_account",children:"Service Account"}),"Admin"===ey&&(0,t.jsx)(w.Radio,{value:"another_user",children:"Another User"}),(0,t.jsxs)(w.Radio,{value:"agent",children:["Agent ",(0,t.jsx)(S.Tag,{color:"purple",children:"New"})]})]})}),"another_user"===ez&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["User ID"," ",(0,t.jsx)(C.Tooltip,{title:"The user who will own this key and be responsible for its usage",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"user_id",className:"mt-4",rules:[{required:"another_user"===ez,message:"Please input the user ID of the user you are assigning the key to"}],children:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{style:{display:"flex",marginBottom:"8px"},children:[(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Type email to search for users",filterOption:!1,onSearch:tz,onSelect:(e,t)=>{let l;return l=t.user,void eI.setFieldsValue({user_id:l.user_id})},options:ta,loading:ti,allowClear:!0,style:{width:"100%"},notFoundContent:ti?"Searching...":"No users found"}),(0,t.jsx)(j.Button,{onClick:()=>e8(!0),style:{marginLeft:"8px"},children:"Create User"})]}),(0,t.jsx)("div",{className:"text-xs text-gray-500",children:"Search by email to find users"})]})}),"agent"===ez&&(0,t.jsxs)("div",{className:"mt-4 p-4 bg-purple-50 border border-purple-200 rounded-md",children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsxs)("span",{className:"text-sm font-medium text-gray-700",children:["Select Agent ",(0,t.jsx)("span",{className:"text-red-500",children:"*"})]})}),(0,t.jsx)(k.Select,{showSearch:!0,placeholder:"Select an agent",style:{width:"100%"},value:tO,onChange:e=>tF(e),filterOption:(e,t)=>t?.label?.toLowerCase().includes(e.toLowerCase()),options:tL.map(e=>({label:e.agent_name||e.agent_id,value:e.agent_id}))}),(0,t.jsx)("div",{className:"text-xs text-gray-500 mt-2",children:"This key will be used by the selected agent to make requests to LiteLLM"})]}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Organization"," ",(0,t.jsx)(C.Tooltip,{title:"The organization this key belongs to. Selecting an organization filters the available teams.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"organization_id",className:"mt-4",children:(0,t.jsx)(W.default,{organizations:ej,loading:e_,disabled:"Admin"!==ey,onChange:e=>{e3(e||null),e4(null),e5(null),eI.setFieldValue("team_id",void 0),eI.setFieldValue("project_id",void 0)}})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Team"," ",(0,t.jsx)(C.Tooltip,{title:"The team this key belongs to, which determines available models and budget limits",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"team_id",initialValue:e?e.team_id:null,className:"mt-4",rules:[{required:"service_account"===ez,message:"Please select a team for the service account"}],help:"service_account"===ez?"required":"",children:(0,t.jsx)(Q.default,{disabled:null!==e6,organizationId:e2,onTeamSelect:e=>{e4(e),e5(null),eI.setFieldValue("project_id",void 0),e?.organization_id?(e3(e.organization_id),eI.setFieldValue("organization_id",e.organization_id)):e||(e3(null),eI.setFieldValue("organization_id",void 0))}})}),eN&&(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Project"," ",(0,t.jsx)(C.Tooltip,{title:"Assign this key to a project. Selecting a project will lock the team to the project's team.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"project_id",className:"mt-4",children:(0,t.jsx)(H.default,{projects:ev,teamId:e1?.team_id,loading:eA||!ec,onChange:e=>{if(!e){e5(null),e4(null),eI.setFieldValue("team_id",void 0);return}e5(e)}})})]}),tP&&(0,t.jsx)("div",{className:"mb-8 p-4 bg-blue-50 border border-blue-200 rounded-md",children:(0,t.jsx)(y.Text,{className:"text-blue-800 text-sm",children:"Please select a team to continue configuring your Virtual Key. If you do not see any teams, please contact your Proxy Admin to either provide you with access to models or to add you to a team."})}),!tP&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)(b.Title,{className:"mb-4",children:"Key Details"}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["you"===ez||"another_user"===ez?"Key Name":"Service Account ID"," ",(0,t.jsx)(C.Tooltip,{title:"you"===ez||"another_user"===ez?"A descriptive name to identify this key":"Unique identifier for this service account",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_alias",rules:[{required:!0,message:`Please input a ${"you"===ez?"key name":"service account ID"}`}],help:"required",children:(0,t.jsx)(f.TextInput,{placeholder:""})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Models"," ",(0,t.jsx)(C.Tooltip,{title:"Select which models this key can access. Choose 'All Team Models' to grant access to all models available to the team. Leave empty to allow access to all models.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"models",rules:[],help:"management"===tu||"read_only"===tu?"Models field is disabled for this key type":"optional - leave empty to allow access to all models",className:"mt-4",children:(0,t.jsxs)(k.Select,{mode:"multiple",placeholder:"Select models",style:{width:"100%"},disabled:"management"===tu||"read_only"===tu,onChange:e=>{e.includes("all-team-models")?eI.setFieldsValue({models:["all-team-models"]}):e.includes("all-proxy-models")&&eI.setFieldsValue({models:["all-proxy-models"]})},children:[!e6&&e1&&(0,t.jsx)(en,{value:"all-team-models",children:"All Team Models"},"all-team-models"),!e6&&!e1&&(0,t.jsx)(en,{value:"all-proxy-models",children:"All Proxy Models"},"all-proxy-models"),eD.map(e=>(0,t.jsx)(en,{value:e,disabled:(0,X.hasAllModelsSentinel)(tM),children:(0,X.getModelDisplayName)(e)},e))]})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Key Type"," ",(0,t.jsx)(C.Tooltip,{title:"Select the type of key to determine what routes and operations this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"key_type",initialValue:"llm_api",className:"mt-4",children:(0,t.jsxs)(k.Select,{defaultValue:"llm_api",placeholder:"Select key type",style:{width:"100%"},optionLabelProp:"label",onChange:e=>{tm(e),("management"===e||"read_only"===e)&&eI.setFieldsValue({models:[]})},children:[(0,t.jsx)(en,{value:"llm_api",label:"AI APIs",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"AI APIs"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only AI API routes (chat/completions, embeddings, etc.)"})]})}),(0,t.jsx)(en,{value:"management",label:"Management",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Management"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call only management routes (user/team/key management)"})]})}),(0,t.jsx)(en,{value:"default",label:"Full Access",children:(0,t.jsxs)("div",{style:{padding:"4px 0"},children:[(0,t.jsx)(T.Typography.Text,{strong:!0,children:"Full Access"}),(0,t.jsx)(T.Typography.Paragraph,{type:"secondary",style:{fontSize:11,margin:"2px 0 0"},children:"Can call all routes (AI APIs, Management, and read-only)"})]})})]})})]}),!tP&&(0,t.jsx)("div",{className:"mb-8",children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)(b.Title,{className:"m-0",children:"Optional Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Max Budget (USD)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum amount in USD this key can spend. When reached, the key will be blocked from making further requests",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"max_budget",help:`Budget cannot exceed team max budget: $${e?.max_budget!==null&&e?.max_budget!==void 0?e?.max_budget:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.max_budget&&l>e.max_budget)throw Error(`Budget cannot exceed team max budget: $${(0,o.formatNumberWithCommas)(e.max_budget,4)}`)}}],children:(0,t.jsx)(ei.default,{step:.01,precision:2,width:200})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Reset Budget"," ",(0,t.jsx)(C.Tooltip,{title:"How often the budget should reset. For example, setting 'daily' will reset the budget every 24 hours",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"budget_duration",help:`Team Reset Budget: ${e?.budget_duration!==null&&e?.budget_duration!==void 0?e?.budget_duration:"None"}`,children:(0,t.jsx)(B.default,{onChange:e=>eI.setFieldValue("budget_duration",e)})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Windows"," ",(0,t.jsx)(C.Tooltip,{title:"Set multiple independent budget windows (e.g., hourly $10 AND monthly $200). Each window tracks spend separately and resets on its own schedule.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)($.BudgetWindowsEditor,{value:t_,onChange:tv})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Budget Fallbacks"," ",(0,t.jsx)(C.Tooltip,{title:"When a model exceeds its per-model budget (model_max_budget), requests automatically reroute to fallback models instead of failing. Configure per-model budgets in Advanced Settings.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(J.BudgetFallbacksEditor,{value:tk,onChange:tN,availableModels:eD},tS)}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Tokens per minute Limit (TPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of tokens this key can process per minute. Helps control usage and costs",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tpm_limit",help:`TPM cannot exceed team TPM limit: ${e?.tpm_limit!==null&&e?.tpm_limit!==void 0?e?.tpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.tpm_limit&&l>e.tpm_limit)throw Error(`TPM limit cannot exceed team TPM limit: ${e.tpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"tpm",name:"tpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Requests per minute Limit (RPM)"," ",(0,t.jsx)(C.Tooltip,{title:"Maximum number of API requests this key can make per minute. Helps prevent abuse and manage load",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"rpm_limit",help:`RPM cannot exceed team RPM limit: ${e?.rpm_limit!==null&&e?.rpm_limit!==void 0?e?.rpm_limit:"unlimited"}`,rules:[{validator:async(t,l)=>{if(l&&e&&null!==e.rpm_limit&&l>e.rpm_limit)throw Error(`RPM limit cannot exceed team RPM limit: ${e.rpm_limit}`)}}],children:(0,t.jsx)(ei.default,{step:1,width:400})}),(0,t.jsx)(K.default,{type:"rpm",name:"rpm_limit_type",className:"mt-4",initialValue:null,form:eI,showDetailedDescriptions:!0}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Per-Tag Rate Limits"," ",(0,t.jsx)(C.Tooltip,{title:"Scope rate limits to a request tag so each tag (e.g. a cell or group) gets its own RPM counter. Requests without a matching tag fall back to the key-level limit.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),children:(0,t.jsx)(Y.TagRateLimitEditor,{value:tA,onChange:tw})}),(0,t.jsx)(_.Form.Item,{className:"mt-4",label:(0,t.jsxs)("span",{children:["Throttle on budget exceeded"," ",(0,t.jsx)(C.Tooltip,{title:"When this key exceeds its max budget, throttle its TPM/RPM to the globally configured percentage instead of blocking access entirely. Requires budget_exceeded_throttle_percentage in litellm_settings and a TPM/RPM limit on the key.",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"throttle_on_budget_exceeded",valuePropName:"checked",children:(0,t.jsx)(N.Switch,{checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"Apply safety guardrails to this key to filter content or enforce policies",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"guardrails",className:"mt-4",help:eb?"Select existing guardrails or enter new ones":"Premium feature - Upgrade to set guardrails by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!eb,placeholder:eb?"Select or enter guardrails":"Premium feature - Upgrade to set guardrails by key",options:eH.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Disable Global Guardrails"," ",(0,t.jsx)(C.Tooltip,{title:"When enabled, this key will bypass any guardrails configured to run on every request (global guardrails)",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/quick_start",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"disable_global_guardrails",className:"mt-4",valuePropName:"checked",help:eb?"Bypass global guardrails for this key":"Premium feature - Upgrade to disable global guardrails by key",children:(0,t.jsx)(N.Switch,{disabled:!eb,checkedChildren:"Yes",unCheckedChildren:"No"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Policies"," ",(0,t.jsx)(C.Tooltip,{title:"Apply policies to this key to control guardrails and other settings",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/guardrails/guardrail_policies",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"policies",className:"mt-4",help:ef?"Select existing policies or enter new ones":"Premium feature - Upgrade to set policies by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter policies":"Premium feature - Upgrade to set policies by key",options:eJ.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Prompts"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific prompt templates",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/prompt_management",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"prompts",className:"mt-4",help:ef?"Select existing prompts or enter new ones":"Premium feature - Upgrade to set prompts by key",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},disabled:!ef,placeholder:ef?"Select or enter prompts":"Premium feature - Upgrade to set prompts by key",options:eY.map(e=>({value:e,label:e}))})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Access Groups"," ",(0,t.jsx)(C.Tooltip,{title:"Assign access groups to this key. Access groups control which models, MCP servers, and agents this key can use",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"access_group_ids",className:"mt-4",help:"Select access groups to assign to this key",children:(0,t.jsx)(R.default,{placeholder:"Select access groups (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Pass Through Routes"," ",(0,t.jsx)(C.Tooltip,{title:"Allow this key to use specific pass through routes",children:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/pass_through",target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})})]}),name:"allowed_passthrough_routes",className:"mt-4",help:ef?"Select existing pass through routes or enter new ones":"Premium feature - Upgrade to set pass through routes by key",children:(0,t.jsx)(z.default,{onChange:e=>eI.setFieldValue("allowed_passthrough_routes",e),value:eI.getFieldValue("allowed_passthrough_routes"),accessToken:eh,placeholder:ef?"Select or enter pass through routes":"Premium feature - Upgrade to set pass through routes by key",disabled:!ef,teamId:e1?e1.team_id:null})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Vector Stores"," ",(0,t.jsx)(C.Tooltip,{title:"Select which vector stores this key can access. If none selected, the key will have access to all available vector stores",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_vector_store_ids",className:"mt-4",help:"Select vector stores this key can access. Leave empty for access to all vector stores",children:(0,t.jsx)(er.default,{onChange:e=>eI.setFieldValue("allowed_vector_store_ids",e),value:eI.getFieldValue("allowed_vector_store_ids"),accessToken:eh,placeholder:"Select vector stores (optional)"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Metadata"," ",(0,t.jsx)(C.Tooltip,{title:"JSON object with additional information about this key. Used for tracking or custom logic",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"metadata",className:"mt-4",children:(0,t.jsx)(v.Input.TextArea,{rows:4,placeholder:"Enter metadata as JSON"})}),(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Tags"," ",(0,t.jsx)(C.Tooltip,{title:"Tags for tracking spend and/or doing tag-based routing. Used for analytics and filtering",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"tags",className:"mt-4",help:"Tags for tracking spend and/or doing tag-based routing.",children:(0,t.jsx)(k.Select,{mode:"tags",style:{width:"100%"},placeholder:"Select or enter tags",tokenSeparators:[","],options:eC})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"MCP Settings"})}),(0,t.jsxs)(m.AccordionBody,{children:[(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed MCP Servers"," ",(0,t.jsx)(C.Tooltip,{title:"Select which MCP servers or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_mcp_servers_and_groups",help:"Select MCP servers or access groups this key can access",children:(0,t.jsx)(Z.default,{onChange:e=>eI.setFieldValue("allowed_mcp_servers_and_groups",e),value:eI.getFieldValue("allowed_mcp_servers_and_groups"),accessToken:eh,teamId:e1?.team_id??null,placeholder:"Select MCP servers or access groups (optional)",allowNoMcpServers:!0})}),(0,t.jsx)(_.Form.Item,{name:"mcp_tool_permissions",initialValue:{},hidden:!0,children:(0,t.jsx)(v.Input,{type:"hidden"})}),(0,t.jsx)(_.Form.Item,{noStyle:!0,shouldUpdate:(e,t)=>e.allowed_mcp_servers_and_groups!==t.allowed_mcp_servers_and_groups||e.mcp_tool_permissions!==t.mcp_tool_permissions,children:()=>(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(et.default,{accessToken:eh,selectedServers:(eI.getFieldValue("allowed_mcp_servers_and_groups")?.servers||[]).filter(e=>e!==ee.NO_MCP_SERVERS_SENTINEL),toolPermissions:eI.getFieldValue("mcp_tool_permissions")||{},onChange:e=>eI.setFieldsValue({mcp_tool_permissions:e})})})})]})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Agent Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(_.Form.Item,{label:(0,t.jsxs)("span",{children:["Allowed Agents"," ",(0,t.jsx)(C.Tooltip,{title:"Select which agents or access groups this key can access",children:(0,t.jsx)(d.InfoCircleOutlined,{style:{marginLeft:"4px"}})})]}),name:"allowed_agents_and_groups",help:"Select agents or access groups this key can access",children:(0,t.jsx)(F.default,{onChange:e=>eI.setFieldValue("allowed_agents_and_groups",e),value:eI.getFieldValue("allowed_agents_and_groups"),accessToken:eh,placeholder:"Select agents or access groups (optional)"})})})]}),ef?(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!0,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]}):(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Key-level logging settings is an enterprise feature, get in touch -",(0,t.jsx)("a",{href:"https://www.litellm.ai/enterprise",target:"_blank",children:"https://www.litellm.ai/enterprise"})]}),placement:"top",children:(0,t.jsxs)("div",{style:{position:"relative"},children:[(0,t.jsx)("div",{style:{opacity:.5},children:(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Logging Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(V.default,{value:eZ,onChange:e0,premiumUser:!1,disabledCallbacks:td,onDisabledCallbacksChange:tc})})})]})}),(0,t.jsx)("div",{style:{position:"absolute",inset:0,cursor:"not-allowed"}})]})}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Router Settings"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4 w-full",children:(0,t.jsx)(G.default,{accessToken:eh||"",value:tb||void 0,onChange:tj,modelData:eB.length>0?{data:eB.map(e=>({model_name:e}))}:void 0},tT)})})]},`router-settings-accordion-${tT}`),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Model Aliases"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)(y.Text,{className:"text-sm text-gray-600 mb-4",children:"Create custom aliases for models that can be used in API calls. This allows you to create shortcuts for specific models."}),(0,t.jsx)(U.default,{accessToken:eh,initialModelAliases:tg,onAliasUpdate:tp,showExampleConfig:!1})]})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsx)("b",{children:"Key Lifecycle"})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(D.default,{form:eI,autoRotationEnabled:th,onAutoRotationChange:tx,rotationInterval:ty,onRotationIntervalChange:tf,isCreateMode:!0})})})]}),(0,t.jsxs)(u.Accordion,{className:"mt-4 mb-4",children:[(0,t.jsx)(g.AccordionHeader,{children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("b",{children:"Advanced Settings"}),(0,t.jsx)(C.Tooltip,{title:(0,t.jsxs)("span",{children:["Learn more about advanced settings in our"," ",(0,t.jsx)("a",{href:ea.proxyBaseUrl?`${ea.proxyBaseUrl}/#/key%20management/generate_key_fn_key_generate_post`:"/#/key%20management/generate_key_fn_key_generate_post",target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:text-blue-300",children:"documentation"})]}),children:(0,t.jsx)(d.InfoCircleOutlined,{className:"text-gray-400 hover:text-gray-300 cursor-help"})})]})}),(0,t.jsx)(m.AccordionBody,{children:(0,t.jsx)(P.default,{schemaComponent:"GenerateKeyRequest",form:eI,excludedFields:["key_alias","team_id","organization_id","models","duration","metadata","tags","guardrails","max_budget","budget_duration","tpm_limit","rpm_limit",...eS?["key"]:[]]})})]})]})]})}),(0,t.jsx)("div",{style:{textAlign:"right",marginTop:"10px"},children:(0,t.jsx)(j.Button,{htmlType:"submit",disabled:tP,style:{opacity:tP?.5:1},children:"Create Key"})})]})}),e7&&(0,t.jsx)(A.Modal,{title:"Create New User",open:e7,onCancel:()=>e8(!1),footer:null,width:800,children:(0,t.jsx)(q.CreateUserButton,{userID:ex,accessToken:eh,teams:ec,possibleUIRoles:tt,onUserCreated:e=>{te(e),eI.setFieldsValue({user_id:e}),e8(!1)},isEmbedded:!0})}),eO&&(0,t.jsx)(A.Modal,{open:eL,onOk:tR,onCancel:tB,footer:null,children:(0,t.jsxs)(x.Grid,{numItems:1,className:"gap-2 w-full",children:[(0,t.jsx)(b.Title,{children:"Save your Key"}),(0,t.jsx)(h.Col,{numColSpan:1,children:null!=eO?(0,t.jsx)(es.default,{apiKey:eO}):(0,t.jsx)(y.Text,{children:"Key being created, this might take 30s"})})]})})]})},"fetchTeamModels",0,eo,"fetchUserModels",0,ed],702597)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/14aik5-j--wpq.js b/litellm/proxy/_experimental/out/_next/static/chunks/14aik5-j--wpq.js deleted file mode 100644 index aebec0bf770..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/14aik5-j--wpq.js +++ /dev/null @@ -1,16 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let s=a.forwardRef(({className:e,size:a="default",...s},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s}));s.displayName="Card";let l=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));l.displayName="CardHeader";let i=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-title",className:(0,r.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));i.displayName="CardTitle";let n=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a}));n.displayName="CardDescription";let o=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));o.displayName="CardAction";let d=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a}));d.displayName="CardContent";let c=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));c.displayName="CardFooter",e.s(["Card",0,s,"CardAction",0,o,"CardContent",0,d,"CardDescription",0,n,"CardFooter",0,c,"CardHeader",0,l,"CardTitle",0,i])},737434,e=>{"use strict";var t=e.i(184163);e.s(["DownloadOutlined",()=>t.default])},695411,e=>{"use strict";var t=e.i(602869);let a=async e=>{try{let a=await (0,t.modelHubCall)(e);if(a?.data.length>0){let e=a.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,a])},244451,e=>{"use strict";let t;e.i(247167);var a=e.i(271645),r=e.i(343794),s=e.i(242064),l=e.i(763731),i=e.i(174428);let n=80*Math.PI,o=e=>{let{dotClassName:t,style:s,hasCircleCls:l}=e;return a.createElement("circle",{className:(0,r.default)(`${t}-circle`,{[`${t}-circle-bg`]:l}),r:40,cx:50,cy:50,strokeWidth:20,style:s})},d=({percent:e,prefixCls:t})=>{let s=`${t}-dot`,l=`${s}-holder`,d=`${l}-hidden`,[c,u]=a.useState(!1);(0,i.default)(()=>{0!==e&&u(!0)},[0!==e]);let m=Math.max(Math.min(e,100),0);if(!c)return null;let x={strokeDashoffset:`${n/4}`,strokeDasharray:`${n*m/100} ${n*(100-m)/100}`};return a.createElement("span",{className:(0,r.default)(l,`${s}-progress`,m<=0&&d)},a.createElement("svg",{viewBox:"0 0 100 100",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m},a.createElement(o,{dotClassName:s,hasCircleCls:!0}),a.createElement(o,{dotClassName:s,style:x})))};function c(e){let{prefixCls:t,percent:s=0}=e,l=`${t}-dot`,i=`${l}-holder`,n=`${i}-hidden`;return a.createElement(a.Fragment,null,a.createElement("span",{className:(0,r.default)(i,s>0&&n)},a.createElement("span",{className:(0,r.default)(l,`${t}-dot-spin`)},[1,2,3,4].map(e=>a.createElement("i",{className:`${t}-dot-item`,key:e})))),a.createElement(d,{prefixCls:t,percent:s}))}function u(e){var t;let{prefixCls:s,indicator:i,percent:n}=e,o=`${s}-dot`;return i&&a.isValidElement(i)?(0,l.cloneElement)(i,{className:(0,r.default)(null==(t=i.props)?void 0:t.className,o),percent:n}):a.createElement(c,{prefixCls:s,percent:n})}e.i(296059);var m=e.i(694758),x=e.i(183293),g=e.i(246422),f=e.i(838378);let h=new m.Keyframes("antSpinMove",{to:{opacity:1}}),p=new m.Keyframes("antRotate",{to:{transform:"rotate(405deg)"}}),v=(0,g.genStyleHooks)("Spin",e=>(e=>{let{componentCls:t,calc:a}=e;return{[t]:Object.assign(Object.assign({},(0,x.resetComponent)(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:a(a(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:a(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:a(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:a(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:a(a(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:a(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),height:a(e.dotSize).sub(a(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:h,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:p,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(t=>`${t} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal(),height:a(a(e.dotSizeSM).sub(a(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:a(a(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}})((0,f.mergeToken)(e,{spinDotDefault:e.colorTextDescription})),e=>{let{controlHeightLG:t,controlHeight:a}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:.35*t,dotSizeLG:a}}),b=[[30,.05],[70,.03],[96,.01]];var y=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(e);st.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(a[r[s]]=e[r[s]]);return a};let j=e=>{var l;let{prefixCls:i,spinning:n=!0,delay:o=0,className:d,rootClassName:c,size:m="default",tip:x,wrapperClassName:g,style:f,children:h,fullscreen:p=!1,indicator:j,percent:N}=e,w=y(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:C,direction:S,className:k,style:D,indicator:M}=(0,s.useComponentConfig)("spin"),L=C("spin",i),[$,O,z]=v(L),[E,Y]=a.useState(()=>n&&(!n||!o||!!Number.isNaN(Number(o)))),R=function(e,t){let[r,s]=a.useState(0),l=a.useRef(null),i="auto"===t;return a.useEffect(()=>(i&&e&&(s(0),l.current=setInterval(()=>{s(e=>{let t=100-e;for(let a=0;a{l.current&&(clearInterval(l.current),l.current=null)}),[i,e]),i?r:t}(E,N);a.useEffect(()=>{if(n){let e=function(e,t,a){var r,s=a||{},l=s.noTrailing,i=void 0!==l&&l,n=s.noLeading,o=void 0!==n&&n,d=s.debounceMode,c=void 0===d?void 0:d,u=!1,m=0;function x(){r&&clearTimeout(r)}function g(){for(var a=arguments.length,s=Array(a),l=0;le?o?(m=Date.now(),i||(r=setTimeout(c?f:g,e))):g():!0!==i&&(r=setTimeout(c?f:g,void 0===c?e-d:e)))}return g.cancel=function(e){var t=(e||{}).upcomingOnly;x(),u=!(void 0!==t&&t)},g}(o,()=>{Y(!0)},{debounceMode:false});return e(),()=>{var t;null==(t=null==e?void 0:e.cancel)||t.call(e)}}Y(!1)},[o,n]);let T=a.useMemo(()=>void 0!==h&&!p,[h,p]),q=(0,r.default)(L,k,{[`${L}-sm`]:"small"===m,[`${L}-lg`]:"large"===m,[`${L}-spinning`]:E,[`${L}-show-text`]:!!x,[`${L}-rtl`]:"rtl"===S},d,!p&&c,O,z),B=(0,r.default)(`${L}-container`,{[`${L}-blur`]:E}),I=null!=(l=null!=j?j:M)?l:t,H=Object.assign(Object.assign({},D),f),V=a.createElement("div",Object.assign({},w,{style:H,className:q,"aria-live":"polite","aria-busy":E}),a.createElement(u,{prefixCls:L,indicator:I,percent:R}),x&&(T||p)?a.createElement("div",{className:`${L}-text`},x):null);return $(T?a.createElement("div",Object.assign({},w,{className:(0,r.default)(`${L}-nested-loading`,g,O,z)}),E&&a.createElement("div",{key:"loading"},V),a.createElement("div",{className:B,key:"container"},h)):p?a.createElement("div",{className:(0,r.default)(`${L}-fullscreen`,{[`${L}-fullscreen-show`]:E},c,O,z)},V):V)};j.setDefaultIndicator=e=>{t=e},e.s(["default",0,j],244451)},482725,e=>{"use strict";var t=e.i(244451);e.s(["Spin",()=>t.default])},184163,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["default",0,l],184163)},211576,e=>{"use strict";var t=e.i(131757);e.s(["Col",()=>t.default])},178654,e=>{"use strict";let t=e.i(211576).Col;e.s(["Col",0,t],178654)},621192,e=>{"use strict";let t=e.i(281256).Row;e.s(["Row",0,t],621192)},653496,e=>{"use strict";var t=e.i(721369);e.s(["Tabs",()=>t.default])},166406,e=>{"use strict";var t=e.i(190144);e.s(["CopyOutlined",()=>t.default])},447566,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["ArrowLeftOutlined",0,l],447566)},637235,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["ClockCircleOutlined",0,l],637235)},245704,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["CheckCircleOutlined",0,l],245704)},72713,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["CalendarOutlined",0,l],72713)},973706,e=>{"use strict";var t=e.i(843476),a=e.i(72713),r=e.i(637235),s=e.i(994388),l=e.i(599724),i=e.i(166540),n=e.i(271645);let o=[{label:"Today",shortLabel:"today",getValue:()=>({from:(0,i.default)().startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 7 days",shortLabel:"7d",getValue:()=>({from:(0,i.default)().subtract(7,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Last 30 days",shortLabel:"30d",getValue:()=>({from:(0,i.default)().subtract(30,"days").startOf("day").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Month to date",shortLabel:"MTD",getValue:()=>({from:(0,i.default)().startOf("month").toDate(),to:(0,i.default)().endOf("day").toDate()})},{label:"Year to date",shortLabel:"YTD",getValue:()=>({from:(0,i.default)().startOf("year").toDate(),to:(0,i.default)().endOf("day").toDate()})}];e.s(["default",0,({value:e,onValueChange:d,label:c="Select Time Range",showTimeRange:u=!0})=>{let[m,x]=(0,n.useState)(!1),[g,f]=(0,n.useState)(e),[h,p]=(0,n.useState)(null),[v,b]=(0,n.useState)(""),[y,j]=(0,n.useState)(""),N=(0,n.useRef)(null),w=(0,n.useCallback)(e=>{if(!e.from||!e.to)return null;for(let t of o){let a=t.getValue(),r=(0,i.default)(e.from).isSame((0,i.default)(a.from),"day"),s=(0,i.default)(e.to).isSame((0,i.default)(a.to),"day");if(r&&s)return t.shortLabel}return null},[]);(0,n.useEffect)(()=>{p(w(e))},[e,w]);let C=(0,n.useCallback)(()=>{if(!v||!y)return{isValid:!0,error:""};let e=(0,i.default)(v,"YYYY-MM-DD"),t=(0,i.default)(y,"YYYY-MM-DD");return e.isValid()&&t.isValid()?t.isBefore(e)?{isValid:!1,error:"End date cannot be before start date"}:{isValid:!0,error:""}:{isValid:!1,error:"Invalid date format"}},[v,y])();(0,n.useEffect)(()=>{e.from&&b((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&j((0,i.default)(e.to).format("YYYY-MM-DD")),f(e)},[e]),(0,n.useEffect)(()=>{let e=e=>{N.current&&!N.current.contains(e.target)&&x(!1)};return m&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[m]);let S=(0,n.useCallback)((e,t)=>{if(!e||!t)return"Select date range";let a=e=>(0,i.default)(e).format("D MMM, HH:mm");return`${a(e)} - ${a(t)}`},[]),k=(0,n.useCallback)(e=>{let t;if(!e.from)return e;let a={...e},r=new Date(e.from);return t=new Date(e.to?e.to:e.from),r.toDateString()===t.toDateString(),r.setHours(0,0,0,0),t.setHours(23,59,59,999),a.from=r,a.to=t,a},[]),D=(0,n.useCallback)(()=>{try{if(v&&y&&C.isValid){let e=(0,i.default)(v,"YYYY-MM-DD").startOf("day"),t=(0,i.default)(y,"YYYY-MM-DD").endOf("day");if(e.isValid()&&t.isValid()){let a={from:e.toDate(),to:t.toDate()};f(a);let r=w(a);p(r)}}}catch(e){console.warn("Invalid date format:",e)}},[v,y,C.isValid,w]);return(0,n.useEffect)(()=>{D()},[D]),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[c&&(0,t.jsx)(l.Text,{className:"text-sm font-medium text-gray-700 whitespace-nowrap",children:c}),(0,t.jsxs)("div",{className:"relative",ref:N,children:[(0,t.jsx)("div",{className:"w-[300px] px-3 py-2 text-sm border border-gray-300 rounded-md bg-white cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500",onClick:()=>x(!m),children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.ClockCircleOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-gray-900",children:S(e.from,e.to)})]}),(0,t.jsx)("svg",{className:`w-4 h-4 text-gray-400 transition-transform ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})}),m&&(0,t.jsx)("div",{className:"absolute top-full right-0 z-9999 min-w-[600px] mt-1 bg-white border border-gray-200 rounded-lg shadow-xl",children:(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsxs)("div",{className:"w-1/2 border-r border-gray-200",children:[(0,t.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Relative time"})}),(0,t.jsx)("div",{className:"h-[350px] overflow-y-auto",children:o.map(e=>{let a=h===e.shortLabel;return(0,t.jsxs)("div",{className:`flex items-center justify-between px-5 py-4 cursor-pointer border-b border-gray-100 transition-colors ${a?"bg-blue-50 hover:bg-blue-100 border-blue-200":"hover:bg-gray-50"}`,onClick:()=>(e=>{let{from:t,to:a}=e.getValue();f({from:t,to:a}),p(e.shortLabel),b((0,i.default)(t).format("YYYY-MM-DD")),j((0,i.default)(a).format("YYYY-MM-DD"))})(e),children:[(0,t.jsx)("span",{className:`text-sm ${a?"text-blue-700 font-medium":"text-gray-700"}`,children:e.label}),(0,t.jsx)("span",{className:`text-xs px-2 py-1 rounded capitalize ${a?"text-blue-700 bg-blue-100":"text-gray-500 bg-gray-100"}`,children:e.shortLabel})]},e.label)})})]}),(0,t.jsxs)("div",{className:"w-1/2 relative",children:[(0,t.jsx)("div",{className:"p-3.5 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(a.CalendarOutlined,{className:"text-gray-600"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Start and end dates"})]})}),(0,t.jsxs)("div",{className:"p-6 space-y-6 pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"Start date"}),(0,t.jsx)("input",{type:"date",value:v,onChange:e=>b(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!C.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-sm text-gray-700 mb-1 block",children:"End date"}),(0,t.jsx)("input",{type:"date",value:y,onChange:e=>j(e.target.value),className:`w-65 px-3 py-2 text-sm border rounded-md cursor-pointer hover:border-gray-400 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 ${!C.isValid?"border-red-300 focus:border-red-500 focus:ring-red-200":"border-gray-300"}`})]}),!C.isValid&&C.error&&(0,t.jsx)("div",{className:"bg-red-50 border border-red-200 rounded-md p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("svg",{className:"w-4 h-4 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,t.jsx)("span",{className:"text-sm text-red-700 font-medium",children:C.error})]})}),g.from&&g.to&&C.isValid&&(0,t.jsxs)("div",{className:"bg-blue-50 p-3 rounded-md space-y-1",children:[(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"From:"})," ",(0,i.default)(g.from).format("MMM D, YYYY [at] HH:mm:ss")]}),(0,t.jsxs)("div",{className:"text-xs text-blue-800",children:[(0,t.jsx)("span",{className:"font-medium",children:"To:"})," ",(0,i.default)(g.to).format("MMM D, YYYY [at] HH:mm:ss")]})]})]}),(0,t.jsx)("div",{className:"absolute bottom-4 right-4",children:(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(s.Button,{variant:"secondary",onClick:()=>{f(e),e.from&&b((0,i.default)(e.from).format("YYYY-MM-DD")),e.to&&j((0,i.default)(e.to).format("YYYY-MM-DD")),p(w(e)),x(!1)},children:"Cancel"}),(0,t.jsx)(s.Button,{onClick:()=>{g.from&&g.to&&C.isValid&&(d(g),requestIdleCallback(()=>{d(k(g))},{timeout:100}),x(!1))},disabled:!g.from||!g.to||!C.isValid,children:"Apply"})]})})]})]})})]})]})}])},788191,e=>{"use strict";e.i(247167);var t=e.i(931067),a=e.i(271645);let r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M719.4 499.1l-296.1-215A15.9 15.9 0 00398 297v430c0 13.1 14.8 20.5 25.3 12.9l296.1-215a15.9 15.9 0 000-25.8zm-257.6 134V390.9L628.5 512 461.8 633.1z"}}]},name:"play-circle",theme:"outlined"};var s=e.i(9583),l=a.forwardRef(function(e,l){return a.createElement(s.default,(0,t.default)({},e,{ref:l,icon:r}))});e.s(["PlayCircleOutlined",0,l],788191)},318842,972680,e=>{"use strict";var t=e.i(843476),a=e.i(245704),r=e.i(149192),s=e.i(755151),l=e.i(285027),i=e.i(266027),n=e.i(166540),o=e.i(464571),d=e.i(482725),c=e.i(271645),u=e.i(602869);e.i(3565);var m=e.i(502626);let x={blocked:{icon:r.CloseOutlined,color:"text-red-600",bg:"bg-red-50",border:"border-red-200",label:"Blocked"},passed:{icon:a.CheckCircleOutlined,color:"text-green-600",bg:"bg-green-50",border:"border-green-200",label:"Passed"},flagged:{icon:l.WarningOutlined,color:"text-amber-600",bg:"bg-amber-50",border:"border-amber-200",label:"Flagged"}};e.s(["LogViewer",0,function({guardrailName:e,filterAction:a="all",logs:r=[],logsLoading:l=!1,totalLogs:g,accessToken:f=null,startDate:h="",endDate:p=""}){let[v,b]=(0,c.useState)(10),[y,j]=(0,c.useState)(a),[N,w]=(0,c.useState)(null),[C,S]=(0,c.useState)(!1),k=r.filter(e=>"all"===y||e.action===y).slice(0,v),D=g??r.length,M=h?(0,n.default)(h).utc().format("YYYY-MM-DD HH:mm:ss"):(0,n.default)().subtract(24,"hours").utc().format("YYYY-MM-DD HH:mm:ss"),L=p?(0,n.default)(p).utc().endOf("day").format("YYYY-MM-DD HH:mm:ss"):(0,n.default)().utc().format("YYYY-MM-DD HH:mm:ss"),{data:$}=(0,i.useQuery)({queryKey:["spend-log-by-request",N,M,L],queryFn:async()=>f&&N?await (0,u.uiSpendLogsCall)({accessToken:f,start_date:M,end_date:L,page:1,page_size:10,params:{request_id:N}}):null,enabled:!!(f&&N&&C)}),O=$?.data?.[0]??null;return(0,t.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg",children:[(0,t.jsx)("div",{className:"p-4 border-b border-gray-200",children:(0,t.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h3",{className:"text-base font-semibold text-gray-900",children:e?`Logs — ${e}`:"Request Logs"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:l?"Loading…":r.length>0?`Showing ${k.length} of ${D} entries`:"No logs for this period. Select a guardrail and date range."})]}),r.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-1",children:["all","blocked","flagged","passed"].map(e=>(0,t.jsx)(o.Button,{type:y===e?"primary":"default",size:"small",onClick:()=>j(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,t.jsx)("div",{className:"h-4 w-px bg-gray-200"}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 mr-1",children:"Sample:"}),[10,50,100].map(e=>(0,t.jsx)(o.Button,{type:v===e?"primary":"default",size:"small",onClick:()=>b(e),children:e},e))]})]})]})}),l&&(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(d.Spin,{})}),!l&&0===k.length&&(0,t.jsx)("div",{className:"py-12 text-center text-sm text-gray-500",children:"No logs to display. Adjust filters or date range."}),!l&&k.length>0&&(0,t.jsx)("div",{className:"divide-y divide-gray-100",children:k.map(e=>{let a=x[e.action],r=a.icon;return(0,t.jsxs)("button",{type:"button",onClick:()=>{w(e.id),S(!0)},className:"w-full text-left px-4 py-3 hover:bg-gray-50 transition-colors flex items-start gap-3",children:[(0,t.jsx)(r,{className:`w-4 h-4 mt-0.5 shrink-0 ${a.color}`}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1 flex-wrap",children:[(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-sm border ${a.bg} ${a.color} ${a.border}`,children:a.label}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp}),(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"·"}),e.model&&(0,t.jsx)("span",{className:"text-xs text-gray-500",children:e.model})]}),(0,t.jsx)("p",{className:"text-sm text-gray-800 truncate",children:e.input_snippet??e.input??"—"})]}),(0,t.jsx)(s.DownOutlined,{className:"w-4 h-4 text-gray-400 shrink-0 mt-1"})]},e.id)})}),(0,t.jsx)(m.LogDetailsDrawer,{open:C,onClose:()=>{S(!1),w(null)},logEntry:O,accessToken:f,allLogs:O?[O]:[],startTime:M})]})}],318842),e.s(["MetricCard",0,function({label:e,value:a,valueColor:r="text-gray-900",icon:s,subtitle:l}){return(0,t.jsxs)("div",{className:"h-full bg-white border border-gray-200 rounded-lg p-5 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-600",children:e}),s&&(0,t.jsx)("span",{className:"text-gray-400",children:s})]}),(0,t.jsx)("div",{className:`text-3xl font-semibold ${r} tracking-tight`,children:a}),l&&(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:l})]})}],972680)},55004,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(602869),s=e.i(973706),l=e.i(447566),i=e.i(602073),n=e.i(313603),o=e.i(285027),d=e.i(266027),c=e.i(464571),u=e.i(178654),m=e.i(621192),x=e.i(482725),g=e.i(653496),f=e.i(149192),h=e.i(788191),p=e.i(212931),v=e.i(199133),b=e.i(311451),y=e.i(695411);let j=`Evaluate whether this guardrail's decision was correct. -Analyze the user input, the guardrail action taken, and determine if it was appropriate. - -Consider: -— Was the user's intent genuinely harmful or policy-violating? -— Was the guardrail's action (block / flag / pass) appropriate? -— Could this be a false positive or false negative? - -Return a structured verdict with confidence and justification.`,N=`{ - "verdict": "correct" | "false_positive" | "false_negative", - "confidence": 0.0, - "justification": "string", - "risk_category": "string", - "suggested_action": "keep" | "adjust threshold" | "add allowlist" -} -`;function w({open:e,onClose:r,guardrailName:s,accessToken:l,onRunEvaluation:i}){let[n,o]=(0,a.useState)(j),[d,u]=(0,a.useState)(N),[m,x]=(0,a.useState)(null),[g,C]=(0,a.useState)([]),[S,k]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(!e||!l)return void C([]);let t=!1;return k(!0),(0,y.fetchAvailableModels)(l).then(e=>{t||C(e)}).catch(()=>{t||C([])}).finally(()=>{t||k(!1)}),()=>{t=!0}},[e,l]);let D=g.map(e=>({value:e.model_group,label:e.model_group}));return(0,t.jsxs)(p.Modal,{title:"Evaluation Settings",open:e,onCancel:r,width:640,footer:null,closeIcon:(0,t.jsx)(f.CloseOutlined,{}),destroyOnClose:!0,children:[(0,t.jsx)("p",{className:"text-sm text-gray-500 mb-4",children:s?`Configure AI evaluation for ${s}`:"Configure AI evaluation for re-running on logs"}),(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,t.jsx)("label",{className:"text-sm font-medium text-gray-700",children:"Evaluation Prompt"}),(0,t.jsx)("button",{type:"button",onClick:()=>o(j),className:"text-xs text-indigo-600 hover:text-indigo-700",children:"Reset to default"})]}),(0,t.jsx)(b.Input.TextArea,{value:n,onChange:e=>o(e.target.value),rows:6,className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"System prompt sent to the evaluation model. Output is structured via response_format."})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Response Schema"}),(0,t.jsx)("p",{className:"text-xs text-gray-400 mb-1",children:"response_format: json_schema"}),(0,t.jsx)(b.Input.TextArea,{value:d,onChange:e=>u(e.target.value),rows:6,className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1.5",children:"Model"}),(0,t.jsx)(v.Select,{placeholder:S?"Loading models…":"Select a model",value:m??void 0,onChange:x,options:D,style:{width:"100%"},showSearch:!0,optionFilterProp:"label",loading:S,notFoundContent:l?"No models available":"Sign in to see models"})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 mt-6 pt-4 border-t border-gray-100",children:[(0,t.jsx)(c.Button,{onClick:r,children:"Cancel"}),(0,t.jsx)(c.Button,{type:"primary",icon:(0,t.jsx)(h.PlayCircleOutlined,{}),onClick:()=>{m&&(i?.({prompt:n,schema:d,model:m}),r())},disabled:!m,children:"Run Evaluation"})]})]})}var C=e.i(318842),S=e.i(972680);let k={healthy:{bg:"bg-green-50",text:"text-green-700",dot:"bg-green-500"},warning:{bg:"bg-amber-50",text:"text-amber-700",dot:"bg-amber-500"},critical:{bg:"bg-red-50",text:"text-red-700",dot:"bg-red-500"}};function D({guardrailId:e,onBack:s,accessToken:f=null,startDate:h,endDate:p}){let[v,b]=(0,a.useState)("overview"),[y,j]=(0,a.useState)(!1),[N,M]=(0,a.useState)(1),{data:L,isLoading:$,error:O}=(0,d.useQuery)({queryKey:["guardrails-usage-detail",e,h,p],queryFn:()=>(0,r.getGuardrailsUsageDetail)(f,e,h,p),enabled:!!f&&!!e}),{data:z,isLoading:E}=(0,d.useQuery)({queryKey:["guardrails-usage-logs",e,N,50],queryFn:()=>(0,r.getGuardrailsUsageLogs)(f,{guardrailId:e,page:N,pageSize:50,startDate:h,endDate:p}),enabled:!!f&&!!e}),Y=(0,a.useMemo)(()=>(z?.logs??[]).map(e=>({id:e.id,timestamp:e.timestamp,action:e.action,score:e.score,model:e.model,input_snippet:e.input_snippet,output_snippet:e.output_snippet,reason:e.reason})),[z?.logs]),R=L?{name:L.guardrail_name,description:L.description??"",status:L.status,provider:L.provider,type:L.type,requestsEvaluated:L.requestsEvaluated,failRate:L.failRate,avgScore:L.avgScore,avgLatency:L.avgLatency}:{name:e,description:"",status:"healthy",provider:"—",type:"—",requestsEvaluated:0,failRate:0,avgScore:void 0,avgLatency:void 0},T=k[R.status]??k.healthy;return $&&!L?(0,t.jsx)("div",{className:"flex items-center justify-center py-12",children:(0,t.jsx)(x.Spin,{size:"large"})}):O&&!L?(0,t.jsxs)("div",{children:[(0,t.jsx)(c.Button,{type:"link",icon:(0,t.jsx)(l.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsx)("p",{className:"text-red-600",children:"Failed to load guardrail details."})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)(c.Button,{type:"link",icon:(0,t.jsx)(l.ArrowLeftOutlined,{}),onClick:s,className:"pl-0 mb-4",children:"Back to Overview"}),(0,t.jsxs)("div",{className:"flex items-start justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(i.SafetyOutlined,{className:"text-xl text-gray-400"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:R.name}),(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-0.5 text-xs font-medium rounded-full ${T.bg} ${T.text}`,children:[(0,t.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${T.dot}`}),R.status.charAt(0).toUpperCase()+R.status.slice(1)]})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500 ml-8",children:R.description})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 text-xs font-medium rounded-md bg-indigo-50 text-indigo-700 border border-indigo-200",children:R.provider}),(0,t.jsx)(c.Button,{type:"default",icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>j(!0),title:"Evaluation settings"})]})]})]}),(0,t.jsx)(g.Tabs,{activeKey:v,onChange:b,items:[{key:"overview",label:"Overview"},{key:"logs",label:"Logs"}]}),"overview"===v&&(0,t.jsxs)("div",{className:"space-y-6 mt-4",children:[(0,t.jsxs)(m.Row,{gutter:[16,16],children:[(0,t.jsx)(u.Col,{xs:12,md:8,children:(0,t.jsx)(S.MetricCard,{label:"Requests Evaluated",value:R.requestsEvaluated.toLocaleString()})}),(0,t.jsx)(u.Col,{xs:12,md:8,children:(0,t.jsx)(S.MetricCard,{label:"Fail Rate",value:`${R.failRate}%`,valueColor:R.failRate>15?"text-red-600":R.failRate>5?"text-amber-600":"text-green-600",subtitle:`${Math.round(R.requestsEvaluated*R.failRate/100).toLocaleString()} blocked`,icon:R.failRate>15?(0,t.jsx)(o.WarningOutlined,{className:"text-red-400"}):void 0})}),(0,t.jsx)(u.Col,{xs:12,md:8,children:(0,t.jsx)(S.MetricCard,{label:"Avg. latency added",value:null!=R.avgLatency?`${Math.round(R.avgLatency)}ms`:"—",valueColor:null!=R.avgLatency?R.avgLatency>150?"text-red-600":R.avgLatency>50?"text-amber-600":"text-green-600":"text-gray-500",subtitle:null!=R.avgLatency?"Per request (avg)":"No data"})})]}),(0,t.jsx)(C.LogViewer,{guardrailName:R.name,filterAction:"all",logs:Y,logsLoading:E,totalLogs:z?.total??0,accessToken:f,startDate:h,endDate:p})]}),"logs"===v&&(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(C.LogViewer,{guardrailName:R.name,logs:Y,logsLoading:E,totalLogs:z?.total??0,accessToken:f,startDate:h,endDate:p})}),(0,t.jsx)(w,{open:y,onClose:()=>j(!1),guardrailName:R.name,accessToken:f})]})}var M=e.i(737434);e.i(247167);var L=e.i(931067);let $={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M917 211.1l-199.2 24c-6.6.8-9.4 8.9-4.7 13.6l59.3 59.3-226 226-101.8-101.7c-6.3-6.3-16.4-6.2-22.6 0L100.3 754.1a8.03 8.03 0 000 11.3l45 45.2c3.1 3.1 8.2 3.1 11.3 0L433.3 534 535 635.7c6.3 6.2 16.4 6.2 22.6 0L829 364.5l59.3 59.3a8.01 8.01 0 0013.6-4.7l24-199.2c.7-5.1-3.7-9.5-8.9-8.8z"}}]},name:"rise",theme:"outlined"};var O=e.i(9583),z=a.forwardRef(function(e,t){return a.createElement(O.default,(0,L.default)({},e,{ref:t,icon:$}))}),E=e.i(175712),Y=e.i(291542),R=e.i(898586);e.i(32117);var T=e.i(343053),q=e.i(515288);function B({data:e}){let a=e&&e.length>0?e:[];return(0,t.jsxs)(q.Card,{children:[(0,t.jsx)(q.CardHeader,{children:(0,t.jsx)(q.CardTitle,{className:"text-base font-semibold",children:"Request Outcomes Over Time"})}),(0,t.jsx)(q.CardContent,{children:(0,t.jsx)("div",{className:"h-80 min-h-[280px]",children:a.length>0?(0,t.jsx)(T.BarChart,{data:a,index:"date",categories:["passed","blocked"],colors:["green","red"],valueFormatter:e=>e.toLocaleString(),yAxisWidth:48,showLegend:!0,stack:!0,className:"h-full"}):(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-sm text-gray-500",children:"No chart data for this period"})})})]})}let I={Bedrock:"bg-orange-100 text-orange-700 border-orange-200","Google Cloud":"bg-sky-100 text-sky-700 border-sky-200",LiteLLM:"bg-indigo-100 text-indigo-700 border-indigo-200",Custom:"bg-gray-100 text-gray-600 border-gray-200"};function H({accessToken:e=null,startDate:s,endDate:l,onSelectGuardrail:g}){let[f,h]=(0,a.useState)("failRate"),[p,v]=(0,a.useState)("desc"),[b,y]=(0,a.useState)(!1),{data:j,isLoading:N,error:C}=(0,d.useQuery)({queryKey:["guardrails-usage-overview",s,l],queryFn:()=>(0,r.getGuardrailsUsageOverview)(e,s,l),enabled:!!e}),k=j?.rows??[],D=(0,a.useMemo)(()=>{let e,t,a,r;return j?{totalRequests:j.totalRequests??0,totalBlocked:j.totalBlocked??0,passRate:String(j.passRate??0),avgLatency:k.length?Math.round(k.reduce((e,t)=>e+(t.avgLatency??0),0)/k.length):0,count:k.length}:(e=k.reduce((e,t)=>e+t.requestsEvaluated,0),t=k.reduce((e,t)=>e+Math.round(t.requestsEvaluated*t.failRate/100),0),a=e>0?((1-t/e)*100).toFixed(1):"0",{totalRequests:e,totalBlocked:t,passRate:a,avgLatency:(r=k.filter(e=>null!=e.avgLatency)).length>0?Math.round(r.reduce((e,t)=>e+(t.avgLatency??0),0)/r.length):0,count:k.length})},[j,k]),L=j?.chart,$=(0,a.useMemo)(()=>[...k].sort((e,t)=>{let a="desc"===p?-1:1,r=e[f]??0,s=t[f]??0;return(Number(r)-Number(s))*a}),[k,f,p]),O=[{title:"Guardrail",dataIndex:"name",key:"name",render:(e,a)=>(0,t.jsx)("button",{type:"button",className:"text-sm font-medium text-gray-900 hover:text-indigo-600 text-left",onClick:()=>g(a.id),children:e})},{title:"Provider",dataIndex:"provider",key:"provider",render:e=>(0,t.jsx)("span",{className:`inline-flex items-center px-2 py-0.5 text-xs font-medium rounded border ${I[e]??I.Custom}`,children:e})},{title:"Requests",dataIndex:"requestsEvaluated",key:"requestsEvaluated",align:"right",sorter:!0,sortOrder:"requestsEvaluated"===f?"desc"===p?"descend":"ascend":null,render:e=>e.toLocaleString()},{title:"Fail Rate",dataIndex:"failRate",key:"failRate",align:"right",sorter:!0,sortOrder:"failRate"===f?"desc"===p?"descend":"ascend":null,render:(e,a)=>(0,t.jsxs)("span",{className:e>15?"text-red-600":e>5?"text-amber-600":"text-green-600",children:[e,"%","up"===a.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-red-400",children:"↑"}),"down"===a.trend&&(0,t.jsx)("span",{className:"ml-1 text-xs text-green-400",children:"↓"})]})},{title:"Avg. latency added",dataIndex:"avgLatency",key:"avgLatency",align:"right",sorter:!0,sortOrder:"avgLatency"===f?"desc"===p?"descend":"ascend":null,render:e=>(0,t.jsx)("span",{className:null==e?"text-gray-400":e>150?"text-red-600":e>50?"text-amber-600":"text-green-600",children:null!=e?`${e}ms`:"—"})},{title:"Status",dataIndex:"status",key:"status",align:"center",render:e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)("span",{className:`w-2 h-2 rounded-full ${"healthy"===e?"bg-green-500":"warning"===e?"bg-amber-500":"bg-red-500"}`}),(0,t.jsx)("span",{className:"text-xs text-gray-600 capitalize",children:e})]})}],T=["failRate","requestsEvaluated","avgLatency"];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-start justify-between mb-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)(i.SafetyOutlined,{className:"text-lg text-indigo-500"}),(0,t.jsx)("h1",{className:"text-xl font-semibold text-gray-900",children:"Guardrails Monitor"})]}),(0,t.jsx)("p",{className:"text-sm text-gray-500",children:"Monitor guardrail performance across all requests"})]}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsx)(c.Button,{type:"default",icon:(0,t.jsx)(M.DownloadOutlined,{}),title:"Coming soon",children:"Export Data"})})]}),(0,t.jsxs)(m.Row,{gutter:[16,16],className:"mb-6",children:[(0,t.jsx)(u.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(S.MetricCard,{label:"Total Evaluations",value:D.totalRequests.toLocaleString()})}),(0,t.jsx)(u.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(S.MetricCard,{label:"Blocked Requests",value:D.totalBlocked.toLocaleString(),valueColor:"text-red-600",icon:(0,t.jsx)(o.WarningOutlined,{className:"text-red-400"})})}),(0,t.jsx)(u.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(S.MetricCard,{label:"Pass Rate",value:`${D.passRate}%`,valueColor:"text-green-600",icon:(0,t.jsx)(z,{className:"text-green-400"})})}),(0,t.jsx)(u.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(S.MetricCard,{label:"Avg. latency added",value:`${D.avgLatency}ms`,valueColor:D.avgLatency>150?"text-red-600":D.avgLatency>50?"text-amber-600":"text-green-600"})}),(0,t.jsx)(u.Col,{xs:12,sm:12,md:8,flex:"1 0 20%",children:(0,t.jsx)(S.MetricCard,{label:"Active Guardrails",value:D.count})})]}),(0,t.jsx)("div",{className:"mb-6",children:(0,t.jsx)(B,{data:L})}),(0,t.jsxs)(E.Card,{className:"border border-gray-200 rounded-lg bg-white",styles:{body:{padding:0}},children:[(N||C)&&(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-center gap-2",children:[N&&(0,t.jsx)(x.Spin,{size:"small"}),C&&(0,t.jsx)("span",{className:"text-sm text-red-600",children:"Failed to load data. Try again."})]}),(0,t.jsxs)("div",{className:"px-6 py-4 border-b border-gray-200 flex items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(R.Typography.Title,{level:5,className:"mb-0! text-gray-900",children:"Guardrail Performance"}),(0,t.jsx)("p",{className:"text-xs text-gray-500 mt-0.5",children:"Click a guardrail to view details, logs, and configuration"})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(c.Button,{type:"default",icon:(0,t.jsx)(n.SettingOutlined,{}),onClick:()=>y(!0),title:"Evaluation settings"})})]}),(0,t.jsx)(Y.Table,{columns:O,dataSource:$,rowKey:"id",pagination:!1,loading:N,onChange:(e,t,a)=>{a?.field&&T.includes(a.field)&&(h(a.field),v("ascend"===a.order?"asc":"desc"))},locale:0!==k.length||N?void 0:{emptyText:"No data for this period"},onRow:e=>({onClick:()=>g(e.id),style:{cursor:"pointer"}})})]}),(0,t.jsx)(w,{open:b,onClose:()=>y(!1),accessToken:e})]})}let V=new Date,A=new Date;function _({accessToken:e=null}){let[l,i]=(0,a.useState)({type:"overview"}),n=(0,a.useMemo)(()=>new Date(A),[]),o=(0,a.useMemo)(()=>new Date(V),[]),[d,c]=(0,a.useState)({from:n,to:o}),u=d.from?(0,r.formatDate)(d.from):"",m=d.to?(0,r.formatDate)(d.to):"",x=(0,a.useCallback)(e=>{c(e)},[]);return(0,t.jsxs)("div",{className:"p-6 w-full min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"flex items-center justify-end mb-4",children:(0,t.jsx)(s.default,{value:d,onValueChange:x,label:"",showTimeRange:!1})}),"overview"===l.type?(0,t.jsx)(H,{accessToken:e,startDate:u,endDate:m,onSelectGuardrail:e=>{i({type:"detail",guardrailId:e})}}):(0,t.jsx)(D,{guardrailId:l.guardrailId,onBack:()=>{i({type:"overview"})},accessToken:e,startDate:u,endDate:m})]})}A.setDate(A.getDate()-7);var F=e.i(135214);e.s(["default",0,function(){let{accessToken:e}=(0,F.default)();return(0,t.jsx)(_,{accessToken:e})}],55004)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/19283pb0f3m0p.js b/litellm/proxy/_experimental/out/_next/static/chunks/19283pb0f3m0p.js deleted file mode 100644 index a233ab42454..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/19283pb0f3m0p.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let n=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));i.displayName="CardTitle";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));l.displayName="CardDescription";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));s.displayName="CardAction";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let u=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));u.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,s,"CardContent",0,d,"CardDescription",0,l,"CardFooter",0,u,"CardHeader",0,n,"CardTitle",0,i])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:o=0,side:n="bottom",sideOffset:i=4,className:l,...s}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:n,sideOffset:i,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",l),...s})})})},"DropdownMenuItem",0,function({className:e,inset:o,variant:n="default",...i}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...i})},"DropdownMenuSeparator",0,function({className:e,...o}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...o})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,a,o=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),i=e.i(951437),l=e.i(146376),s=e.i(667865),d=e.i(552245),u=e.i(53687),c=e.i(733332);let f=n.createContext(void 0);function g(){let e=n.useContext(f);if(void 0===e)throw Error((0,c.default)(64));return e}let p=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),b={tabActivationDirection:e=>({[p.activationDirection]:e})};var m=e.i(675606),h=e.i(56434);let v=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:c,orientation:g="horizontal",render:p,value:v,style:C,...y}=e,k=void 0!==e.defaultValue,w=n.useRef([]),[R,N]=n.useState(()=>new Map),[T,S]=(0,i.useControlled)({controlled:v,default:a,name:"Tabs",state:"value"}),E=void 0!==v,[M,I]=n.useState(()=>new Map),j=n.useRef(void 0),A=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of M.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[M]),[D,O]=n.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:_}=D,z=_,P=!1;L!==T&&(z=x(L,T,g,M),P=null!=L&&null!=T&&null==A(T));let H=P?L:T,W=L!==H||_!==z;(0,l.useIsoLayoutEffect)(()=>{W&&O({previousValue:H,tabActivationDirection:z})},[H,W,z]);let V=(0,s.useStableCallback)((e,t)=>{t.activationDirection=x(T,e,g,M),c?.(e,t),t.isCanceled||S(e)}),Y=(0,s.useStableCallback)((e,t)=>{c?.(e,(0,m.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),B=(0,s.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),K=(0,s.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),F=n.useCallback(e=>R.get(e),[R]),X=n.useCallback(e=>{for(let t of M.values())if(e===t?.value)return t?.id},[M]),$=n.useMemo(()=>({getTabElementBySelectedValue:A,getTabIdByPanelValue:X,getTabPanelIdByValue:F,onValueChange:V,orientation:g,registerMountedTabPanel:B,setTabMap:I,unregisterMountedTabPanel:K,tabActivationDirection:z,value:T}),[A,X,F,V,g,B,I,K,z,T]),U=n.useMemo(()=>{for(let e of M.values())if(null!=e&&e.value===T)return e},[M,T]),q=n.useMemo(()=>{for(let e of M.values())if(null!=e&&!e.disabled)return e.value},[M]),G=n.useRef(!k),Z=n.useRef(a),J=n.useRef(k),Q=n.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(E)return;function e(e,t){S(e),O(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),Y(e,t),G.current=!1}if(0===M.size){Q.current&&null!==T&&!j.current?.isConnected&&e(null,h.REASONS.missing);return}Q.current=!0,j.current=M.keys().next().value;let t=U?.disabled,r=null==U&&null!==T;if(t||T!==Z.current||(J.current=!1),J.current&&t&&T===Z.current)return;let a=G.current;if(t||r){let r=q??null;if(T===r){G.current=!1;return}let o=h.REASONS.missing;a?o=h.REASONS.initial:t&&(o=h.REASONS.disabled),e(r,o);return}a&&null!=U&&(Y(T,h.REASONS.initial),G.current=!1)},[q,E,Y,U,S,M,T]);let ee={orientation:g,tabActivationDirection:z},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:b});return(0,o.jsx)(f.Provider,{value:$,children:(0,o.jsx)(u.CompositeList,{elementsRef:w,children:et})})});function x(e,t,r,a){if(null==e||null==t)return"none";let o=null,n=null;for(let[r,i]of a.entries()){if(null==i)continue;let a=i.value??i.index;if(e===a&&(o=r),t===a&&(n=r),null!=o&&null!=n)break}if(null==o||null==n)return o!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let i=o.getBoundingClientRect(),l=n.getBoundingClientRect();if("horizontal"===r){if(l.lefti.left)return"right"}else{if(l.topi.top)return"down"}return"none"}var C=e.i(108868),y=e.i(788015),k=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var R=e.i(395530);let N=n.createContext(void 0);function T(){let e=n.useContext(N);if(void 0===e)throw Error((0,c.default)(65));return e}var S=e.i(647554);let E=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:o,value:i,id:s,nativeButton:u=!0,style:c,...f}=e,{value:p,getTabPanelIdByValue:v,orientation:x,tabActivationDirection:N}=g(),{activateOnFocus:E,highlightedTabIndex:M,onTabActivation:I,registerTabResizeObserverElement:j,setHighlightedTabIndex:A,tabsListElement:D}=T(),O=(0,y.useBaseUiId)(s),L=n.useMemo(()=>({disabled:a,id:O,value:i}),[a,O,i]),{compositeProps:_,compositeRef:z,index:P}=(0,R.useCompositeItem)({metadata:L}),H=i===p,W=n.useRef(!1),V=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=V.current;if(e)return j(e)},[j]),(0,l.useIsoLayoutEffect)(()=>{if(W.current){W.current=!1;return}if(H&&P>-1&&M!==P){if(null!=D){let e=(0,S.activeElement)((0,C.ownerDocument)(D));if(e&&(0,S.contains)(D,e))return}a||A(P)}},[H,P,M,A,a,D]);let{getButtonProps:Y,buttonRef:B}=(0,k.useButton)({disabled:a,native:u,focusableWhenDisabled:!0}),K=v(i),F=n.useRef(!1),X=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:H,orientation:x,tabActivationDirection:N},ref:[t,B,z,V],props:[_,{role:"tab","aria-controls":K,"aria-selected":H,id:O,onClick:function(e){H||a||I(i,(0,m.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){H||(P>-1&&!a&&A(P),!a&&E&&(!F.current||F.current&&X.current)&&I(i,(0,m.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){H||a||(F.current=!0,e.button&&0!==e.button||(X.current=!0,(0,C.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){F.current=!1,X.current=!1},{once:!0})))},[w]:H?"":void 0,onKeyDownCapture(){W.current=!0}},f,Y],stateAttributesMapping:b})});var M=e.i(73364),I=e.i(802239),j=e.i(956789);function A(){return j.NOOP}function D(){return!1}function O(){return!0}let L=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var _=e.i(172410);let z={...b,activeTabPosition:()=>null,activeTabSize:()=>null},P=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:i=!1,style:l,...s}=e,{nonce:u}=(0,_.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:p,value:b}=g(),{tabsListElement:m,registerIndicatorUpdateListener:h}=T(),v=(0,I.useSyncExternalStore)(A,D,O),x=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>h(x),[h,x]);let C=0,y=0,k=0,w=0,R=0,N=0,S=!1;if(null!=b&&null!=m){let e=c(b);if(null!=e){S=!0;let{width:t,height:r}=(0,M.getCssDimensions)(e),{width:a,height:o}=(0,M.getCssDimensions)(m),n=e.getBoundingClientRect(),i=m.getBoundingClientRect(),l=a>0?i.width/a:1,s=o>0?i.height/o:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=n.left-i.left,t=n.top-i.top;C=e/l+m.scrollLeft-m.clientLeft,k=t/s+m.scrollTop-m.clientTop}else C=e.offsetLeft,k=e.offsetTop;R=t,N=r,y=m.scrollWidth-C-R,w=m.scrollHeight-k-N}}let E=S?{left:C,right:y,top:k,bottom:w}:null,j=S?{width:R,height:N}:null,P=S?{[L.activeTabLeft]:`${C}px`,[L.activeTabRight]:`${y}px`,[L.activeTabTop]:`${k}px`,[L.activeTabBottom]:`${w}px`,[L.activeTabWidth]:`${R}px`,[L.activeTabHeight]:`${N}px`}:void 0,H=S&&R>0&&N>0,W=(0,d.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:E,activeTabSize:j,tabActivationDirection:p},ref:t,props:[{role:"presentation",style:P,hidden:!H},s,{suppressHydrationWarning:!0}],stateAttributesMapping:z});return null==b?null:(0,o.jsxs)(n.Fragment,{children:[W,v&&i&&(0,o.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var H=e.i(144394),W=e.i(209407),V=e.i(137584),Y=e.i(223910),B=e.i(673553);let K=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=W.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=W.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),F={...b,...W.transitionStatusMapping},X=n.forwardRef(function(e,t){let{className:r,value:a,render:o,keepMounted:i=!1,style:s,...u}=e,{value:c,getTabIdByPanelValue:f,orientation:p,tabActivationDirection:b,registerMountedTabPanel:m,unregisterMountedTabPanel:h}=g(),v=(0,y.useBaseUiId)(),x=n.useMemo(()=>({id:v,value:a}),[v,a]),{ref:C,index:k}=(0,B.useCompositeListItem)({metadata:x}),w=a===c,{mounted:R,transitionStatus:N,setMounted:T}=(0,Y.useTransitionStatus)(w),S=!R,E=f(a),M=n.useRef(null),I=(0,d.useRenderElement)("div",e,{state:{hidden:S,orientation:p,tabActivationDirection:b,transitionStatus:N},ref:[t,C,M],props:[{"aria-labelledby":E,hidden:S,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:(0,H.inertValue)(!w),[K.index]:k},u],stateAttributesMapping:F});return((0,V.useOpenChangeComplete)({open:w,ref:M,onComplete(){w||T(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!S||i)&&null!=v)return m(a,v),()=>{h(a,v)}},[S,i,a,v,m,h]),i||R)?I:null});var $=e.i(590803),U=e.i(828918),q=e.i(673327),G=e.i(621082);let Z=[];var J=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:i=j.EMPTY_ARRAY,props:c=j.EMPTY_ARRAY,state:f=j.EMPTY_OBJECT,stateAttributesMapping:g,highlightedIndex:p,onHighlightedIndexChange:b,orientation:m,grid:h,loopFocus:v,onLoop:x,enableHomeAndEndKeys:C,onMapChange:y,stopEventPropagation:k=!0,rootRef:R,disabledIndices:N,modifierKeys:T,highlightItemOnHover:E=!1,tag:M="div",...I}=e,{props:A,highlightedIndex:D,onHighlightedIndexChange:O,elementsRef:L,onMapChange:_,relayKeyboardEvent:z}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:o,direction:i,highlightedIndex:d,onHighlightedIndexChange:u,rootRef:c,enableHomeAndEndKeys:f=!1,stopEventPropagation:g=!1,disabledIndices:p,modifierKeys:b=Z}=e,[m,h]=n.useState(0),v=null!=a,x=n.useRef(null),C=(0,U.useMergedRefs)(x,c),y=n.useRef([]),k=n.useRef(!1),R=d??m,N=(0,s.useStableCallback)((e,t=!1)=>{if((u??h)(e),t){let t=y.current[e];(0,q.scrollIntoViewIfNeeded)(x.current,t,i,r)}}),T=(0,s.useStableCallback)(e=>{if(0===e.size||k.current)return;k.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(w))??null,o=a?t.indexOf(a):-1;if(-1!==o)N(o);else if((0,G.isListIndexDisabled)(t,R,p)){let e=(0,G.findNonDisabledListIndex)(t,{disabledIndices:p});(0,G.isIndexOutOfListBounds)(t,e)||N(e)}(0,q.scrollIntoViewIfNeeded)(x.current,a,i,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==p||null!=d||!k.current)return;let e=y.current;if((0,G.isListIndexDisabled)(e,R,p)){let t=(0,G.findNonDisabledListIndex)(e,{disabledIndices:p});(0,G.isIndexOutOfListBounds)(e,t)||N(t)}},[p,d,R,y,N]);let E=(0,s.useStableCallback)((e,t,r)=>o?o(e,t,r,y):r),M=(0,s.useStableCallback)(e=>{let n=f?q.COMPOSITE_KEYS:q.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of q.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,b)||!x.current)return;let l="rtl"===i,s=l?q.ARROW_LEFT:q.ARROW_RIGHT,d={horizontal:s,vertical:q.ARROW_DOWN,both:s}[r],u=l?q.ARROW_RIGHT:q.ARROW_LEFT,c={horizontal:u,vertical:q.ARROW_UP,both:u}[r],m=(0,S.getTarget)(e.nativeEvent);if(null!=m&&(0,q.isNativeInput)(m)&&!(0,$.isElementDisabled)(m)){let t=m.selectionStart,r=m.selectionEnd,a=m.value??"";if(null==t||e.shiftKey||t!==r||e.key!==c&&t0)return}let h=R,C=(0,G.getMinListIndex)(y,p),k=(0,G.getMaxListIndex)(y,p);null!=a&&(h=a({disabledIndices:p,elementsRef:y,event:e,highlightedIndex:R,loopFocus:t,maxIndex:k,minIndex:C,onLoop:E,orientation:r,rtl:l}));let w={horizontal:[s],vertical:[q.ARROW_DOWN],both:[s,q.ARROW_DOWN]}[r],T={horizontal:[u],vertical:[q.ARROW_UP],both:[u,q.ARROW_UP]}[r],M=v?n:({horizontal:f?q.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:q.HORIZONTAL_KEYS,vertical:f?q.VERTICAL_KEYS_WITH_EXTRA_KEYS:q.VERTICAL_KEYS,both:n})[r];f&&(e.key===q.HOME?h=C:e.key===q.END&&(h=k)),h===R&&(w.includes(e.key)||T.includes(e.key))&&(t&&h===k&&w.includes(e.key)?(h=C,o&&(h=o(e,R,h,y))):t&&h===C&&T.includes(e.key)?(h=k,o&&(h=o(e,R,h,y))):h=(0,G.findNonDisabledListIndex)(y.current,{startingIndex:h,decrement:T.includes(e.key),disabledIndices:p})),h===R||(0,G.isIndexOutOfListBounds)(y.current,h)||(g&&e.stopPropagation(),M.has(e.key)&&e.preventDefault(),N(h,!0),queueMicrotask(()=>{y.current[h]?.focus()}))});return{props:{ref:C,onFocus(e){let t=x.current,r=(0,S.getTarget)(e.nativeEvent);t&&null!=r&&(0,q.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:M},highlightedIndex:R,onHighlightedIndexChange:N,elementsRef:y,disabledIndices:p,onMapChange:T,relayKeyboardEvent:M}}({grid:h,loopFocus:v,onLoop:x,orientation:m,highlightedIndex:p,onHighlightedIndexChange:b,rootRef:R,stopEventPropagation:k,enableHomeAndEndKeys:C,direction:(0,Q.useDirection)(),disabledIndices:N,modifierKeys:T}),P=(0,d.useRenderElement)(M,e,{state:f,ref:i,props:[A,...c,I],stateAttributesMapping:g}),H=n.useMemo(()=>({highlightedIndex:D,onHighlightedIndexChange:O,highlightItemOnHover:E,relayKeyboardEvent:z}),[D,O,E,z]);return(0,o.jsx)(J.CompositeRootContext.Provider,{value:H,children:(0,o.jsx)(u.CompositeList,{elementsRef:L,onMapChange:e=>{y?.(e),_(e)},children:P})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:i=!0,render:d,style:u,...c}=e,{onValueChange:f,orientation:p,value:m,setTabMap:h,tabActivationDirection:v}=g(),[x,C]=n.useState(0),[y,k]=n.useState(null),w=n.useRef(new Set),R=n.useRef(new Set),T=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return T.current=e,y&&e.observe(y),R.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[y]);let S=(0,s.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),E=(0,s.useStableCallback)(e=>(R.current.add(e),T.current?.observe(e),()=>{R.current.delete(e),T.current?.unobserve(e)})),M=(0,s.useStableCallback)((e,t)=>{e!==m&&f(e,t)}),I=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:S,registerTabResizeObserverElement:E,onTabActivation:M,setHighlightedTabIndex:C,tabsListElement:y}),[r,x,S,E,M,C,y]);return(0,o.jsx)(N.Provider,{value:I,children:(0,o.jsx)(ee,{render:d,className:a,style:u,state:{orientation:p,tabActivationDirection:v},refs:[t,k],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:b,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:i,orientation:p,onHighlightedIndexChange:C,onMapChange:h,disabledIndices:j.EMPTY_ARRAY})})});e.s(["Indicator",0,P,"List",0,et,"Panel",0,X,"Root",0,v,"Tab",0,E],69281);var er=e.i(69281),er=er,ea=e.i(115504);let eo=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,o.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,o.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,o.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(eo({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,o.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},879664,e=>{"use strict";let t=(0,e.i(475254).default)("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);e.s(["default",0,t])},952571,e=>{"use strict";var t=e.i(879664);e.s(["Info",()=>t.default])},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),o=e.i(480731),n=e.i(444755),i=e.i(673706),l=e.i(95779);let s={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},u={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},c=(0,i.makeClassName)("Icon"),f=r.default.forwardRef((e,f)=>{let{icon:g,variant:p="simple",tooltip:b,size:m=o.Sizes.SM,color:h,className:v}=e,x=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),C=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,i.getColorClassNames)(t,l.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,l.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,i.getColorClassNames)(t,l.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(p,h),{tooltipProps:y,getReferenceProps:k}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([f,y.refs.setReference]),className:(0,n.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",C.bgColor,C.textColor,C.borderColor,C.ringColor,u[p].rounded,u[p].border,u[p].shadow,u[p].ring,s[m].paddingX,s[m].paddingY,v)},k,x),r.default.createElement(a.default,Object.assign({text:b},y)),r.default.createElement(g,{className:(0,n.tremorTwMerge)(c("icon"),"shrink-0",d[m].height,d[m].width)}))});f.displayName="Icon",e.s(["default",0,f],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let a=void 0!==r,[o,n]=(0,t.useState)(e);return[a?r:o,e=>{a||n(e)}]}])},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},21548,e=>{"use strict";var t=e.i(616303);e.s(["Empty",()=>t.default])},552546,e=>{"use strict";var t=e.i(843476),r=e.i(131792);let a=(e,t)=>{let r=t.trim().toLowerCase();return!r||e.label.toLowerCase().includes(r)||(e.sublabel?.toLowerCase().includes(r)??!1)};e.s(["SearchSelect",0,function({options:e,value:o,onValueChange:n,placeholder:i="Select…",emptyText:l="No results",disabled:s=!1,className:d}){let u=e.find(e=>e.value===o)??null;return(0,t.jsxs)(r.Combobox,{items:e,value:u,onValueChange:e=>n(e?.value??""),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,filter:a,disabled:s,children:[(0,t.jsx)(r.ComboboxInput,{placeholder:i,showClear:null!=o&&""!==o,className:`w-full ${d??""}`}),(0,t.jsxs)(r.ComboboxContent,{children:[(0,t.jsx)(r.ComboboxEmpty,{children:l}),(0,t.jsx)(r.ComboboxList,{children:e=>(0,t.jsx)(r.ComboboxItem,{value:e,children:(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"truncate",children:e.label}),null!=e.sublabel&&""!==e.sublabel&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.sublabel})]})},e.value)})]})]})}])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(353753),a=e.i(115504),o=e.i(519455),n=e.i(995926);function i({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function l({className:e,...o}){return(0,t.jsx)(r.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...o})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:s,showCloseButton:d=!0,...u}){return(0,t.jsxs)(i,{children:[(0,t.jsx)(l,{}),(0,t.jsxs)(r.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...u,children:[s,d&&(0,t.jsxs)(r.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(o.Button,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...o}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...o})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:i,...l}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...l,children:[i,n&&(0,t.jsx)(r.Dialog.Close,{render:(0,t.jsx)(o.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2",e),...r})},"DialogTitle",0,function({className:e,...o}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.cn)("leading-none font-medium",e),...o})}])},439573,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let o=(0,a.cva)({base:"group/alert relative grid w-full gap-0.5 rounded-lg border px-4 py-3 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2.5 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:r,...n},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"alert",role:"alert",className:(0,a.cn)(o({variant:r}),e),...n}));n.displayName="Alert";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-title",className:(0,a.cn)("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...r}));i.displayName="AlertTitle";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-description",className:(0,a.cn)("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...r}));l.displayName="AlertDescription";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"alert-action",className:(0,a.cn)("absolute top-2.5 right-3",e),...r}));s.displayName="AlertAction",e.s(["Alert",0,n,"AlertAction",0,s,"AlertDescription",0,l,"AlertTitle",0,i])},123287,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["default",0,t])},595468,e=>{"use strict";var t=e.i(123287);e.s(["CheckCircle2",()=>t.default])},582458,e=>{"use strict";let t=(0,e.i(475254).default)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);e.s(["default",0,t])},878894,e=>{"use strict";var t=e.i(582458);e.s(["AlertTriangle",()=>t.default])},89128,e=>{"use strict";var t=e.i(582458);e.s(["TriangleAlert",()=>t.default])},373884,e=>{"use strict";let t=(0,e.i(475254).default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);e.s(["XCircle",0,t],373884)},78085,e=>{"use strict";var t=e.i(290571),r=e.i(103471),a=e.i(888288),o=e.i(271645),n=e.i(444755),i=e.i(673706);let l=(0,i.makeClassName)("Textarea"),s=o.default.forwardRef((e,s)=>{let{value:d,defaultValue:u="",placeholder:c="Type...",error:f=!1,errorMessage:g,disabled:p=!1,className:b,onChange:m,onValueChange:h,autoHeight:v=!1}=e,x=(0,t.__rest)(e,["value","defaultValue","placeholder","error","errorMessage","disabled","className","onChange","onValueChange","autoHeight"]),[C,y]=(0,a.default)(u,d),k=(0,o.useRef)(null),w=(0,r.hasValue)(C);return(0,o.useEffect)(()=>{let e=k.current;if(v&&e){e.style.height="60px";let t=e.scrollHeight;e.style.height=t+"px"}},[v,k,C]),o.default.createElement(o.default.Fragment,null,o.default.createElement("textarea",Object.assign({ref:(0,i.mergeRefs)([k,s]),value:C,placeholder:c,disabled:p,className:(0,n.tremorTwMerge)(l("Textarea"),"w-full flex items-center outline-none rounded-tremor-default px-3 py-2 text-tremor-default focus:ring-2 transition duration-100 border","shadow-tremor-input focus:border-tremor-brand-subtle focus:ring-tremor-brand-muted","dark:shadow-dark-tremor-input focus:dark:border-dark-tremor-brand-subtle focus:dark:ring-dark-tremor-brand-muted",(0,r.getSelectButtonColors)(w,p,f),p?"placeholder:text-tremor-content-subtle dark:placeholder:text-dark-tremor-content-subtle":"placeholder:text-tremor-content dark:placeholder:text-dark-tremor-content",b),"data-testid":"text-area",onChange:e=>{null==m||m(e),y(e.target.value),null==h||h(e.target.value)}},x)),f&&g?o.default.createElement("p",{className:(0,n.tremorTwMerge)(l("errorMessage"),"text-sm text-red-500 mt-1")},g):null)});s.displayName="Textarea",e.s(["Textarea",0,s],78085)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/19wkvbsdat9-w.js b/litellm/proxy/_experimental/out/_next/static/chunks/19wkvbsdat9-w.js deleted file mode 100644 index 8934d648052..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/19wkvbsdat9-w.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},332102,e=>{"use strict";let t=(0,e.i(475254).default)("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);e.s(["Inbox",0,t],332102)},515288,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let i=a.forwardRef(({className:e,size:a="default",...i},r)=>(0,t.jsx)("div",{ref:r,"data-slot":"card","data-size":a,className:(0,n.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...i}));i.displayName="Card";let r=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-header",className:(0,n.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));r.displayName="CardHeader";let o=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-title",className:(0,n.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));o.displayName="CardTitle";let s=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-description",className:(0,n.cn)("text-sm text-muted-foreground",e),...a}));s.displayName="CardDescription";let l=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-action",className:(0,n.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));l.displayName="CardAction";let u=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-content",className:(0,n.cn)("px-(--card-spacing)",e),...a}));u.displayName="CardContent";let d=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("div",{ref:i,"data-slot":"card-footer",className:(0,n.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));d.displayName="CardFooter",e.s(["Card",0,i,"CardAction",0,l,"CardContent",0,u,"CardDescription",0,s,"CardFooter",0,d,"CardHeader",0,r,"CardTitle",0,o])},624687,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504);let i=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)("textarea",{ref:i,"data-slot":"textarea",className:(0,n.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));i.displayName="Textarea",e.s(["Textarea",0,i])},950594,e=>{"use strict";var t=e.i(843476),a=e.i(271645),n=e.i(115504),i=e.i(519455),r=e.i(793479),o=e.i(624687);let s=(0,n.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),l=(0,n.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),u=a.forwardRef(({className:e,type:a="button",variant:r="ghost",size:o="xs",...s},u)=>(0,t.jsx)(i.Button,{ref:u,type:a,"data-size":o,variant:r,className:(0,n.cn)(l({size:o}),e),...s}));u.displayName="InputGroupButton";let d=a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(r.Input,{ref:i,"data-slot":"input-group-control",className:(0,n.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a}));d.displayName="InputGroupInput",a.forwardRef(({className:e,...a},i)=>(0,t.jsx)(o.Textarea,{ref:i,"data-slot":"input-group-control",className:(0,n.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,n.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})},"InputGroupAddon",0,function({className:e,align:a="inline-start",...i}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:(0,n.cn)(s({align:a}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...i})},"InputGroupButton",0,u,"InputGroupInput",0,d,"InputGroupText",0,function({className:e,...a}){return(0,t.jsx)("span",{className:(0,n.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}])},677572,370359,405934,e=>{"use strict";var t,a,n,i=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var r=e.i(271645),o=e.i(951437),s=e.i(146376),l=e.i(667865),u=e.i(552245),d=e.i(53687),c=e.i(733332);let f=r.createContext(void 0);function p(){let e=r.useContext(f);if(void 0===e)throw Error((0,c.default)(64));return e}let g=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),b={tabActivationDirection:e=>({[g.activationDirection]:e})};var v=e.i(675606),h=e.i(56434);let x=r.forwardRef(function(e,t){let{className:a,defaultValue:n=0,onValueChange:c,orientation:p="horizontal",render:g,value:x,style:R,...y}=e,C=void 0!==e.defaultValue,S=r.useRef([]),[w,T]=r.useState(()=>new Map),[k,E]=(0,o.useControlled)({controlled:x,default:n,name:"Tabs",state:"value"}),I=void 0!==x,[N,A]=r.useState(()=>new Map),O=r.useRef(void 0),L=r.useCallback(e=>{if(void 0===e)return null;for(let[t,a]of N.entries())if(null!=a&&e===(a.value??a.index))return t;return null},[N]),[M,_]=r.useState(()=>({previousValue:k,tabActivationDirection:"none"})),{previousValue:z,tabActivationDirection:D}=M,j=D,W=!1;z!==k&&(j=m(z,k,p,N),W=null!=z&&null!=k&&null==L(k));let P=W?z:k,H=z!==P||D!==j;(0,s.useIsoLayoutEffect)(()=>{H&&_({previousValue:P,tabActivationDirection:j})},[P,H,j]);let B=(0,l.useStableCallback)((e,t)=>{t.activationDirection=m(k,e,p,N),c?.(e,t),t.isCanceled||E(e)}),V=(0,l.useStableCallback)((e,t)=>{c?.(e,(0,v.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),Y=(0,l.useStableCallback)((e,t)=>{T(a=>{if(a.get(e)===t)return a;let n=new Map(a);return n.set(e,t),n})}),K=(0,l.useStableCallback)((e,t)=>{T(a=>{if(!a.has(e)||a.get(e)!==t)return a;let n=new Map(a);return n.delete(e),n})}),F=r.useCallback(e=>w.get(e),[w]),G=r.useCallback(e=>{for(let t of N.values())if(e===t?.value)return t?.id},[N]),$=r.useMemo(()=>({getTabElementBySelectedValue:L,getTabIdByPanelValue:G,getTabPanelIdByValue:F,onValueChange:B,orientation:p,registerMountedTabPanel:Y,setTabMap:A,unregisterMountedTabPanel:K,tabActivationDirection:j,value:k}),[L,G,F,B,p,Y,A,K,j,k]),q=r.useMemo(()=>{for(let e of N.values())if(null!=e&&e.value===k)return e},[N,k]),U=r.useMemo(()=>{for(let e of N.values())if(null!=e&&!e.disabled)return e.value},[N]),X=r.useRef(!C),Z=r.useRef(n),J=r.useRef(C),Q=r.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(I)return;function e(e,t){E(e),_(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),V(e,t),X.current=!1}if(0===N.size){Q.current&&null!==k&&!O.current?.isConnected&&e(null,h.REASONS.missing);return}Q.current=!0,O.current=N.keys().next().value;let t=q?.disabled,a=null==q&&null!==k;if(t||k!==Z.current||(J.current=!1),J.current&&t&&k===Z.current)return;let n=X.current;if(t||a){let a=U??null;if(k===a){X.current=!1;return}let i=h.REASONS.missing;n?i=h.REASONS.initial:t&&(i=h.REASONS.disabled),e(a,i);return}n&&null!=q&&(V(k,h.REASONS.initial),X.current=!1)},[U,I,V,q,E,N,k]);let ee={orientation:p,tabActivationDirection:j},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:b});return(0,i.jsx)(f.Provider,{value:$,children:(0,i.jsx)(d.CompositeList,{elementsRef:S,children:et})})});function m(e,t,a,n){if(null==e||null==t)return"none";let i=null,r=null;for(let[a,o]of n.entries()){if(null==o)continue;let n=o.value??o.index;if(e===n&&(i=a),t===n&&(r=a),null!=i&&null!=r)break}if(null==i||null==r)return i!==r&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===a?t>e?"right":"left":t>e?"down":"up":"none";let o=i.getBoundingClientRect(),s=r.getBoundingClientRect();if("horizontal"===a){if(s.lefto.left)return"right"}else{if(s.topo.top)return"down"}return"none"}var R=e.i(108868),y=e.i(788015),C=e.i(540886);let S="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,S],370359);var w=e.i(395530);let T=r.createContext(void 0);function k(){let e=r.useContext(T);if(void 0===e)throw Error((0,c.default)(65));return e}var E=e.i(647554);let I=r.forwardRef(function(e,t){let{className:a,disabled:n=!1,render:i,value:o,id:l,nativeButton:d=!0,style:c,...f}=e,{value:g,getTabPanelIdByValue:x,orientation:m,tabActivationDirection:T}=p(),{activateOnFocus:I,highlightedTabIndex:N,onTabActivation:A,registerTabResizeObserverElement:O,setHighlightedTabIndex:L,tabsListElement:M}=k(),_=(0,y.useBaseUiId)(l),z=r.useMemo(()=>({disabled:n,id:_,value:o}),[n,_,o]),{compositeProps:D,compositeRef:j,index:W}=(0,w.useCompositeItem)({metadata:z}),P=o===g,H=r.useRef(!1),B=r.useRef(null);(0,s.useIsoLayoutEffect)(()=>{let e=B.current;if(e)return O(e)},[O]),(0,s.useIsoLayoutEffect)(()=>{if(H.current){H.current=!1;return}if(P&&W>-1&&N!==W){if(null!=M){let e=(0,E.activeElement)((0,R.ownerDocument)(M));if(e&&(0,E.contains)(M,e))return}n||L(W)}},[P,W,N,L,n,M]);let{getButtonProps:V,buttonRef:Y}=(0,C.useButton)({disabled:n,native:d,focusableWhenDisabled:!0}),K=x(o),F=r.useRef(!1),G=r.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:n,active:P,orientation:m,tabActivationDirection:T},ref:[t,Y,j,B],props:[D,{role:"tab","aria-controls":K,"aria-selected":P,id:_,onClick:function(e){P||n||A(o,(0,v.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){P||(W>-1&&!n&&L(W),!n&&I&&(!F.current||F.current&&G.current)&&A(o,(0,v.createChangeEventDetails)(h.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){P||n||(F.current=!0,e.button&&0!==e.button||(G.current=!0,(0,R.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){F.current=!1,G.current=!1},{once:!0})))},[S]:P?"":void 0,onKeyDownCapture(){H.current=!0}},f,V],stateAttributesMapping:b})});var N=e.i(73364),A=e.i(802239),O=e.i(956789);function L(){return O.NOOP}function M(){return!1}function _(){return!0}let z=((a={}).activeTabLeft="--active-tab-left",a.activeTabRight="--active-tab-right",a.activeTabTop="--active-tab-top",a.activeTabBottom="--active-tab-bottom",a.activeTabWidth="--active-tab-width",a.activeTabHeight="--active-tab-height",a);var D=e.i(172410);let j={...b,activeTabPosition:()=>null,activeTabSize:()=>null},W=r.forwardRef(function(e,t){let{className:a,render:n,renderBeforeHydration:o=!1,style:s,...l}=e,{nonce:d}=(0,D.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:g,value:b}=p(),{tabsListElement:v,registerIndicatorUpdateListener:h}=k(),x=(0,A.useSyncExternalStore)(L,M,_),m=function(){let[,e]=r.useState({});return r.useCallback(()=>{e({})},[])}();r.useEffect(()=>h(m),[h,m]);let R=0,y=0,C=0,S=0,w=0,T=0,E=!1;if(null!=b&&null!=v){let e=c(b);if(null!=e){E=!0;let{width:t,height:a}=(0,N.getCssDimensions)(e),{width:n,height:i}=(0,N.getCssDimensions)(v),r=e.getBoundingClientRect(),o=v.getBoundingClientRect(),s=n>0?o.width/n:1,l=i>0?o.height/i:1;if(Math.abs(s)>Number.EPSILON&&Math.abs(l)>Number.EPSILON){let e=r.left-o.left,t=r.top-o.top;R=e/s+v.scrollLeft-v.clientLeft,C=t/l+v.scrollTop-v.clientTop}else R=e.offsetLeft,C=e.offsetTop;w=t,T=a,y=v.scrollWidth-R-w,S=v.scrollHeight-C-T}}let I=E?{left:R,right:y,top:C,bottom:S}:null,O=E?{width:w,height:T}:null,W=E?{[z.activeTabLeft]:`${R}px`,[z.activeTabRight]:`${y}px`,[z.activeTabTop]:`${C}px`,[z.activeTabBottom]:`${S}px`,[z.activeTabWidth]:`${w}px`,[z.activeTabHeight]:`${T}px`}:void 0,P=E&&w>0&&T>0,H=(0,u.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:I,activeTabSize:O,tabActivationDirection:g},ref:t,props:[{role:"presentation",style:W,hidden:!P},l,{suppressHydrationWarning:!0}],stateAttributesMapping:j});return null==b?null:(0,i.jsxs)(r.Fragment,{children:[H,x&&o&&(0,i.jsx)("script",{nonce:d,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var P=e.i(144394),H=e.i(209407),B=e.i(137584),V=e.i(223910),Y=e.i(673553);let K=((n={}).index="data-index",n.activationDirection="data-activation-direction",n.orientation="data-orientation",n.hidden="data-hidden",n[n.startingStyle=H.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=H.TransitionStatusDataAttributes.endingStyle]="endingStyle",n),F={...b,...H.transitionStatusMapping},G=r.forwardRef(function(e,t){let{className:a,value:n,render:i,keepMounted:o=!1,style:l,...d}=e,{value:c,getTabIdByPanelValue:f,orientation:g,tabActivationDirection:b,registerMountedTabPanel:v,unregisterMountedTabPanel:h}=p(),x=(0,y.useBaseUiId)(),m=r.useMemo(()=>({id:x,value:n}),[x,n]),{ref:R,index:C}=(0,Y.useCompositeListItem)({metadata:m}),S=n===c,{mounted:w,transitionStatus:T,setMounted:k}=(0,V.useTransitionStatus)(S),E=!w,I=f(n),N=r.useRef(null),A=(0,u.useRenderElement)("div",e,{state:{hidden:E,orientation:g,tabActivationDirection:b,transitionStatus:T},ref:[t,R,N],props:[{"aria-labelledby":I,hidden:E,id:x,role:"tabpanel",tabIndex:S?0:-1,inert:(0,P.inertValue)(!S),[K.index]:C},d],stateAttributesMapping:F});return((0,B.useOpenChangeComplete)({open:S,ref:N,onComplete(){S||k(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if((!E||o)&&null!=x)return v(n,x),()=>{h(n,x)}},[E,o,n,x,v,h]),o||w)?A:null});var $=e.i(590803),q=e.i(828918),U=e.i(673327),X=e.i(621082);let Z=[];var J=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:a,style:n,refs:o=O.EMPTY_ARRAY,props:c=O.EMPTY_ARRAY,state:f=O.EMPTY_OBJECT,stateAttributesMapping:p,highlightedIndex:g,onHighlightedIndexChange:b,orientation:v,grid:h,loopFocus:x,onLoop:m,enableHomeAndEndKeys:R,onMapChange:y,stopEventPropagation:C=!0,rootRef:w,disabledIndices:T,modifierKeys:k,highlightItemOnHover:I=!1,tag:N="div",...A}=e,{props:L,highlightedIndex:M,onHighlightedIndexChange:_,elementsRef:z,onMapChange:D,relayKeyboardEvent:j}=function(e){let{loopFocus:t=!0,orientation:a="both",grid:n,onLoop:i,direction:o,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:c,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:g,modifierKeys:b=Z}=e,[v,h]=r.useState(0),x=null!=n,m=r.useRef(null),R=(0,q.useMergedRefs)(m,c),y=r.useRef([]),C=r.useRef(!1),w=u??v,T=(0,l.useStableCallback)((e,t=!1)=>{if((d??h)(e),t){let t=y.current[e];(0,U.scrollIntoViewIfNeeded)(m.current,t,o,a)}}),k=(0,l.useStableCallback)(e=>{if(0===e.size||C.current)return;C.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(S))??null,i=n?t.indexOf(n):-1;if(-1!==i)T(i);else if((0,X.isListIndexDisabled)(t,w,g)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(t,e)||T(e)}(0,U.scrollIntoViewIfNeeded)(m.current,n,o,a)});(0,s.useIsoLayoutEffect)(()=>{if(null==g||null!=u||!C.current)return;let e=y.current;if((0,X.isListIndexDisabled)(e,w,g)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:g});(0,X.isIndexOutOfListBounds)(e,t)||T(t)}},[g,u,w,y,T]);let I=(0,l.useStableCallback)((e,t,a)=>i?i(e,t,a,y):a),N=(0,l.useStableCallback)(e=>{let r=f?U.COMPOSITE_KEYS:U.ARROW_KEYS;if(!r.has(e.key)||function(e,t){for(let a of U.MODIFIER_KEYS.values())if(!t.includes(a)&&e.getModifierState(a))return!0;return!1}(e,b)||!m.current)return;let s="rtl"===o,l=s?U.ARROW_LEFT:U.ARROW_RIGHT,u={horizontal:l,vertical:U.ARROW_DOWN,both:l}[a],d=s?U.ARROW_RIGHT:U.ARROW_LEFT,c={horizontal:d,vertical:U.ARROW_UP,both:d}[a],v=(0,E.getTarget)(e.nativeEvent);if(null!=v&&(0,U.isNativeInput)(v)&&!(0,$.isElementDisabled)(v)){let t=v.selectionStart,a=v.selectionEnd,n=v.value??"";if(null==t||e.shiftKey||t!==a||e.key!==c&&t0)return}let h=w,R=(0,X.getMinListIndex)(y,g),C=(0,X.getMaxListIndex)(y,g);null!=n&&(h=n({disabledIndices:g,elementsRef:y,event:e,highlightedIndex:w,loopFocus:t,maxIndex:C,minIndex:R,onLoop:I,orientation:a,rtl:s}));let S={horizontal:[l],vertical:[U.ARROW_DOWN],both:[l,U.ARROW_DOWN]}[a],k={horizontal:[d],vertical:[U.ARROW_UP],both:[d,U.ARROW_UP]}[a],N=x?r:({horizontal:f?U.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:U.HORIZONTAL_KEYS,vertical:f?U.VERTICAL_KEYS_WITH_EXTRA_KEYS:U.VERTICAL_KEYS,both:r})[a];f&&(e.key===U.HOME?h=R:e.key===U.END&&(h=C)),h===w&&(S.includes(e.key)||k.includes(e.key))&&(t&&h===C&&S.includes(e.key)?(h=R,i&&(h=i(e,w,h,y))):t&&h===R&&k.includes(e.key)?(h=C,i&&(h=i(e,w,h,y))):h=(0,X.findNonDisabledListIndex)(y.current,{startingIndex:h,decrement:k.includes(e.key),disabledIndices:g})),h===w||(0,X.isIndexOutOfListBounds)(y.current,h)||(p&&e.stopPropagation(),N.has(e.key)&&e.preventDefault(),T(h,!0),queueMicrotask(()=>{y.current[h]?.focus()}))});return{props:{ref:R,onFocus(e){let t=m.current,a=(0,E.getTarget)(e.nativeEvent);t&&null!=a&&(0,U.isNativeInput)(a)&&a.setSelectionRange(0,a.value.length??0)},onKeyDown:N},highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:y,disabledIndices:g,onMapChange:k,relayKeyboardEvent:N}}({grid:h,loopFocus:x,onLoop:m,orientation:v,highlightedIndex:g,onHighlightedIndexChange:b,rootRef:w,stopEventPropagation:C,enableHomeAndEndKeys:R,direction:(0,Q.useDirection)(),disabledIndices:T,modifierKeys:k}),W=(0,u.useRenderElement)(N,e,{state:f,ref:o,props:[L,...c,A],stateAttributesMapping:p}),P=r.useMemo(()=>({highlightedIndex:M,onHighlightedIndexChange:_,highlightItemOnHover:I,relayKeyboardEvent:j}),[M,_,I,j]);return(0,i.jsx)(J.CompositeRootContext.Provider,{value:P,children:(0,i.jsx)(d.CompositeList,{elementsRef:z,onMapChange:e=>{y?.(e),D(e)},children:W})})}e.s(["CompositeRoot",0,ee],405934);let et=r.forwardRef(function(e,t){let{activateOnFocus:a=!1,className:n,loopFocus:o=!0,render:u,style:d,...c}=e,{onValueChange:f,orientation:g,value:v,setTabMap:h,tabActivationDirection:x}=p(),[m,R]=r.useState(0),[y,C]=r.useState(null),S=r.useRef(new Set),w=r.useRef(new Set),k=r.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"{S.current.forEach(e=>{e()})});return k.current=e,y&&e.observe(y),w.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),k.current=null}},[y]);let E=(0,l.useStableCallback)(e=>(S.current.add(e),()=>{S.current.delete(e)})),I=(0,l.useStableCallback)(e=>(w.current.add(e),k.current?.observe(e),()=>{w.current.delete(e),k.current?.unobserve(e)})),N=(0,l.useStableCallback)((e,t)=>{e!==v&&f(e,t)}),A=r.useMemo(()=>({activateOnFocus:a,highlightedTabIndex:m,registerIndicatorUpdateListener:E,registerTabResizeObserverElement:I,onTabActivation:N,setHighlightedTabIndex:R,tabsListElement:y}),[a,m,E,I,N,R,y]);return(0,i.jsx)(T.Provider,{value:A,children:(0,i.jsx)(ee,{render:u,className:n,style:d,state:{orientation:g,tabActivationDirection:x},refs:[t,C],props:[{"aria-orientation":"vertical"===g?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:b,highlightedIndex:m,enableHomeAndEndKeys:!0,loopFocus:o,orientation:g,onHighlightedIndexChange:R,onMapChange:h,disabledIndices:O.EMPTY_ARRAY})})});e.s(["Indicator",0,W,"List",0,et,"Panel",0,G,"Root",0,x,"Tab",0,I],69281);var ea=e.i(69281),ea=ea,en=e.i(115504);let ei=(0,en.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...a}){return(0,i.jsx)(ea.Root,{"data-slot":"tabs","data-orientation":t,className:(0,en.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...a})},"TabsContent",0,function({className:e,...t}){return(0,i.jsx)(ea.Panel,{"data-slot":"tabs-content",className:(0,en.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...a}){return(0,i.jsx)(ea.List,{"data-slot":"tabs-list","data-variant":t,className:(0,en.cn)(ei({variant:t}),e),...a})},"TabsTrigger",0,function({className:e,...t}){return(0,i.jsx)(ea.Tab,{"data-slot":"tabs-trigger",className:(0,en.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},990681,e=>{e.q("/litellm-asset-prefix/_next/static/media/postgresql.0a2k5oak2hvw5.svg")},338684,e=>{e.q("/litellm-asset-prefix/_next/static/media/milvus.04t2ilugeb7ad.svg")},832316,e=>{e.q("/litellm-asset-prefix/_next/static/media/s3_vector.1dy8xaiph416k.png")},284629,e=>{"use strict";let t={src:e.i(990681).default,width:64,height:64,blurWidth:0,blurHeight:0};e.s(["default",0,t])},695420,e=>{"use strict";var t=e.i(271645);e.s(["useVisitedTabs",0,function(e){let[a,n]=(0,t.useState)(()=>new Set([e]));return{onTabChange:(0,t.useCallback)(e=>{n(t=>new Set(t).add(String(e)))},[]),hasVisited:(0,t.useCallback)(e=>a.has(e),[a])}}])},514764,e=>{"use strict";let t=(0,e.i(475254).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",0,t],514764)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1_l2msnvj037n.js b/litellm/proxy/_experimental/out/_next/static/chunks/1_l2msnvj037n.js deleted file mode 100644 index 302a153394d..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1_l2msnvj037n.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let n=a.forwardRef(({className:e,size:a="default",...n},l)=>(0,t.jsx)("div",{ref:l,"data-slot":"card","data-size":a,className:(0,r.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n}));n.displayName="Card";let l=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-header",className:(0,r.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));l.displayName="CardHeader";let i=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-title",className:(0,r.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));i.displayName="CardTitle";let s=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...a}));s.displayName="CardDescription";let o=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-action",className:(0,r.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));o.displayName="CardAction";let d=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-content",className:(0,r.cn)("px-(--card-spacing)",e),...a}));d.displayName="CardContent";let u=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card-footer",className:(0,r.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));u.displayName="CardFooter",e.s(["Card",0,n,"CardAction",0,o,"CardContent",0,d,"CardDescription",0,s,"CardFooter",0,u,"CardHeader",0,l,"CardTitle",0,i])},624687,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504);let n=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)("textarea",{ref:n,"data-slot":"textarea",className:(0,r.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));n.displayName="Textarea",e.s(["Textarea",0,n])},950594,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(115504),n=e.i(519455),l=e.i(793479),i=e.i(624687);let s=(0,r.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),o=(0,r.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),d=a.forwardRef(({className:e,type:a="button",variant:l="ghost",size:i="xs",...s},d)=>(0,t.jsx)(n.Button,{ref:d,type:a,"data-size":i,variant:l,className:(0,r.cn)(o({size:i}),e),...s}));d.displayName="InputGroupButton";let u=a.forwardRef(({className:e,...a},n)=>(0,t.jsx)(l.Input,{ref:n,"data-slot":"input-group-control",className:(0,r.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a}));u.displayName="InputGroupInput",a.forwardRef(({className:e,...a},n)=>(0,t.jsx)(i.Textarea,{ref:n,"data-slot":"input-group-control",className:(0,r.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...a})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,r.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...a})},"InputGroupAddon",0,function({className:e,align:a="inline-start",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":a,className:(0,r.cn)(s({align:a}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...n})},"InputGroupButton",0,d,"InputGroupInput",0,u,"InputGroupText",0,function({className:e,...a}){return(0,t.jsx)("span",{className:(0,r.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...a})}])},677572,370359,405934,e=>{"use strict";var t,a,r,n=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var l=e.i(271645),i=e.i(951437),s=e.i(146376),o=e.i(667865),d=e.i(552245),u=e.i(53687),c=e.i(733332);let m=l.createContext(void 0);function g(){let e=l.useContext(m);if(void 0===e)throw Error((0,c.default)(64));return e}let h=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),f={tabActivationDirection:e=>({[h.activationDirection]:e})};var p=e.i(675606),b=e.i(56434);let x=l.forwardRef(function(e,t){let{className:a,defaultValue:r=0,onValueChange:c,orientation:g="horizontal",render:h,value:x,style:C,...y}=e,j=void 0!==e.defaultValue,w=l.useRef([]),[S,N]=l.useState(()=>new Map),[k,T]=(0,i.useControlled)({controlled:x,default:r,name:"Tabs",state:"value"}),R=void 0!==x,[E,_]=l.useState(()=>new Map),I=l.useRef(void 0),M=l.useCallback(e=>{if(void 0===e)return null;for(let[t,a]of E.entries())if(null!=a&&e===(a.value??a.index))return t;return null},[E]),[D,O]=l.useState(()=>({previousValue:k,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:A}=D,$=A,P=!1;L!==k&&($=v(L,k,g,E),P=null!=L&&null!=k&&null==M(k));let H=P?L:k,B=L!==H||A!==$;(0,s.useIsoLayoutEffect)(()=>{B&&O({previousValue:H,tabActivationDirection:$})},[H,B,$]);let z=(0,o.useStableCallback)((e,t)=>{t.activationDirection=v(k,e,g,E),c?.(e,t),t.isCanceled||T(e)}),F=(0,o.useStableCallback)((e,t)=>{c?.(e,(0,p.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),W=(0,o.useStableCallback)((e,t)=>{N(a=>{if(a.get(e)===t)return a;let r=new Map(a);return r.set(e,t),r})}),V=(0,o.useStableCallback)((e,t)=>{N(a=>{if(!a.has(e)||a.get(e)!==t)return a;let r=new Map(a);return r.delete(e),r})}),K=l.useCallback(e=>S.get(e),[S]),Y=l.useCallback(e=>{for(let t of E.values())if(e===t?.value)return t?.id},[E]),U=l.useMemo(()=>({getTabElementBySelectedValue:M,getTabIdByPanelValue:Y,getTabPanelIdByValue:K,onValueChange:z,orientation:g,registerMountedTabPanel:W,setTabMap:_,unregisterMountedTabPanel:V,tabActivationDirection:$,value:k}),[M,Y,K,z,g,W,_,V,$,k]),G=l.useMemo(()=>{for(let e of E.values())if(null!=e&&e.value===k)return e},[E,k]),q=l.useMemo(()=>{for(let e of E.values())if(null!=e&&!e.disabled)return e.value},[E]),X=l.useRef(!j),Z=l.useRef(r),Q=l.useRef(j),J=l.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(R)return;function e(e,t){T(e),O(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),F(e,t),X.current=!1}if(0===E.size){J.current&&null!==k&&!I.current?.isConnected&&e(null,b.REASONS.missing);return}J.current=!0,I.current=E.keys().next().value;let t=G?.disabled,a=null==G&&null!==k;if(t||k!==Z.current||(Q.current=!1),Q.current&&t&&k===Z.current)return;let r=X.current;if(t||a){let a=q??null;if(k===a){X.current=!1;return}let n=b.REASONS.missing;r?n=b.REASONS.initial:t&&(n=b.REASONS.disabled),e(a,n);return}r&&null!=G&&(F(k,b.REASONS.initial),X.current=!1)},[q,R,F,G,T,E,k]);let ee={orientation:g,tabActivationDirection:$},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:f});return(0,n.jsx)(m.Provider,{value:U,children:(0,n.jsx)(u.CompositeList,{elementsRef:w,children:et})})});function v(e,t,a,r){if(null==e||null==t)return"none";let n=null,l=null;for(let[a,i]of r.entries()){if(null==i)continue;let r=i.value??i.index;if(e===r&&(n=a),t===r&&(l=a),null!=n&&null!=l)break}if(null==n||null==l)return n!==l&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===a?t>e?"right":"left":t>e?"down":"up":"none";let i=n.getBoundingClientRect(),s=l.getBoundingClientRect();if("horizontal"===a){if(s.lefti.left)return"right"}else{if(s.topi.top)return"down"}return"none"}var C=e.i(108868),y=e.i(788015),j=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var S=e.i(395530);let N=l.createContext(void 0);function k(){let e=l.useContext(N);if(void 0===e)throw Error((0,c.default)(65));return e}var T=e.i(647554);let R=l.forwardRef(function(e,t){let{className:a,disabled:r=!1,render:n,value:i,id:o,nativeButton:u=!0,style:c,...m}=e,{value:h,getTabPanelIdByValue:x,orientation:v,tabActivationDirection:N}=g(),{activateOnFocus:R,highlightedTabIndex:E,onTabActivation:_,registerTabResizeObserverElement:I,setHighlightedTabIndex:M,tabsListElement:D}=k(),O=(0,y.useBaseUiId)(o),L=l.useMemo(()=>({disabled:r,id:O,value:i}),[r,O,i]),{compositeProps:A,compositeRef:$,index:P}=(0,S.useCompositeItem)({metadata:L}),H=i===h,B=l.useRef(!1),z=l.useRef(null);(0,s.useIsoLayoutEffect)(()=>{let e=z.current;if(e)return I(e)},[I]),(0,s.useIsoLayoutEffect)(()=>{if(B.current){B.current=!1;return}if(H&&P>-1&&E!==P){if(null!=D){let e=(0,T.activeElement)((0,C.ownerDocument)(D));if(e&&(0,T.contains)(D,e))return}r||M(P)}},[H,P,E,M,r,D]);let{getButtonProps:F,buttonRef:W}=(0,j.useButton)({disabled:r,native:u,focusableWhenDisabled:!0}),V=x(i),K=l.useRef(!1),Y=l.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:r,active:H,orientation:v,tabActivationDirection:N},ref:[t,W,$,z],props:[A,{role:"tab","aria-controls":V,"aria-selected":H,id:O,onClick:function(e){H||r||_(i,(0,p.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){H||(P>-1&&!r&&M(P),!r&&R&&(!K.current||K.current&&Y.current)&&_(i,(0,p.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){H||r||(K.current=!0,e.button&&0!==e.button||(Y.current=!0,(0,C.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){K.current=!1,Y.current=!1},{once:!0})))},[w]:H?"":void 0,onKeyDownCapture(){B.current=!0}},m,F],stateAttributesMapping:f})});var E=e.i(73364),_=e.i(802239),I=e.i(956789);function M(){return I.NOOP}function D(){return!1}function O(){return!0}let L=((a={}).activeTabLeft="--active-tab-left",a.activeTabRight="--active-tab-right",a.activeTabTop="--active-tab-top",a.activeTabBottom="--active-tab-bottom",a.activeTabWidth="--active-tab-width",a.activeTabHeight="--active-tab-height",a);var A=e.i(172410);let $={...f,activeTabPosition:()=>null,activeTabSize:()=>null},P=l.forwardRef(function(e,t){let{className:a,render:r,renderBeforeHydration:i=!1,style:s,...o}=e,{nonce:u}=(0,A.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:m,tabActivationDirection:h,value:f}=g(),{tabsListElement:p,registerIndicatorUpdateListener:b}=k(),x=(0,_.useSyncExternalStore)(M,D,O),v=function(){let[,e]=l.useState({});return l.useCallback(()=>{e({})},[])}();l.useEffect(()=>b(v),[b,v]);let C=0,y=0,j=0,w=0,S=0,N=0,T=!1;if(null!=f&&null!=p){let e=c(f);if(null!=e){T=!0;let{width:t,height:a}=(0,E.getCssDimensions)(e),{width:r,height:n}=(0,E.getCssDimensions)(p),l=e.getBoundingClientRect(),i=p.getBoundingClientRect(),s=r>0?i.width/r:1,o=n>0?i.height/n:1;if(Math.abs(s)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=l.left-i.left,t=l.top-i.top;C=e/s+p.scrollLeft-p.clientLeft,j=t/o+p.scrollTop-p.clientTop}else C=e.offsetLeft,j=e.offsetTop;S=t,N=a,y=p.scrollWidth-C-S,w=p.scrollHeight-j-N}}let R=T?{left:C,right:y,top:j,bottom:w}:null,I=T?{width:S,height:N}:null,P=T?{[L.activeTabLeft]:`${C}px`,[L.activeTabRight]:`${y}px`,[L.activeTabTop]:`${j}px`,[L.activeTabBottom]:`${w}px`,[L.activeTabWidth]:`${S}px`,[L.activeTabHeight]:`${N}px`}:void 0,H=T&&S>0&&N>0,B=(0,d.useRenderElement)("span",e,{state:{orientation:m,activeTabPosition:R,activeTabSize:I,tabActivationDirection:h},ref:t,props:[{role:"presentation",style:P,hidden:!H},o,{suppressHydrationWarning:!0}],stateAttributesMapping:$});return null==f?null:(0,n.jsxs)(l.Fragment,{children:[B,x&&i&&(0,n.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var H=e.i(144394),B=e.i(209407),z=e.i(137584),F=e.i(223910),W=e.i(673553);let V=((r={}).index="data-index",r.activationDirection="data-activation-direction",r.orientation="data-orientation",r.hidden="data-hidden",r[r.startingStyle=B.TransitionStatusDataAttributes.startingStyle]="startingStyle",r[r.endingStyle=B.TransitionStatusDataAttributes.endingStyle]="endingStyle",r),K={...f,...B.transitionStatusMapping},Y=l.forwardRef(function(e,t){let{className:a,value:r,render:n,keepMounted:i=!1,style:o,...u}=e,{value:c,getTabIdByPanelValue:m,orientation:h,tabActivationDirection:f,registerMountedTabPanel:p,unregisterMountedTabPanel:b}=g(),x=(0,y.useBaseUiId)(),v=l.useMemo(()=>({id:x,value:r}),[x,r]),{ref:C,index:j}=(0,W.useCompositeListItem)({metadata:v}),w=r===c,{mounted:S,transitionStatus:N,setMounted:k}=(0,F.useTransitionStatus)(w),T=!S,R=m(r),E=l.useRef(null),_=(0,d.useRenderElement)("div",e,{state:{hidden:T,orientation:h,tabActivationDirection:f,transitionStatus:N},ref:[t,C,E],props:[{"aria-labelledby":R,hidden:T,id:x,role:"tabpanel",tabIndex:w?0:-1,inert:(0,H.inertValue)(!w),[V.index]:j},u],stateAttributesMapping:K});return((0,z.useOpenChangeComplete)({open:w,ref:E,onComplete(){w||k(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if((!T||i)&&null!=x)return p(r,x),()=>{b(r,x)}},[T,i,r,x,p,b]),i||S)?_:null});var U=e.i(590803),G=e.i(828918),q=e.i(673327),X=e.i(621082);let Z=[];var Q=e.i(838452),J=e.i(872855);function ee(e){let{render:t,className:a,style:r,refs:i=I.EMPTY_ARRAY,props:c=I.EMPTY_ARRAY,state:m=I.EMPTY_OBJECT,stateAttributesMapping:g,highlightedIndex:h,onHighlightedIndexChange:f,orientation:p,grid:b,loopFocus:x,onLoop:v,enableHomeAndEndKeys:C,onMapChange:y,stopEventPropagation:j=!0,rootRef:S,disabledIndices:N,modifierKeys:k,highlightItemOnHover:R=!1,tag:E="div",..._}=e,{props:M,highlightedIndex:D,onHighlightedIndexChange:O,elementsRef:L,onMapChange:A,relayKeyboardEvent:$}=function(e){let{loopFocus:t=!0,orientation:a="both",grid:r,onLoop:n,direction:i,highlightedIndex:d,onHighlightedIndexChange:u,rootRef:c,enableHomeAndEndKeys:m=!1,stopEventPropagation:g=!1,disabledIndices:h,modifierKeys:f=Z}=e,[p,b]=l.useState(0),x=null!=r,v=l.useRef(null),C=(0,G.useMergedRefs)(v,c),y=l.useRef([]),j=l.useRef(!1),S=d??p,N=(0,o.useStableCallback)((e,t=!1)=>{if((u??b)(e),t){let t=y.current[e];(0,q.scrollIntoViewIfNeeded)(v.current,t,i,a)}}),k=(0,o.useStableCallback)(e=>{if(0===e.size||j.current)return;j.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(w))??null,n=r?t.indexOf(r):-1;if(-1!==n)N(n);else if((0,X.isListIndexDisabled)(t,S,h)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:h});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,q.scrollIntoViewIfNeeded)(v.current,r,i,a)});(0,s.useIsoLayoutEffect)(()=>{if(null==h||null!=d||!j.current)return;let e=y.current;if((0,X.isListIndexDisabled)(e,S,h)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:h});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[h,d,S,y,N]);let R=(0,o.useStableCallback)((e,t,a)=>n?n(e,t,a,y):a),E=(0,o.useStableCallback)(e=>{let l=m?q.COMPOSITE_KEYS:q.ARROW_KEYS;if(!l.has(e.key)||function(e,t){for(let a of q.MODIFIER_KEYS.values())if(!t.includes(a)&&e.getModifierState(a))return!0;return!1}(e,f)||!v.current)return;let s="rtl"===i,o=s?q.ARROW_LEFT:q.ARROW_RIGHT,d={horizontal:o,vertical:q.ARROW_DOWN,both:o}[a],u=s?q.ARROW_RIGHT:q.ARROW_LEFT,c={horizontal:u,vertical:q.ARROW_UP,both:u}[a],p=(0,T.getTarget)(e.nativeEvent);if(null!=p&&(0,q.isNativeInput)(p)&&!(0,U.isElementDisabled)(p)){let t=p.selectionStart,a=p.selectionEnd,r=p.value??"";if(null==t||e.shiftKey||t!==a||e.key!==c&&t0)return}let b=S,C=(0,X.getMinListIndex)(y,h),j=(0,X.getMaxListIndex)(y,h);null!=r&&(b=r({disabledIndices:h,elementsRef:y,event:e,highlightedIndex:S,loopFocus:t,maxIndex:j,minIndex:C,onLoop:R,orientation:a,rtl:s}));let w={horizontal:[o],vertical:[q.ARROW_DOWN],both:[o,q.ARROW_DOWN]}[a],k={horizontal:[u],vertical:[q.ARROW_UP],both:[u,q.ARROW_UP]}[a],E=x?l:({horizontal:m?q.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:q.HORIZONTAL_KEYS,vertical:m?q.VERTICAL_KEYS_WITH_EXTRA_KEYS:q.VERTICAL_KEYS,both:l})[a];m&&(e.key===q.HOME?b=C:e.key===q.END&&(b=j)),b===S&&(w.includes(e.key)||k.includes(e.key))&&(t&&b===j&&w.includes(e.key)?(b=C,n&&(b=n(e,S,b,y))):t&&b===C&&k.includes(e.key)?(b=j,n&&(b=n(e,S,b,y))):b=(0,X.findNonDisabledListIndex)(y.current,{startingIndex:b,decrement:k.includes(e.key),disabledIndices:h})),b===S||(0,X.isIndexOutOfListBounds)(y.current,b)||(g&&e.stopPropagation(),E.has(e.key)&&e.preventDefault(),N(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:C,onFocus(e){let t=v.current,a=(0,T.getTarget)(e.nativeEvent);t&&null!=a&&(0,q.isNativeInput)(a)&&a.setSelectionRange(0,a.value.length??0)},onKeyDown:E},highlightedIndex:S,onHighlightedIndexChange:N,elementsRef:y,disabledIndices:h,onMapChange:k,relayKeyboardEvent:E}}({grid:b,loopFocus:x,onLoop:v,orientation:p,highlightedIndex:h,onHighlightedIndexChange:f,rootRef:S,stopEventPropagation:j,enableHomeAndEndKeys:C,direction:(0,J.useDirection)(),disabledIndices:N,modifierKeys:k}),P=(0,d.useRenderElement)(E,e,{state:m,ref:i,props:[M,...c,_],stateAttributesMapping:g}),H=l.useMemo(()=>({highlightedIndex:D,onHighlightedIndexChange:O,highlightItemOnHover:R,relayKeyboardEvent:$}),[D,O,R,$]);return(0,n.jsx)(Q.CompositeRootContext.Provider,{value:H,children:(0,n.jsx)(u.CompositeList,{elementsRef:L,onMapChange:e=>{y?.(e),A(e)},children:P})})}e.s(["CompositeRoot",0,ee],405934);let et=l.forwardRef(function(e,t){let{activateOnFocus:a=!1,className:r,loopFocus:i=!0,render:d,style:u,...c}=e,{onValueChange:m,orientation:h,value:p,setTabMap:b,tabActivationDirection:x}=g(),[v,C]=l.useState(0),[y,j]=l.useState(null),w=l.useRef(new Set),S=l.useRef(new Set),k=l.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return k.current=e,y&&e.observe(y),S.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),k.current=null}},[y]);let T=(0,o.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),R=(0,o.useStableCallback)(e=>(S.current.add(e),k.current?.observe(e),()=>{S.current.delete(e),k.current?.unobserve(e)})),E=(0,o.useStableCallback)((e,t)=>{e!==p&&m(e,t)}),_=l.useMemo(()=>({activateOnFocus:a,highlightedTabIndex:v,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:R,onTabActivation:E,setHighlightedTabIndex:C,tabsListElement:y}),[a,v,T,R,E,C,y]);return(0,n.jsx)(N.Provider,{value:_,children:(0,n.jsx)(ee,{render:d,className:r,style:u,state:{orientation:h,tabActivationDirection:x},refs:[t,j],props:[{"aria-orientation":"vertical"===h?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:f,highlightedIndex:v,enableHomeAndEndKeys:!0,loopFocus:i,orientation:h,onHighlightedIndexChange:C,onMapChange:b,disabledIndices:I.EMPTY_ARRAY})})});e.s(["Indicator",0,P,"List",0,et,"Panel",0,Y,"Root",0,x,"Tab",0,R],69281);var ea=e.i(69281),ea=ea,er=e.i(115504);let en=(0,er.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...a}){return(0,n.jsx)(ea.Root,{"data-slot":"tabs","data-orientation":t,className:(0,er.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...a})},"TabsContent",0,function({className:e,...t}){return(0,n.jsx)(ea.Panel,{"data-slot":"tabs-content",className:(0,er.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...a}){return(0,n.jsx)(ea.List,{"data-slot":"tabs-list","data-variant":t,className:(0,er.cn)(en({variant:t}),e),...a})},"TabsTrigger",0,function({className:e,...t}){return(0,n.jsx)(ea.Tab,{"data-slot":"tabs-trigger",className:(0,er.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},360820,e=>{"use strict";var t=e.i(271645);let a=t.forwardRef(function(e,a){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:a},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,a],360820)},541202,e=>{"use strict";var t=e.i(843476),a=e.i(522016),r=e.i(560445);e.s(["DeprecationBanner",0,({featureName:e})=>(0,t.jsx)(r.Alert,{message:`${e} is on a draft deprecation list`,description:(0,t.jsxs)(t.Fragment,{children:[`${e} is one of several experimental features we're considering removing, potentially as early as September 1, 2026. This list is a draft and is not final. If you rely on this feature, please share feedback on the `,(0,t.jsx)(a.default,{href:"https://github.com/BerriAI/litellm/discussions/32090",target:"_blank",rel:"noopener noreferrer",children:"deprecation discussion"}),"."]}),type:"info",showIcon:!0,closable:!0,style:{marginBottom:16}})])},728889,e=>{"use strict";var t=e.i(290571),a=e.i(271645),r=e.i(829087),n=e.i(480731),l=e.i(444755),i=e.i(673706),s=e.i(95779);let o={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},u={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},c=(0,i.makeClassName)("Icon"),m=a.default.forwardRef((e,m)=>{let{icon:g,variant:h="simple",tooltip:f,size:p=n.Sizes.SM,color:b,className:x}=e,v=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),C=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,l.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,l.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,l.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(h,b),{tooltipProps:y,getReferenceProps:j}=(0,r.useTooltip)();return a.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([m,y.refs.setReference]),className:(0,l.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",C.bgColor,C.textColor,C.borderColor,C.ringColor,u[h].rounded,u[h].border,u[h].shadow,u[h].ring,o[p].paddingX,o[p].paddingY,x)},j,v),a.default.createElement(r.default,Object.assign({text:f},y)),a.default.createElement(g,{className:(0,l.tremorTwMerge)(c("icon"),"shrink-0",d[p].height,d[p].width)}))});m.displayName="Icon",e.s(["default",0,m],728889)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,a)=>{let r=void 0!==a,[n,l]=(0,t.useState)(e);return[r?a:n,e=>{r||l(e)}]}])},560025,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(343794),r=e.i(931067),n=e.i(392221),l=e.i(703923),i=e.i(211577),s=e.i(209428),o=e.i(410160),d=e.i(914949),u=e.i(529681),c=e.i(611935),m=e.i(361275),g=e.i(174428),h=function(e,t){if(!e)return null;var a={left:e.offsetLeft,right:e.parentElement.clientWidth-e.clientWidth-e.offsetLeft,width:e.clientWidth,top:e.offsetTop,bottom:e.parentElement.clientHeight-e.clientHeight-e.offsetTop,height:e.clientHeight};return t?{left:0,right:0,width:0,top:a.top,bottom:a.bottom,height:a.height}:{left:a.left,right:a.right,width:a.width,top:0,bottom:0,height:0}},f=function(e){return void 0!==e?"".concat(e,"px"):void 0};function p(e){var r=e.prefixCls,l=e.containerRef,i=e.value,o=e.getValueIndex,d=e.motionName,u=e.onMotionStart,p=e.onMotionEnd,b=e.direction,x=e.vertical,v=void 0!==x&&x,C=t.useRef(null),y=t.useState(i),j=(0,n.default)(y,2),w=j[0],S=j[1],N=function(e){var t,a=o(e),n=null==(t=l.current)?void 0:t.querySelectorAll(".".concat(r,"-item"))[a];return(null==n?void 0:n.offsetParent)&&n},k=t.useState(null),T=(0,n.default)(k,2),R=T[0],E=T[1],_=t.useState(null),I=(0,n.default)(_,2),M=I[0],D=I[1];(0,g.default)(function(){if(w!==i){var e=N(w),t=N(i),a=h(e,v),r=h(t,v);S(i),E(a),D(r),e&&t?u():p()}},[i]);var O=t.useMemo(function(){if(v){var e;return f(null!=(e=null==R?void 0:R.top)?e:0)}return"rtl"===b?f(-(null==R?void 0:R.right)):f(null==R?void 0:R.left)},[v,b,R]),L=t.useMemo(function(){if(v){var e;return f(null!=(e=null==M?void 0:M.top)?e:0)}return"rtl"===b?f(-(null==M?void 0:M.right)):f(null==M?void 0:M.left)},[v,b,M]);return R&&M?t.createElement(m.default,{visible:!0,motionName:d,motionAppear:!0,onAppearStart:function(){return v?{transform:"translateY(var(--thumb-start-top))",height:"var(--thumb-start-height)"}:{transform:"translateX(var(--thumb-start-left))",width:"var(--thumb-start-width)"}},onAppearActive:function(){return v?{transform:"translateY(var(--thumb-active-top))",height:"var(--thumb-active-height)"}:{transform:"translateX(var(--thumb-active-left))",width:"var(--thumb-active-width)"}},onVisibleChanged:function(){E(null),D(null),p()}},function(e,n){var l=e.className,i=e.style,o=(0,s.default)((0,s.default)({},i),{},{"--thumb-start-left":O,"--thumb-start-width":f(null==R?void 0:R.width),"--thumb-active-left":L,"--thumb-active-width":f(null==M?void 0:M.width),"--thumb-start-top":O,"--thumb-start-height":f(null==R?void 0:R.height),"--thumb-active-top":L,"--thumb-active-height":f(null==M?void 0:M.height)}),d={ref:(0,c.composeRef)(C,n),style:o,className:(0,a.default)("".concat(r,"-thumb"),l)};return t.createElement("div",d)}):null}var b=["prefixCls","direction","vertical","options","disabled","defaultValue","value","name","onChange","className","motionName"],x=function(e){var r=e.prefixCls,n=e.className,l=e.disabled,s=e.checked,o=e.label,d=e.title,u=e.value,c=e.name,m=e.onChange,g=e.onFocus,h=e.onBlur,f=e.onKeyDown,p=e.onKeyUp,b=e.onMouseDown;return t.createElement("label",{className:(0,a.default)(n,(0,i.default)({},"".concat(r,"-item-disabled"),l)),onMouseDown:b},t.createElement("input",{name:c,className:"".concat(r,"-item-input"),type:"radio",disabled:l,checked:s,onChange:function(e){l||m(e,u)},onFocus:g,onBlur:h,onKeyDown:f,onKeyUp:p}),t.createElement("div",{className:"".concat(r,"-item-label"),title:d},o))},v=t.forwardRef(function(e,m){var g,h=e.prefixCls,f=void 0===h?"rc-segmented":h,v=e.direction,C=e.vertical,y=e.options,j=void 0===y?[]:y,w=e.disabled,S=e.defaultValue,N=e.value,k=e.name,T=e.onChange,R=e.className,E=e.motionName,_=(0,l.default)(e,b),I=t.useRef(null),M=t.useMemo(function(){return(0,c.composeRef)(I,m)},[I,m]),D=t.useMemo(function(){return j.map(function(e){if("object"===(0,o.default)(e)&&null!==e){var t=function(e){if(void 0!==e.title)return e.title;if("object"!==(0,o.default)(e.label)){var t;return null==(t=e.label)?void 0:t.toString()}}(e);return(0,s.default)((0,s.default)({},e),{},{title:t})}return{label:null==e?void 0:e.toString(),title:null==e?void 0:e.toString(),value:e}})},[j]),O=(0,d.default)(null==(g=D[0])?void 0:g.value,{value:N,defaultValue:S}),L=(0,n.default)(O,2),A=L[0],$=L[1],P=t.useState(!1),H=(0,n.default)(P,2),B=H[0],z=H[1],F=function(e,t){$(t),null==T||T(t)},W=(0,u.default)(_,["children"]),V=t.useState(!1),K=(0,n.default)(V,2),Y=K[0],U=K[1],G=t.useState(!1),q=(0,n.default)(G,2),X=q[0],Z=q[1],Q=function(){Z(!0)},J=function(){Z(!1)},ee=function(){U(!1)},et=function(e){"Tab"===e.key&&U(!0)},ea=function(e){var t=D.findIndex(function(e){return e.value===A}),a=D.length,r=D[(t+e+a)%a];r&&($(r.value),null==T||T(r.value))},er=function(e){switch(e.key){case"ArrowLeft":case"ArrowUp":ea(-1);break;case"ArrowRight":case"ArrowDown":ea(1)}};return t.createElement("div",(0,r.default)({role:"radiogroup","aria-label":"segmented control",tabIndex:w?void 0:0,"aria-orientation":C?"vertical":"horizontal"},W,{className:(0,a.default)(f,(0,i.default)((0,i.default)((0,i.default)({},"".concat(f,"-rtl"),"rtl"===v),"".concat(f,"-disabled"),w),"".concat(f,"-vertical"),C),void 0===R?"":R),ref:M}),t.createElement("div",{className:"".concat(f,"-group")},t.createElement(p,{vertical:C,prefixCls:f,value:A,containerRef:I,motionName:"".concat(f,"-").concat(void 0===E?"thumb-motion":E),direction:v,getValueIndex:function(e){return D.findIndex(function(t){return t.value===e})},onMotionStart:function(){z(!0)},onMotionEnd:function(){z(!1)}}),D.map(function(e){return t.createElement(x,(0,r.default)({},e,{name:k,key:e.value,prefixCls:f,className:(0,a.default)(e.className,"".concat(f,"-item"),(0,i.default)((0,i.default)({},"".concat(f,"-item-selected"),e.value===A&&!B),"".concat(f,"-item-focused"),X&&Y&&e.value===A)),checked:e.value===A,onChange:F,onFocus:Q,onBlur:J,onKeyDown:er,onKeyUp:et,onMouseDown:ee,disabled:!!w||!!e.disabled}))})))}),C=e.i(981444),y=e.i(242064),j=e.i(517455);e.i(296059);var w=e.i(915654),S=e.i(183293),N=e.i(246422),k=e.i(838378);function T(e,t){return{[`${e}, ${e}:hover, ${e}:focus`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}}function R(e){return{background:e.itemSelectedBg,boxShadow:e.boxShadowTertiary}}let E=Object.assign({overflow:"hidden"},S.textEllipsis),_=(0,N.genStyleHooks)("Segmented",e=>{let{lineWidth:t,calc:a}=e;return(e=>{let{componentCls:t}=e,a=e.calc(e.controlHeight).sub(e.calc(e.trackPadding).mul(2)).equal(),r=e.calc(e.controlHeightLG).sub(e.calc(e.trackPadding).mul(2)).equal(),n=e.calc(e.controlHeightSM).sub(e.calc(e.trackPadding).mul(2)).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,S.resetComponent)(e)),{display:"inline-block",padding:e.trackPadding,color:e.itemColor,background:e.trackBg,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`}),(0,S.genFocusStyle)(e)),{[`${t}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",flexDirection:"row",width:"100%"},[`&${t}-rtl`]:{direction:"rtl"},[`&${t}-vertical`]:{[`${t}-group`]:{flexDirection:"column"},[`${t}-thumb`]:{width:"100%",height:0,padding:`0 ${(0,w.unit)(e.paddingXXS)}`}},[`&${t}-block`]:{display:"flex"},[`&${t}-block ${t}-item`]:{flex:1,minWidth:0},[`${t}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${e.motionDurationMid}`,borderRadius:e.borderRadiusSM,transform:"translateZ(0)","&-selected":Object.assign(Object.assign({},R(e)),{color:e.itemSelectedColor}),"&-focused":(0,S.genFocusOutline)(e),"&::after":{content:'""',position:"absolute",zIndex:-1,width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",opacity:0,transition:`opacity ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,pointerEvents:"none"},[`&:not(${t}-item-selected):not(${t}-item-disabled)`]:{"&:hover, &:active":{color:e.itemHoverColor},"&:hover::after":{opacity:1,backgroundColor:e.itemHoverBg},"&:active::after":{opacity:1,backgroundColor:e.itemActiveBg}},"&-label":Object.assign({minHeight:a,lineHeight:(0,w.unit)(a),padding:`0 ${(0,w.unit)(e.segmentedPaddingHorizontal)}`},E),"&-icon + *":{marginInlineStart:e.calc(e.marginSM).div(2).equal()},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${t}-thumb`]:Object.assign(Object.assign({},R(e)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${(0,w.unit)(e.paddingXXS)} 0`,borderRadius:e.borderRadiusSM,[`& ~ ${t}-item:not(${t}-item-selected):not(${t}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${t}-lg`]:{borderRadius:e.borderRadiusLG,[`${t}-item-label`]:{minHeight:r,lineHeight:(0,w.unit)(r),padding:`0 ${(0,w.unit)(e.segmentedPaddingHorizontal)}`,fontSize:e.fontSizeLG},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadius}},[`&${t}-sm`]:{borderRadius:e.borderRadiusSM,[`${t}-item-label`]:{minHeight:n,lineHeight:(0,w.unit)(n),padding:`0 ${(0,w.unit)(e.segmentedPaddingHorizontalSM)}`},[`${t}-item, ${t}-thumb`]:{borderRadius:e.borderRadiusXS}}}),T(`&-disabled ${t}-item`,e)),T(`${t}-item-disabled`,e)),{[`${t}-thumb-motion-appear-active`]:{transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOut}, width ${e.motionDurationSlow} ${e.motionEaseInOut}`,willChange:"transform, width"},[`&${t}-shape-round`]:{borderRadius:9999,[`${t}-item, ${t}-thumb`]:{borderRadius:9999}}})}})((0,k.mergeToken)(e,{segmentedPaddingHorizontal:a(e.controlPaddingHorizontal).sub(t).equal(),segmentedPaddingHorizontalSM:a(e.controlPaddingHorizontalSM).sub(t).equal()}))},e=>{let{colorTextLabel:t,colorText:a,colorFillSecondary:r,colorBgElevated:n,colorFill:l,lineWidthBold:i,colorBgLayout:s}=e;return{trackPadding:i,trackBg:s,itemColor:t,itemHoverColor:a,itemHoverBg:r,itemSelectedBg:n,itemActiveBg:l,itemSelectedColor:a}});var I=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,r=Object.getOwnPropertySymbols(e);nt.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]]);return a};let M=t.forwardRef((e,r)=>{let n=(0,C.default)(),{prefixCls:l,className:i,rootClassName:s,block:o,options:d=[],size:u="middle",style:c,vertical:m,shape:g="default",name:h=n}=e,f=I(e,["prefixCls","className","rootClassName","block","options","size","style","vertical","shape","name"]),{getPrefixCls:p,direction:b,className:x,style:w}=(0,y.useComponentConfig)("segmented"),S=p("segmented",l),[N,k,T]=_(S),R=(0,j.default)(u),E=t.useMemo(()=>d.map(e=>{if("object"==typeof e&&(null==e?void 0:e.icon)){let{icon:a,label:r}=e;return Object.assign(Object.assign({},I(e,["icon","label"])),{label:t.createElement(t.Fragment,null,t.createElement("span",{className:`${S}-item-icon`},a),r&&t.createElement("span",null,r))})}return e}),[d,S]),M=(0,a.default)(i,s,x,{[`${S}-block`]:o,[`${S}-sm`]:"small"===R,[`${S}-lg`]:"large"===R,[`${S}-vertical`]:m,[`${S}-shape-${g}`]:"round"===g},k,T),D=Object.assign(Object.assign({},w),c);return N(t.createElement(v,Object.assign({},f,{name:h,className:M,style:D,options:E,ref:r,prefixCls:S,direction:b,vertical:m})))});e.s(["Segmented",0,M],560025)},446428,854056,e=>{"use strict";let t;var a=e.i(290571),r=e.i(271645);e.s(["default",0,e=>{var t=(0,a.__rest)(e,[]);return r.default.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"},t),r.default.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"}))}],446428);var n=e.i(746725),l=e.i(914189),i=e.i(553521),s=e.i(835696),o=e.i(941444),d=e.i(178677),u=e.i(294316),c=e.i(83733),m=e.i(233137),g=e.i(732607),h=e.i(397701),f=e.i(700020);function p(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||(null!=(t=e.as)?t:j)!==r.Fragment||1===r.default.Children.count(e.children)}let b=(0,r.createContext)(null);b.displayName="TransitionContext";var x=((t=x||{}).Visible="visible",t.Hidden="hidden",t);let v=(0,r.createContext)(null);function C(e){return"children"in e?C(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function y(e,t){let a=(0,o.useLatestValue)(e),s=(0,r.useRef)([]),d=(0,i.useIsMounted)(),u=(0,n.useDisposables)(),c=(0,l.useEvent)((e,t=f.RenderStrategy.Hidden)=>{let r=s.current.findIndex(({el:t})=>t===e);-1!==r&&((0,h.match)(t,{[f.RenderStrategy.Unmount](){s.current.splice(r,1)},[f.RenderStrategy.Hidden](){s.current[r].state="hidden"}}),u.microTask(()=>{var e;!C(s)&&d.current&&(null==(e=a.current)||e.call(a))}))}),m=(0,l.useEvent)(e=>{let t=s.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):s.current.push({el:e,state:"visible"}),()=>c(e,f.RenderStrategy.Unmount)}),g=(0,r.useRef)([]),p=(0,r.useRef)(Promise.resolve()),b=(0,r.useRef)({enter:[],leave:[]}),x=(0,l.useEvent)((e,a,r)=>{g.current.splice(0),t&&(t.chains.current[a]=t.chains.current[a].filter(([t])=>t!==e)),null==t||t.chains.current[a].push([e,new Promise(e=>{g.current.push(e)})]),null==t||t.chains.current[a].push([e,new Promise(e=>{Promise.all(b.current[a].map(([e,t])=>t)).then(()=>e())})]),"enter"===a?p.current=p.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(a)):r(a)}),v=(0,l.useEvent)((e,t,a)=>{Promise.all(b.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=g.current.shift())||e()}).then(()=>a(t))});return(0,r.useMemo)(()=>({children:s,register:m,unregister:c,onStart:x,onStop:v,wait:p,chains:b}),[m,c,s,x,v,b,p])}v.displayName="NestingContext";let j=r.Fragment,w=f.RenderFeatures.RenderStrategy,S=(0,f.forwardRefWithAs)(function(e,t){let{show:a,appear:n=!1,unmount:i=!0,...o}=e,c=(0,r.useRef)(null),g=p(e),h=(0,u.useSyncRefs)(...g?[c,t]:null===t?[]:[t]);(0,d.useServerHandoffComplete)();let x=(0,m.useOpenClosed)();if(void 0===a&&null!==x&&(a=(x&m.State.Open)===m.State.Open),void 0===a)throw Error("A is used but it is missing a `show={true | false}` prop.");let[j,S]=(0,r.useState)(a?"visible":"hidden"),k=y(()=>{a||S("hidden")}),[T,R]=(0,r.useState)(!0),E=(0,r.useRef)([a]);(0,s.useIsoMorphicEffect)(()=>{!1!==T&&E.current[E.current.length-1]!==a&&(E.current.push(a),R(!1))},[E,a]);let _=(0,r.useMemo)(()=>({show:a,appear:n,initial:T}),[a,n,T]);(0,s.useIsoMorphicEffect)(()=>{a?S("visible"):C(k)||null===c.current||S("hidden")},[a,k]);let I={unmount:i},M=(0,l.useEvent)(()=>{var t;T&&R(!1),null==(t=e.beforeEnter)||t.call(e)}),D=(0,l.useEvent)(()=>{var t;T&&R(!1),null==(t=e.beforeLeave)||t.call(e)}),O=(0,f.useRender)();return r.default.createElement(v.Provider,{value:k},r.default.createElement(b.Provider,{value:_},O({ourProps:{...I,as:r.Fragment,children:r.default.createElement(N,{ref:h,...I,...o,beforeEnter:M,beforeLeave:D})},theirProps:{},defaultTag:r.Fragment,features:w,visible:"visible"===j,name:"Transition"})))}),N=(0,f.forwardRefWithAs)(function(e,t){var a,n;let{transition:i=!0,beforeEnter:o,afterEnter:x,beforeLeave:S,afterLeave:N,enter:k,enterFrom:T,enterTo:R,entered:E,leave:_,leaveFrom:I,leaveTo:M,...D}=e,[O,L]=(0,r.useState)(null),A=(0,r.useRef)(null),$=p(e),P=(0,u.useSyncRefs)(...$?[A,t,L]:null===t?[]:[t]),H=null==(a=D.unmount)||a?f.RenderStrategy.Unmount:f.RenderStrategy.Hidden,{show:B,appear:z,initial:F}=function(){let e=(0,r.useContext)(b);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),[W,V]=(0,r.useState)(B?"visible":"hidden"),K=function(){let e=(0,r.useContext)(v);if(null===e)throw Error("A is used but it is missing a parent or .");return e}(),{register:Y,unregister:U}=K;(0,s.useIsoMorphicEffect)(()=>Y(A),[Y,A]),(0,s.useIsoMorphicEffect)(()=>{if(H===f.RenderStrategy.Hidden&&A.current)return B&&"visible"!==W?void V("visible"):(0,h.match)(W,{hidden:()=>U(A),visible:()=>Y(A)})},[W,A,Y,U,B,H]);let G=(0,d.useServerHandoffComplete)();(0,s.useIsoMorphicEffect)(()=>{if($&&G&&"visible"===W&&null===A.current)throw Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[A,W,G,$]);let q=F&&!z,X=z&&B&&F,Z=(0,r.useRef)(!1),Q=y(()=>{Z.current||(V("hidden"),U(A))},K),J=(0,l.useEvent)(e=>{Z.current=!0,Q.onStart(A,e?"enter":"leave",e=>{"enter"===e?null==o||o():"leave"===e&&(null==S||S())})}),ee=(0,l.useEvent)(e=>{let t=e?"enter":"leave";Z.current=!1,Q.onStop(A,t,e=>{"enter"===e?null==x||x():"leave"===e&&(null==N||N())}),"leave"!==t||C(Q)||(V("hidden"),U(A))});(0,r.useEffect)(()=>{$&&i||(J(B),ee(B))},[B,$,i]);let et=!(!i||!$||!G||q),[,ea]=(0,c.useTransition)(et,O,B,{start:J,end:ee}),er=(0,f.compact)({ref:P,className:(null==(n=(0,g.classNames)(D.className,X&&k,X&&T,ea.enter&&k,ea.enter&&ea.closed&&T,ea.enter&&!ea.closed&&R,ea.leave&&_,ea.leave&&!ea.closed&&I,ea.leave&&ea.closed&&M,!ea.transition&&B&&E))?void 0:n.trim())||void 0,...(0,c.transitionDataAttributes)(ea)}),en=0;"visible"===W&&(en|=m.State.Open),"hidden"===W&&(en|=m.State.Closed),ea.enter&&(en|=m.State.Opening),ea.leave&&(en|=m.State.Closing);let el=(0,f.useRender)();return r.default.createElement(v.Provider,{value:Q},r.default.createElement(m.OpenClosedProvider,{value:en},el({ourProps:er,theirProps:D,defaultTag:j,features:w,visible:"visible"===W,name:"Transition.Child"})))}),k=(0,f.forwardRefWithAs)(function(e,t){let a=null!==(0,r.useContext)(b),n=null!==(0,m.useOpenClosed)();return r.default.createElement(r.default.Fragment,null,!a&&n?r.default.createElement(S,{ref:t,...e}):r.default.createElement(N,{ref:t,...e}))}),T=Object.assign(S,{Child:k,Root:S});e.s(["Transition",0,T],854056)},617802,149121,1023,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(602869),n=e.i(500330),l=e.i(135214);e.s(["default",0,({userSpend:e,userMaxBudget:i,selectedTeam:s})=>{let{accessToken:o,userRole:d,userId:u}=(0,l.default)(),[c,m]=(0,a.useState)(null!==e?e:0),[g,h]=(0,a.useState)(s?Number((0,n.formatNumberWithCommas)(s.max_budget,4)):null);(0,a.useEffect)(()=>{if(s)if("Default Team"===s.team_alias)h(i);else{let e=!1;if(s.team_memberships)for(let t of s.team_memberships)t.user_id===u&&"max_budget"in t.litellm_budget_table&&null!==t.litellm_budget_table.max_budget&&(h(t.litellm_budget_table.max_budget),e=!0);e||h(s.max_budget)}else h(i)},[s,i]);let[f,p]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=async()=>{if(!o||!u||!d)return};(async()=>{try{if(null===u||null===d)return;if(null!==o){let e=(await (0,r.modelAvailableCall)(o,u,d)).data.map(e=>e.id);p(e)}}catch(e){console.error("Error fetching user models:",e)}})(),e()},[d,o,u]),(0,a.useEffect)(()=>{null!==e&&m(e)},[e]);let b=[];s&&s.models&&(b=s.models),b&&b.includes("all-proxy-models")?b=f:b&&b.includes("all-team-models")?b=s.models:b&&0===b.length&&(b=f);let x=null!==g?`$${(0,n.formatNumberWithCommas)(Number(g),4)} limit`:"No limit",v=void 0!==c?(0,n.formatNumberWithCommas)(c,4):null;return(0,t.jsx)("div",{className:"flex items-center",children:(0,t.jsxs)("div",{className:"flex justify-between gap-x-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Total Spend"}),(0,t.jsxs)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:["$",v]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-tremor-default text-tremor-content dark:text-dark-tremor-content",children:"Max Budget"}),(0,t.jsx)("p",{className:"text-2xl text-tremor-content-strong dark:text-dark-tremor-content-strong font-semibold",children:x})]})]})})}],617802),e.i(32117);var i=e.i(343053);e.i(622826);var s=e.i(399536),o=e.i(964471),d=e.i(871943),u=e.i(360820),c=e.i(560025),m=e.i(592968),g=e.i(20147),h=e.i(152990),f=e.i(682830),p=e.i(784774);function b({data:e=[],columns:r,getRowId:n,onRowClick:l,renderSubComponent:i,getRowCanExpand:s,isLoading:o=!1,loadingMessage:d="Loading...",noDataMessage:u="No results",enableSorting:c=!1}){let m=!!i&&!!s,g=r.some(e=>void 0!==e.size),[x,v]=(0,a.useState)([]),C=(0,h.useReactTable)({data:e,columns:r,...c&&{state:{sorting:x},onSortingChange:v,enableSortingRemoval:!1},...m&&{getRowCanExpand:s},...n&&{getRowId:n},getCoreRowModel:(0,f.getCoreRowModel)(),...c&&{getSortedRowModel:(0,f.getSortedRowModel)()},...m&&{getExpandedRowModel:(0,f.getExpandedRowModel)()}}),y=g?{minWidth:C.getCenterTotalSize()}:{minWidth:"400px"};return(0,t.jsx)("div",{className:"rounded-lg custom-border overflow-hidden w-full max-w-full box-border",children:(0,t.jsxs)(p.Table,{className:g?"table-fixed":"table-fixed w-full box-border",style:y,children:[(0,t.jsx)(p.TableHeader,{children:C.getHeaderGroups().map(e=>(0,t.jsx)(p.TableRow,{className:"bg-muted/50 hover:bg-muted/50",children:e.headers.map(e=>{let a=c&&e.column.getCanSort(),r=e.column.getIsSorted(),n=e.column.columnDef.meta?.numeric;return(0,t.jsx)(p.TableHead,{className:`py-1 h-8 text-xs font-medium text-muted-foreground first:pl-4 last:pr-4 ${a?"cursor-pointer select-none hover:bg-muted":""}`,style:g?{width:e.getSize()}:void 0,onClick:a?e.column.getToggleSortingHandler():void 0,children:e.isPlaceholder?null:(0,t.jsxs)("div",{className:`flex items-center gap-1 ${n?"justify-end":""}`,children:[(0,h.flexRender)(e.column.columnDef.header,e.getContext()),a&&(0,t.jsx)("span",{className:"text-muted-foreground",children:"asc"===r?"↑":"desc"===r?"↓":"⇅"})]})},e.id)})},e.id))}),(0,t.jsx)(p.TableBody,{children:o?(0,t.jsx)(p.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(p.TableCell,{colSpan:r.length,className:"h-8 text-center",children:(0,t.jsx)("div",{className:"text-center text-muted-foreground",children:(0,t.jsx)("p",{children:d})})})}):C.getRowModel().rows.length>0?C.getRowModel().rows.map(e=>(0,t.jsxs)(a.Fragment,{children:[(0,t.jsx)(p.TableRow,{className:`h-8 ${l?"cursor-pointer":""}`,onClick:()=>l?.(e.original),children:e.getVisibleCells().map(e=>(0,t.jsx)(p.TableCell,{className:`py-0.5 max-h-8 overflow-hidden text-ellipsis whitespace-nowrap first:pl-4 last:pr-4 ${e.column.columnDef.meta?.numeric?"text-right tabular-nums":""}`,style:g?{width:e.column.getSize()}:void 0,children:(0,h.flexRender)(e.column.columnDef.cell,e.getContext())},e.id))}),m&&e.getIsExpanded()&&i&&(0,t.jsx)(p.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(p.TableCell,{colSpan:e.getVisibleCells().length,className:"p-0",children:(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden box-border",children:i({row:e})})})})]},e.id)):(0,t.jsx)(p.TableRow,{className:"hover:bg-transparent",children:(0,t.jsx)(p.TableCell,{colSpan:r.length,className:"h-24 text-center align-middle",children:(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:u})})})})]})})}e.s(["DataTable",0,b],149121),e.s(["default",0,({topKeys:e,teams:h,showTags:f=!1,topKeysLimit:p,setTopKeysLimit:x})=>{let{accessToken:v,userRole:C,userId:y,premiumUser:j}=(0,l.default)(),[w,S]=(0,a.useState)(!1),[N,k]=(0,a.useState)(null),[T,R]=(0,a.useState)(void 0),[E,_]=(0,a.useState)("table"),[I,M]=(0,a.useState)(new Set),D=async e=>{if(v)try{let t=await (0,r.keyInfoV1Call)(v,e.api_key),a=(e=>{let{key:t,info:a}=e;return{token:t,...a}})(t);R(a),k(e.api_key),S(!0)}catch(e){console.error("Error fetching key info:",e)}},O=()=>{S(!1),k(null),R(void 0)};a.default.useEffect(()=>{let e=e=>{"Escape"===e.key&&w&&O()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[w]);let L=[{header:"Key ID",accessorKey:"api_key",cell:e=>(0,t.jsx)(s.IdCell,{value:e.getValue(),onClick:()=>D(e.row.original)})},{header:"Key Alias",accessorKey:"key_alias",cell:e=>e.getValue()||"-"}],A={header:"Spend (USD)",accessorKey:"spend",meta:{numeric:!0},cell:e=>(0,t.jsx)(o.MoneyCell,{value:e.getValue(),decimals:2})},$=f?[...L,{header:"Tags",accessorKey:"tags",cell:e=>{let a=e.getValue(),r=e.row.original.api_key,l=I.has(r);if(!a||0===a.length)return"-";let i=a.sort((e,t)=>t.usage-e.usage),s=l?i:i.slice(0,2),o=a.length>2;return(0,t.jsx)("div",{className:"overflow-hidden",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[s.map((e,a)=>(0,t.jsx)(m.Tooltip,{title:(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Tag Name:"})," ",e.tag]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Spend:"})," ",e.usage>0&&e.usage<.01?"<$0.01":`$${(0,n.formatNumberWithCommas)(e.usage,2)}`]})]}),children:(0,t.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded-full text-xs",children:[e.tag.slice(0,7),"..."]})},a)),o&&(0,t.jsx)("button",{onClick:()=>{M(e=>{let t=new Set(e);return t.has(r)?t.delete(r):t.add(r),t})},className:"ml-1 p-1 hover:bg-gray-200 rounded-full transition-colors",title:l?"Show fewer tags":"Show all tags",children:l?(0,t.jsx)(u.ChevronUpIcon,{className:"h-3 w-3 text-gray-500"}):(0,t.jsx)(d.ChevronDownIcon,{className:"h-3 w-3 text-gray-500"})})]})})}},A]:[...L,A],P=e.map(e=>({...e,display_key_alias:e.key_alias&&e.key_alias.length>10?`${e.key_alias.slice(0,10)}...`:e.key_alias||"-"}));return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mb-4 flex justify-between items-center",children:[(0,t.jsx)(c.Segmented,{options:[{label:"5",value:5},{label:"10",value:10},{label:"25",value:25},{label:"50",value:50}],value:p,onChange:e=>x(e)}),(0,t.jsxs)("div",{className:"flex space-x-2",children:[(0,t.jsx)("button",{onClick:()=>_("table"),className:`px-3 py-1 text-sm rounded-md ${"table"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Table View"}),(0,t.jsx)("button",{onClick:()=>_("chart"),className:`px-3 py-1 text-sm rounded-md ${"chart"===E?"bg-blue-100 text-blue-700":"bg-gray-100 text-gray-700"}`,children:"Chart View"})]})]}),"chart"===E?(0,t.jsx)("div",{className:"relative max-h-[600px] overflow-y-auto",children:(0,t.jsx)(i.BarChart,{className:"mt-4 cursor-pointer hover:opacity-90",style:{height:52*Math.min(P.length,p)},data:P,index:"display_key_alias",categories:["spend"],colors:["cyan"],yAxisWidth:120,tickGap:5,layout:"vertical",showLegend:!1,valueFormatter:e=>`$${(0,n.formatNumberWithCommas)(e,2)}`,onValueChange:e=>D(e),showTooltip:!0,customTooltip:e=>{let a=e.payload?.[0]?.payload;return(0,t.jsx)("div",{className:"relative z-50 p-3 bg-black/90 shadow-lg rounded-lg text-white max-w-xs",children:(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Key Alias: "}),(0,t.jsx)("span",{className:"font-mono text-gray-100 break-all",children:a?.key_alias})]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Key ID: "}),(0,t.jsx)("span",{className:"font-mono text-gray-100 break-all",children:a?.api_key})]}),(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsx)("span",{className:"text-gray-300",children:"Spend: "}),(0,t.jsxs)("span",{className:"text-white font-medium",children:["$",(0,n.formatNumberWithCommas)(a?.spend,2)]})]})]})})}})}):(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden max-h-[600px] overflow-y-auto",children:(0,t.jsx)(b,{columns:$,data:e,isLoading:!1})}),w&&N&&T&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:e=>{e.target===e.currentTarget&&O()},children:(0,t.jsxs)("div",{className:"bg-white rounded-lg shadow-xl relative w-11/12 max-w-6xl max-h-[90vh] overflow-y-auto min-h-[750px]",children:[(0,t.jsx)("button",{onClick:O,className:"absolute top-4 right-4 text-gray-500 hover:text-gray-700 focus:outline-hidden","aria-label":"Close",children:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),(0,t.jsx)("div",{className:"p-6 h-full",children:(0,t.jsx)(g.default,{keyId:N,onClose:O,keyData:T,teams:h})})]})})]})}],1023)},183051,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(617802),n=e.i(144267),l=e.i(519455),i=e.i(515288),s=e.i(131792),o=e.i(944835),d=e.i(967489),u=e.i(784774),c=e.i(677572);e.i(32117);var m=e.i(591025),g=e.i(343053),h=e.i(325738),f=e.i(602869),p=e.i(1023);e.i(622826);var b=e.i(964471),x=e.i(500330);let v="all-tags",C=e=>null!==e&&("Admin"===e||"Admin Viewer"===e),y=({data:e})=>{let a=Math.max(0,...e.map(e=>e.value));return(0,t.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsx)("p",{className:"w-1/3 truncate text-sm text-foreground",children:e.name}),(0,t.jsx)(o.Meter,{value:e.value,max:0===a?1:a,className:"flex-1",children:(0,t.jsx)(o.MeterTrack,{children:(0,t.jsx)(o.MeterIndicator,{})})}),(0,t.jsx)("p",{className:"w-24 shrink-0 text-right text-sm tabular-nums text-foreground",children:(0,x.formatNumberWithCommas)(e.value,2)})]},e.name))})},j=({accessToken:e,token:o,userRole:j,userID:w,keys:S,premiumUser:N})=>{let k=new Date,[T,R]=(0,a.useState)([]),[E,_]=(0,a.useState)([]),[I,M]=(0,a.useState)([]),[D,O]=(0,a.useState)([]),[L,A]=(0,a.useState)([]),[$,P]=(0,a.useState)([]),[H,B]=(0,a.useState)([]),[z,F]=(0,a.useState)([]),[W,V]=(0,a.useState)([]),[K,Y]=(0,a.useState)([]),[U,G]=(0,a.useState)({}),[q,X]=(0,a.useState)([]),[Z,Q]=(0,a.useState)(null),[J,ee]=(0,a.useState)([v]),[et,ea]=(0,a.useState)({from:new Date(Date.now()-6048e5),to:new Date}),[er,en]=(0,a.useState)(null),[el,ei]=(0,a.useState)(0),es=new Date(k.getFullYear(),k.getMonth(),1),eo=new Date(k.getFullYear(),k.getMonth()+1,0),ed=eb(es),eu=eb(eo),ec=(S??[]).filter(e=>e&&"string"==typeof e.key_alias&&e.key_alias.length>0).map(e=>({token:String(e.token),alias:String(e.key_alias)})),em=[{value:v,label:"All Tags",disabled:!1},...H.filter(e=>e!==v).map(e=>({value:e,label:N?e:`✨ ${e} (Enterprise only Feature)`,disabled:!N}))];function eg(e){return new Intl.NumberFormat("en-US",{maximumFractionDigits:0,notation:"compact",compactDisplay:"short"}).format(e)}let eh=async()=>{if(e)try{return await (0,f.getProxyUISettings)(e)}catch(e){console.error("Error fetching proxy settings:",e)}};(0,a.useEffect)(()=>{ep(et.from,et.to)},[et,J]);let ef=async(t,a,r)=>{t&&a&&e&&O(await (0,f.adminTopEndUsersCall)(e,r,t.toISOString(),a.toISOString()))},ep=async(t,a)=>{if(!t||!a||!e)return;let r=await eh();r?.DISABLE_EXPENSIVE_DB_QUERIES||P((await (0,f.tagsSpendLogsCall)(e,t.toISOString(),a.toISOString(),0===J.length?void 0:J)).spend_per_tag)};function eb(e){let t=e.getFullYear(),a=e.getMonth()+1,r=e.getDate();return`${t}-${a<10?"0"+a:a}-${r<10?"0"+r:r}`}let ex=async(e,t,a)=>{try{let a=await e();t(a)}catch(e){console.error(a,e)}},ev=(e,t,a,r)=>{let n=[],l=new Date(t),i=new Map(e.map(e=>{let t=(e=>{if(e.includes("-"))return e;{let[t,a]=e.split(" ");return new Date(new Date().getFullYear(),new Date(`${t} 01 2024`).getMonth(),parseInt(a)).toISOString().split("T")[0]}})(e.date);return[t,{...e,date:t}]}));for(;l<=a;){let e=l.toISOString().split("T")[0];if(i.has(e))n.push(i.get(e));else{let t={date:e,api_requests:0,total_tokens:0};r.forEach(e=>{t[e]||(t[e]=0)}),n.push(t)}l.setDate(l.getDate()+1)}return n},eC=async()=>{if(e)try{let t=await (0,f.adminSpendLogsCall)(e),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),1),n=new Date(a.getFullYear(),a.getMonth()+1,0),l=ev(t,r,n,[]),i=Number(l.reduce((e,t)=>e+(t.spend||0),0).toFixed(2));ei(i),R(l)}catch(e){console.error("Error fetching overall spend:",e)}},ey=async()=>{e&&await ex(async()=>(await (0,f.adminTopKeysCall)(e)).map(e=>({key:e.api_key.substring(0,10),api_key:e.api_key,key_alias:e.key_alias,spend:Number(e.total_spend.toFixed(2))})),_,"Error fetching top keys")},ej=async()=>{e&&await ex(async()=>(await (0,f.adminTopModelsCall)(e)).map(e=>({key:e.model,spend:(0,x.formatNumberWithCommas)(e.total_spend,2)})),M,"Error fetching top models")},ew=async()=>{e&&await ex(async()=>{let t=await (0,f.teamSpendLogsCall)(e),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),1),n=new Date(a.getFullYear(),a.getMonth()+1,0);return A(ev(t.daily_spend,r,n,t.teams)),F(t.teams),t.total_spend_per_team.map(e=>({name:e.team_id||"",value:Number(e.total_spend||0)}))},V,"Error fetching team spend")},eS=async()=>{if(e)try{let t=await (0,f.adminGlobalActivity)(e,ed,eu),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),1),n=new Date(a.getFullYear(),a.getMonth()+1,0),l=ev(t.daily_data||[],r,n,["api_requests","total_tokens"]);G({...t,daily_data:l})}catch(e){console.error("Error fetching global activity:",e)}},eN=async()=>{if(e)try{let t=await (0,f.adminGlobalActivityPerModel)(e,ed,eu),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),1),n=new Date(a.getFullYear(),a.getMonth()+1,0),l=t.map(e=>({...e,daily_data:ev(e.daily_data||[],r,n,["api_requests","total_tokens"])}));X(l)}catch(e){console.error("Error fetching global activity per model:",e)}};return((0,a.useEffect)(()=>{(async()=>{if(e&&o&&j&&w){let t=await eh();!(t&&(en(t),t?.DISABLE_EXPENSIVE_DB_QUERIES))&&(eC(),ex(()=>e&&o?(0,f.adminspendByProvider)(e,o,ed,eu):Promise.reject("No access token or token"),Y,"Error fetching provider spend"),ey(),ej(),eS(),eN(),C(j)&&(ew(),e&&ex(async()=>(await (0,f.allTagNamesCall)(e)).tag_names,B,"Error fetching tag names"),e&&ex(()=>(0,f.tagsSpendLogsCall)(e,et.from?.toISOString(),et.to?.toISOString(),void 0),e=>P(e.spend_per_tag),"Error fetching top tags"),e&&ex(()=>(0,f.adminTopEndUsersCall)(e,null,void 0,void 0),O,"Error fetching top end users")))}})()},[e,o,j,w,ed,eu]),er?.DISABLE_EXPENSIVE_DB_QUERIES)?(0,t.jsx)("div",{className:"w-full p-8",children:(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Database Query Limit Reached"})}),(0,t.jsxs)(i.CardContent,{className:"flex flex-col items-start gap-4",children:[(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["SpendLogs in DB has ",er.NUM_SPEND_LOGS_ROWS," rows.",(0,t.jsx)("br",{}),"Please follow our guide to view usage when SpendLogs has more than 1M rows."]}),(0,t.jsx)(l.Button,{render:(0,t.jsx)("a",{href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",rel:"noreferrer",children:"View Usage Guide"})})]})]})}):(0,t.jsx)("div",{className:"w-full p-8",children:(0,t.jsxs)(c.Tabs,{defaultValue:"all-up",children:[(0,t.jsxs)(c.TabsList,{variant:"line",className:"mt-2",children:[(0,t.jsx)(c.TabsTrigger,{value:"all-up",children:"All Up"}),C(j)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.TabsTrigger,{value:"team-based-usage",children:"Team Based Usage"}),(0,t.jsx)(c.TabsTrigger,{value:"customer-usage",children:"Customer Usage"}),(0,t.jsx)(c.TabsTrigger,{value:"tag-based-usage",children:"Tag Based Usage"})]})]}),(0,t.jsx)(c.TabsContent,{value:"all-up",children:(0,t.jsxs)(c.Tabs,{defaultValue:"cost",children:[(0,t.jsxs)(c.TabsList,{className:"mt-1",children:[(0,t.jsx)(c.TabsTrigger,{value:"cost",children:"Cost"}),(0,t.jsx)(c.TabsTrigger,{value:"activity",children:"Activity"})]}),(0,t.jsx)(c.TabsContent,{value:"cost",children:(0,t.jsxs)("div",{className:"grid h-screen w-full grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsxs)("p",{className:"mt-2 mb-2 text-lg text-muted-foreground",children:["Project Spend ",new Date().toLocaleString("default",{month:"long"})," 1 -"," ",new Date(new Date().getFullYear(),new Date().getMonth()+1,0).getDate()]}),(0,t.jsx)(r.default,{userSpend:el,selectedTeam:null,userMaxBudget:null})]}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Monthly Spend"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsx)(g.BarChart,{data:T,index:"date",categories:["spend"],colors:["cyan"],valueFormatter:e=>`$ ${(0,x.formatNumberWithCommas)(e,2)}`,yAxisWidth:100,tickGap:5})})]})}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsxs)(i.Card,{className:"h-full",children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Top Virtual Keys"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsx)(p.default,{topKeys:E,teams:null,topKeysLimit:5,setTopKeysLimit:()=>{}})})]})}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsxs)(i.Card,{className:"h-full",children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Top Models"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsx)(g.BarChart,{className:"mt-4 h-40",data:I,index:"key",categories:["spend"],colors:["cyan"],yAxisWidth:200,layout:"vertical",showXAxis:!1,showLegend:!1,valueFormatter:e=>`$${(0,x.formatNumberWithCommas)(e,2)}`})})]})}),(0,t.jsx)("div",{className:"col-span-1"}),(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsxs)(i.Card,{className:"mb-2",children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Spend by Provider"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsxs)("div",{className:"grid grid-cols-2",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(h.DonutChart,{className:"mt-4 h-40",variant:"pie",data:K,index:"provider",category:"spend",colors:["cyan"],valueFormatter:e=>`$${(0,x.formatNumberWithCommas)(e,2)}`})}),(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Provider"}),(0,t.jsx)(u.TableHead,{children:"Spend"})]})}),(0,t.jsx)(u.TableBody,{children:K.map(e=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{children:e.provider}),(0,t.jsx)(u.TableCell,{children:(0,t.jsx)(b.MoneyCell,{value:e.spend,decimals:2})})]},e.provider))})]})})]})})]})})]})}),(0,t.jsx)(c.TabsContent,{value:"activity",children:(0,t.jsxs)("div",{className:"grid h-[75vh] w-full grid-cols-1 gap-2",children:[(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"All Up"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsxs)("div",{className:"grid grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-[15px] font-normal text-muted-foreground",children:["API Requests ",eg(U.sum_api_requests)]}),(0,t.jsx)(m.AreaChart,{className:"h-40",data:U.daily_data,valueFormatter:eg,index:"date",colors:["cyan"],categories:["api_requests"]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-[15px] font-normal text-muted-foreground",children:["Tokens ",eg(U.sum_total_tokens)]}),(0,t.jsx)(g.BarChart,{className:"h-40",data:U.daily_data,valueFormatter:eg,index:"date",colors:["cyan"],categories:["total_tokens"]})]})]})})]}),q.map((e,a)=>(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:e.model})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsxs)("div",{className:"grid grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-[15px] font-normal text-muted-foreground",children:["API Requests ",eg(e.sum_api_requests)]}),(0,t.jsx)(m.AreaChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["api_requests"],valueFormatter:eg})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"text-[15px] font-normal text-muted-foreground",children:["Tokens ",eg(e.sum_total_tokens)]}),(0,t.jsx)(g.BarChart,{className:"h-40",data:e.daily_data,index:"date",colors:["cyan"],categories:["total_tokens"],valueFormatter:eg})]})]})})]},a))]})})]})}),(0,t.jsx)(c.TabsContent,{value:"team-based-usage",children:(0,t.jsx)("div",{className:"grid h-[75vh] w-full grid-cols-2 gap-2",children:(0,t.jsxs)("div",{className:"col-span-2",children:[(0,t.jsxs)(i.Card,{className:"mb-2",children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Total Spend Per Team"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsx)(y,{data:W})})]}),(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Daily Spend Per Team"})}),(0,t.jsx)(i.CardContent,{children:(0,t.jsx)(g.BarChart,{className:"h-72",data:L,showLegend:!0,index:"date",categories:z,yAxisWidth:80,stack:!0})})]})]})})}),(0,t.jsxs)(c.TabsContent,{value:"customer-usage",children:[(0,t.jsxs)("p",{className:"mb-2 text-[12px] text-muted-foreground italic",children:["Customers of your LLM API calls. Tracked when a `user` param is passed in your LLM calls"," ",(0,t.jsx)("a",{className:"text-primary",href:"https://docs.litellm.ai/docs/proxy/users",target:"_blank",rel:"noreferrer",children:"docs here"})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2",children:[(0,t.jsx)("div",{children:(0,t.jsx)(n.default,{value:et,onValueChange:e=>{ea(e),ef(e.from,e.to,null)}})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select Key"}),(0,t.jsxs)(d.Select,{value:Z,onValueChange:e=>{Q(e),ef(et.from,et.to,e)},children:[(0,t.jsx)(d.SelectTrigger,{className:"w-full",children:(0,t.jsx)(d.SelectValue,{placeholder:"All Keys",children:e=>ec.find(t=>t.token===e)?.alias??"All Keys"})}),(0,t.jsxs)(d.SelectContent,{children:[(0,t.jsx)(d.SelectItem,{value:null,children:"All Keys"}),ec.map(e=>(0,t.jsx)(d.SelectItem,{value:e.token,children:e.alias},e.token))]})]})]})]}),(0,t.jsx)(i.Card,{className:"mt-4",children:(0,t.jsx)(i.CardContent,{children:(0,t.jsx)("div",{className:"max-h-[70vh] min-h-[500px] overflow-y-auto",children:(0,t.jsxs)(u.Table,{children:[(0,t.jsx)(u.TableHeader,{children:(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableHead,{children:"Customer"}),(0,t.jsx)(u.TableHead,{children:"Spend"}),(0,t.jsx)(u.TableHead,{children:"Total Events"})]})}),(0,t.jsx)(u.TableBody,{children:D?.map((e,a)=>(0,t.jsxs)(u.TableRow,{children:[(0,t.jsx)(u.TableCell,{children:e.end_user}),(0,t.jsx)(u.TableCell,{children:(0,t.jsx)(b.MoneyCell,{value:e.total_spend,decimals:2})}),(0,t.jsx)(u.TableCell,{children:e.total_count})]},a))})]})})})})]}),(0,t.jsxs)(c.TabsContent,{value:"tag-based-usage",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2",children:[(0,t.jsx)("div",{className:"col-span-1",children:(0,t.jsx)(n.default,{className:"mb-4",value:et,onValueChange:e=>{ea(e),ep(e.from,e.to)}})}),(0,t.jsx)("div",{children:(0,t.jsxs)(s.Combobox,{multiple:!0,items:em,value:em.filter(e=>J.includes(e.value)),onValueChange:e=>ee(e.map(e=>e.value)),isItemEqualToValue:(e,t)=>e.value===t.value,itemToStringLabel:e=>e.label,children:[(0,t.jsxs)(s.ComboboxChips,{children:[(0,t.jsx)(s.ComboboxValue,{children:e=>e.map(e=>(0,t.jsx)(s.ComboboxChip,{"aria-label":e.label,children:e.label},e.value))}),(0,t.jsx)(s.ComboboxChipsInput,{placeholder:"Select tags",className:"border-0 bg-transparent"})]}),(0,t.jsxs)(s.ComboboxContent,{children:[(0,t.jsx)(s.ComboboxEmpty,{children:"No tags found"}),(0,t.jsx)(s.ComboboxList,{children:e=>(0,t.jsx)(s.ComboboxItem,{value:e,disabled:e.disabled,children:e.label},e.value)})]})]})})]}),(0,t.jsx)("div",{className:"mb-4 grid h-[75vh] w-full grid-cols-2 gap-2",children:(0,t.jsx)("div",{className:"col-span-2",children:(0,t.jsxs)(i.Card,{children:[(0,t.jsx)(i.CardHeader,{children:(0,t.jsx)(i.CardTitle,{children:"Spend Per Tag"})}),(0,t.jsxs)(i.CardContent,{className:"flex flex-col gap-2",children:[(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Get Started by Tracking cost per tag"," ",(0,t.jsx)("a",{className:"text-primary",href:"https://docs.litellm.ai/docs/proxy/cost_tracking",target:"_blank",rel:"noreferrer",children:"here"})]}),(0,t.jsx)(g.BarChart,{className:"h-72",data:$,index:"name",categories:["spend"],colors:["cyan"]})]})]})})})]})]})})};var w=e.i(541202),S=e.i(135214);e.s(["default",0,function(){let{accessToken:e,token:a,userRole:r,userId:n,premiumUser:l}=(0,S.default)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.DeprecationBanner,{featureName:"The old Usage page"}),(0,t.jsx)(j,{accessToken:e,token:a,userRole:r,userID:n,keys:null,premiumUser:l})]})}],183051)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1a0bgy7kzrj91.js b/litellm/proxy/_experimental/out/_next/static/chunks/1a0bgy7kzrj91.js deleted file mode 100644 index 2706a0a76a9..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1a0bgy7kzrj91.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,111672,858488,625005,e=>{"use strict";var a=e.i(843476),l=e.i(109799),r=e.i(785242),t=e.i(135214),s=e.i(143488),i=e.i(268004),o=e.i(321836),n=e.i(592392),d=e.i(602869),c=e.i(275144),p=e.i(487486),u=e.i(519455),x=e.i(759684),g=e.i(271645),m=e.i(527930),h=e.i(115504);let b=g.createContext({collapsed:!1}),f=g.forwardRef(({className:e,collapsed:l=!1,children:r,...t},s)=>(0,a.jsx)(b.Provider,{value:{collapsed:l},children:(0,a.jsx)("aside",{ref:s,"data-slot":"sidebar","data-collapsed":l,className:(0,h.cn)("group/sidebar flex h-full flex-none flex-col overflow-hidden border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-in-out",l?"w-[72px]":"w-[280px]",e),...t,children:r})}));f.displayName="Sidebar";let y=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-header",className:(0,h.cn)("flex flex-none flex-col gap-2 p-3",e),...l}));y.displayName="SidebarHeader",g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("nav",{ref:r,"data-slot":"sidebar-content",className:(0,h.cn)("flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-3 pb-3",e),...l})).displayName="SidebarContent";let k=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-footer",className:(0,h.cn)("flex flex-none flex-col gap-2.5 border-t border-sidebar-border p-3",e),...l}));k.displayName="SidebarFooter";let j=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-group",className:(0,h.cn)("flex flex-col gap-0.5 py-1",e),...l}));j.displayName="SidebarGroup";let v=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-group-label",className:(0,h.cn)("px-2 pt-3 pb-1.5 text-[11px] font-semibold tracking-wider text-muted-foreground uppercase group-data-[collapsed=true]/sidebar:hidden",e),...l}));v.displayName="SidebarGroupLabel";let w=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("ul",{ref:r,"data-slot":"sidebar-menu",className:(0,h.cn)("flex w-full flex-col gap-0.5",e),...l}));w.displayName="SidebarMenu";let N=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("li",{ref:r,"data-slot":"sidebar-menu-item",className:(0,h.cn)("relative",e),...l}));N.displayName="SidebarMenuItem";let _=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("ul",{ref:r,"data-slot":"sidebar-menu-sub",className:(0,h.cn)("mx-3.5 my-0.5 flex min-w-0 flex-col gap-0.5 border-l border-sidebar-border py-0.5 pl-3 group-data-[collapsed=true]/sidebar:hidden",e),...l}));_.displayName="SidebarMenuSub",g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("span",{ref:r,"data-slot":"sidebar-menu-badge",className:(0,h.cn)("ml-auto flex-none rounded-full bg-sidebar-primary/10 px-1.5 py-px text-[10px] font-semibold text-sidebar-primary tabular-nums group-data-[collapsed=true]/sidebar:hidden",e),...l})).displayName="SidebarMenuBadge";let S=(0,h.cva)({base:"group/menu-btn relative flex w-full items-center gap-2.5 overflow-hidden rounded-md px-2.5 text-left text-[13px] font-medium no-underline text-sidebar-foreground/70 outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 focus-visible:ring-sidebar-ring disabled:pointer-events-none disabled:opacity-50 [&>svg]:size-[18px] [&>svg]:shrink-0 group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-9 group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:gap-0 group-data-[collapsed=true]/sidebar:px-0",variants:{isActive:{true:"bg-sidebar-accent text-sidebar-accent-foreground before:absolute before:inset-y-1.5 before:left-0 before:w-[3px] before:rounded-r-full before:bg-sidebar-primary group-data-[collapsed=true]/sidebar:before:hidden",false:""},size:{default:"h-[34px]",sub:"h-[34px]"}},defaultVariants:{isActive:!1,size:"default"}}),L=g.forwardRef(({className:e,isActive:l,size:r,...t},s)=>(0,a.jsx)(m.Button,{ref:s,"data-slot":"sidebar-menu-button","data-active":l||void 0,className:(0,h.cn)(S({isActive:l,size:r,className:e})),...t}));L.displayName="SidebarMenuButton";let C=g.forwardRef(({className:e,...l},r)=>(0,a.jsx)("div",{ref:r,"data-slot":"sidebar-separator",className:(0,h.cn)("mx-2 my-2 h-px bg-sidebar-border",e),...l}));C.displayName="SidebarSeparator";var T=e.i(475254);let A=(0,T.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var M=e.i(217923);let B=(0,T.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),R=(0,T.default)("blocks",[["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["path",{d:"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1H3",key:"1fpvtg"}]]);var z=e.i(531245);let P=(0,T.default)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);var U=e.i(607486);let D=(0,T.default)("boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);var E=e.i(463059),I=e.i(997625),O=e.i(658041),H=e.i(778917),V=e.i(178583),G=e.i(38982);let q=(0,T.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var $=e.i(61574),W=e.i(465261),F=e.i(373264);let K=(0,T.default)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]),Z=(0,T.default)("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]),Y=(0,T.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),Q=(0,T.default)("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);var X=e.i(487074),J=e.i(875475),J=J;let ee=(0,T.default)("route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);var ea=e.i(176516),el=e.i(555436),er=e.i(618393),et=e.i(239616),es=e.i(98919),ei=e.i(581418);let eo=(0,T.default)("tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);var en=e.i(868054),ed=e.i(284614),ec=e.i(761911);let ep=(0,T.default)("wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);var eu=e.i(195116);let ex=(0,T.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var eg=e.i(522016),em=e.i(708347),eh=e.i(906579),eb=e.i(814431),ef=e.i(844444),ey=e.i(731565),ek=e.i(912089),ej=e.i(636772),ev=e.i(115571),ew=e.i(222038),eN=e.i(922407),e_=e.i(799676),eS=e.i(337822),eL=e.i(772436),eC=e.i(699375),eT=e.i(344523);let eA=(0,T.default)("crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]),eM=(0,T.default)("id-card",[["path",{d:"M16 10h2",key:"8sgtl7"}],["path",{d:"M16 14h2",key:"epxaof"}],["path",{d:"M6.17 15a3 3 0 0 1 5.66 0",key:"n6f512"}],["circle",{cx:"9",cy:"11",r:"2",key:"yxgjnd"}],["rect",{x:"2",y:"5",width:"20",height:"14",rx:"2",key:"qneu4z"}]]),eB=(0,T.default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),eR=(0,T.default)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]),ez=({icon:e,label:l,children:r})=>(0,a.jsxs)("div",{className:"flex min-h-[34px] items-center justify-between gap-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-[13px] text-muted-foreground",children:[e,l]}),r]}),eP=({value:e,copyLabel:l})=>(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[(0,a.jsx)("span",{className:"max-w-[150px] truncate font-mono text-[13px] font-medium text-foreground",title:e||"-",children:e||"-"}),(0,a.jsx)(eN.default,{value:e,label:l})]}),eU=({onLogout:e,collapsed:l=!1})=>{let{userId:r,userEmail:i,userRole:o,premiumUser:n,accessToken:d}=(0,t.default)(),{data:c}=(0,s.useHealthReadinessDetails)(d),x=c?.litellm_version,g=(0,ej.useDisableShowPrompts)(),m=(0,ey.useDisableBlogPosts)(),b=(0,ek.useDisableBouncingIcon)(),f=(0,eb.useDisableShowNewBadge)(),y=(e,a)=>{a?(0,ev.setLocalStorageItem)(e,"true"):(0,ev.removeLocalStorageItem)(e),(0,ev.emitLocalStorageChange)(e)},k=[{key:"disableShowNewBadge",label:"Hide New Feature Indicators",ariaLabel:"Toggle hide new feature indicators",checked:f,onCheckedChange:e=>y("disableShowNewBadge",e)},{key:"disableShowPrompts",label:"Hide All Prompts",ariaLabel:"Toggle hide all prompts",checked:g,onCheckedChange:e=>y("disableShowPrompts",e)},{key:"disableBlogPosts",label:"Hide Blog Posts",ariaLabel:"Toggle hide blog posts",checked:m,onCheckedChange:e=>y("disableBlogPosts",e)},{key:"disableBouncingIcon",label:"Hide Bouncing Icon",ariaLabel:"Toggle hide bouncing icon",checked:b,onCheckedChange:e=>y("disableBouncingIcon",e)}],j=i||r||"user",v=function(e,a){let l=e?.split("@")[0]?.trim();if(l){let e=l.replace(/[^a-zA-Z0-9]+/g," ").trim().split(/\s+/).filter(Boolean);if(e.length>=2)return`${e[0].charAt(0)}${e[1].charAt(0)}`.toUpperCase();if(1===e.length){let a=e[0];return a.length>=2?a.slice(0,2).toUpperCase():`${a.charAt(0)}`.toUpperCase()}}return a&&a.length>=2?a.slice(0,2).toUpperCase():a&&1===a.length?`${a.toUpperCase()}•`:"?"}(i,r),w=function(e){let a=0;for(let l=0;l(0,a.jsxs)("div",{className:"flex h-[38px] items-center justify-between gap-3 px-3",children:[(0,a.jsx)("span",{className:"text-[13px] text-foreground",children:e.label}),(0,a.jsx)(eC.Switch,{size:"sm",checked:e.checked,onCheckedChange:e.onCheckedChange,"aria-label":e.ariaLabel})]},e.key))}),(0,a.jsx)(eL.Separator,{}),(0,a.jsxs)(u.Button,{variant:"ghost",onClick:e,className:"h-[42px] w-full justify-start gap-2.5 rounded-none px-3 text-sm font-medium text-foreground",children:[(0,a.jsx)(eB,{className:"size-[19px] text-muted-foreground"}),"Logout"]})]})]})};var eD=e.i(266027);let eE=(0,e.i(243652).createQueryKeys)("licenseInfo"),eI=e=>{let a={queryKey:eE.detail("license"),queryFn:()=>(0,d.getLicenseInfo)(e),enabled:!!e,staleTime:3e5,retry:!1};return(0,eD.useQuery)(a)};e.s(["useLicenseInfo",0,eI],858488);let eO=(e,a=new Date)=>{if(!e)return null;let l=new Date(`${e}T00:00:00Z`);if(Number.isNaN(l.getTime()))return null;let r=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate());return Math.ceil((l.getTime()-r)/864e5)},eH={year:"numeric",month:"short",day:"numeric",timeZone:"UTC"},eV=e=>{let a=new Date(`${e}T00:00:00Z`);return Number.isNaN(a.getTime())?e:a.toLocaleDateString("en-US",eH)},eG=(e,a=new Date)=>{let l=eO(e,a);return null===e||null===l?"No expiration":l<0?`Expired ${eV(e)}`:`Expires ${eV(e)}`};e.s(["formatExpirationStatus",0,eG,"formatExpiryDate",0,eV,"getDaysUntilExpiration",0,eO,"getLicenseExpiryTier",0,(e,a=new Date)=>{let l=eO(e,a);return null===l?"none":l<0?"expired":l<=7?"critical":l<=30?"warning":"none"}],625005);var eq=e.i(204258),e$=e.i(944835);let eW=(0,T.default)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);var eF=e.i(664659),eK=e.i(531278);let eZ=({label:e,used:l,total:r})=>{let t=r>0?l/r*100:0;return(0,a.jsxs)(e$.Meter,{value:l,max:r,"aria-valuetext":`${l.toLocaleString()} of ${r.toLocaleString()}`,children:[(0,a.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,a.jsx)(e$.MeterLabel,{children:e}),(0,a.jsxs)("span",{className:"text-xs font-medium tabular-nums",children:[(0,a.jsx)("span",{className:"text-foreground",children:l.toLocaleString()}),(0,a.jsxs)("span",{className:"text-muted-foreground",children:[" / ",r.toLocaleString()]})]})]}),(0,a.jsx)(e$.MeterTrack,{children:(0,a.jsx)(e$.MeterIndicator,{tone:t>100?"over":t>=80?"warning":"default"})})]})};function eY({accessToken:e,collapsed:l,onExpandRail:r}){let t=eI(e).data??null,{data:s,isLoading:i}=(0,eD.useQuery)({queryKey:["sidebarRemainingUsers",e],queryFn:()=>(0,d.getRemainingUsers)(e),enabled:!!e,retry:!1,staleTime:3e5}),o=s??null,n=null!==o&&(null!==o.total_users||null!==o.total_teams),c=!t?.has_license||!i&&!n;if(!e||c)return null;if(l)return(0,a.jsx)(u.Button,{variant:"outline",onClick:r,title:"Enterprise usage",className:"h-9 w-full rounded-lg border-sidebar-border bg-sidebar text-sidebar-primary shadow-none hover:bg-sidebar-accent hover:text-sidebar-primary",children:(0,a.jsx)(eW,{className:"size-[18px]",strokeWidth:1.75})});let p=t?.expiration_date?eG(t.expiration_date):"Active plan",x=o?[...null!=o.total_users?[{label:"Seats",used:o.total_users_used,total:o.total_users}]:[],...null!=o.total_teams?[{label:"Teams",used:o.total_teams_used,total:o.total_teams}]:[]]:[];return(0,a.jsxs)(eq.Collapsible,{defaultOpen:!0,className:"overflow-hidden rounded-xl border border-sidebar-border bg-sidebar",children:[(0,a.jsxs)(eq.CollapsibleTrigger,{className:"group/usage flex w-full items-center gap-2.5 px-3 py-2.5 text-left transition-colors hover:bg-sidebar-accent",children:[(0,a.jsx)("span",{className:"flex size-[26px] flex-none items-center justify-center rounded-md bg-sidebar-primary/10 text-sidebar-primary",children:(0,a.jsx)(eW,{className:"size-4",strokeWidth:1.75})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1 leading-tight",children:[(0,a.jsx)("span",{className:"block text-[13px] font-semibold text-foreground",children:"Enterprise usage"}),(0,a.jsx)("span",{className:"block truncate text-[11px] text-muted-foreground",children:p})]}),(0,a.jsx)(eF.ChevronDown,{className:"size-4 flex-none -rotate-90 text-muted-foreground transition-transform group-data-[panel-open]/usage:rotate-0"})]}),(0,a.jsx)(eq.CollapsibleContent,{className:"flex flex-col gap-3 px-3 pt-0.5 pb-3",children:i&&0===x.length?(0,a.jsxs)("div",{className:"flex items-center gap-2 py-1 text-xs text-muted-foreground",children:[(0,a.jsx)(eK.Loader2,{className:"size-3.5 animate-spin"})," Loading…"]}):x.map(e=>(0,a.jsx)(eZ,{...e},e.label))})]})}var eQ=e.i(571353);let eX={strokeWidth:1.75},eJ=[{groupLabel:"AI GATEWAY",items:[{key:"api-keys",page:"api-keys",label:"Virtual Keys",icon:(0,a.jsx)(W.KeyRound,{...eX})},{key:"llm-playground",page:"llm-playground",label:"Playground",icon:(0,a.jsx)(J.default,{...eX}),roles:em.rolesWithWriteAccess},{key:"models",page:"models",label:"Models + Endpoints",icon:(0,a.jsx)(K,{...eX}),roles:em.rolesAllowedToViewWriteScopedPages},{key:"agentic",page:"agentic",label:"Agentic",icon:(0,a.jsx)(z.Bot,{...eX}),children:[{key:"agents",page:"agents",label:"Agents",icon:(0,a.jsx)(z.Bot,{...eX}),roles:em.rolesAllowedToViewWriteScopedPages},{key:"workflows",page:"workflows",label:"Workflow Runs",icon:(0,a.jsx)(ex,{...eX})},{key:"memory",page:"memory",label:"Memory",icon:(0,a.jsx)(O.Database,{...eX})}]},{key:"mcp-servers",page:"mcp-servers",label:"MCP Servers",icon:(0,a.jsx)(er.Server,{...eX})},{key:"skills",page:"skills",label:"Skills",icon:(0,a.jsx)(R,{...eX}),roles:em.all_admin_roles},{key:"guardrails",page:"guardrails",label:"Guardrails",icon:(0,a.jsx)(es.Shield,{...eX})},{key:"policies",page:"policies",label:"Policies",icon:(0,a.jsx)(ea.ScrollText,{...eX}),roles:em.all_admin_roles},{key:"tools",page:"tools",label:"Tools",icon:(0,a.jsx)(eu.Wrench,{...eX}),children:[{key:"search-tools",page:"search-tools",label:"Search Tools",icon:(0,a.jsx)(el.Search,{...eX})},{key:"vector-stores",page:"vector-stores",label:"Vector Stores",icon:(0,a.jsx)(O.Database,{...eX})},{key:"tool-policies",page:"tool-policies",label:"Tool Policies",icon:(0,a.jsx)(ei.ShieldCheck,{...eX})}]}]},{groupLabel:"OBSERVABILITY",items:[{key:"new_usage",page:"new_usage",icon:(0,a.jsx)(M.BarChart3,{...eX}),roles:[...em.all_admin_roles,...em.internalUserRoles],label:"Usage"},{key:"cost-optimization",page:"cost-optimization",icon:(0,a.jsx)(X.PiggyBank,{...eX}),roles:[...em.all_admin_roles,...em.internalUserRoles],label:"Cost Optimization"},{key:"logs",page:"logs",label:"Logs",icon:(0,a.jsx)(A,{...eX})},{key:"guardrails-monitor",page:"guardrails-monitor",label:"Guardrails Monitor",icon:(0,a.jsx)($.HeartPulse,{...eX}),roles:[...em.all_admin_roles,...em.internalUserRoles]}]},{groupLabel:"ACCESS CONTROL",items:[{key:"teams",page:"teams",label:"Teams",icon:(0,a.jsx)(ec.Users,{...eX})},{key:"projects",page:"projects",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Projects ",(0,a.jsx)(function({children:e,dot:l=!1}){return(0,eb.useDisableShowNewBadge)()?e?(0,a.jsx)(a.Fragment,{children:e}):null:e?(0,a.jsx)(eh.Badge,{color:"blue",count:l?void 0:"Beta",dot:l,children:e}):(0,a.jsx)(eh.Badge,{color:"blue",count:l?void 0:"Beta",dot:l})},{})]}),icon:(0,a.jsx)(q,{...eX}),roles:em.all_admin_roles},{key:"users",page:"users",label:"Internal Users",icon:(0,a.jsx)(ed.User,{...eX}),roles:em.all_admin_roles},{key:"organizations",page:"organizations",label:"Organizations",icon:(0,a.jsx)(U.Building2,{...eX}),roles:em.all_admin_roles},{key:"access-groups",page:"access-groups",label:"Access Groups",icon:(0,a.jsx)(D,{...eX}),roles:em.all_admin_roles},{key:"budgets",page:"budgets",label:"Budgets",icon:(0,a.jsx)(ep,{...eX}),roles:em.all_admin_roles}]},{groupLabel:"DEVELOPER TOOLS",items:[{key:"api_ref",page:"api_ref",label:"API Reference",icon:(0,a.jsx)(I.Code2,{...eX})},{key:"model-hub-table",page:"model-hub-table",label:"AI Hub",icon:(0,a.jsx)(F.LayoutGrid,{...eX})},{key:"learning-resources",page:"learning-resources",label:"Learning Resources",icon:(0,a.jsx)(P,{...eX}),external_url:"https://models.litellm.ai/cookbook"},{key:"caching",page:"caching",label:"Response Cache",icon:(0,a.jsx)(O.Database,{...eX}),roles:em.all_admin_roles},{key:"experimental",page:"experimental",label:"Experimental",icon:(0,a.jsx)(G.FlaskConical,{...eX}),children:[{key:"prompts",page:"prompts",label:"Prompts",icon:(0,a.jsx)(V.FileText,{...eX}),roles:em.all_admin_roles},{key:"transform-request",page:"transform-request",label:"API Playground",icon:(0,a.jsx)(en.Terminal,{...eX}),roles:[...em.all_admin_roles,...em.internalUserRoles]},{key:"tag-management",page:"tag-management",label:"Tag Management",icon:(0,a.jsx)(eo,{...eX}),roles:em.all_admin_roles},{key:"4",page:"usage",label:"Old Usage",icon:(0,a.jsx)(M.BarChart3,{...eX})}]}]},{groupLabel:"SETTINGS",roles:em.all_admin_roles,items:[{key:"settings",page:"settings",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Settings ",(0,a.jsx)(ef.default,{})]}),icon:(0,a.jsx)(et.Settings,{...eX}),roles:em.all_admin_roles,children:[{key:"router-settings",page:"router-settings",label:"Router Settings",icon:(0,a.jsx)(ee,{...eX}),roles:em.all_admin_roles},{key:"logging-and-alerts",page:"logging-and-alerts",label:"Logging & Alerts",icon:(0,a.jsx)(B,{...eX}),roles:em.all_admin_roles},{key:"admin-panel",page:"admin-panel",label:(0,a.jsxs)("span",{className:"flex items-center gap-2",children:["Admin Settings"," ",(0,a.jsx)(ef.default,{dot:!0,children:(0,a.jsx)("span",{})})]}),icon:(0,a.jsx)(et.Settings,{...eX}),roles:em.all_admin_roles},{key:"cost-tracking",page:"cost-tracking",label:"Cost Tracking",icon:(0,a.jsx)(M.BarChart3,{...eX}),roles:em.all_admin_roles},{key:"ui-theme",page:"ui-theme",label:"UI Theme",icon:(0,a.jsx)(Z,{...eX}),roles:em.all_admin_roles}]}]}],e0=e=>{for(let a of eJ)for(let l of a.items)if(l.children?.some(a=>a.page===e||a.key===e))return l.key;return null},e1=e=>"string"==typeof e.label?e.label:e.key,e2={"AI GATEWAY":"AI Gateway",OBSERVABILITY:"Observability","ACCESS CONTROL":"Access Control","DEVELOPER TOOLS":"Developer Tools",SETTINGS:"Settings"},e5=e=>e.split(/[-_]/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");e.s(["default",0,({setPage:e,defaultSelectedKey:m,collapsed:b=!1,onToggleCollapsed:T,enabledPagesInternalUsers:A,enableProjectsUI:M,disableAgentsForInternalUsers:B,allowAgentsForTeamAdmins:R,disableVectorStoresForInternalUsers:z,allowVectorStoresForTeamAdmins:P})=>{let U,{userId:D,accessToken:I,userRole:O}=(0,t.default)(),{data:V}=(0,l.useOrganizations)(),{data:G}=(0,r.useTeams)(),{logoUrl:q}=(0,c.useTheme)(),{data:$}=(0,s.useHealthReadinessDetails)(I),W=(U=(0,n.default)(I),()=>{(0,i.clearTokenCookies)(),(0,o.clearStoredReturnUrl)(),localStorage.removeItem("litellm_selected_worker_id"),localStorage.removeItem("litellm_worker_url"),window.location.href=U.PROXY_LOGOUT_URL||""}),F=(0,d.getProxyBaseUrl)(),K=$?.litellm_version,Z=(e=>{for(let a of eJ)for(let l of a.items){if(l.page===e)return l.key;let a=l.children?.find(a=>a.page===e);if(a)return a.key}return"api-keys"})(m),[X,J]=(0,g.useState)(()=>{let e=e0(m);return new Set(e?[e]:[])}),[ee,ea]=(0,g.useState)(m);if(m!==ee){ea(m);let e=e0(m);e&&!X.has(e)&&J(a=>new Set(a).add(e))}let el=(0,g.useMemo)(()=>!!D&&!!V&&V.some(e=>e.members?.some(e=>e.user_id===D&&"org_admin"===e.user_role)),[D,V]),er=(0,g.useMemo)(()=>(0,em.isUserTeamAdminForAnyTeam)(G??null,D??""),[G,D]),et=e=>{let a=(0,em.isAdminRole)(O);return e.map(e=>({...e,children:e.children?et(e.children):void 0})).filter(e=>{if("organizations"===e.key||"users"===e.key)return!!(!e.roles||e.roles.includes(O)||el)&&(!!a||null==A||A.includes(e.page));if("projects"===e.key&&!M||!a&&"agents"===e.key&&B&&!(R&&er)||!a&&"vector-stores"===e.key&&z&&!(P&&er)||e.roles&&!e.roles.includes(O))return!1;if(!a&&null!=A)return!!(e.children&&e.children.length>0&&e.children.some(e=>A.includes(e.page)))||A.includes(e.page);return!0})},es=eJ.filter(e=>!e.roles||e.roles.includes(O)).map(e=>({groupLabel:e.groupLabel,items:et(e.items)})).filter(e=>e.items.length>0),ei=(l,r)=>{let t=Z===l.key,s=r?"sub":"default",i=(0,a.jsx)("span",{className:"flex-1 truncate group-data-[collapsed=true]/sidebar:hidden",children:l.label});if(l.external_url)return(0,a.jsxs)("a",{href:l.external_url,target:"_blank",rel:"noopener noreferrer",title:b?e1(l):void 0,"data-active":t||void 0,className:(0,h.cn)(S({isActive:t,size:s})),children:[l.icon,i,(0,a.jsx)(H.ExternalLink,{className:"size-3.5 shrink-0 opacity-70 group-data-[collapsed=true]/sidebar:hidden"})]},l.key);let o=eQ.MIGRATED_PAGES[l.page]?(0,eQ.migratedHref)(eQ.MIGRATED_PAGES[l.page]):(0,eQ.legacyPageHref)(l.page);return(0,a.jsxs)("a",{href:o,onClick:a=>{l.external_url||!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&1!==a.button&&(a.preventDefault(),e(l.page))},title:b?e1(l):void 0,"data-active":t||void 0,className:(0,h.cn)(S({isActive:t,size:s})),children:[l.icon,i]},l.key)},eo=q||`${F}/get_image`;return(0,a.jsxs)(f,{collapsed:b,children:[(0,a.jsx)(y,{className:"h-14 border-b border-border group-data-[collapsed=true]/sidebar:h-auto",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 group-data-[collapsed=true]/sidebar:flex-col",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(eg.default,{href:F||"/",className:"flex min-w-0 items-center","aria-label":"LiteLLM home",children:(0,a.jsx)("img",{src:eo,alt:"LiteLLM",className:"h-7 w-auto max-w-[150px] object-contain group-data-[collapsed=true]/sidebar:w-7"})}),K&&(0,a.jsxs)(p.Badge,{variant:"outline",render:(0,a.jsx)("a",{href:"https://docs.litellm.ai/release_notes",target:"_blank",rel:"noopener noreferrer"}),className:"px-1.5 py-0 font-mono text-[10px] font-medium text-muted-foreground group-data-[collapsed=true]/sidebar:hidden",children:["v",K]})]}),T&&(0,a.jsx)(u.Button,{variant:"ghost",size:"icon-sm",onClick:T,"aria-label":b?"Expand sidebar":"Collapse sidebar",className:"flex-none text-muted-foreground",children:b?(0,a.jsx)(Q,{}):(0,a.jsx)(Y,{})})]})}),(0,a.jsx)(x.ScrollArea,{className:"min-h-0 flex-1",children:(0,a.jsx)("nav",{className:"flex flex-col gap-0.5 px-3 pb-3",children:es.map((e,l)=>(0,a.jsxs)(j,{children:[l>0&&(0,a.jsx)(C,{className:"hidden group-data-[collapsed=true]/sidebar:block"}),(0,a.jsx)(v,{children:e.groupLabel}),(0,a.jsx)(w,{children:e.items.map(e=>(e=>{if(!(e.children&&e.children.length>0))return(0,a.jsx)(N,{children:ei(e,!1)},e.key);let l=Z===e.key,r=X.has(e.key);return(0,a.jsxs)(N,{children:[(0,a.jsxs)(L,{isActive:l,onClick:()=>(e=>{if(b){T?.(),J(a=>new Set(a).add(e));return}J(a=>{let l=new Set(a);return l.has(e)?l.delete(e):l.add(e),l})})(e.key),title:b?e1(e):void 0,children:[e.icon,(0,a.jsx)("span",{className:"flex-1 truncate group-data-[collapsed=true]/sidebar:hidden",children:e.label}),(0,a.jsx)(E.ChevronRight,{className:(0,h.cn)("size-4 shrink-0 transition-transform group-data-[collapsed=true]/sidebar:hidden",r&&"rotate-90")})]}),r&&(0,a.jsx)(_,{children:e.children.map(e=>(0,a.jsx)(N,{children:ei(e,!0)},e.key))})]},e.key)})(e))})]},e.groupLabel))})}),(0,a.jsxs)(k,{children:[(0,em.isAdminRole)(O)&&(0,a.jsx)(eY,{accessToken:I,collapsed:b,onExpandRail:()=>T?.()}),(0,a.jsx)(eU,{onLogout:W,collapsed:b})]})]})},"getBreadcrumb",0,e=>{for(let a of eJ)for(let l of a.items){let r=e2[a.groupLabel]??a.groupLabel;if(l.page===e)return{section:r,title:"string"==typeof l.label?l.label:e5(l.key)};let t=l.children?.find(a=>a.page===e);if(t)return{section:r,title:"string"==typeof t.label?t.label:e5(t.key)}}return{section:null,title:e5(e)}},"menuGroups",0,eJ],111672)}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1cu4fo0qe7dbg.js b/litellm/proxy/_experimental/out/_next/static/chunks/1cu4fo0qe7dbg.js new file mode 100644 index 00000000000..3d22e39df82 --- /dev/null +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1cu4fo0qe7dbg.js @@ -0,0 +1 @@ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(115504);let s=r.forwardRef(({className:e,size:r="default",...s},n)=>(0,t.jsx)("div",{ref:n,"data-slot":"card","data-size":r,className:(0,a.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s}));s.displayName="Card";let n=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-header",className:(0,a.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));n.displayName="CardHeader";let l=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-title",className:(0,a.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));l.displayName="CardTitle";let i=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-description",className:(0,a.cn)("text-sm text-muted-foreground",e),...r}));i.displayName="CardDescription";let o=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-action",className:(0,a.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));o.displayName="CardAction";let d=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-content",className:(0,a.cn)("px-(--card-spacing)",e),...r}));d.displayName="CardContent";let c=r.forwardRef(({className:e,...r},s)=>(0,t.jsx)("div",{ref:s,"data-slot":"card-footer",className:(0,a.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));c.displayName="CardFooter",e.s(["Card",0,s,"CardAction",0,o,"CardContent",0,d,"CardDescription",0,i,"CardFooter",0,c,"CardHeader",0,n,"CardTitle",0,l])},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],727612)},541071,373488,e=>{"use strict";let t=(0,e.i(475254).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t],373488),e.s(["MoreHorizontal",0,t],541071)},755146,e=>{"use strict";var t=e.i(843476),r=e.i(451512),a=e.i(115504);e.i(233565),e.i(678784),e.s(["DropdownMenu",0,function({...e}){return(0,t.jsx)(r.Menu.Root,{"data-slot":"dropdown-menu",...e})},"DropdownMenuContent",0,function({align:e="start",alignOffset:s=0,side:n="bottom",sideOffset:l=4,className:i,...o}){return(0,t.jsx)(r.Menu.Portal,{children:(0,t.jsx)(r.Menu.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:s,side:n,sideOffset:l,children:(0,t.jsx)(r.Menu.Popup,{"data-slot":"dropdown-menu-content",className:(0,a.cn)("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",i),...o})})})},"DropdownMenuItem",0,function({className:e,inset:s,variant:n="default",...l}){return(0,t.jsx)(r.Menu.Item,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":n,className:(0,a.cn)("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",e),...l})},"DropdownMenuSeparator",0,function({className:e,...s}){return(0,t.jsx)(r.Menu.Separator,{"data-slot":"dropdown-menu-separator",className:(0,a.cn)("-mx-1 my-1 h-px bg-border",e),...s})},"DropdownMenuTrigger",0,function({...e}){return(0,t.jsx)(r.Menu.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}])},788699,e=>{"use strict";let t=(0,e.i(475254).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["Pencil",0,t],788699)},677572,370359,405934,e=>{"use strict";var t,r,a,s=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var n=e.i(271645),l=e.i(951437),i=e.i(146376),o=e.i(667865),d=e.i(552245),c=e.i(53687),u=e.i(733332);let p=n.createContext(void 0);function m(){let e=n.useContext(p);if(void 0===e)throw Error((0,u.default)(64));return e}let f=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),h={tabActivationDirection:e=>({[f.activationDirection]:e})};var g=e.i(675606),x=e.i(56434);let v=n.forwardRef(function(e,t){let{className:r,defaultValue:a=0,onValueChange:u,orientation:m="horizontal",render:f,value:v,style:y,...w}=e,j=void 0!==e.defaultValue,C=n.useRef([]),[N,S]=n.useState(()=>new Map),[k,E]=(0,l.useControlled)({controlled:v,default:a,name:"Tabs",state:"value"}),R=void 0!==v,[_,T]=n.useState(()=>new Map),M=n.useRef(void 0),I=n.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of _.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[_]),[O,L]=n.useState(()=>({previousValue:k,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:A}=O,D=A,z=!1;P!==k&&(D=b(P,k,m,_),z=null!=P&&null!=k&&null==I(k));let $=z?P:k,W=P!==$||A!==D;(0,i.useIsoLayoutEffect)(()=>{W&&L({previousValue:$,tabActivationDirection:D})},[$,W,D]);let B=(0,o.useStableCallback)((e,t)=>{t.activationDirection=b(k,e,m,_),u?.(e,t),t.isCanceled||E(e)}),F=(0,o.useStableCallback)((e,t)=>{u?.(e,(0,g.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),U=(0,o.useStableCallback)((e,t)=>{S(r=>{if(r.get(e)===t)return r;let a=new Map(r);return a.set(e,t),a})}),H=(0,o.useStableCallback)((e,t)=>{S(r=>{if(!r.has(e)||r.get(e)!==t)return r;let a=new Map(r);return a.delete(e),a})}),V=n.useCallback(e=>N.get(e),[N]),q=n.useCallback(e=>{for(let t of _.values())if(e===t?.value)return t?.id},[_]),Y=n.useMemo(()=>({getTabElementBySelectedValue:I,getTabIdByPanelValue:q,getTabPanelIdByValue:V,onValueChange:B,orientation:m,registerMountedTabPanel:U,setTabMap:T,unregisterMountedTabPanel:H,tabActivationDirection:D,value:k}),[I,q,V,B,m,U,T,H,D,k]),K=n.useMemo(()=>{for(let e of _.values())if(null!=e&&e.value===k)return e},[_,k]),X=n.useMemo(()=>{for(let e of _.values())if(null!=e&&!e.disabled)return e.value},[_]),G=n.useRef(!j),Q=n.useRef(a),J=n.useRef(j),Z=n.useRef(!1);(0,i.useIsoLayoutEffect)(()=>{if(R)return;function e(e,t){E(e),L(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),F(e,t),G.current=!1}if(0===_.size){Z.current&&null!==k&&!M.current?.isConnected&&e(null,x.REASONS.missing);return}Z.current=!0,M.current=_.keys().next().value;let t=K?.disabled,r=null==K&&null!==k;if(t||k!==Q.current||(J.current=!1),J.current&&t&&k===Q.current)return;let a=G.current;if(t||r){let r=X??null;if(k===r){G.current=!1;return}let s=x.REASONS.missing;a?s=x.REASONS.initial:t&&(s=x.REASONS.disabled),e(r,s);return}a&&null!=K&&(F(k,x.REASONS.initial),G.current=!1)},[X,R,F,K,E,_,k]);let ee={orientation:m,tabActivationDirection:D},et=(0,d.useRenderElement)("div",e,{state:ee,ref:t,props:w,stateAttributesMapping:h});return(0,s.jsx)(p.Provider,{value:Y,children:(0,s.jsx)(c.CompositeList,{elementsRef:C,children:et})})});function b(e,t,r,a){if(null==e||null==t)return"none";let s=null,n=null;for(let[r,l]of a.entries()){if(null==l)continue;let a=l.value??l.index;if(e===a&&(s=r),t===a&&(n=r),null!=s&&null!=n)break}if(null==s||null==n)return s!==n&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let l=s.getBoundingClientRect(),i=n.getBoundingClientRect();if("horizontal"===r){if(i.leftl.left)return"right"}else{if(i.topl.top)return"down"}return"none"}var y=e.i(108868),w=e.i(788015),j=e.i(540886);let C="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,C],370359);var N=e.i(395530);let S=n.createContext(void 0);function k(){let e=n.useContext(S);if(void 0===e)throw Error((0,u.default)(65));return e}var E=e.i(647554);let R=n.forwardRef(function(e,t){let{className:r,disabled:a=!1,render:s,value:l,id:o,nativeButton:c=!0,style:u,...p}=e,{value:f,getTabPanelIdByValue:v,orientation:b,tabActivationDirection:S}=m(),{activateOnFocus:R,highlightedTabIndex:_,onTabActivation:T,registerTabResizeObserverElement:M,setHighlightedTabIndex:I,tabsListElement:O}=k(),L=(0,w.useBaseUiId)(o),P=n.useMemo(()=>({disabled:a,id:L,value:l}),[a,L,l]),{compositeProps:A,compositeRef:D,index:z}=(0,N.useCompositeItem)({metadata:P}),$=l===f,W=n.useRef(!1),B=n.useRef(null);(0,i.useIsoLayoutEffect)(()=>{let e=B.current;if(e)return M(e)},[M]),(0,i.useIsoLayoutEffect)(()=>{if(W.current){W.current=!1;return}if($&&z>-1&&_!==z){if(null!=O){let e=(0,E.activeElement)((0,y.ownerDocument)(O));if(e&&(0,E.contains)(O,e))return}a||I(z)}},[$,z,_,I,a,O]);let{getButtonProps:F,buttonRef:U}=(0,j.useButton)({disabled:a,native:c,focusableWhenDisabled:!0}),H=v(l),V=n.useRef(!1),q=n.useRef(!1);return(0,d.useRenderElement)("button",e,{state:{disabled:a,active:$,orientation:b,tabActivationDirection:S},ref:[t,U,D,B],props:[A,{role:"tab","aria-controls":H,"aria-selected":$,id:L,onClick:function(e){$||a||T(l,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){$||(z>-1&&!a&&I(z),!a&&R&&(!V.current||V.current&&q.current)&&T(l,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){$||a||(V.current=!0,e.button&&0!==e.button||(q.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){V.current=!1,q.current=!1},{once:!0})))},[C]:$?"":void 0,onKeyDownCapture(){W.current=!0}},p,F],stateAttributesMapping:h})});var _=e.i(73364),T=e.i(802239),M=e.i(956789);function I(){return M.NOOP}function O(){return!1}function L(){return!0}let P=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var A=e.i(172410);let D={...h,activeTabPosition:()=>null,activeTabSize:()=>null},z=n.forwardRef(function(e,t){let{className:r,render:a,renderBeforeHydration:l=!1,style:i,...o}=e,{nonce:c}=(0,A.useCSPContext)(),{getTabElementBySelectedValue:u,orientation:p,tabActivationDirection:f,value:h}=m(),{tabsListElement:g,registerIndicatorUpdateListener:x}=k(),v=(0,T.useSyncExternalStore)(I,O,L),b=function(){let[,e]=n.useState({});return n.useCallback(()=>{e({})},[])}();n.useEffect(()=>x(b),[x,b]);let y=0,w=0,j=0,C=0,N=0,S=0,E=!1;if(null!=h&&null!=g){let e=u(h);if(null!=e){E=!0;let{width:t,height:r}=(0,_.getCssDimensions)(e),{width:a,height:s}=(0,_.getCssDimensions)(g),n=e.getBoundingClientRect(),l=g.getBoundingClientRect(),i=a>0?l.width/a:1,o=s>0?l.height/s:1;if(Math.abs(i)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=n.left-l.left,t=n.top-l.top;y=e/i+g.scrollLeft-g.clientLeft,j=t/o+g.scrollTop-g.clientTop}else y=e.offsetLeft,j=e.offsetTop;N=t,S=r,w=g.scrollWidth-y-N,C=g.scrollHeight-j-S}}let R=E?{left:y,right:w,top:j,bottom:C}:null,M=E?{width:N,height:S}:null,z=E?{[P.activeTabLeft]:`${y}px`,[P.activeTabRight]:`${w}px`,[P.activeTabTop]:`${j}px`,[P.activeTabBottom]:`${C}px`,[P.activeTabWidth]:`${N}px`,[P.activeTabHeight]:`${S}px`}:void 0,$=E&&N>0&&S>0,W=(0,d.useRenderElement)("span",e,{state:{orientation:p,activeTabPosition:R,activeTabSize:M,tabActivationDirection:f},ref:t,props:[{role:"presentation",style:z,hidden:!$},o,{suppressHydrationWarning:!0}],stateAttributesMapping:D});return null==h?null:(0,s.jsxs)(n.Fragment,{children:[W,v&&l&&(0,s.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var $=e.i(144394),W=e.i(209407),B=e.i(137584),F=e.i(223910),U=e.i(673553);let H=((a={}).index="data-index",a.activationDirection="data-activation-direction",a.orientation="data-orientation",a.hidden="data-hidden",a[a.startingStyle=W.TransitionStatusDataAttributes.startingStyle]="startingStyle",a[a.endingStyle=W.TransitionStatusDataAttributes.endingStyle]="endingStyle",a),V={...h,...W.transitionStatusMapping},q=n.forwardRef(function(e,t){let{className:r,value:a,render:s,keepMounted:l=!1,style:o,...c}=e,{value:u,getTabIdByPanelValue:p,orientation:f,tabActivationDirection:h,registerMountedTabPanel:g,unregisterMountedTabPanel:x}=m(),v=(0,w.useBaseUiId)(),b=n.useMemo(()=>({id:v,value:a}),[v,a]),{ref:y,index:j}=(0,U.useCompositeListItem)({metadata:b}),C=a===u,{mounted:N,transitionStatus:S,setMounted:k}=(0,F.useTransitionStatus)(C),E=!N,R=p(a),_=n.useRef(null),T=(0,d.useRenderElement)("div",e,{state:{hidden:E,orientation:f,tabActivationDirection:h,transitionStatus:S},ref:[t,y,_],props:[{"aria-labelledby":R,hidden:E,id:v,role:"tabpanel",tabIndex:C?0:-1,inert:(0,$.inertValue)(!C),[H.index]:j},c],stateAttributesMapping:V});return((0,B.useOpenChangeComplete)({open:C,ref:_,onComplete(){C||k(!1)}}),(0,i.useIsoLayoutEffect)(()=>{if((!E||l)&&null!=v)return g(a,v),()=>{x(a,v)}},[E,l,a,v,g,x]),l||N)?T:null});var Y=e.i(590803),K=e.i(828918),X=e.i(673327),G=e.i(621082);let Q=[];var J=e.i(838452),Z=e.i(872855);function ee(e){let{render:t,className:r,style:a,refs:l=M.EMPTY_ARRAY,props:u=M.EMPTY_ARRAY,state:p=M.EMPTY_OBJECT,stateAttributesMapping:m,highlightedIndex:f,onHighlightedIndexChange:h,orientation:g,grid:x,loopFocus:v,onLoop:b,enableHomeAndEndKeys:y,onMapChange:w,stopEventPropagation:j=!0,rootRef:N,disabledIndices:S,modifierKeys:k,highlightItemOnHover:R=!1,tag:_="div",...T}=e,{props:I,highlightedIndex:O,onHighlightedIndexChange:L,elementsRef:P,onMapChange:A,relayKeyboardEvent:D}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:a,onLoop:s,direction:l,highlightedIndex:d,onHighlightedIndexChange:c,rootRef:u,enableHomeAndEndKeys:p=!1,stopEventPropagation:m=!1,disabledIndices:f,modifierKeys:h=Q}=e,[g,x]=n.useState(0),v=null!=a,b=n.useRef(null),y=(0,K.useMergedRefs)(b,u),w=n.useRef([]),j=n.useRef(!1),N=d??g,S=(0,o.useStableCallback)((e,t=!1)=>{if((c??x)(e),t){let t=w.current[e];(0,X.scrollIntoViewIfNeeded)(b.current,t,l,r)}}),k=(0,o.useStableCallback)(e=>{if(0===e.size||j.current)return;j.current=!0;let t=Array.from(e.keys()),a=t.find(e=>e?.hasAttribute(C))??null,s=a?t.indexOf(a):-1;if(-1!==s)S(s);else if((0,G.isListIndexDisabled)(t,N,f)){let e=(0,G.findNonDisabledListIndex)(t,{disabledIndices:f});(0,G.isIndexOutOfListBounds)(t,e)||S(e)}(0,X.scrollIntoViewIfNeeded)(b.current,a,l,r)});(0,i.useIsoLayoutEffect)(()=>{if(null==f||null!=d||!j.current)return;let e=w.current;if((0,G.isListIndexDisabled)(e,N,f)){let t=(0,G.findNonDisabledListIndex)(e,{disabledIndices:f});(0,G.isIndexOutOfListBounds)(e,t)||S(t)}},[f,d,N,w,S]);let R=(0,o.useStableCallback)((e,t,r)=>s?s(e,t,r,w):r),_=(0,o.useStableCallback)(e=>{let n=p?X.COMPOSITE_KEYS:X.ARROW_KEYS;if(!n.has(e.key)||function(e,t){for(let r of X.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,h)||!b.current)return;let i="rtl"===l,o=i?X.ARROW_LEFT:X.ARROW_RIGHT,d={horizontal:o,vertical:X.ARROW_DOWN,both:o}[r],c=i?X.ARROW_RIGHT:X.ARROW_LEFT,u={horizontal:c,vertical:X.ARROW_UP,both:c}[r],g=(0,E.getTarget)(e.nativeEvent);if(null!=g&&(0,X.isNativeInput)(g)&&!(0,Y.isElementDisabled)(g)){let t=g.selectionStart,r=g.selectionEnd,a=g.value??"";if(null==t||e.shiftKey||t!==r||e.key!==u&&t0)return}let x=N,y=(0,G.getMinListIndex)(w,f),j=(0,G.getMaxListIndex)(w,f);null!=a&&(x=a({disabledIndices:f,elementsRef:w,event:e,highlightedIndex:N,loopFocus:t,maxIndex:j,minIndex:y,onLoop:R,orientation:r,rtl:i}));let C={horizontal:[o],vertical:[X.ARROW_DOWN],both:[o,X.ARROW_DOWN]}[r],k={horizontal:[c],vertical:[X.ARROW_UP],both:[c,X.ARROW_UP]}[r],_=v?n:({horizontal:p?X.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:X.HORIZONTAL_KEYS,vertical:p?X.VERTICAL_KEYS_WITH_EXTRA_KEYS:X.VERTICAL_KEYS,both:n})[r];p&&(e.key===X.HOME?x=y:e.key===X.END&&(x=j)),x===N&&(C.includes(e.key)||k.includes(e.key))&&(t&&x===j&&C.includes(e.key)?(x=y,s&&(x=s(e,N,x,w))):t&&x===y&&k.includes(e.key)?(x=j,s&&(x=s(e,N,x,w))):x=(0,G.findNonDisabledListIndex)(w.current,{startingIndex:x,decrement:k.includes(e.key),disabledIndices:f})),x===N||(0,G.isIndexOutOfListBounds)(w.current,x)||(m&&e.stopPropagation(),_.has(e.key)&&e.preventDefault(),S(x,!0),queueMicrotask(()=>{w.current[x]?.focus()}))});return{props:{ref:y,onFocus(e){let t=b.current,r=(0,E.getTarget)(e.nativeEvent);t&&null!=r&&(0,X.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:_},highlightedIndex:N,onHighlightedIndexChange:S,elementsRef:w,disabledIndices:f,onMapChange:k,relayKeyboardEvent:_}}({grid:x,loopFocus:v,onLoop:b,orientation:g,highlightedIndex:f,onHighlightedIndexChange:h,rootRef:N,stopEventPropagation:j,enableHomeAndEndKeys:y,direction:(0,Z.useDirection)(),disabledIndices:S,modifierKeys:k}),z=(0,d.useRenderElement)(_,e,{state:p,ref:l,props:[I,...u,T],stateAttributesMapping:m}),$=n.useMemo(()=>({highlightedIndex:O,onHighlightedIndexChange:L,highlightItemOnHover:R,relayKeyboardEvent:D}),[O,L,R,D]);return(0,s.jsx)(J.CompositeRootContext.Provider,{value:$,children:(0,s.jsx)(c.CompositeList,{elementsRef:P,onMapChange:e=>{w?.(e),A(e)},children:z})})}e.s(["CompositeRoot",0,ee],405934);let et=n.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:a,loopFocus:l=!0,render:d,style:c,...u}=e,{onValueChange:p,orientation:f,value:g,setTabMap:x,tabActivationDirection:v}=m(),[b,y]=n.useState(0),[w,j]=n.useState(null),C=n.useRef(new Set),N=n.useRef(new Set),k=n.useRef(null);(0,i.useIsoLayoutEffect)(()=>{if("u"{C.current.forEach(e=>{e()})});return k.current=e,w&&e.observe(w),N.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),k.current=null}},[w]);let E=(0,o.useStableCallback)(e=>(C.current.add(e),()=>{C.current.delete(e)})),R=(0,o.useStableCallback)(e=>(N.current.add(e),k.current?.observe(e),()=>{N.current.delete(e),k.current?.unobserve(e)})),_=(0,o.useStableCallback)((e,t)=>{e!==g&&p(e,t)}),T=n.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,registerIndicatorUpdateListener:E,registerTabResizeObserverElement:R,onTabActivation:_,setHighlightedTabIndex:y,tabsListElement:w}),[r,b,E,R,_,y,w]);return(0,s.jsx)(S.Provider,{value:T,children:(0,s.jsx)(ee,{render:d,className:a,style:c,state:{orientation:f,tabActivationDirection:v},refs:[t,j],props:[{"aria-orientation":"vertical"===f?"vertical":void 0,role:"tablist"},u],stateAttributesMapping:h,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:l,orientation:f,onHighlightedIndexChange:y,onMapChange:x,disabledIndices:M.EMPTY_ARRAY})})});e.s(["Indicator",0,z,"List",0,et,"Panel",0,q,"Root",0,v,"Tab",0,R],69281);var er=e.i(69281),er=er,ea=e.i(115504);let es=(0,ea.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,s.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,ea.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,s.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,ea.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,s.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,ea.cn)(es({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,s.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,ea.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},213205,e=>{"use strict";e.i(247167);var t=e.i(931067),r=e.i(271645);let a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M678.3 642.4c24.2-13 51.9-20.4 81.4-20.4h.1c3 0 4.4-3.6 2.2-5.6a371.67 371.67 0 00-103.7-65.8c-.4-.2-.8-.3-1.2-.5C719.2 505 759.6 431.7 759.6 349c0-137-110.8-248-247.5-248S264.7 212 264.7 349c0 82.7 40.4 156 102.6 201.1-.4.2-.8.3-1.2.5-44.7 18.9-84.8 46-119.3 80.6a373.42 373.42 0 00-80.4 119.5A373.6 373.6 0 00137 888.8a8 8 0 008 8.2h59.9c4.3 0 7.9-3.5 8-7.8 2-77.2 32.9-149.5 87.6-204.3C357 628.2 432.2 597 512.2 597c56.7 0 111.1 15.7 158 45.1a8.1 8.1 0 008.1.3zM512.2 521c-45.8 0-88.9-17.9-121.4-50.4A171.2 171.2 0 01340.5 349c0-45.9 17.9-89.1 50.3-121.6S466.3 177 512.2 177s88.9 17.9 121.4 50.4A171.2 171.2 0 01683.9 349c0 45.9-17.9 89.1-50.3 121.6C601.1 503.1 558 521 512.2 521zM880 759h-84v-84c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v84h-84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h84v84c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-84h84c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"user-add",theme:"outlined"};var s=e.i(9583),n=r.forwardRef(function(e,n){return r.createElement(s.default,(0,t.default)({},e,{ref:n,icon:a}))});e.s(["UserAddOutlined",0,n],213205)},860585,e=>{"use strict";var t=e.i(843476),r=e.i(199133);let{Option:a}=r.Select;e.s(["default",0,({value:e,onChange:s,className:n="",style:l={}})=>(0,t.jsxs)(r.Select,{style:{width:"100%",...l},value:e||void 0,onChange:s,className:n,placeholder:"n/a",allowClear:!0,children:[(0,t.jsx)(a,{value:"1h",children:"hourly"}),(0,t.jsx)(a,{value:"24h",children:"daily"}),(0,t.jsx)(a,{value:"7d",children:"weekly"}),(0,t.jsx)(a,{value:"30d",children:"monthly"})]}),"getBudgetDurationLabel",0,e=>e?({"1h":"hourly","24h":"daily","7d":"weekly","30d":"monthly"})[e]||e:"Not set"])},981339,e=>{"use strict";var t=e.i(185793);e.s(["Skeleton",()=>t.default])},343488,e=>{"use strict";var t=e.i(540626),r=e.i(271645);e.s(["useDebouncedCallback",0,function(e,a){let s=(0,t.useDebouncer)(e,a).maybeExecute;return(0,r.useCallback)((...e)=>s(...e),[s])}])},500727,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),s=e.i(135214);let n=(0,r.createQueryKeys)("mcpServers");e.s(["useMCPServers",0,e=>{let{accessToken:r}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list(e?{filters:{teamId:e}}:void 0),queryFn:async()=>await (0,a.fetchMCPServers)(r,e),enabled:!!r})}])},699857,e=>{"use strict";var t=e.i(266027),r=e.i(243652),a=e.i(602869),s=e.i(135214);let n=(0,r.createQueryKeys)("mcpToolsets");e.s(["useMCPToolsets",0,()=>{let{accessToken:e}=(0,s.default)();return(0,t.useQuery)({queryKey:n.list(),queryFn:async()=>await (0,a.fetchMCPToolsets)(e),enabled:!!e})}])},916940,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(199133),s=e.i(602869);e.s(["default",0,({onChange:e,value:n,className:l,accessToken:i,placeholder:o="Select vector stores",disabled:d=!1})=>{let[c,u]=(0,r.useState)([]),[p,m]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{if(i){m(!0);try{let e=await (0,s.vectorStoreListCall)(i);e.data&&u(e.data)}catch(e){console.error("Error fetching vector stores:",e)}finally{m(!1)}}})()},[i]),(0,t.jsx)("div",{children:(0,t.jsx)(a.Select,{mode:"multiple",placeholder:o,onChange:e,value:n,loading:p,className:l,allowClear:!0,options:c.map(e=>({label:`${e.vector_store_name||e.vector_store_id} (${e.vector_store_id})`,value:e.vector_store_id,title:e.vector_store_description||e.vector_store_id})),optionFilterProp:"label",showSearch:!0,style:{width:"100%"},disabled:d})})}])},75921,e=>{"use strict";var t=e.i(843476),r=e.i(266027),a=e.i(243652),s=e.i(602869),n=e.i(135214);let l=(0,a.createQueryKeys)("mcpAccessGroups");var i=e.i(500727),o=e.i(699857),d=e.i(199133),c=e.i(234713);let u="toolset:";e.s(["default",0,({onChange:e,value:a,className:p,accessToken:m,placeholder:f="Select MCP servers",disabled:h=!1,teamId:g,allowNoMcpServers:x=!1,allowAllProxyMcpServers:v=!1})=>{let{data:b=[],isLoading:y}=(0,i.useMCPServers)(g),{data:w=[],isLoading:j}=(()=>{let{accessToken:e}=(0,n.default)();return(0,r.useQuery)({queryKey:l.list({}),queryFn:async()=>await (0,s.fetchMCPAccessGroups)(e),enabled:!!e})})(),{data:C=[],isLoading:N}=(0,o.useMCPToolsets)(),S=new Set(w),k=[...w.map(e=>({label:e,value:e,type:"accessGroup",searchText:`${e} Access Group`})),...b.map(e=>({label:`${e.server_name||e.server_id} (${e.server_id})`,value:e.server_id,type:"server",searchText:`${e.server_name||e.server_id} ${e.server_id} MCP Server`})),...C.map(e=>({label:e.toolset_name,value:`${u}${e.toolset_id}`,type:"toolset",searchText:`${e.toolset_name} ${e.toolset_id} Toolset`}))],E={accessGroup:"#52c41a",server:"#1890ff",toolset:"#722ed1"},R={accessGroup:"Access Group",server:"MCP Server",toolset:"Toolset"},_=[...a?.servers||[],...a?.accessGroups||[],...(a?.toolsets||[]).map(e=>`${u}${e}`)],T=x&&_.includes(c.NO_MCP_SERVERS_SENTINEL),M=_.includes(c.ALL_PROXY_MCP_SERVERS_SENTINEL);return(0,t.jsx)("div",{children:(0,t.jsxs)(d.Select,{mode:"multiple",placeholder:f,onChange:t=>{if(v&&t.includes(c.ALL_PROXY_MCP_SERVERS_SENTINEL))return void e({servers:[c.ALL_PROXY_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});if(x&&t.includes(c.NO_MCP_SERVERS_SENTINEL))return void e({servers:[c.NO_MCP_SERVERS_SENTINEL],accessGroups:[],toolsets:[]});let r=t.filter(e=>e.startsWith(u)).map(e=>e.slice(u.length)),a=t.filter(e=>!e.startsWith(u));e({servers:a.filter(e=>!S.has(e)),accessGroups:a.filter(e=>S.has(e)),toolsets:r})},value:_,loading:y||j||N,className:p,allowClear:!0,showSearch:!0,style:{width:"100%"},disabled:h,filterOption:(e,t)=>t?.value===c.NO_MCP_SERVERS_SENTINEL||t?.value===c.ALL_PROXY_MCP_SERVERS_SENTINEL||(k.find(e=>e.value===t?.value)?.searchText||"").toLowerCase().includes(e.toLowerCase()),children:[(v||M)&&(0,t.jsx)(d.Select.Option,{value:c.ALL_PROXY_MCP_SERVERS_SENTINEL,label:"All Proxy MCP Servers",children:(0,t.jsx)("span",{style:{color:"#1890ff",fontWeight:500},children:"All Proxy MCP Servers"})},c.ALL_PROXY_MCP_SERVERS_SENTINEL),x&&(0,t.jsx)(d.Select.Option,{value:c.NO_MCP_SERVERS_SENTINEL,label:"No MCP Servers",children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{flex:1},children:"No MCP Servers"}),(0,t.jsx)("span",{style:{color:"#8c8c8c",fontSize:"12px",fontWeight:500,opacity:.8},children:"Block all"})]})},c.NO_MCP_SERVERS_SENTINEL),k.map(e=>(0,t.jsx)(d.Select.Option,{value:e.value,label:e.label,disabled:T||M,children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,t.jsx)("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",background:E[e.type],flexShrink:0}}),(0,t.jsx)("span",{style:{flex:1},children:e.label}),(0,t.jsx)("span",{style:{color:E[e.type],fontSize:"12px",fontWeight:500,opacity:.8},children:R[e.type]})]})},e.value))]})})}],75921)},68155,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"}))});e.s(["TrashIcon",0,r],68155)},389083,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),s=e.i(480731),n=e.i(95779),l=e.i(444755),i=e.i(673706);let o={xs:{paddingX:"px-2",paddingY:"py-0.5",fontSize:"text-xs"},sm:{paddingX:"px-2.5",paddingY:"py-0.5",fontSize:"text-sm"},md:{paddingX:"px-3",paddingY:"py-0.5",fontSize:"text-md"},lg:{paddingX:"px-3.5",paddingY:"py-0.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-1",fontSize:"text-xl"}},d={xs:{height:"h-4",width:"w-4"},sm:{height:"h-4",width:"w-4"},md:{height:"h-4",width:"w-4"},lg:{height:"h-5",width:"w-5"},xl:{height:"h-6",width:"w-6"}},c=(0,i.makeClassName)("Badge"),u=r.default.forwardRef((e,u)=>{let{color:p,icon:m,size:f=s.Sizes.SM,tooltip:h,className:g,children:x}=e,v=(0,t.__rest)(e,["color","icon","size","tooltip","className","children"]),b=m||null,{tooltipProps:y,getReferenceProps:w}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([u,y.refs.setReference]),className:(0,l.tremorTwMerge)(c("root"),"w-max shrink-0 inline-flex justify-center items-center cursor-default rounded-tremor-small ring-1 ring-inset",p?(0,l.tremorTwMerge)((0,i.getColorClassNames)(p,n.colorPalette.background).bgColor,(0,i.getColorClassNames)(p,n.colorPalette.iconText).textColor,(0,i.getColorClassNames)(p,n.colorPalette.iconRing).ringColor,"bg-opacity-10 ring-opacity-20","dark:bg-opacity-5 dark:ring-opacity-60"):(0,l.tremorTwMerge)("bg-tremor-brand-faint text-tremor-brand-emphasis ring-tremor-brand/20","dark:bg-dark-tremor-brand-muted/50 dark:text-dark-tremor-brand dark:ring-dark-tremor-subtle/20"),o[f].paddingX,o[f].paddingY,o[f].fontSize,g)},w,v),r.default.createElement(a.default,Object.assign({text:h},y)),b?r.default.createElement(b,{className:(0,l.tremorTwMerge)(c("icon"),"shrink-0 -ml-1 mr-1.5",d[f].height,d[f].width)}):null,r.default.createElement("span",{className:(0,l.tremorTwMerge)(c("text"),"whitespace-nowrap")},x))});u.displayName="Badge",e.s(["Badge",0,u],389083)},278587,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"}))});e.s(["RefreshIcon",0,r],278587)},871943,502547,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"}))});e.s(["ChevronDownIcon",0,r],871943);let a=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"}))});e.s(["ChevronRightIcon",0,a],502547)},384767,e=>{"use strict";var t=e.i(843476),r=e.i(599724),a=e.i(271645),s=e.i(389083);let n=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"}))});var l=e.i(602869);let i=function({vectorStores:e,accessToken:i}){let[o,d]=(0,a.useState)([]);return(0,a.useEffect)(()=>{(async()=>{if(i&&0!==e.length)try{let e=await (0,l.vectorStoreListCall)(i);e.data&&d(e.data.map(e=>({vector_store_id:e.vector_store_id,vector_store_name:e.vector_store_name})))}catch(e){console.error("Error fetching vector stores:",e)}})()},[i,e.length]),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Vector Stores"}),(0,t.jsx)(s.Badge,{color:"blue",size:"xs",children:e.length})]}),e.length>0?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((e,r)=>{let a;return(0,t.jsx)("div",{className:"inline-flex items-center px-3 py-1.5 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-sm font-medium",children:(a=o.find(t=>t.vector_store_id===e))?`${a.vector_store_name||a.vector_store_id} (${a.vector_store_id})`:e},r)})}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(n,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No vector stores configured"})]})]})},o=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14M5 12a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v4a2 2 0 01-2 2M5 12a2 2 0 00-2 2v4a2 2 0 002 2h14a2 2 0 002-2v-4a2 2 0 00-2-2m-2-4h.01M17 16h.01"}))});var d=e.i(871943),c=e.i(502547),u=e.i(592968),p=e.i(234713);let m=function({mcpServers:e,mcpAccessGroups:n=[],mcpToolPermissions:i={},mcpToolsets:m=[],accessToken:f}){let[h,g]=(0,a.useState)([]),[x,v]=(0,a.useState)([]),[b,y]=(0,a.useState)(new Set),[w,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{(async()=>{if(f&&e.length>0)try{let e=await (0,l.fetchMCPServers)(f);e&&Array.isArray(e)?g(e):e.data&&Array.isArray(e.data)&&g(e.data)}catch(e){console.error("Error fetching MCP servers:",e)}})()},[f,e.length]),(0,a.useEffect)(()=>{(async()=>{if(f&&m.length>0)try{let e=await (0,l.fetchMCPToolsets)(f),t=Array.isArray(e)?e.filter(e=>m.includes(e.toolset_id)):[];v(t)}catch(e){console.error("Error fetching toolsets:",e)}})()},[f,m.length]);let C=e.includes(p.NO_MCP_SERVERS_SENTINEL),N=e.includes(p.ALL_PROXY_MCP_SERVERS_SENTINEL),S=[...e.filter(e=>e!==p.NO_MCP_SERVERS_SENTINEL&&e!==p.ALL_PROXY_MCP_SERVERS_SENTINEL).map(e=>({type:"server",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],k=S.length+m.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-blue-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"MCP Servers"}),(0,t.jsx)(s.Badge,{color:C?"red":"blue",size:"xs",children:C?"Blocked":N?"All":k})]}),C?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-red-50 border border-red-200",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-red-400"}),(0,t.jsx)(r.Text,{className:"text-red-700 text-sm",children:"No MCP servers — this key is blocked from all MCP servers, including its team's servers"})]}):N?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-blue-400"}),(0,t.jsx)(r.Text,{className:"text-blue-700 text-sm",children:"All Proxy MCP Servers"})]}):k>0?(0,t.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:[S.map((e,r)=>{let a="server"===e.type?i[e.value]:void 0,s=a&&a.length>0,n=b.has(e.value);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>{var t;return s&&(t=e.value,void y(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r}))},className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 transition-all ${s?"cursor-pointer hover:bg-gray-50 hover:border-gray-300":"bg-white"}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"server"===e.type?(0,t.jsx)(u.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-blue-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=h.find(t=>t.server_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.alias} (${r})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded-sm uppercase tracking-wide shrink-0",children:"Group"})]})}),s&&(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:a.length}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===a.length?"tool":"tools"}),n?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),s&&n&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-blue-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.map((e,r)=>(0,t.jsx)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-blue-50 border border-blue-200 text-blue-800 text-xs font-medium",children:e},r))})})]},r)}),m.length>0&&m.map((e,r)=>{let a=x.find(t=>t.toolset_id===e),s=w.has(e),n=a?.tools.length??0;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{onClick:()=>n>0&&void j(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r}),className:`flex items-center gap-3 py-2 px-3 rounded-lg border border-purple-200 transition-all ${n>0?"cursor-pointer hover:bg-purple-50 hover:border-purple-300":"bg-white"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:a?.toolset_name??e}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-purple-600 bg-purple-50 border border-purple-200 rounded-sm uppercase tracking-wide shrink-0",children:"Toolset"})]}),n>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 whitespace-nowrap",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-gray-600",children:n}),(0,t.jsx)("span",{className:"text-xs text-gray-500",children:1===n?"tool":"tools"}),s?(0,t.jsx)(d.ChevronDownIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"}):(0,t.jsx)(c.ChevronRightIcon,{className:"h-3.5 w-3.5 text-gray-400 ml-0.5"})]})]}),n>0&&s&&a&&(0,t.jsx)("div",{className:"ml-4 pl-4 border-l-2 border-purple-200 pb-1",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:a.tools.map((e,r)=>(0,t.jsxs)("span",{className:"inline-flex items-center px-2.5 py-1 rounded-lg bg-purple-50 border border-purple-200 text-purple-800 text-xs font-medium",children:[(0,t.jsxs)("span",{className:"text-purple-400 mr-1 text-[10px]",children:[e.server_id.slice(0,6),"…"]}),e.tool_name]},r))})})]},`toolset-${r}`)})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(o,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No MCP servers, access groups, or toolsets configured"})]})]})},f=a.forwardRef(function(e,t){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"}))}),h=function({agents:e,agentAccessGroups:n=[],accessToken:i}){let[o,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{if(i&&e.length>0)try{let e=await (0,l.getAgentsList)(i);e&&e.agents&&Array.isArray(e.agents)&&d(e.agents)}catch(e){console.error("Error fetching agents:",e)}})()},[i,e.length]);let c=[...e.map(e=>({type:"agent",value:e})),...n.map(e=>({type:"accessGroup",value:e}))],p=c.length;return(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(f,{className:"h-4 w-4 text-purple-600"}),(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Agents"}),(0,t.jsx)(s.Badge,{color:"purple",size:"xs",children:p})]}),p>0?(0,t.jsx)("div",{className:"max-h-[400px] overflow-y-auto space-y-2 pr-1",children:c.map((e,r)=>(0,t.jsx)("div",{className:"space-y-2",children:(0,t.jsx)("div",{className:"flex items-center gap-3 py-2 px-3 rounded-lg border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:"agent"===e.type?(0,t.jsx)(u.Tooltip,{title:`Full ID: ${e.value}`,placement:"top",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-purple-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:(e=>{let t=o.find(t=>t.agent_id===e);if(t){let r=e.length>7?`${e.slice(0,3)}...${e.slice(-4)}`:e;return`${t.agent_name} (${r})`}return e})(e.value)})]})}):(0,t.jsxs)("div",{className:"inline-flex items-center gap-2 min-w-0",children:[(0,t.jsx)("span",{className:"inline-block w-1.5 h-1.5 bg-green-500 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"text-sm font-medium text-gray-900 truncate",children:e.value}),(0,t.jsx)("span",{className:"ml-1 px-1.5 py-0.5 text-[9px] font-semibold text-green-600 bg-green-50 border border-green-200 rounded-sm uppercase tracking-wide shrink-0",children:"Group"})]})})})},r))}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-gray-50 border border-gray-200",children:[(0,t.jsx)(f,{className:"h-4 w-4 text-gray-400"}),(0,t.jsx)(r.Text,{className:"text-gray-500 text-sm",children:"No agents or access groups configured"})]})]})};e.s(["default",0,function({objectPermission:e,variant:a="card",className:s="",accessToken:n}){let l=e?.vector_stores||[],o=e?.mcp_servers||[],d=e?.mcp_access_groups||[],c=e?.mcp_tool_permissions||{},u=e?.mcp_toolsets||[],p=e?.agents||[],f=e?.agent_access_groups||[],g=e?.search_tools||[],x=(0,t.jsxs)("div",{className:"card"===a?"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6":"space-y-4",children:[(0,t.jsx)(i,{vectorStores:l,accessToken:n}),(0,t.jsx)(m,{mcpServers:o,mcpAccessGroups:d,mcpToolPermissions:c,mcpToolsets:u,accessToken:n}),(0,t.jsx)(h,{agents:p,agentAccessGroups:f,accessToken:n}),(0,t.jsxs)("div",{className:"rounded-md border border-gray-100 p-4",children:[(0,t.jsx)(r.Text,{className:"text-sm font-medium text-gray-800",children:"Search tools"}),0===g.length?(0,t.jsx)(r.Text,{className:"mt-1 block text-xs text-gray-500",children:"No restriction — all configured search tools are allowed for this team."}):(0,t.jsx)(r.Text,{className:"mt-1 block text-xs text-gray-700",children:g.join(", ")})]})]});return"card"===a?(0,t.jsxs)("div",{className:`bg-white border border-gray-200 rounded-lg p-6 ${s}`,children:[(0,t.jsx)("div",{className:"flex items-center gap-2 mb-6",children:(0,t.jsxs)("div",{children:[(0,t.jsx)(r.Text,{className:"font-semibold text-gray-900",children:"Object Permissions"}),(0,t.jsx)(r.Text,{className:"text-xs text-gray-500",children:"Access control for Vector Stores and MCP Servers"})]})}),x]}):(0,t.jsxs)("div",{className:`${s}`,children:[(0,t.jsx)(r.Text,{className:"font-medium text-gray-900 mb-3",children:"Object Permissions"}),x]})}],384767)},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},776639,e=>{"use strict";var t=e.i(843476),r=e.i(353753),a=e.i(115504),s=e.i(519455),n=e.i(995926);function l({...e}){return(0,t.jsx)(r.Dialog.Portal,{"data-slot":"dialog-portal",...e})}function i({className:e,...s}){return(0,t.jsx)(r.Dialog.Backdrop,{"data-slot":"dialog-overlay",className:(0,a.cn)("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...s})}e.s(["Dialog",0,function({...e}){return(0,t.jsx)(r.Dialog.Root,{"data-slot":"dialog",...e})},"DialogContent",0,function({className:e,children:o,showCloseButton:d=!0,...c}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(i,{}),(0,t.jsxs)(r.Dialog.Popup,{"data-slot":"dialog-content",className:(0,a.cn)("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-md data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...c,children:[o,d&&(0,t.jsxs)(r.Dialog.Close,{"data-slot":"dialog-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[(0,t.jsx)(n.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"DialogDescription",0,function({className:e,...s}){return(0,t.jsx)(r.Dialog.Description,{"data-slot":"dialog-description",className:(0,a.cn)("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...s})},"DialogFooter",0,function({className:e,showCloseButton:n=!1,children:l,...i}){return(0,t.jsxs)("div",{"data-slot":"dialog-footer",className:(0,a.cn)("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...i,children:[l,n&&(0,t.jsx)(r.Dialog.Close,{render:(0,t.jsx)(s.Button,{variant:"outline"}),children:"Close"})]})},"DialogHeader",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"dialog-header",className:(0,a.cn)("flex flex-col gap-2",e),...r})},"DialogTitle",0,function({className:e,...s}){return(0,t.jsx)(r.Dialog.Title,{"data-slot":"dialog-title",className:(0,a.cn)("leading-none font-medium",e),...s})}])},768371,e=>{"use strict";let t,r;var a=e.i(247167);let s=/\{[^{}]+\}/g;function n(e,t,r){if(null==t)return"";if("object"==typeof t)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${e}=${r?.allowReserved===!0?t:encodeURIComponent(t)}`}function l(e,t,r){if(!t||"object"!=typeof t)return"";let a=[],s={simple:",",label:".",matrix:";"}[r.style]||"&";if("deepObject"!==r.style&&!1===r.explode){for(let e in t)a.push(e,!0===r.allowReserved?t[e]:encodeURIComponent(t[e]));let s=a.join(",");switch(r.style){case"form":return`${e}=${s}`;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return s}}for(let s in t){let l="deepObject"===r.style?`${e}[${s}]`:s;a.push(n(l,t[s],r))}let l=a.join(s);return"label"===r.style||"matrix"===r.style?`${s}${l}`:l}function i(e,t,r){if(!Array.isArray(t))return"";if(!1===r.explode){let a={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[r.style]||",",s=(!0===r.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(a);switch(r.style){case"simple":return s;case"label":return`.${s}`;case"matrix":return`;${e}=${s}`;default:return`${e}=${s}`}}let a={simple:",",label:".",matrix:";"}[r.style]||"&",s=[];for(let a of t)"simple"===r.style||"label"===r.style?s.push(!0===r.allowReserved?a:encodeURIComponent(a)):s.push(n(e,a,r));return"label"===r.style||"matrix"===r.style?`${a}${s.join(a)}`:s.join(a)}function o(e){return function(t){let r=[];if(t&&"object"==typeof t)for(let a in t){let s=t[a];if(null!=s){if(Array.isArray(s)){if(0===s.length)continue;r.push(i(a,s,{style:"form",explode:!0,...e?.array,allowReserved:e?.allowReserved||!1}));continue}if("object"==typeof s){r.push(l(a,s,{style:"deepObject",explode:!0,...e?.object,allowReserved:e?.allowReserved||!1}));continue}r.push(n(a,s,e))}}return r.join("&")}}function d(e,t){let r=e;for(let a of e.match(s)??[]){let e=a.substring(1,a.length-1),s=!1,o="simple";if(e.endsWith("*")&&(s=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(o="label",e=e.substring(1)):e.startsWith(";")&&(o="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;let d=t[e];if(Array.isArray(d)){r=r.replace(a,i(e,d,{style:o,explode:s}));continue}if("object"==typeof d){r=r.replace(a,l(e,d,{style:o,explode:s}));continue}if("matrix"===o){r=r.replace(a,`;${n(e,d)}`);continue}r=r.replace(a,"label"===o?`.${encodeURIComponent(d)}`:encodeURIComponent(d))}return r}function c(e,t){return e instanceof FormData?e:t&&"application/x-www-form-urlencoded"===(t.get instanceof Function?t.get("Content-Type")??t.get("content-type"):t["Content-Type"]??t["content-type"])?new URLSearchParams(e).toString():JSON.stringify(e)}function u(...e){let t=new Headers;for(let r of e)if(r&&"object"==typeof r)for(let[e,a]of r instanceof Headers?r.entries():Object.entries(r))if(null===a)t.delete(e);else if(Array.isArray(a))for(let r of a)t.append(e,r);else void 0!==a&&t.set(e,a);return t}function p(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var m=e.i(954616),f=e.i(621482),h=e.i(869230),g=e.i(469637),x=e.i(254440),v=e.i(266027),b=e.i(431703),y=e.i(97198);let w=async(e,t)=>new Request(t,{method:e.method,headers:e.headers,body:e.body?await e.arrayBuffer():void 0,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal}),j=function(e){let{baseUrl:t="",Request:r=globalThis.Request,fetch:s=globalThis.fetch,querySerializer:n,bodySerializer:l,pathSerializer:i,headers:m,requestInitExt:f,...h}={...e};f="object"==typeof a.default&&Number.parseInt(a.default?.versions?.node?.substring(0,2))>=18&&a.default.versions.undici?f:void 0,t=p(t);let g=[];async function x(e,a){var x,v;let b,y,w,j,C,{baseUrl:N,fetch:S=s,Request:k=r,headers:E,params:R={},parseAs:_="json",querySerializer:T,bodySerializer:M=l??c,pathSerializer:I,body:O,middleware:L=[],...P}=a||{},A=t;N&&(A=p(N)??t);let D="function"==typeof n?n:o(n);T&&(D="function"==typeof T?T:o({..."object"==typeof n?n:{},...T}));let z=I||i||d,$=void 0===O?void 0:M(O,u(m,E,R.header)),W=u(void 0===$||$ instanceof FormData?{}:{"Content-Type":"application/json"},m,E,R.header),B=[...g,...L],F={redirect:"follow",...h,...P,body:$,headers:W},U=new k((x=e,v={baseUrl:A,params:R,querySerializer:D,pathSerializer:z},b=`${v.baseUrl}${x}`,v.params?.path&&(b=v.pathSerializer(b,v.params.path)),(y=v.querySerializer(v.params.query??{})).startsWith("?")&&(y=y.substring(1)),y&&(b+=`?${y}`),b),F);for(let e in P)e in U||(U[e]=P[e]);if(B.length){for(let t of(w=Math.random().toString(36).slice(2,11),j=Object.freeze({baseUrl:A,fetch:S,parseAs:_,querySerializer:D,bodySerializer:M,pathSerializer:z}),B))if(t&&"object"==typeof t&&"function"==typeof t.onRequest){let r=await t.onRequest({request:U,schemaPath:e,params:R,options:j,id:w});if(r)if(r instanceof k)U=r;else if(r instanceof Response){C=r;break}else throw Error("onRequest: must return new Request() or Response() when modifying the request")}}if(!C){try{C=await S(U,f)}catch(r){let t=r;if(B.length)for(let r=B.length-1;r>=0;r--){let a=B[r];if(a&&"object"==typeof a&&"function"==typeof a.onError){let r=await a.onError({request:U,error:t,schemaPath:e,params:R,options:j,id:w});if(r){if(r instanceof Response){t=void 0,C=r;break}if(r instanceof Error){t=r;continue}throw Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(B.length)for(let t=B.length-1;t>=0;t--){let r=B[t];if(r&&"object"==typeof r&&"function"==typeof r.onResponse){let t=await r.onResponse({request:U,response:C,schemaPath:e,params:R,options:j,id:w});if(t){if(!(t instanceof Response))throw Error("onResponse: must return new Response() when modifying the response");C=t}}}}let H=C.headers.get("Content-Length");if(204===C.status||"HEAD"===U.method||"0"===H&&!C.headers.get("Transfer-Encoding")?.includes("chunked"))return C.ok?{data:void 0,response:C}:{error:void 0,response:C};if(C.ok){let e=async()=>{if("stream"===_)return C.body;if("json"===_&&!H){let e=await C.text();return e?JSON.parse(e):void 0}return await C[_]()};return{data:await e(),response:C}}let V=await C.text();try{V=JSON.parse(V)}catch{}return{error:V,response:C}}return{request:(e,t,r)=>x(t,{...r,method:e.toUpperCase()}),GET:(e,t)=>x(e,{...t,method:"GET"}),PUT:(e,t)=>x(e,{...t,method:"PUT"}),POST:(e,t)=>x(e,{...t,method:"POST"}),DELETE:(e,t)=>x(e,{...t,method:"DELETE"}),OPTIONS:(e,t)=>x(e,{...t,method:"OPTIONS"}),HEAD:(e,t)=>x(e,{...t,method:"HEAD"}),PATCH:(e,t)=>x(e,{...t,method:"PATCH"}),TRACE:(e,t)=>x(e,{...t,method:"TRACE"}),use(...e){for(let t of e)if(t){if("object"!=typeof t||!("onRequest"in t||"onResponse"in t||"onError"in t))throw Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");g.push(t)}},eject(...e){for(let t of e){let e=g.indexOf(t);-1!==e&&g.splice(e,1)}}}}({baseUrl:globalThis.location?.origin??""});j.use({async onRequest({request:e}){let t=(0,y.getRequestBaseUrl)(),r=t?await w(e,((e,t)=>{let{pathname:r,search:a}=new URL(e);return`${t.replace(/\/+$/,"")}${r}${a}`})(e.url,t)):e,a=(0,y.getAuthToken)();return a&&r.headers.set((0,y.getAuthHeaderName)(),`Bearer ${a}`),r},async onResponse({response:e}){let t;if(e.ok)return e;let r=await e.clone().text(),a=r;try{a=JSON.parse(r),t=(0,b.deriveErrorMessage)(a)}catch{t=r||`HTTP ${e.status}`}throw(0,y.reportError)(t),new b.ApiError(t,e.status,a)}});let C=(t=async({queryKey:[e,t,r],signal:a})=>{let s=j[e.toUpperCase()],{data:n,error:l,response:i}=await s(t,{signal:a,...r});if(l)throw l;return 204===i.status||"0"===i.headers.get("Content-Length")?n??null:n},{queryOptions:r=(e,r,...[a,s])=>({queryKey:void 0===a?[e,r]:[e,r,a],queryFn:t,...s}),useQuery:(e,t,...[a,s,n])=>(0,v.useQuery)(r(e,t,a,s),n),useSuspenseQuery:(e,t,...[a,s,n])=>{var l;return l=r(e,t,a,s),(0,g.useBaseQuery)({...l,enabled:!0,suspense:!0,throwOnError:x.defaultThrowOnError,placeholderData:void 0},h.QueryObserver,n)},useInfiniteQuery:(e,t,a,s,n)=>{let{pageParamName:l="cursor",...i}=s,{queryKey:o}=r(e,t,a);return(0,f.useInfiniteQuery)({queryKey:o,queryFn:async({queryKey:[e,t,r],pageParam:a=0,signal:s})=>{let n=j[e.toUpperCase()],i={...r,signal:s,params:{...r?.params||{},query:{...r?.params?.query,[l]:a}}},{data:o,error:d}=await n(t,i);if(d)throw d;return o},...i},n)},useMutation:(e,t,r,a)=>(0,m.useMutation)({mutationKey:[e,t],mutationFn:async r=>{let a=j[e.toUpperCase()],{data:s,error:n}=await a(t,r);if(n)throw n;return s},...r},a)});e.s(["$api",0,C,"fetchClient",0,j],768371)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),a=e.i(829087),s=e.i(480731),n=e.i(444755),l=e.i(673706),i=e.i(95779);let o={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},d={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},c={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},u=(0,l.makeClassName)("Icon"),p=r.default.forwardRef((e,p)=>{let{icon:m,variant:f="simple",tooltip:h,size:g=s.Sizes.SM,color:x,className:v}=e,b=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),y=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,l.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,l.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,l.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,l.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,l.getColorClassNames)(t,i.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,i.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,l.getColorClassNames)(t,i.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,n.tremorTwMerge)((0,l.getColorClassNames)(t,i.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(f,x),{tooltipProps:w,getReferenceProps:j}=(0,a.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,l.mergeRefs)([p,w.refs.setReference]),className:(0,n.tremorTwMerge)(u("root"),"inline-flex shrink-0 items-center justify-center",y.bgColor,y.textColor,y.borderColor,y.ringColor,c[f].rounded,c[f].border,c[f].shadow,c[f].ring,o[g].paddingX,o[g].paddingY,v)},j,b),r.default.createElement(a.default,Object.assign({text:h},w)),r.default.createElement(m,{className:(0,n.tremorTwMerge)(u("icon"),"shrink-0",d[g].height,d[g].width)}))});p.displayName="Icon",e.s(["default",0,p],728889)},752978,e=>{"use strict";var t=e.i(728889);e.s(["Icon",()=>t.default])},591935,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"}))});e.s(["PencilAltIcon",0,r],591935)},122577,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z"}),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"}))});e.s(["PlayIcon",0,r],122577)},360820,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15l7-7 7 7"}))});e.s(["ChevronUpIcon",0,r],360820)},434626,e=>{"use strict";var t=e.i(271645);let r=t.forwardRef(function(e,r){return t.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:r},e),t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"}))});e.s(["ExternalLinkIcon",0,r],434626)},902555,e=>{"use strict";var t=e.i(843476),r=e.i(591935),a=e.i(122577),s=e.i(278587),n=e.i(68155),l=e.i(360820),i=e.i(871943),o=e.i(434626),d=e.i(271645);let c=d.forwardRef(function(e,t){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:t},e),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3m2 4H10m0 0l3-3m-3 3l3 3"}))});var u=e.i(592968),p=e.i(115504),m=e.i(752978);function f({icon:e,onClick:r,className:a,disabled:s,dataTestId:n}){return s?(0,t.jsx)(m.Icon,{icon:e,size:"sm",className:"opacity-50 cursor-not-allowed","data-testid":n}):(0,t.jsx)(m.Icon,{icon:e,size:"sm",onClick:r,className:(0,p.cx)("cursor-pointer",a),"data-testid":n})}let h={Edit:{icon:r.PencilAltIcon,className:"hover:text-blue-600"},Delete:{icon:n.TrashIcon,className:"hover:text-red-600"},Test:{icon:a.PlayIcon,className:"hover:text-blue-600"},Regenerate:{icon:s.RefreshIcon,className:"hover:text-green-600"},Up:{icon:l.ChevronUpIcon,className:"hover:text-blue-600"},Down:{icon:i.ChevronDownIcon,className:"hover:text-blue-600"},Open:{icon:o.ExternalLinkIcon,className:"hover:text-green-600"},Copy:{icon:c,className:"hover:text-blue-600"}};e.s(["default",0,function({onClick:e,tooltipText:r,disabled:a=!1,disabledTooltipText:s,dataTestId:n,variant:l}){let{icon:i,className:o}=h[l];return(0,t.jsx)(u.Tooltip,{title:a?s:r,children:(0,t.jsx)("span",{children:(0,t.jsx)(f,{icon:i,onClick:e,className:o,disabled:a,dataTestId:n})})})}],902555)},738014,e=>{"use strict";var t=e.i(135214),r=e.i(602869),a=e.i(266027);let s=(0,e.i(243652).createQueryKeys)("users");e.s(["useCurrentUser",0,()=>{let{accessToken:e,userId:n}=(0,t.default)();return(0,a.useQuery)({queryKey:s.detail(n),queryFn:async()=>await (0,r.userGetInfoV2)(e),enabled:!!(e&&n)})}])},162386,e=>{"use strict";var t=e.i(843476),r=e.i(625901),a=e.i(109799),s=e.i(785242),n=e.i(738014),l=e.i(199133),i=e.i(981339),o=e.i(592968);let d={label:"All Proxy Models",value:"all-proxy-models"},c={label:"No Default Models",value:"no-default-models"},u=[d,c],p={user:({allProxyModels:e,userModels:t,options:r})=>t&&r?.includeUserModels?t:[],team:({allProxyModels:e,selectedOrganization:t,userModels:r})=>t?t.models.includes(d.value)||0===t.models.length?e:e.filter(e=>t.models.includes(e)):e??[],organization:({allProxyModels:e})=>e,global:({allProxyModels:e})=>e};e.s(["MODEL_SENTINEL_OPTIONS",0,u,"ModelSelect",0,e=>{let{teamID:m,organizationID:f,options:h,context:g,dataTestId:x,value:v=[],onChange:b,style:y}=e,{includeUserModels:w,showAllTeamModelsOption:j,showAllProxyModelsOverride:C,includeSpecialOptions:N}=h||{},{data:S,isLoading:k}=(0,r.useAllProxyModels)(),{data:E,isLoading:R}=(0,s.useTeam)(m),{data:_,isLoading:T}=(0,a.useOrganization)(f),{data:M,isLoading:I}=(0,n.useCurrentUser)(),O=e=>u.some(t=>t.value===e),L=v.some(O),P=_?.models.includes(d.value)||_?.models.length===0;if(k||R||T||I)return(0,t.jsx)(i.Skeleton.Input,{active:!0,block:!0});let{wildcard:A,regular:D}=(e=>{let t=[],r=[];for(let a of e)a.endsWith("/*")?t.push(a):r.push(a);return{wildcard:t,regular:r}})(((e,t,r)=>{let a=Array.from(new Map(e.map(e=>[e.id,e])).values()).map(e=>e.id);if(t.options?.showAllProxyModelsOverride)return a;let s=p[t.context];return s?s({allProxyModels:a,...r,options:t.options}):[]})(S?.data??[],e,{selectedTeam:E,selectedOrganization:_,userModels:M?.models}));return(0,t.jsx)(l.Select,{"data-testid":x,value:v,onChange:e=>{let t=e.filter(O);b(t.length>0?[t[t.length-1]]:e)},style:y,options:[...N?[{label:(0,t.jsx)("span",{children:"Special Options"}),title:"Special Options",options:[...C||P&&N||"global"===g?[{label:(0,t.jsx)("span",{children:"All Proxy Models"}),value:d.value,disabled:v.length>0&&v.some(e=>O(e)&&e!==d.value),key:d.value}]:[],{label:(0,t.jsx)("span",{children:"No Default Models"}),value:c.value,disabled:v.length>0&&v.some(e=>O(e)&&e!==c.value),key:c.value}]}]:[],...A.length>0?[{label:(0,t.jsx)("span",{children:"Wildcard Options"}),title:"Wildcard Options",options:A.map(e=>{let r=e.replace("/*",""),a=r.charAt(0).toUpperCase()+r.slice(1);return{label:(0,t.jsx)("span",{children:`All ${a} models`}),value:e,disabled:L}})}]:[],{label:(0,t.jsx)("span",{children:"Models"}),title:"Models",options:D.map(e=>({label:(0,t.jsx)("span",{children:e}),value:e,disabled:L}))}],mode:"multiple",placeholder:"Select Models",allowClear:!0,maxTagCount:"responsive",maxTagPlaceholder:e=>(0,t.jsx)(o.Tooltip,{styles:{root:{pointerEvents:"none"}},title:e.map(({value:e})=>e).join(", "),children:(0,t.jsxs)("span",{children:["+",e.length," more"]})})})}],162386)},294612,e=>{"use strict";var t=e.i(843476),r=e.i(100486),a=e.i(827252),s=e.i(213205),n=e.i(771674),l=e.i(464571),i=e.i(770914),o=e.i(291542),d=e.i(262218),c=e.i(592968),u=e.i(898586),p=e.i(902555);let{Text:m}=u.Typography;e.s(["default",0,function({members:e,canEdit:u,onEdit:f,onDelete:h,onAddMember:g,roleColumnTitle:x="Role",roleTooltip:v,extraColumns:b=[],showDeleteForMember:y,emptyText:w}){let j=[{title:"User Email",dataIndex:"user_email",key:"user_email",render:e=>(0,t.jsx)(m,{children:e||"-"})},{title:"User ID",dataIndex:"user_id",key:"user_id",render:e=>"default_user_id"===e?(0,t.jsx)(d.Tag,{color:"blue",children:"Default Proxy Admin"}):(0,t.jsx)(m,{children:e||"-"})},{title:v?(0,t.jsxs)(i.Space,{direction:"horizontal",children:[x,(0,t.jsx)(c.Tooltip,{title:v,children:(0,t.jsx)(a.InfoCircleOutlined,{})})]}):x,dataIndex:"role",key:"role",render:e=>(0,t.jsxs)(i.Space,{children:[e?.toLowerCase()==="admin"||e?.toLowerCase()==="org_admin"?(0,t.jsx)(r.CrownOutlined,{}):(0,t.jsx)(n.UserOutlined,{}),(0,t.jsx)(m,{style:{textTransform:"capitalize"},children:e||"-"})]})},...b,{title:"Actions",key:"actions",fixed:"right",width:120,render:(e,r)=>u?(0,t.jsxs)(i.Space,{children:[(0,t.jsx)(p.default,{variant:"Edit",tooltipText:"Edit member",dataTestId:"edit-member",onClick:()=>f(r)}),(!y||y(r))&&(0,t.jsx)(p.default,{variant:"Delete",tooltipText:"Delete member",dataTestId:"delete-member",onClick:()=>h(r)})]}):null}];return(0,t.jsxs)(i.Space,{direction:"vertical",style:{width:"100%"},children:[(0,t.jsxs)("span",{className:"inline-flex text-sm text-gray-700",children:[e.length," Member",1!==e.length?"s":""]}),(0,t.jsx)(o.Table,{columns:j,dataSource:e,rowKey:e=>e.user_id??e.user_email??JSON.stringify(e),pagination:!1,size:"small",scroll:{x:"max-content"},locale:w?{emptyText:w}:void 0}),g&&u&&(0,t.jsx)(l.Button,{icon:(0,t.jsx)(s.UserAddOutlined,{}),type:"primary",onClick:g,children:"Add Member"})]})}])},907308,276173,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(212931),s=e.i(808613),n=e.i(464571),l=e.i(199133),i=e.i(592968),o=e.i(213205),d=e.i(343488),c=e.i(602869),u=e.i(741466);e.s(["default",0,({isVisible:e,onCancel:p,onSubmit:m,accessToken:f,title:h="Add Team Member",roles:g=[{label:"admin",value:"admin",description:"Admin role. Can create team keys, add members, and manage settings."},{label:"user",value:"user",description:"User role. Can view team info, but not manage it."}],defaultRole:x="user",teamId:v})=>{let[b]=s.Form.useForm(),[y,w]=(0,r.useState)([]),[j,C]=(0,r.useState)(!1),[N,S]=(0,r.useState)("user_email"),[k,E]=(0,r.useState)(!1),R=async(e,t)=>{if(!e)return void w([]);C(!0);try{let r=new URLSearchParams;if(r.append(t,e),v&&r.append("team_id",v),null==f)return;let a=(await (0,c.userFilterUICall)(f,r)).map(e=>({label:"user_email"===t?`${e.user_email}`:`${e.user_id}`,value:"user_email"===t?e.user_email:e.user_id,user:e}));w(a)}catch(e){console.error("Error fetching users:",e)}finally{C(!1)}},_=(0,d.useDebouncedCallback)((e,t)=>R(e,t),{wait:u.DEBOUNCE_WAIT_MS}),T=(e,t)=>{S(t),_(e,t)},M=(e,t)=>{let r=t.user;b.setFieldsValue({user_email:r.user_email,user_id:r.user_id,role:b.getFieldValue("role")})},I=async e=>{E(!0);try{await m(e)}finally{E(!1)}};return(0,t.jsx)(a.Modal,{title:h,open:e,onCancel:()=>{b.resetFields(),w([]),p()},footer:null,width:800,maskClosable:!k,children:(0,t.jsxs)(s.Form,{form:b,onFinish:I,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",initialValues:{role:x},children:[(0,t.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",children:(0,t.jsx)(l.Select,{showSearch:!0,className:"w-full",placeholder:"Search by email",filterOption:!1,onSearch:e=>T(e,"user_email"),onSelect:(e,t)=>M(e,t),options:"user_email"===N?y:[],loading:j,allowClear:!0,"data-testid":"member-email-search"})}),(0,t.jsx)("div",{className:"text-center mb-4",children:"OR"}),(0,t.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(l.Select,{showSearch:!0,className:"w-full",placeholder:"Search by user ID",filterOption:!1,onSearch:e=>T(e,"user_id"),onSelect:(e,t)=>M(e,t),options:"user_id"===N?y:[],loading:j,allowClear:!0})}),(0,t.jsx)(s.Form.Item,{label:"Member Role",name:"role",className:"mb-4",children:(0,t.jsx)(l.Select,{defaultValue:x,children:g.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,children:(0,t.jsxs)(i.Tooltip,{title:e.description,children:[(0,t.jsx)("span",{className:"font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-2 text-gray-500 text-sm",children:["- ",e.description]})]})},e.value))})}),(0,t.jsx)("div",{className:"text-right mt-4",children:(0,t.jsx)(n.Button,{type:"primary",htmlType:"submit",icon:(0,t.jsx)(o.UserAddOutlined,{}),loading:k,children:k?"Adding...":"Add Member"})})]})})}],907308);var p=e.i(599724),m=e.i(779241),f=e.i(435451),h=e.i(860585);e.s(["default",0,({visible:e,onCancel:i,onSubmit:o,initialData:d,mode:c,config:u})=>{let g,[x]=s.Form.useForm(),[v,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(e)if("edit"===c&&d){let e={...d,role:d.role||u.defaultRole,max_budget_in_team:d.max_budget_in_team||null,tpm_limit:d.tpm_limit||null,rpm_limit:d.rpm_limit||null,budget_duration:d.budget_duration||null,allowed_models:d.allowed_models||[]};x.setFieldsValue(e)}else x.resetFields(),x.setFieldsValue({role:u.defaultRole||u.roleOptions[0]?.value})},[e,d,c,x,u.defaultRole,u.roleOptions]);let y=async e=>{try{b(!0);let t=Object.entries(e).reduce((e,[t,r])=>{if("string"==typeof r){let a=r.trim();return""===a&&("max_budget_in_team"===t||"tpm_limit"===t||"rpm_limit"===t)?{...e,[t]:null}:{...e,[t]:a}}return{...e,[t]:r}},{});await Promise.resolve(o(t)),x.resetFields()}catch(e){console.error("Form submission error:",e)}finally{b(!1)}};return(0,t.jsx)(a.Modal,{title:u.title||("add"===c?"Add Member":"Edit Member"),open:e,width:1e3,footer:null,onCancel:i,children:(0,t.jsxs)(s.Form,{form:x,onFinish:y,labelCol:{span:8},wrapperCol:{span:16},labelAlign:"left",children:[u.showEmail&&(0,t.jsx)(s.Form.Item,{label:"Email",name:"user_email",className:"mb-4",rules:[{type:"email",message:"Please enter a valid email!"}],children:(0,t.jsx)(m.TextInput,{placeholder:"user@example.com"})}),u.showEmail&&u.showUserId&&(0,t.jsx)("div",{className:"text-center mb-4",children:(0,t.jsx)(p.Text,{children:"OR"})}),u.showUserId&&(0,t.jsx)(s.Form.Item,{label:"User ID",name:"user_id",className:"mb-4",children:(0,t.jsx)(m.TextInput,{placeholder:"user_123"})}),(0,t.jsx)(s.Form.Item,{label:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{children:"Role"}),"edit"===c&&d&&(0,t.jsxs)("span",{className:"text-gray-500 text-sm",children:["(Current: ",(g=d.role,u.roleOptions.find(e=>e.value===g)?.label||g),")"]})]}),name:"role",className:"mb-4",rules:[{required:!0,message:"Please select a role!"}],children:(0,t.jsx)(l.Select,{children:"edit"===c&&d?[...u.roleOptions.filter(e=>e.value===d.role),...u.roleOptions.filter(e=>e.value!==d.role)].map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,children:e.label},e.value)):u.roleOptions.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,children:e.label},e.value))})}),u.additionalFields?.map(e=>(0,t.jsx)(s.Form.Item,{label:e.label,name:e.name,className:"mb-4",rules:e.rules,children:(e=>{switch(e.type){case"input":return(0,t.jsx)(m.TextInput,{placeholder:e.placeholder});case"numerical":return(0,t.jsx)(f.default,{step:e.step||1,min:e.min||0,style:{width:"100%"},placeholder:e.placeholder||"Enter a numerical value"});case"select":return(0,t.jsx)(l.Select,{children:e.options?.map(e=>(0,t.jsx)(l.Select.Option,{value:e.value,children:e.label},e.value))});case"multi-select":return(0,t.jsx)(l.Select,{mode:"multiple",placeholder:e.placeholder||"Select options",options:e.options,allowClear:!0});case"budget-duration":return(0,t.jsx)(h.default,{});default:return null}})(e)},e.name)),(0,t.jsxs)("div",{className:"text-right mt-6",children:[(0,t.jsx)(n.Button,{onClick:i,className:"mr-2",disabled:v,children:"Cancel"}),(0,t.jsx)(n.Button,{type:"default",htmlType:"submit",loading:v,children:"add"===c?v?"Adding...":"Add Member":v?"Saving...":"Save Changes"})]})]})})}],276173)},980187,e=>{"use strict";e.s(["createTeamAliasMap",0,e=>e?e.reduce((e,t)=>(e[t.team_id]=t.team_alias,e),{}):{},"resolveTeamAliasFromTeamID",0,(e,t)=>{let r=t.find(t=>t.team_id===e);return r?r.team_alias:null}])},367240,e=>{"use strict";let t=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",0,t],367240)},695420,e=>{"use strict";var t=e.i(271645);e.s(["useVisitedTabs",0,function(e){let[r,a]=(0,t.useState)(()=>new Set([e]));return{onTabChange:(0,t.useCallback)(e=>{a(t=>new Set(t).add(String(e)))},[]),hasVisited:(0,t.useCallback)(e=>r.has(e),[r])}}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/058j9m4b8p4wx.js b/litellm/proxy/_experimental/out/_next/static/chunks/1jgomcpnpdcun.js similarity index 64% rename from litellm/proxy/_experimental/out/_next/static/chunks/058j9m4b8p4wx.js rename to litellm/proxy/_experimental/out/_next/static/chunks/1jgomcpnpdcun.js index 361fcf6e3e1..0decdd928a1 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/058j9m4b8p4wx.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1jgomcpnpdcun.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,677572,370359,405934,e=>{"use strict";var t,r,n,a=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var i=e.i(271645),s=e.i(951437),l=e.i(146376),o=e.i(667865),u=e.i(552245),c=e.i(53687),d=e.i(733332);let f=i.createContext(void 0);function h(){let e=i.useContext(f);if(void 0===e)throw Error((0,d.default)(64));return e}let p=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),m={tabActivationDirection:e=>({[p.activationDirection]:e})};var g=e.i(675606),x=e.i(56434);let v=i.forwardRef(function(e,t){let{className:r,defaultValue:n=0,onValueChange:d,orientation:h="horizontal",render:p,value:v,style:y,..._}=e,w=void 0!==e.defaultValue,S=i.useRef([]),[C,N]=i.useState(()=>new Map),[T,A]=(0,s.useControlled)({controlled:v,default:n,name:"Tabs",state:"value"}),E=void 0!==v,[j,O]=i.useState(()=>new Map),R=i.useRef(void 0),k=i.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of j.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[j]),[I,M]=i.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:P}=I,U=P,H=!1;L!==T&&(U=b(L,T,h,j),H=null!=L&&null!=T&&null==k(T));let D=H?L:T,z=L!==D||P!==U;(0,l.useIsoLayoutEffect)(()=>{z&&M({previousValue:D,tabActivationDirection:U})},[D,z,U]);let W=(0,o.useStableCallback)((e,t)=>{t.activationDirection=b(T,e,h,j),d?.(e,t),t.isCanceled||A(e)}),B=(0,o.useStableCallback)((e,t)=>{d?.(e,(0,g.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,o.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let n=new Map(r);return n.set(e,t),n})}),F=(0,o.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let n=new Map(r);return n.delete(e),n})}),K=i.useCallback(e=>C.get(e),[C]),$=i.useCallback(e=>{for(let t of j.values())if(e===t?.value)return t?.id},[j]),Y=i.useMemo(()=>({getTabElementBySelectedValue:k,getTabIdByPanelValue:$,getTabPanelIdByValue:K,onValueChange:W,orientation:h,registerMountedTabPanel:V,setTabMap:O,unregisterMountedTabPanel:F,tabActivationDirection:U,value:T}),[k,$,K,W,h,V,O,F,U,T]),G=i.useMemo(()=>{for(let e of j.values())if(null!=e&&e.value===T)return e},[j,T]),J=i.useMemo(()=>{for(let e of j.values())if(null!=e&&!e.disabled)return e.value},[j]),X=i.useRef(!w),q=i.useRef(n),Z=i.useRef(w),Q=i.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(E)return;function e(e,t){A(e),M(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),X.current=!1}if(0===j.size){Q.current&&null!==T&&!R.current?.isConnected&&e(null,x.REASONS.missing);return}Q.current=!0,R.current=j.keys().next().value;let t=G?.disabled,r=null==G&&null!==T;if(t||T!==q.current||(Z.current=!1),Z.current&&t&&T===q.current)return;let n=X.current;if(t||r){let r=J??null;if(T===r){X.current=!1;return}let a=x.REASONS.missing;n?a=x.REASONS.initial:t&&(a=x.REASONS.disabled),e(r,a);return}n&&null!=G&&(B(T,x.REASONS.initial),X.current=!1)},[J,E,B,G,A,j,T]);let ee={orientation:h,tabActivationDirection:U},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:_,stateAttributesMapping:m});return(0,a.jsx)(f.Provider,{value:Y,children:(0,a.jsx)(c.CompositeList,{elementsRef:S,children:et})})});function b(e,t,r,n){if(null==e||null==t)return"none";let a=null,i=null;for(let[r,s]of n.entries()){if(null==s)continue;let n=s.value??s.index;if(e===n&&(a=r),t===n&&(i=r),null!=a&&null!=i)break}if(null==a||null==i)return a!==i&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let s=a.getBoundingClientRect(),l=i.getBoundingClientRect();if("horizontal"===r){if(l.lefts.left)return"right"}else{if(l.tops.top)return"down"}return"none"}var y=e.i(108868),_=e.i(788015),w=e.i(540886);let S="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,S],370359);var C=e.i(395530);let N=i.createContext(void 0);function T(){let e=i.useContext(N);if(void 0===e)throw Error((0,d.default)(65));return e}var A=e.i(647554);let E=i.forwardRef(function(e,t){let{className:r,disabled:n=!1,render:a,value:s,id:o,nativeButton:c=!0,style:d,...f}=e,{value:p,getTabPanelIdByValue:v,orientation:b,tabActivationDirection:N}=h(),{activateOnFocus:E,highlightedTabIndex:j,onTabActivation:O,registerTabResizeObserverElement:R,setHighlightedTabIndex:k,tabsListElement:I}=T(),M=(0,_.useBaseUiId)(o),L=i.useMemo(()=>({disabled:n,id:M,value:s}),[n,M,s]),{compositeProps:P,compositeRef:U,index:H}=(0,C.useCompositeItem)({metadata:L}),D=s===p,z=i.useRef(!1),W=i.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=W.current;if(e)return R(e)},[R]),(0,l.useIsoLayoutEffect)(()=>{if(z.current){z.current=!1;return}if(D&&H>-1&&j!==H){if(null!=I){let e=(0,A.activeElement)((0,y.ownerDocument)(I));if(e&&(0,A.contains)(I,e))return}n||k(H)}},[D,H,j,k,n,I]);let{getButtonProps:B,buttonRef:V}=(0,w.useButton)({disabled:n,native:c,focusableWhenDisabled:!0}),F=v(s),K=i.useRef(!1),$=i.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:n,active:D,orientation:b,tabActivationDirection:N},ref:[t,V,U,W],props:[P,{role:"tab","aria-controls":F,"aria-selected":D,id:M,onClick:function(e){D||n||O(s,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){D||(H>-1&&!n&&k(H),!n&&E&&(!K.current||K.current&&$.current)&&O(s,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){D||n||(K.current=!0,e.button&&0!==e.button||($.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){K.current=!1,$.current=!1},{once:!0})))},[S]:D?"":void 0,onKeyDownCapture(){z.current=!0}},f,B],stateAttributesMapping:m})});var j=e.i(73364),O=e.i(802239),R=e.i(956789);function k(){return R.NOOP}function I(){return!1}function M(){return!0}let L=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var P=e.i(172410);let U={...m,activeTabPosition:()=>null,activeTabSize:()=>null},H=i.forwardRef(function(e,t){let{className:r,render:n,renderBeforeHydration:s=!1,style:l,...o}=e,{nonce:c}=(0,P.useCSPContext)(),{getTabElementBySelectedValue:d,orientation:f,tabActivationDirection:p,value:m}=h(),{tabsListElement:g,registerIndicatorUpdateListener:x}=T(),v=(0,O.useSyncExternalStore)(k,I,M),b=function(){let[,e]=i.useState({});return i.useCallback(()=>{e({})},[])}();i.useEffect(()=>x(b),[x,b]);let y=0,_=0,w=0,S=0,C=0,N=0,A=!1;if(null!=m&&null!=g){let e=d(m);if(null!=e){A=!0;let{width:t,height:r}=(0,j.getCssDimensions)(e),{width:n,height:a}=(0,j.getCssDimensions)(g),i=e.getBoundingClientRect(),s=g.getBoundingClientRect(),l=n>0?s.width/n:1,o=a>0?s.height/a:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=i.left-s.left,t=i.top-s.top;y=e/l+g.scrollLeft-g.clientLeft,w=t/o+g.scrollTop-g.clientTop}else y=e.offsetLeft,w=e.offsetTop;C=t,N=r,_=g.scrollWidth-y-C,S=g.scrollHeight-w-N}}let E=A?{left:y,right:_,top:w,bottom:S}:null,R=A?{width:C,height:N}:null,H=A?{[L.activeTabLeft]:`${y}px`,[L.activeTabRight]:`${_}px`,[L.activeTabTop]:`${w}px`,[L.activeTabBottom]:`${S}px`,[L.activeTabWidth]:`${C}px`,[L.activeTabHeight]:`${N}px`}:void 0,D=A&&C>0&&N>0,z=(0,u.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:E,activeTabSize:R,tabActivationDirection:p},ref:t,props:[{role:"presentation",style:H,hidden:!D},o,{suppressHydrationWarning:!0}],stateAttributesMapping:U});return null==m?null:(0,a.jsxs)(i.Fragment,{children:[z,v&&s&&(0,a.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var D=e.i(144394),z=e.i(209407),W=e.i(137584),B=e.i(223910),V=e.i(673553);let F=((n={}).index="data-index",n.activationDirection="data-activation-direction",n.orientation="data-orientation",n.hidden="data-hidden",n[n.startingStyle=z.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=z.TransitionStatusDataAttributes.endingStyle]="endingStyle",n),K={...m,...z.transitionStatusMapping},$=i.forwardRef(function(e,t){let{className:r,value:n,render:a,keepMounted:s=!1,style:o,...c}=e,{value:d,getTabIdByPanelValue:f,orientation:p,tabActivationDirection:m,registerMountedTabPanel:g,unregisterMountedTabPanel:x}=h(),v=(0,_.useBaseUiId)(),b=i.useMemo(()=>({id:v,value:n}),[v,n]),{ref:y,index:w}=(0,V.useCompositeListItem)({metadata:b}),S=n===d,{mounted:C,transitionStatus:N,setMounted:T}=(0,B.useTransitionStatus)(S),A=!C,E=f(n),j=i.useRef(null),O=(0,u.useRenderElement)("div",e,{state:{hidden:A,orientation:p,tabActivationDirection:m,transitionStatus:N},ref:[t,y,j],props:[{"aria-labelledby":E,hidden:A,id:v,role:"tabpanel",tabIndex:S?0:-1,inert:(0,D.inertValue)(!S),[F.index]:w},c],stateAttributesMapping:K});return((0,W.useOpenChangeComplete)({open:S,ref:j,onComplete(){S||T(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!A||s)&&null!=v)return g(n,v),()=>{x(n,v)}},[A,s,n,v,g,x]),s||C)?O:null});var Y=e.i(590803),G=e.i(828918),J=e.i(673327),X=e.i(621082);let q=[];var Z=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:r,style:n,refs:s=R.EMPTY_ARRAY,props:d=R.EMPTY_ARRAY,state:f=R.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:p,onHighlightedIndexChange:m,orientation:g,grid:x,loopFocus:v,onLoop:b,enableHomeAndEndKeys:y,onMapChange:_,stopEventPropagation:w=!0,rootRef:C,disabledIndices:N,modifierKeys:T,highlightItemOnHover:E=!1,tag:j="div",...O}=e,{props:k,highlightedIndex:I,onHighlightedIndexChange:M,elementsRef:L,onMapChange:P,relayKeyboardEvent:U}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:n,onLoop:a,direction:s,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:p,modifierKeys:m=q}=e,[g,x]=i.useState(0),v=null!=n,b=i.useRef(null),y=(0,G.useMergedRefs)(b,d),_=i.useRef([]),w=i.useRef(!1),C=u??g,N=(0,o.useStableCallback)((e,t=!1)=>{if((c??x)(e),t){let t=_.current[e];(0,J.scrollIntoViewIfNeeded)(b.current,t,s,r)}}),T=(0,o.useStableCallback)(e=>{if(0===e.size||w.current)return;w.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(S))??null,a=n?t.indexOf(n):-1;if(-1!==a)N(a);else if((0,X.isListIndexDisabled)(t,C,p)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:p});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,J.scrollIntoViewIfNeeded)(b.current,n,s,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==p||null!=u||!w.current)return;let e=_.current;if((0,X.isListIndexDisabled)(e,C,p)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:p});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[p,u,C,_,N]);let E=(0,o.useStableCallback)((e,t,r)=>a?a(e,t,r,_):r),j=(0,o.useStableCallback)(e=>{let i=f?J.COMPOSITE_KEYS:J.ARROW_KEYS;if(!i.has(e.key)||function(e,t){for(let r of J.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,m)||!b.current)return;let l="rtl"===s,o=l?J.ARROW_LEFT:J.ARROW_RIGHT,u={horizontal:o,vertical:J.ARROW_DOWN,both:o}[r],c=l?J.ARROW_RIGHT:J.ARROW_LEFT,d={horizontal:c,vertical:J.ARROW_UP,both:c}[r],g=(0,A.getTarget)(e.nativeEvent);if(null!=g&&(0,J.isNativeInput)(g)&&!(0,Y.isElementDisabled)(g)){let t=g.selectionStart,r=g.selectionEnd,n=g.value??"";if(null==t||e.shiftKey||t!==r||e.key!==d&&t0)return}let x=C,y=(0,X.getMinListIndex)(_,p),w=(0,X.getMaxListIndex)(_,p);null!=n&&(x=n({disabledIndices:p,elementsRef:_,event:e,highlightedIndex:C,loopFocus:t,maxIndex:w,minIndex:y,onLoop:E,orientation:r,rtl:l}));let S={horizontal:[o],vertical:[J.ARROW_DOWN],both:[o,J.ARROW_DOWN]}[r],T={horizontal:[c],vertical:[J.ARROW_UP],both:[c,J.ARROW_UP]}[r],j=v?i:({horizontal:f?J.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:J.HORIZONTAL_KEYS,vertical:f?J.VERTICAL_KEYS_WITH_EXTRA_KEYS:J.VERTICAL_KEYS,both:i})[r];f&&(e.key===J.HOME?x=y:e.key===J.END&&(x=w)),x===C&&(S.includes(e.key)||T.includes(e.key))&&(t&&x===w&&S.includes(e.key)?(x=y,a&&(x=a(e,C,x,_))):t&&x===y&&T.includes(e.key)?(x=w,a&&(x=a(e,C,x,_))):x=(0,X.findNonDisabledListIndex)(_.current,{startingIndex:x,decrement:T.includes(e.key),disabledIndices:p})),x===C||(0,X.isIndexOutOfListBounds)(_.current,x)||(h&&e.stopPropagation(),j.has(e.key)&&e.preventDefault(),N(x,!0),queueMicrotask(()=>{_.current[x]?.focus()}))});return{props:{ref:y,onFocus(e){let t=b.current,r=(0,A.getTarget)(e.nativeEvent);t&&null!=r&&(0,J.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:j},highlightedIndex:C,onHighlightedIndexChange:N,elementsRef:_,disabledIndices:p,onMapChange:T,relayKeyboardEvent:j}}({grid:x,loopFocus:v,onLoop:b,orientation:g,highlightedIndex:p,onHighlightedIndexChange:m,rootRef:C,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:(0,Q.useDirection)(),disabledIndices:N,modifierKeys:T}),H=(0,u.useRenderElement)(j,e,{state:f,ref:s,props:[k,...d,O],stateAttributesMapping:h}),D=i.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:M,highlightItemOnHover:E,relayKeyboardEvent:U}),[I,M,E,U]);return(0,a.jsx)(Z.CompositeRootContext.Provider,{value:D,children:(0,a.jsx)(c.CompositeList,{elementsRef:L,onMapChange:e=>{_?.(e),P(e)},children:H})})}e.s(["CompositeRoot",0,ee],405934);let et=i.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:n,loopFocus:s=!0,render:u,style:c,...d}=e,{onValueChange:f,orientation:p,value:g,setTabMap:x,tabActivationDirection:v}=h(),[b,y]=i.useState(0),[_,w]=i.useState(null),S=i.useRef(new Set),C=i.useRef(new Set),T=i.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{S.current.forEach(e=>{e()})});return T.current=e,_&&e.observe(_),C.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[_]);let A=(0,o.useStableCallback)(e=>(S.current.add(e),()=>{S.current.delete(e)})),E=(0,o.useStableCallback)(e=>(C.current.add(e),T.current?.observe(e),()=>{C.current.delete(e),T.current?.unobserve(e)})),j=(0,o.useStableCallback)((e,t)=>{e!==g&&f(e,t)}),O=i.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,registerIndicatorUpdateListener:A,registerTabResizeObserverElement:E,onTabActivation:j,setHighlightedTabIndex:y,tabsListElement:_}),[r,b,A,E,j,y,_]);return(0,a.jsx)(N.Provider,{value:O,children:(0,a.jsx)(ee,{render:u,className:n,style:c,state:{orientation:p,tabActivationDirection:v},refs:[t,w],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},d],stateAttributesMapping:m,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:s,orientation:p,onHighlightedIndexChange:y,onMapChange:x,disabledIndices:R.EMPTY_ARRAY})})});e.s(["Indicator",0,H,"List",0,et,"Panel",0,$,"Root",0,v,"Tab",0,E],69281);var er=e.i(69281),er=er,en=e.i(115504);let ea=(0,en.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,a.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,en.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,a.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,en.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,a.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,en.cn)(ea({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,a.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,en.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},195116,e=>{"use strict";let t=(0,e.i(475254).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,t],195116)},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},292335,122520,165615,779129,280024,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",OAUTH2_TOKEN_EXCHANGE:"oauth2_token_exchange",AWS_SIGV4:"aws_sigv4",TRUE_PASSTHROUGH:"true_passthrough",OAUTH_DELEGATE:"oauth_delegate"},r=e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE,n={INTERACTIVE:"interactive",M2M:"m2m"},a=e=>{let t=e.credentials??{};return JSON.stringify({url:"string"==typeof e.url?e.url:null,spec_path:"string"==typeof e.spec_path?e.spec_path:null,auth_type:e.auth_type??null,oauth_flow_type:e.oauth_flow_type??null,client_id:t.client_id??null,client_secret:t.client_secret??null,scopes:t.scopes??null,upstream_resource:t.upstream_resource??null,issuer:e.issuer??null,authorization_url:e.authorization_url??null,token_url:e.token_url??null,registration_url:e.registration_url??null})},i=["client_id","client_secret"],s=["upstream_resource"],l=["access_token","refresh_token","expires_in","scope"],o=(e,t)=>{if(!e)return;let r=Object.fromEntries(t.filter(t=>"string"==typeof e[t]&&""!==e[t]).map(t=>[t,e[t]]));return Object.keys(r).length>0?r:void 0},u="client_credentials",c={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};e.s(["ADMIN_CONFIG_CREDENTIAL_KEYS",0,s,"AUTH_TYPE",0,t,"CLEARED_ON_INVALIDATION",0,["credentials"],"MCP_OAUTH2_FLOW_INTERACTIVE",0,"authorization_code","MCP_OAUTH2_FLOW_M2M",0,u,"OAUTH_FLOW",0,n,"TRANSPORT",0,c,"credentialAuthClass",0,e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE?"client_forwarded":e??null,"gatewayMintsClientFor",0,e=>e.auth_type===t.TRUE_PASSTHROUGH||e.auth_type===t.OAUTH_DELEGATE&&!e.dcr_bridge,"getMcpOAuthMode",0,function(e){return e.auth_type===t.OAUTH2_TOKEN_EXCHANGE?"token_exchange":e.auth_type!==t.OAUTH2?null:e.oauth2_flow===u?"m2m":e.delegate_auth_to_upstream?"passthrough":"authorization_code"},"getOAuthAuthorizationIdentity",0,a,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?c.SSE:t&&e!==c.STDIO?c.OPENAPI:e,"isClientForwardedTokenMode",0,r,"isHeldOAuthTokenStale",0,(e,t)=>void 0!==t&&a(e)!==t,"isUnsupportedOnGatewayConnect",0,e=>r(e)||e===t.OAUTH2_TOKEN_EXCHANGE,"oauth2FlowToFormValue",0,function(e){return e===u?n.M2M:e?n.INTERACTIVE:void 0},"preservedAdminCredentials",0,e=>o(e,[...i,...s]),"preservedDeclaredAppCredentials",0,e=>o(e,i),"withoutMintedTokenCredentials",0,e=>{if(!e)return;let t=Object.fromEntries(Object.entries(e).filter(([e])=>!l.includes(e)));return Object.keys(t).length>0?t:void 0}],292335);var d=e.i(271645),f=e.i(602869),h=e.i(727749);function p(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["extractErrorMessage",0,p],122520);let m=e=>{let t=new Uint8Array(e),r="";return t.forEach(e=>r+=String.fromCharCode(e)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},g=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),m(e.buffer)},x=async e=>{let t=new TextEncoder().encode(e);return m(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,x,"generateCodeVerifier",0,g],165615);var v=e.i(434166);let b=()=>{{let e=window.location.pathname||"",t=e.indexOf("/ui"),r=t>=0?e.slice(0,t+3).replace(/\/+$/,""):"";return`${window.location.origin}${r}/mcp/oauth/callback`}},y=(...e)=>{e.forEach(e=>{try{window.sessionStorage.removeItem(e)}catch(e){}})};e.s(["TOOLS_OAUTH_UI_STATE_KEY",0,"litellm-mcp-oauth-tools-state","buildCallbackUrl",0,b,"clearStorage",0,y],779129);let _="litellm-user-mcp-oauth-flow-state",w="litellm-user-mcp-oauth-result",S=(e,t)=>{(0,v.setSecureItem)(e,t)},C=e=>(0,v.getSecureItem)(e);e.s(["useUserMcpOAuthFlow",0,({accessToken:e,serverId:t,serverAlias:r,scopes:n,clientId:a,onSuccess:i})=>{let[s,l]=(0,d.useState)("idle"),[o,u]=(0,d.useState)(null),c=(0,d.useRef)(!1),m=(0,d.useCallback)(async()=>{try{let i;l("authorizing"),u(null);let s=a??void 0;if(!s)try{let n=await (0,f.registerMcpOAuthClient)(e,t,{client_name:r||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"});s=n?.client_id,i=n?.client_secret}catch(e){}let o=g(),c=await x(o),d=crypto.randomUUID(),h=b(),p=n?.filter(e=>e.trim()).join(" "),m=(0,f.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:s,redirectUri:h,state:d,codeChallenge:c,scope:p}),v={state:d,codeVerifier:o,serverId:t,redirectUri:h,clientId:s,clientSecret:i,scopes:n};S(_,JSON.stringify(v));let y=new URL(window.location.href);y.searchParams.set("mcpOauthReturn","apps"),S("litellm-mcp-oauth-return-url",y.toString()),window.location.href=m}catch(t){let e=p(t);u(e),l("error"),h.default.error(e)}},[e,t,r,n,a]),v=(0,d.useCallback)(async()=>{if(c.current)return;let r=C(w);if(!r)return;let n=C(_);if(!n)return;try{let e=JSON.parse(n);if(e.serverId&&e.serverId!==t)return}catch(e){}c.current=!0,y(w);let a=null,s=null;try{a=JSON.parse(r);let e=C(_);s=e?JSON.parse(e):null}catch(e){u("Failed to resume OAuth flow. Please retry."),l("error"),c.current=!1,y(_);return}try{if(!s?.state||!s.codeVerifier||!s.serverId)throw Error("OAuth session state was lost. Please retry.");if(!a?.state||a.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(a.error)throw Error(a.error_description||a.error);if(!a.code)throw Error("Authorization code missing in callback.");l("exchanging");let t=await (0,f.exchangeMcpOAuthToken)({serverId:s.serverId,code:a.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri,accessToken:e});await (0,f.storeMCPOAuthUserCredential)(e,s.serverId,{access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,scopes:s.scopes}),l("success"),u(null),h.default.success("Connected successfully"),i()}catch(t){let e=p(t);u(e),l("error"),h.default.error(e)}finally{y(_),setTimeout(()=>{c.current=!1},1e3)}},[e,t,i]);return(0,d.useEffect)(()=>{v()},[v]),{startOAuthFlow:m,status:s,error:o}}],280024)},269638,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",0,t],269638)},21040,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(266027),a=e.i(555436),i=e.i(871689),s=e.i(463059),l=e.i(195116),o=e.i(269638),u=e.i(531278),c=e.i(519455),d=e.i(793479),f=e.i(302747),h=e.i(677572),p=e.i(602869),m=e.i(292335),g=e.i(174553),x=e.i(888259),v=e.i(280024);let b=({server:e,accessToken:n,onConnect:a,variant:i="badge"})=>{let s=e.server_name??e.alias??e.server_id,{startOAuthFlow:l,status:o}=(0,v.useUserMcpOAuthFlow)({accessToken:n,serverId:e.server_id,serverAlias:s,onSuccess:(0,r.useCallback)(()=>a(e.server_id),[a,e.server_id])}),d="authorizing"===o||"exchanging"===o;return"button"===i?(0,t.jsxs)(c.Button,{onClick:l,disabled:d,className:"font-semibold h-[38px] min-w-[110px]",children:[d&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),d?"Connecting…":"Connect"]}):(0,t.jsx)("span",{onClick:e=>{e.stopPropagation(),d||l()},className:`text-[11px] font-semibold rounded-md px-2 py-0.5 shrink-0 whitespace-nowrap ${d?"text-muted-foreground bg-muted cursor-default":"text-primary-foreground bg-primary cursor-pointer hover:bg-primary/90"}`,children:d?"Connecting…":"Connect"})},y=["#1677ff","#52c41a","#fa8c16","#eb2f96","#722ed1","#13c2c2","#fa541c","#2f54eb","#a0d911","#faad14"];function _(e){let t=0;for(let r=0;r{let[S,C]=(0,r.useState)([]),[N,T]=(0,r.useState)(!0),[A,E]=(0,r.useState)(""),[j,O]=(0,r.useState)("all"),[R,k]=(0,r.useState)(new Set),[I,M]=(0,r.useState)(null),[L,P]=(0,r.useState)({}),[U,H]=(0,r.useState)(!1),[D,z]=(0,r.useState)(new Set),[W,B]=(0,r.useState)(new Set),V=(0,r.useRef)([]);(0,r.useEffect)(()=>{V.current=S},[S]);let F=(0,r.useRef)(v);(0,r.useEffect)(()=>{F.current=v},[v]);let K=(0,r.useRef)(y);(0,r.useEffect)(()=>{K.current=y},[y]);let $=e=>e.server_name??e.alias??e.server_id,Y=(0,r.useRef)(!1),G=(0,r.useCallback)(async t=>{try{let r=await (0,p.listMCPTools)(e,t.server_id);if(Y.current)return;let n=Array.isArray(r?.tools)?r.tools:[];P(e=>({...e,[$(t)]:n.length}))}catch{}},[e]),J=(0,r.useCallback)(async t=>{try{let r=await (0,p.getMCPOAuthUserCredentialStatus)(e,t.server_id);if(Y.current)return;r.has_credential&&!r.is_expired&&z(e=>new Set(e).add(t.server_id))}catch{}finally{Y.current||B(e=>{let r=new Set(e);return r.delete(t.server_id),r})}},[e]);(0,r.useEffect)(()=>(Y.current=!1,(0,p.fetchMCPServers)(e).then(async e=>{if(Y.current)return;let t=Array.isArray(e)?e:e?.data??[],r=t.filter(e=>e.auth_type===m.AUTH_TYPE.OAUTH2);for(let e of(C(t),B(new Set(r.map(e=>e.server_id))),T(!1),r.forEach(e=>J(e)),H(!0),Array.from({length:Math.ceil(t.length/5)},(e,r)=>t.slice(5*r,(r+1)*5)))){if(Y.current)return;await Promise.allSettled(e.map(e=>G(e)))}Y.current||H(!1)}).catch(()=>{Y.current||(C([]),T(!1))}),()=>{Y.current=!0}),[e,G,J]),(0,r.useEffect)(()=>{if(0===D.size)return;let e=V.current.filter(e=>D.has(e.server_id)&&!F.current.includes($(e))).map($);e.length>0&&K.current([...F.current,...e])},[D]);let X=async(t,r,n)=>{if(!r){y(v.filter(e=>e!==t)),n&&z(e=>{let t=new Set(e);return t.delete(n),t});return}k(e=>new Set(e).add(t));try{let r=n??t,a=await (0,p.listMCPTools)(e,r);if(a?.error)return void x.default.warning(`Could not load tools for ${t}`);F.current.includes(t)||y([...F.current,t])}catch{x.default.warning(`Could not load tools for ${t}`)}finally{k(e=>{let r=new Set(e);return r.delete(t),r})}},{data:q,isLoading:Z}=(0,n.useQuery)({queryKey:["mcp-apps-panel-detail-tools",I?.server_id],queryFn:()=>(0,p.listMCPTools)(e,I.server_id),enabled:!!I}),Q=Array.isArray(q?.tools)?q.tools:[],ee=S.filter(e=>{let t=$(e),r=!A.trim()||t.toLowerCase().includes(A.toLowerCase())||(e.description??"").toLowerCase().includes(A.toLowerCase()),n="all"===j||v.includes(t);return r&&n}),et=S.filter(e=>v.includes($(e))).length,er=Object.values(L).reduce((e,t)=>e+t,0);if(I){let r=$(I),n=v.includes(r),a=R.has(r),s=_(r);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:()=>M(null),className:"-ml-3 mb-5 gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(i.ArrowLeft,{className:"h-3 w-3"}),"Back"]}),(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-7",children:[I.mcp_info?.logo_url?(0,t.jsx)(g.Logo,{src:I.mcp_info.logo_url,label:r,className:"w-16 h-16 rounded-2xl object-contain shrink-0 bg-muted/50"}):(0,t.jsx)("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center text-white font-bold text-[28px] shrink-0",style:{background:s},children:r.charAt(0).toUpperCase()}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"m-0 mb-1 text-[22px] font-bold text-foreground",children:r}),(0,t.jsx)("p",{className:"m-0 text-sm text-muted-foreground",children:I.description??"MCP server"})]}),I.auth_type===m.AUTH_TYPE.OAUTH2?D.has(I.server_id)?(0,t.jsx)(c.Button,{variant:"destructive",onClick:async()=>{try{await (0,p.deleteMCPOAuthUserCredential)(e,I.server_id)}catch(e){}z(e=>{let t=new Set(e);return t.delete(I.server_id),t}),K.current(F.current.filter(e=>e!==r))},className:"font-semibold h-[38px] min-w-[110px]",children:"Disconnect"}):(0,t.jsx)(b,{server:I,accessToken:e,onConnect:e=>{z(t=>new Set(t).add(e))},variant:"button"}):(0,t.jsxs)(c.Button,{variant:n?"outline":"default",disabled:a,onClick:()=>X(r,!n,I.server_id),className:"font-semibold h-[38px] min-w-[110px]",children:[a&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),n?"Disconnect":"Connect"]})]}),(0,t.jsx)("h3",{className:"m-0 mb-3 text-[15px] font-semibold text-foreground",children:"Information"}),(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden mb-7",children:[["Server ID",I.server_id],["Transport",(0,m.handleTransport)(I.transport,I.spec_path)],["Status",n?"Connected":"Not connected"]].filter(([,e])=>e).map(([e,r],n,a)=>(0,t.jsxs)("div",{className:`flex px-4 py-3 text-[13px] ${n(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30 flex flex-col gap-1.5",children:[(0,t.jsx)(f.Skeleton,{className:"h-3.5 w-1/3"}),(0,t.jsx)(f.Skeleton,{className:"h-3 w-2/3"})]},r))}):0===Q.length?(0,t.jsx)("div",{className:"text-muted-foreground text-[13px] py-2",children:"No tools available"}):(0,t.jsx)("div",{className:"flex flex-col gap-2",children:Q.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${e.description?"mb-1":""}`,children:[(0,t.jsx)(l.Wrench,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold text-foreground font-mono",children:e.name})]}),e.description&&(0,t.jsx)("p",{className:"m-0 text-xs text-muted-foreground pl-[21px]",children:e.description})]},e.name))})]})}return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("h2",{className:"m-0 text-lg font-semibold text-foreground",children:"MCP Servers"}),!w&&(0,t.jsx)("span",{className:"text-[10px] font-semibold text-primary bg-primary/10 rounded px-1.5 py-0.5 uppercase tracking-wider",children:"Beta"})]}),w?(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Click a server to see its tools and connect"}):(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Browse tools, authenticate once, use in chat"}),U?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}),"Loading tools..."]}):er>0?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(l.Wrench,{className:"h-3 w-3"}),er," tool",1!==er?"s":""," available"]}):null]})]}),(0,t.jsxs)("div",{className:"relative w-[220px]",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)(d.Input,{placeholder:"Search servers...",value:A,onChange:e=>E(e.target.value),className:"pl-9 text-[13px] h-9"})]})]}),(0,t.jsx)(h.Tabs,{value:j,onValueChange:e=>O(e),className:"mb-4",children:(0,t.jsxs)(h.TabsList,{variant:"line",className:"border-b rounded-none w-full justify-start h-auto p-0",children:[(0,t.jsx)(h.TabsTrigger,{value:"all",className:"rounded-none px-4 py-2 text-[13px]",children:"All"}),(0,t.jsxs)(h.TabsTrigger,{value:"connected",className:"rounded-none px-4 py-2 text-[13px]",children:["Connected",et>0?` (${et})`:""]})]})}),N?(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:Array.from({length:6},(e,r)=>(0,t.jsxs)("div",{className:`flex items-center gap-3 p-4 ${r%2==0?"border-r":""} ${r<4?"border-b":""}`,children:[(0,t.jsx)(f.Skeleton,{className:"w-[38px] h-[38px] rounded-xl shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1.5",children:[(0,t.jsx)(f.Skeleton,{className:"h-3.5 w-2/3"}),(0,t.jsx)(f.Skeleton,{className:"h-3 w-1/2"})]})]},r))}):0===ee.length?(0,t.jsx)("div",{className:"text-center text-muted-foreground text-[13px] py-12 px-3",children:0===S.length?"No MCP servers configured. Add servers in Tools -> MCP Servers.":"connected"===j?"No servers connected yet.":"No servers match your search."}):(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:ee.map((r,n)=>{var a;let i=$(r),u=_(i),c=L[i],d=!!w&&(0,m.isUnsupportedOnGatewayConnect)(r.auth_type);return(0,t.jsxs)("div",{onClick:()=>M(r),className:`flex items-center gap-3 p-4 bg-card cursor-pointer transition-colors hover:bg-accent/30 min-w-0 ${n%2==0?"border-r":""} ${Math.floor(n/2)0?(0,t.jsxs)("span",{className:"shrink-0 flex items-center gap-1 text-muted-foreground",children:["· ",(0,t.jsx)(l.Wrench,{className:"h-2.5 w-2.5"})," ",c]}):null:U?(0,t.jsx)(f.Skeleton,{className:"w-7 h-3 shrink-0"}):null]})]}),(a=r,w&&(0,m.isUnsupportedOnGatewayConnect)(a.auth_type)?(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 whitespace-nowrap",children:"Not supported on this connection"}):a.auth_type===m.AUTH_TYPE.OAUTH2?D.has(a.server_id)?(0,t.jsx)(o.CheckCircle,{className:"h-3.5 w-3.5 text-emerald-600 shrink-0"}):W.has(a.server_id)?(0,t.jsx)(f.Skeleton,{className:"h-6 w-16 shrink-0 rounded-md"}):(0,t.jsx)(b,{server:a,accessToken:e,onConnect:e=>z(t=>new Set(t).add(e)),variant:"badge"}):v.includes($(a))?(0,t.jsx)("span",{className:"w-[7px] h-[7px] rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}):null),(0,t.jsx)(s.ChevronRight,{className:"h-3 w-3 text-muted-foreground/40 shrink-0"})]},r.server_id)})})]})}])},248536,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(405033),i=e.i(21040),s=e.i(269638),l=e.i(602869);let o=({flowHandle:e,clientOrigin:r})=>{let n=`${(0,l.getProxyBaseUrl)()}/authorize/complete`,a=r??"the application";return(0,t.jsx)("div",{className:"mb-6 rounded-lg border border-primary/30 bg-primary/5 px-5 py-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 min-w-0",children:[(0,t.jsx)(s.CheckCircle,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"text-sm font-semibold text-foreground",children:["Connect your MCP servers to ",a]}),(0,t.jsxs)("p",{className:"text-[13px] text-muted-foreground mt-0.5",children:["Authorize the servers you want to use below, then click Finish connecting to return to ",a,"."]})]})]}),(0,t.jsxs)("form",{method:"POST",action:n,className:"shrink-0",children:[(0,t.jsx)("input",{type:"hidden",name:"flow",value:e}),(0,t.jsx)("button",{type:"submit",className:"h-[38px] rounded-md bg-primary px-4 text-sm font-semibold text-primary-foreground hover:bg-primary/90",children:"Finish connecting"})]})]})})};function u(){let{accessToken:e,selectedMCPServers:s,setSelectedMCPServers:l}=(0,a.useChatShell)(),u=(0,n.useRouter)(),c=(0,n.useSearchParams)(),d=c.get("mcpOauthReturn"),f=c.get("connect_flow"),h=c.get("connect_client");return(0,r.useEffect)(()=>{if(d){let e=new URL(window.location.href);e.searchParams.delete("mcpOauthReturn"),u.replace(e.pathname+e.search)}},[d,u]),(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-auto w-full py-8 px-8",children:[f&&(0,t.jsx)(o,{flowHandle:f,clientOrigin:h}),(0,t.jsx)(i.default,{accessToken:e,selectedServers:s,onChange:l,connectMode:!!f})]})}e.s(["default",0,function(){return(0,t.jsx)(r.Suspense,{children:(0,t.jsx)(u,{})})}],248536)}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,677572,370359,405934,e=>{"use strict";var t,r,n,a=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var i=e.i(271645),s=e.i(951437),l=e.i(146376),o=e.i(667865),u=e.i(552245),c=e.i(53687),d=e.i(733332);let f=i.createContext(void 0);function h(){let e=i.useContext(f);if(void 0===e)throw Error((0,d.default)(64));return e}let p=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),m={tabActivationDirection:e=>({[p.activationDirection]:e})};var g=e.i(675606),x=e.i(56434);let v=i.forwardRef(function(e,t){let{className:r,defaultValue:n=0,onValueChange:d,orientation:h="horizontal",render:p,value:v,style:y,..._}=e,w=void 0!==e.defaultValue,S=i.useRef([]),[C,N]=i.useState(()=>new Map),[T,A]=(0,s.useControlled)({controlled:v,default:n,name:"Tabs",state:"value"}),E=void 0!==v,[j,O]=i.useState(()=>new Map),R=i.useRef(void 0),k=i.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of j.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[j]),[I,M]=i.useState(()=>({previousValue:T,tabActivationDirection:"none"})),{previousValue:L,tabActivationDirection:P}=I,U=P,H=!1;L!==T&&(U=b(L,T,h,j),H=null!=L&&null!=T&&null==k(T));let D=H?L:T,z=L!==D||P!==U;(0,l.useIsoLayoutEffect)(()=>{z&&M({previousValue:D,tabActivationDirection:U})},[D,z,U]);let W=(0,o.useStableCallback)((e,t)=>{t.activationDirection=b(T,e,h,j),d?.(e,t),t.isCanceled||A(e)}),B=(0,o.useStableCallback)((e,t)=>{d?.(e,(0,g.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),V=(0,o.useStableCallback)((e,t)=>{N(r=>{if(r.get(e)===t)return r;let n=new Map(r);return n.set(e,t),n})}),F=(0,o.useStableCallback)((e,t)=>{N(r=>{if(!r.has(e)||r.get(e)!==t)return r;let n=new Map(r);return n.delete(e),n})}),K=i.useCallback(e=>C.get(e),[C]),$=i.useCallback(e=>{for(let t of j.values())if(e===t?.value)return t?.id},[j]),Y=i.useMemo(()=>({getTabElementBySelectedValue:k,getTabIdByPanelValue:$,getTabPanelIdByValue:K,onValueChange:W,orientation:h,registerMountedTabPanel:V,setTabMap:O,unregisterMountedTabPanel:F,tabActivationDirection:U,value:T}),[k,$,K,W,h,V,O,F,U,T]),G=i.useMemo(()=>{for(let e of j.values())if(null!=e&&e.value===T)return e},[j,T]),J=i.useMemo(()=>{for(let e of j.values())if(null!=e&&!e.disabled)return e.value},[j]),X=i.useRef(!w),q=i.useRef(n),Z=i.useRef(w),Q=i.useRef(!1);(0,l.useIsoLayoutEffect)(()=>{if(E)return;function e(e,t){A(e),M(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),B(e,t),X.current=!1}if(0===j.size){Q.current&&null!==T&&!R.current?.isConnected&&e(null,x.REASONS.missing);return}Q.current=!0,R.current=j.keys().next().value;let t=G?.disabled,r=null==G&&null!==T;if(t||T!==q.current||(Z.current=!1),Z.current&&t&&T===q.current)return;let n=X.current;if(t||r){let r=J??null;if(T===r){X.current=!1;return}let a=x.REASONS.missing;n?a=x.REASONS.initial:t&&(a=x.REASONS.disabled),e(r,a);return}n&&null!=G&&(B(T,x.REASONS.initial),X.current=!1)},[J,E,B,G,A,j,T]);let ee={orientation:h,tabActivationDirection:U},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:_,stateAttributesMapping:m});return(0,a.jsx)(f.Provider,{value:Y,children:(0,a.jsx)(c.CompositeList,{elementsRef:S,children:et})})});function b(e,t,r,n){if(null==e||null==t)return"none";let a=null,i=null;for(let[r,s]of n.entries()){if(null==s)continue;let n=s.value??s.index;if(e===n&&(a=r),t===n&&(i=r),null!=a&&null!=i)break}if(null==a||null==i)return a!==i&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let s=a.getBoundingClientRect(),l=i.getBoundingClientRect();if("horizontal"===r){if(l.lefts.left)return"right"}else{if(l.tops.top)return"down"}return"none"}var y=e.i(108868),_=e.i(788015),w=e.i(540886);let S="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,S],370359);var C=e.i(395530);let N=i.createContext(void 0);function T(){let e=i.useContext(N);if(void 0===e)throw Error((0,d.default)(65));return e}var A=e.i(647554);let E=i.forwardRef(function(e,t){let{className:r,disabled:n=!1,render:a,value:s,id:o,nativeButton:c=!0,style:d,...f}=e,{value:p,getTabPanelIdByValue:v,orientation:b,tabActivationDirection:N}=h(),{activateOnFocus:E,highlightedTabIndex:j,onTabActivation:O,registerTabResizeObserverElement:R,setHighlightedTabIndex:k,tabsListElement:I}=T(),M=(0,_.useBaseUiId)(o),L=i.useMemo(()=>({disabled:n,id:M,value:s}),[n,M,s]),{compositeProps:P,compositeRef:U,index:H}=(0,C.useCompositeItem)({metadata:L}),D=s===p,z=i.useRef(!1),W=i.useRef(null);(0,l.useIsoLayoutEffect)(()=>{let e=W.current;if(e)return R(e)},[R]),(0,l.useIsoLayoutEffect)(()=>{if(z.current){z.current=!1;return}if(D&&H>-1&&j!==H){if(null!=I){let e=(0,A.activeElement)((0,y.ownerDocument)(I));if(e&&(0,A.contains)(I,e))return}n||k(H)}},[D,H,j,k,n,I]);let{getButtonProps:B,buttonRef:V}=(0,w.useButton)({disabled:n,native:c,focusableWhenDisabled:!0}),F=v(s),K=i.useRef(!1),$=i.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:n,active:D,orientation:b,tabActivationDirection:N},ref:[t,V,U,W],props:[P,{role:"tab","aria-controls":F,"aria-selected":D,id:M,onClick:function(e){D||n||O(s,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){D||(H>-1&&!n&&k(H),!n&&E&&(!K.current||K.current&&$.current)&&O(s,(0,g.createChangeEventDetails)(x.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){D||n||(K.current=!0,e.button&&0!==e.button||($.current=!0,(0,y.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){K.current=!1,$.current=!1},{once:!0})))},[S]:D?"":void 0,onKeyDownCapture(){z.current=!0}},f,B],stateAttributesMapping:m})});var j=e.i(73364),O=e.i(802239),R=e.i(956789);function k(){return R.NOOP}function I(){return!1}function M(){return!0}let L=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var P=e.i(172410);let U={...m,activeTabPosition:()=>null,activeTabSize:()=>null},H=i.forwardRef(function(e,t){let{className:r,render:n,renderBeforeHydration:s=!1,style:l,...o}=e,{nonce:c}=(0,P.useCSPContext)(),{getTabElementBySelectedValue:d,orientation:f,tabActivationDirection:p,value:m}=h(),{tabsListElement:g,registerIndicatorUpdateListener:x}=T(),v=(0,O.useSyncExternalStore)(k,I,M),b=function(){let[,e]=i.useState({});return i.useCallback(()=>{e({})},[])}();i.useEffect(()=>x(b),[x,b]);let y=0,_=0,w=0,S=0,C=0,N=0,A=!1;if(null!=m&&null!=g){let e=d(m);if(null!=e){A=!0;let{width:t,height:r}=(0,j.getCssDimensions)(e),{width:n,height:a}=(0,j.getCssDimensions)(g),i=e.getBoundingClientRect(),s=g.getBoundingClientRect(),l=n>0?s.width/n:1,o=a>0?s.height/a:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=i.left-s.left,t=i.top-s.top;y=e/l+g.scrollLeft-g.clientLeft,w=t/o+g.scrollTop-g.clientTop}else y=e.offsetLeft,w=e.offsetTop;C=t,N=r,_=g.scrollWidth-y-C,S=g.scrollHeight-w-N}}let E=A?{left:y,right:_,top:w,bottom:S}:null,R=A?{width:C,height:N}:null,H=A?{[L.activeTabLeft]:`${y}px`,[L.activeTabRight]:`${_}px`,[L.activeTabTop]:`${w}px`,[L.activeTabBottom]:`${S}px`,[L.activeTabWidth]:`${C}px`,[L.activeTabHeight]:`${N}px`}:void 0,D=A&&C>0&&N>0,z=(0,u.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:E,activeTabSize:R,tabActivationDirection:p},ref:t,props:[{role:"presentation",style:H,hidden:!D},o,{suppressHydrationWarning:!0}],stateAttributesMapping:U});return null==m?null:(0,a.jsxs)(i.Fragment,{children:[z,v&&s&&(0,a.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var D=e.i(144394),z=e.i(209407),W=e.i(137584),B=e.i(223910),V=e.i(673553);let F=((n={}).index="data-index",n.activationDirection="data-activation-direction",n.orientation="data-orientation",n.hidden="data-hidden",n[n.startingStyle=z.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=z.TransitionStatusDataAttributes.endingStyle]="endingStyle",n),K={...m,...z.transitionStatusMapping},$=i.forwardRef(function(e,t){let{className:r,value:n,render:a,keepMounted:s=!1,style:o,...c}=e,{value:d,getTabIdByPanelValue:f,orientation:p,tabActivationDirection:m,registerMountedTabPanel:g,unregisterMountedTabPanel:x}=h(),v=(0,_.useBaseUiId)(),b=i.useMemo(()=>({id:v,value:n}),[v,n]),{ref:y,index:w}=(0,V.useCompositeListItem)({metadata:b}),S=n===d,{mounted:C,transitionStatus:N,setMounted:T}=(0,B.useTransitionStatus)(S),A=!C,E=f(n),j=i.useRef(null),O=(0,u.useRenderElement)("div",e,{state:{hidden:A,orientation:p,tabActivationDirection:m,transitionStatus:N},ref:[t,y,j],props:[{"aria-labelledby":E,hidden:A,id:v,role:"tabpanel",tabIndex:S?0:-1,inert:(0,D.inertValue)(!S),[F.index]:w},c],stateAttributesMapping:K});return((0,W.useOpenChangeComplete)({open:S,ref:j,onComplete(){S||T(!1)}}),(0,l.useIsoLayoutEffect)(()=>{if((!A||s)&&null!=v)return g(n,v),()=>{x(n,v)}},[A,s,n,v,g,x]),s||C)?O:null});var Y=e.i(590803),G=e.i(828918),J=e.i(673327),X=e.i(621082);let q=[];var Z=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:r,style:n,refs:s=R.EMPTY_ARRAY,props:d=R.EMPTY_ARRAY,state:f=R.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:p,onHighlightedIndexChange:m,orientation:g,grid:x,loopFocus:v,onLoop:b,enableHomeAndEndKeys:y,onMapChange:_,stopEventPropagation:w=!0,rootRef:C,disabledIndices:N,modifierKeys:T,highlightItemOnHover:E=!1,tag:j="div",...O}=e,{props:k,highlightedIndex:I,onHighlightedIndexChange:M,elementsRef:L,onMapChange:P,relayKeyboardEvent:U}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:n,onLoop:a,direction:s,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:f=!1,stopEventPropagation:h=!1,disabledIndices:p,modifierKeys:m=q}=e,[g,x]=i.useState(0),v=null!=n,b=i.useRef(null),y=(0,G.useMergedRefs)(b,d),_=i.useRef([]),w=i.useRef(!1),C=u??g,N=(0,o.useStableCallback)((e,t=!1)=>{if((c??x)(e),t){let t=_.current[e];(0,J.scrollIntoViewIfNeeded)(b.current,t,s,r)}}),T=(0,o.useStableCallback)(e=>{if(0===e.size||w.current)return;w.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(S))??null,a=n?t.indexOf(n):-1;if(-1!==a)N(a);else if((0,X.isListIndexDisabled)(t,C,p)){let e=(0,X.findNonDisabledListIndex)(t,{disabledIndices:p});(0,X.isIndexOutOfListBounds)(t,e)||N(e)}(0,J.scrollIntoViewIfNeeded)(b.current,n,s,r)});(0,l.useIsoLayoutEffect)(()=>{if(null==p||null!=u||!w.current)return;let e=_.current;if((0,X.isListIndexDisabled)(e,C,p)){let t=(0,X.findNonDisabledListIndex)(e,{disabledIndices:p});(0,X.isIndexOutOfListBounds)(e,t)||N(t)}},[p,u,C,_,N]);let E=(0,o.useStableCallback)((e,t,r)=>a?a(e,t,r,_):r),j=(0,o.useStableCallback)(e=>{let i=f?J.COMPOSITE_KEYS:J.ARROW_KEYS;if(!i.has(e.key)||function(e,t){for(let r of J.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,m)||!b.current)return;let l="rtl"===s,o=l?J.ARROW_LEFT:J.ARROW_RIGHT,u={horizontal:o,vertical:J.ARROW_DOWN,both:o}[r],c=l?J.ARROW_RIGHT:J.ARROW_LEFT,d={horizontal:c,vertical:J.ARROW_UP,both:c}[r],g=(0,A.getTarget)(e.nativeEvent);if(null!=g&&(0,J.isNativeInput)(g)&&!(0,Y.isElementDisabled)(g)){let t=g.selectionStart,r=g.selectionEnd,n=g.value??"";if(null==t||e.shiftKey||t!==r||e.key!==d&&t0)return}let x=C,y=(0,X.getMinListIndex)(_,p),w=(0,X.getMaxListIndex)(_,p);null!=n&&(x=n({disabledIndices:p,elementsRef:_,event:e,highlightedIndex:C,loopFocus:t,maxIndex:w,minIndex:y,onLoop:E,orientation:r,rtl:l}));let S={horizontal:[o],vertical:[J.ARROW_DOWN],both:[o,J.ARROW_DOWN]}[r],T={horizontal:[c],vertical:[J.ARROW_UP],both:[c,J.ARROW_UP]}[r],j=v?i:({horizontal:f?J.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:J.HORIZONTAL_KEYS,vertical:f?J.VERTICAL_KEYS_WITH_EXTRA_KEYS:J.VERTICAL_KEYS,both:i})[r];f&&(e.key===J.HOME?x=y:e.key===J.END&&(x=w)),x===C&&(S.includes(e.key)||T.includes(e.key))&&(t&&x===w&&S.includes(e.key)?(x=y,a&&(x=a(e,C,x,_))):t&&x===y&&T.includes(e.key)?(x=w,a&&(x=a(e,C,x,_))):x=(0,X.findNonDisabledListIndex)(_.current,{startingIndex:x,decrement:T.includes(e.key),disabledIndices:p})),x===C||(0,X.isIndexOutOfListBounds)(_.current,x)||(h&&e.stopPropagation(),j.has(e.key)&&e.preventDefault(),N(x,!0),queueMicrotask(()=>{_.current[x]?.focus()}))});return{props:{ref:y,onFocus(e){let t=b.current,r=(0,A.getTarget)(e.nativeEvent);t&&null!=r&&(0,J.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:j},highlightedIndex:C,onHighlightedIndexChange:N,elementsRef:_,disabledIndices:p,onMapChange:T,relayKeyboardEvent:j}}({grid:x,loopFocus:v,onLoop:b,orientation:g,highlightedIndex:p,onHighlightedIndexChange:m,rootRef:C,stopEventPropagation:w,enableHomeAndEndKeys:y,direction:(0,Q.useDirection)(),disabledIndices:N,modifierKeys:T}),H=(0,u.useRenderElement)(j,e,{state:f,ref:s,props:[k,...d,O],stateAttributesMapping:h}),D=i.useMemo(()=>({highlightedIndex:I,onHighlightedIndexChange:M,highlightItemOnHover:E,relayKeyboardEvent:U}),[I,M,E,U]);return(0,a.jsx)(Z.CompositeRootContext.Provider,{value:D,children:(0,a.jsx)(c.CompositeList,{elementsRef:L,onMapChange:e=>{_?.(e),P(e)},children:H})})}e.s(["CompositeRoot",0,ee],405934);let et=i.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:n,loopFocus:s=!0,render:u,style:c,...d}=e,{onValueChange:f,orientation:p,value:g,setTabMap:x,tabActivationDirection:v}=h(),[b,y]=i.useState(0),[_,w]=i.useState(null),S=i.useRef(new Set),C=i.useRef(new Set),T=i.useRef(null);(0,l.useIsoLayoutEffect)(()=>{if("u"{S.current.forEach(e=>{e()})});return T.current=e,_&&e.observe(_),C.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),T.current=null}},[_]);let A=(0,o.useStableCallback)(e=>(S.current.add(e),()=>{S.current.delete(e)})),E=(0,o.useStableCallback)(e=>(C.current.add(e),T.current?.observe(e),()=>{C.current.delete(e),T.current?.unobserve(e)})),j=(0,o.useStableCallback)((e,t)=>{e!==g&&f(e,t)}),O=i.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,registerIndicatorUpdateListener:A,registerTabResizeObserverElement:E,onTabActivation:j,setHighlightedTabIndex:y,tabsListElement:_}),[r,b,A,E,j,y,_]);return(0,a.jsx)(N.Provider,{value:O,children:(0,a.jsx)(ee,{render:u,className:n,style:c,state:{orientation:p,tabActivationDirection:v},refs:[t,w],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},d],stateAttributesMapping:m,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:s,orientation:p,onHighlightedIndexChange:y,onMapChange:x,disabledIndices:R.EMPTY_ARRAY})})});e.s(["Indicator",0,H,"List",0,et,"Panel",0,$,"Root",0,v,"Tab",0,E],69281);var er=e.i(69281),er=er,en=e.i(115504);let ea=(0,en.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,a.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,en.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,a.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,en.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,a.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,en.cn)(ea({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,a.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,en.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},195116,e=>{"use strict";let t=(0,e.i(475254).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,t],195116)},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},292335,122520,165615,779129,280024,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",OAUTH2_TOKEN_EXCHANGE:"oauth2_token_exchange",AWS_SIGV4:"aws_sigv4",TRUE_PASSTHROUGH:"true_passthrough",OAUTH_DELEGATE:"oauth_delegate"},r=e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE,n={INTERACTIVE:"interactive",M2M:"m2m"},a=e=>{let t=e.credentials??{};return JSON.stringify({url:"string"==typeof e.url?e.url:null,spec_path:"string"==typeof e.spec_path?e.spec_path:null,auth_type:e.auth_type??null,oauth_flow_type:e.oauth_flow_type??null,client_id:t.client_id??null,client_secret:t.client_secret??null,scopes:t.scopes??null,upstream_resource:t.upstream_resource??null,issuer:e.issuer??null,authorization_url:e.authorization_url??null,token_url:e.token_url??null,registration_url:e.registration_url??null})},i=["client_id","client_secret"],s=["upstream_resource"],l=["access_token","refresh_token","expires_in","scope"],o=(e,t)=>{if(!e)return;let r=Object.fromEntries(t.filter(t=>"string"==typeof e[t]&&""!==e[t]).map(t=>[t,e[t]]));return Object.keys(r).length>0?r:void 0},u="client_credentials",c={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};e.s(["ADMIN_CONFIG_CREDENTIAL_KEYS",0,s,"AUTH_TYPE",0,t,"CLEARED_ON_INVALIDATION",0,["credentials"],"MCP_OAUTH2_FLOW_INTERACTIVE",0,"authorization_code","MCP_OAUTH2_FLOW_M2M",0,u,"OAUTH_FLOW",0,n,"TRANSPORT",0,c,"credentialAuthClass",0,e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE?"client_forwarded":e??null,"gatewayMintsClientFor",0,e=>e.auth_type===t.TRUE_PASSTHROUGH||e.auth_type===t.OAUTH_DELEGATE&&!e.dcr_bridge,"getMcpOAuthMode",0,function(e){return e.auth_type===t.OAUTH2_TOKEN_EXCHANGE?"token_exchange":e.auth_type!==t.OAUTH2?null:e.oauth2_flow===u?"m2m":e.delegate_auth_to_upstream?"passthrough":"authorization_code"},"getOAuthAuthorizationIdentity",0,a,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?c.SSE:t&&e!==c.STDIO?c.OPENAPI:e,"isClientForwardedTokenMode",0,r,"isHeldOAuthTokenStale",0,(e,t)=>void 0!==t&&a(e)!==t,"isUnsupportedOnGatewayConnect",0,e=>r(e)||e===t.OAUTH2_TOKEN_EXCHANGE,"oauth2FlowToFormValue",0,function(e){return e===u?n.M2M:e?n.INTERACTIVE:void 0},"preservedAdminCredentials",0,e=>o(e,[...i,...s]),"preservedDeclaredAppCredentials",0,e=>o(e,i),"withoutMintedTokenCredentials",0,e=>{if(!e)return;let t=Object.fromEntries(Object.entries(e).filter(([e])=>!l.includes(e)));return Object.keys(t).length>0?t:void 0}],292335);var d=e.i(271645),f=e.i(602869),h=e.i(727749);function p(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["extractErrorMessage",0,p],122520);let m=e=>{let t=new Uint8Array(e),r="";return t.forEach(e=>r+=String.fromCharCode(e)),btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},g=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),m(e.buffer)},x=async e=>{let t=new TextEncoder().encode(e);return m(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,x,"generateCodeVerifier",0,g],165615);var v=e.i(434166);let b=()=>{{let e=window.location.pathname||"",t=e.indexOf("/ui"),r=t>=0?e.slice(0,t+3).replace(/\/+$/,""):"";return`${window.location.origin}${r}/mcp/oauth/callback`}},y=(...e)=>{e.forEach(e=>{try{window.sessionStorage.removeItem(e)}catch(e){}})};e.s(["TOOLS_OAUTH_UI_STATE_KEY",0,"litellm-mcp-oauth-tools-state","buildCallbackUrl",0,b,"clearStorage",0,y],779129);let _="litellm-user-mcp-oauth-flow-state",w="litellm-user-mcp-oauth-result",S=(e,t)=>{(0,v.setSecureItem)(e,t)},C=e=>(0,v.getSecureItem)(e);e.s(["useUserMcpOAuthFlow",0,({accessToken:e,serverId:t,serverAlias:r,scopes:n,clientId:a,onSuccess:i})=>{let[s,l]=(0,d.useState)("idle"),[o,u]=(0,d.useState)(null),c=(0,d.useRef)(!1),m=(0,d.useCallback)(async()=>{try{let i;l("authorizing"),u(null);let s=a??void 0;if(!s)try{let n=await (0,f.registerMcpOAuthClient)(e,t,{client_name:r||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"});s=n?.client_id,i=n?.client_secret}catch(e){}let o=g(),c=await x(o),d=crypto.randomUUID(),h=b(),p=n?.filter(e=>e.trim()).join(" "),m=(0,f.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:s,redirectUri:h,state:d,codeChallenge:c,scope:p}),v={state:d,codeVerifier:o,serverId:t,redirectUri:h,clientId:s,clientSecret:i,scopes:n};S(_,JSON.stringify(v));let y=new URL(window.location.href);y.searchParams.set("mcpOauthReturn","apps"),S("litellm-mcp-oauth-return-url",y.toString()),window.location.href=m}catch(t){let e=p(t);u(e),l("error"),h.default.error(e)}},[e,t,r,n,a]),v=(0,d.useCallback)(async()=>{if(c.current)return;let r=C(w);if(!r)return;let n=C(_);if(!n)return;try{let e=JSON.parse(n);if(e.serverId&&e.serverId!==t)return}catch(e){}c.current=!0,y(w);let a=null,s=null;try{a=JSON.parse(r);let e=C(_);s=e?JSON.parse(e):null}catch(e){u("Failed to resume OAuth flow. Please retry."),l("error"),c.current=!1,y(_);return}try{if(!s?.state||!s.codeVerifier||!s.serverId)throw Error("OAuth session state was lost. Please retry.");if(!a?.state||a.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(a.error)throw Error(a.error_description||a.error);if(!a.code)throw Error("Authorization code missing in callback.");l("exchanging");let t=await (0,f.exchangeMcpOAuthToken)({serverId:s.serverId,code:a.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri,accessToken:e});await (0,f.storeMCPOAuthUserCredential)(e,s.serverId,{access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,scopes:s.scopes}),l("success"),u(null),h.default.success("Connected successfully"),i()}catch(t){let e=p(t);u(e),l("error"),h.default.error(e)}finally{y(_),setTimeout(()=>{c.current=!1},1e3)}},[e,t,i]);return(0,d.useEffect)(()=>{v()},[v]),{startOAuthFlow:m,status:s,error:o}}],280024)},269638,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",0,t],269638)},21040,131913,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(266027),a=e.i(555436),i=e.i(871689),s=e.i(463059),l=e.i(195116),o=e.i(269638),u=e.i(531278),c=e.i(519455),d=e.i(793479),f=e.i(302747),h=e.i(677572),p=e.i(602869),m=e.i(292335),g=e.i(174553),x=e.i(888259),v=e.i(280024);let b=({server:e,accessToken:n,onConnect:a,variant:i="badge"})=>{let s=e.server_name??e.alias??e.server_id,{startOAuthFlow:l,status:o}=(0,v.useUserMcpOAuthFlow)({accessToken:n,serverId:e.server_id,serverAlias:s,onSuccess:(0,r.useCallback)(()=>a(e.server_id),[a,e.server_id])}),d="authorizing"===o||"exchanging"===o;return"button"===i?(0,t.jsxs)(c.Button,{onClick:l,disabled:d,className:"font-semibold h-[38px] min-w-[110px]",children:[d&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),d?"Connecting…":"Connect"]}):(0,t.jsx)("span",{onClick:e=>{e.stopPropagation(),d||l()},className:`text-[11px] font-semibold rounded-md px-2 py-0.5 shrink-0 whitespace-nowrap ${d?"text-muted-foreground bg-muted cursor-default":"text-primary-foreground bg-primary cursor-pointer hover:bg-primary/90"}`,children:d?"Connecting…":"Connect"})},y=["#1677ff","#52c41a","#fa8c16","#eb2f96","#722ed1","#13c2c2","#fa541c","#2f54eb","#a0d911","#faad14"];function _(e){let t=0;for(let r=0;r{let[S,C]=(0,r.useState)([]),[N,T]=(0,r.useState)(!0),[A,E]=(0,r.useState)(""),[j,O]=(0,r.useState)("all"),[R,k]=(0,r.useState)(new Set),[I,M]=(0,r.useState)(null),[L,P]=(0,r.useState)({}),[U,H]=(0,r.useState)(!1),[D,z]=(0,r.useState)(new Set),[W,B]=(0,r.useState)(new Set),V=(0,r.useRef)([]);(0,r.useEffect)(()=>{V.current=S},[S]);let F=(0,r.useRef)(v);(0,r.useEffect)(()=>{F.current=v},[v]);let K=(0,r.useRef)(y);(0,r.useEffect)(()=>{K.current=y},[y]);let $=e=>e.server_name??e.alias??e.server_id,Y=(0,r.useRef)(!1),G=(0,r.useCallback)(async t=>{try{let r=await (0,p.listMCPTools)(e,t.server_id);if(Y.current)return;let n=Array.isArray(r?.tools)?r.tools:[];P(e=>({...e,[$(t)]:n.length}))}catch{}},[e]),J=(0,r.useCallback)(async t=>{try{let r=await (0,p.getMCPOAuthUserCredentialStatus)(e,t.server_id);if(Y.current)return;r.has_credential&&!r.is_expired&&z(e=>new Set(e).add(t.server_id))}catch{}finally{Y.current||B(e=>{let r=new Set(e);return r.delete(t.server_id),r})}},[e]);(0,r.useEffect)(()=>(Y.current=!1,(0,p.fetchMCPServers)(e).then(async e=>{if(Y.current)return;let t=Array.isArray(e)?e:e?.data??[],r=t.filter(e=>e.auth_type===m.AUTH_TYPE.OAUTH2);for(let e of(C(t),B(new Set(r.map(e=>e.server_id))),T(!1),r.forEach(e=>J(e)),H(!0),Array.from({length:Math.ceil(t.length/5)},(e,r)=>t.slice(5*r,(r+1)*5)))){if(Y.current)return;await Promise.allSettled(e.map(e=>G(e)))}Y.current||H(!1)}).catch(()=>{Y.current||(C([]),T(!1))}),()=>{Y.current=!0}),[e,G,J]),(0,r.useEffect)(()=>{if(0===D.size)return;let e=V.current.filter(e=>D.has(e.server_id)&&!F.current.includes($(e))).map($);e.length>0&&K.current([...F.current,...e])},[D]);let X=async(t,r,n)=>{if(!r){y(v.filter(e=>e!==t)),n&&z(e=>{let t=new Set(e);return t.delete(n),t});return}k(e=>new Set(e).add(t));try{let r=n??t,a=await (0,p.listMCPTools)(e,r);if(a?.error)return void x.default.warning(`Could not load tools for ${t}`);F.current.includes(t)||y([...F.current,t])}catch{x.default.warning(`Could not load tools for ${t}`)}finally{k(e=>{let r=new Set(e);return r.delete(t),r})}},{data:q,isLoading:Z}=(0,n.useQuery)({queryKey:["mcp-apps-panel-detail-tools",I?.server_id],queryFn:()=>(0,p.listMCPTools)(e,I.server_id),enabled:!!I}),Q=Array.isArray(q?.tools)?q.tools:[],ee=S.filter(e=>{let t=$(e),r=!A.trim()||t.toLowerCase().includes(A.toLowerCase())||(e.description??"").toLowerCase().includes(A.toLowerCase()),n="all"===j||v.includes(t);return r&&n}),et=S.filter(e=>v.includes($(e))).length,er=Object.values(L).reduce((e,t)=>e+t,0);if(I){let r=$(I),n=v.includes(r),a=R.has(r),s=_(r);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:()=>M(null),className:"-ml-3 mb-5 gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(i.ArrowLeft,{className:"h-3 w-3"}),"Back"]}),(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-7",children:[I.mcp_info?.logo_url?(0,t.jsx)(g.Logo,{src:I.mcp_info.logo_url,label:r,className:"w-16 h-16 rounded-2xl object-contain shrink-0 bg-muted/50"}):(0,t.jsx)("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center text-white font-bold text-[28px] shrink-0",style:{background:s},children:r.charAt(0).toUpperCase()}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"m-0 mb-1 text-[22px] font-bold text-foreground",children:r}),(0,t.jsx)("p",{className:"m-0 text-sm text-muted-foreground",children:I.description??"MCP server"})]}),I.auth_type===m.AUTH_TYPE.OAUTH2?D.has(I.server_id)?(0,t.jsx)(c.Button,{variant:"destructive",onClick:async()=>{try{await (0,p.deleteMCPOAuthUserCredential)(e,I.server_id)}catch(e){}z(e=>{let t=new Set(e);return t.delete(I.server_id),t}),K.current(F.current.filter(e=>e!==r))},className:"font-semibold h-[38px] min-w-[110px]",children:"Disconnect"}):(0,t.jsx)(b,{server:I,accessToken:e,onConnect:e=>{z(t=>new Set(t).add(e))},variant:"button"}):(0,t.jsxs)(c.Button,{variant:n?"outline":"default",disabled:a,onClick:()=>X(r,!n,I.server_id),className:"font-semibold h-[38px] min-w-[110px]",children:[a&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),n?"Disconnect":"Connect"]})]}),(0,t.jsx)("h3",{className:"m-0 mb-3 text-[15px] font-semibold text-foreground",children:"Information"}),(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden mb-7",children:[["Server ID",I.server_id],["Transport",(0,m.handleTransport)(I.transport,I.spec_path)],["Status",n?"Connected":"Not connected"]].filter(([,e])=>e).map(([e,r],n,a)=>(0,t.jsxs)("div",{className:`flex px-4 py-3 text-[13px] ${n(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30 flex flex-col gap-1.5",children:[(0,t.jsx)(f.Skeleton,{className:"h-3.5 w-1/3"}),(0,t.jsx)(f.Skeleton,{className:"h-3 w-2/3"})]},r))}):0===Q.length?(0,t.jsx)("div",{className:"text-muted-foreground text-[13px] py-2",children:"No tools available"}):(0,t.jsx)("div",{className:"flex flex-col gap-2",children:Q.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${e.description?"mb-1":""}`,children:[(0,t.jsx)(l.Wrench,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold text-foreground font-mono",children:e.name})]}),e.description&&(0,t.jsx)("p",{className:"m-0 text-xs text-muted-foreground pl-[21px]",children:e.description})]},e.name))})]})}return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("h2",{className:"m-0 text-lg font-semibold text-foreground",children:"MCP Servers"}),!w&&(0,t.jsx)("span",{className:"text-[10px] font-semibold text-primary bg-primary/10 rounded px-1.5 py-0.5 uppercase tracking-wider",children:"Beta"})]}),w?(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Click a server to see its tools and connect"}):(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Browse tools, authenticate once, use in chat"}),U?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}),"Loading tools..."]}):er>0?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(l.Wrench,{className:"h-3 w-3"}),er," tool",1!==er?"s":""," available"]}):null]})]}),(0,t.jsxs)("div",{className:"relative w-[220px]",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)(d.Input,{placeholder:"Search servers...",value:A,onChange:e=>E(e.target.value),className:"pl-9 text-[13px] h-9"})]})]}),(0,t.jsx)(h.Tabs,{value:j,onValueChange:e=>O(e),className:"mb-4",children:(0,t.jsxs)(h.TabsList,{variant:"line",className:"border-b rounded-none w-full justify-start h-auto p-0",children:[(0,t.jsx)(h.TabsTrigger,{value:"all",className:"rounded-none px-4 py-2 text-[13px]",children:"All"}),(0,t.jsxs)(h.TabsTrigger,{value:"connected",className:"rounded-none px-4 py-2 text-[13px]",children:["Connected",et>0?` (${et})`:""]})]})}),N?(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:Array.from({length:6},(e,r)=>(0,t.jsxs)("div",{className:`flex items-center gap-3 p-4 ${r%2==0?"border-r":""} ${r<4?"border-b":""}`,children:[(0,t.jsx)(f.Skeleton,{className:"w-[38px] h-[38px] rounded-xl shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1.5",children:[(0,t.jsx)(f.Skeleton,{className:"h-3.5 w-2/3"}),(0,t.jsx)(f.Skeleton,{className:"h-3 w-1/2"})]})]},r))}):0===ee.length?(0,t.jsx)("div",{className:"text-center text-muted-foreground text-[13px] py-12 px-3",children:0===S.length?"No MCP servers configured. Add servers in Tools -> MCP Servers.":"connected"===j?"No servers connected yet.":"No servers match your search."}):(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:ee.map((r,n)=>{var a;let i=$(r),u=_(i),c=L[i],d=!!w&&(0,m.isUnsupportedOnGatewayConnect)(r.auth_type);return(0,t.jsxs)("div",{onClick:()=>M(r),className:`flex items-center gap-3 p-4 bg-card cursor-pointer transition-colors hover:bg-accent/30 min-w-0 ${n%2==0?"border-r":""} ${Math.floor(n/2)0?(0,t.jsxs)("span",{className:"shrink-0 flex items-center gap-1 text-muted-foreground",children:["· ",(0,t.jsx)(l.Wrench,{className:"h-2.5 w-2.5"})," ",c]}):null:U?(0,t.jsx)(f.Skeleton,{className:"w-7 h-3 shrink-0"}):null]})]}),(a=r,w&&(0,m.isUnsupportedOnGatewayConnect)(a.auth_type)?(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 whitespace-nowrap",children:"Not supported on this connection"}):a.auth_type===m.AUTH_TYPE.OAUTH2?D.has(a.server_id)?(0,t.jsx)(o.CheckCircle,{className:"h-3.5 w-3.5 text-emerald-600 shrink-0"}):W.has(a.server_id)?(0,t.jsx)(f.Skeleton,{className:"h-6 w-16 shrink-0 rounded-md"}):(0,t.jsx)(b,{server:a,accessToken:e,onConnect:e=>z(t=>new Set(t).add(e)),variant:"badge"}):v.includes($(a))?(0,t.jsx)("span",{className:"w-[7px] h-[7px] rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}):null),(0,t.jsx)(s.ChevronRight,{className:"h-3 w-3 text-muted-foreground/40 shrink-0"})]},r.server_id)})})]})}],21040),e.s(["default",0,({flowHandle:e,clientOrigin:r})=>{let n=`${(0,p.getProxyBaseUrl)()}/authorize/complete`,a=r??"the application";return(0,t.jsx)("div",{className:"mb-6 rounded-lg border border-primary/30 bg-primary/5 px-5 py-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 min-w-0",children:[(0,t.jsx)(o.CheckCircle,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"text-sm font-semibold text-foreground",children:["Connect your MCP servers to ",a]}),(0,t.jsxs)("p",{className:"text-[13px] text-muted-foreground mt-0.5",children:["Authorize the servers you want to use below, then click Finish connecting to return to ",a,"."]})]})]}),(0,t.jsxs)("form",{method:"POST",action:n,className:"shrink-0",children:[(0,t.jsx)("input",{type:"hidden",name:"flow",value:e}),(0,t.jsx)("button",{type:"submit",className:"h-[38px] rounded-md bg-primary px-4 text-sm font-semibold text-primary-foreground hover:bg-primary/90",children:"Finish connecting"})]})]})})}],131913)},248536,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(405033),i=e.i(21040),s=e.i(131913);function l(){let{accessToken:e,selectedMCPServers:l,setSelectedMCPServers:o}=(0,a.useChatShell)(),u=(0,n.useRouter)(),c=(0,n.useSearchParams)(),d=c.get("mcpOauthReturn"),f=c.get("connect_flow"),h=c.get("connect_client");return(0,r.useEffect)(()=>{if(d){let e=new URL(window.location.href);e.searchParams.delete("mcpOauthReturn"),u.replace(e.pathname+e.search)}},[d,u]),(0,t.jsxs)("div",{className:"flex-1 min-h-0 overflow-auto w-full py-8 px-8",children:[f&&(0,t.jsx)(s.default,{flowHandle:f,clientOrigin:h}),(0,t.jsx)(i.default,{accessToken:e,selectedServers:l,onChange:o,connectMode:!!f})]})}e.s(["default",0,function(){return(0,t.jsx)(r.Suspense,{children:(0,t.jsx)(l,{})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/24quqpgjv0f2h.js b/litellm/proxy/_experimental/out/_next/static/chunks/1lrw-21mmi7hg.js similarity index 69% rename from litellm/proxy/_experimental/out/_next/static/chunks/24quqpgjv0f2h.js rename to litellm/proxy/_experimental/out/_next/static/chunks/1lrw-21mmi7hg.js index fbebca8c8b0..58117627e6d 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/24quqpgjv0f2h.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1lrw-21mmi7hg.js @@ -1,4 +1,4 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,624687,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(115504);let s=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("textarea",{ref:s,"data-slot":"textarea",className:(0,t.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));s.displayName="Textarea",e.s(["Textarea",0,s])},515288,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(115504);let s=a.forwardRef(({className:e,size:a="default",...s},i)=>(0,r.jsx)("div",{ref:i,"data-slot":"card","data-size":a,className:(0,t.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s}));s.displayName="Card";let i=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-header",className:(0,t.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));i.displayName="CardHeader";let d=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-title",className:(0,t.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));d.displayName="CardTitle";let o=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-description",className:(0,t.cn)("text-sm text-muted-foreground",e),...a}));o.displayName="CardDescription";let n=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-action",className:(0,t.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));n.displayName="CardAction";let l=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-content",className:(0,t.cn)("px-(--card-spacing)",e),...a}));l.displayName="CardContent";let c=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-footer",className:(0,t.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));c.displayName="CardFooter",e.s(["Card",0,s,"CardAction",0,n,"CardContent",0,l,"CardDescription",0,o,"CardFooter",0,c,"CardHeader",0,i,"CardTitle",0,d])},972520,e=>{"use strict";let r=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,r],972520)},411929,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(972520),s=e.i(174886),i=e.i(519455),d=e.i(515288),o=e.i(624687),n=e.i(571303),l=e.i(602869),c=e.i(727749);let u=({accessToken:e})=>{let[u,m]=(0,a.useState)(`{ +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,624687,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(115504);let s=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("textarea",{ref:s,"data-slot":"textarea",className:(0,t.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...a}));s.displayName="Textarea",e.s(["Textarea",0,s])},515288,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(115504);let s=a.forwardRef(({className:e,size:a="default",...s},i)=>(0,r.jsx)("div",{ref:i,"data-slot":"card","data-size":a,className:(0,t.cn)("group/card flex flex-col gap-(--card-spacing) rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...s}));s.displayName="Card";let i=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-header",className:(0,t.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...a}));i.displayName="CardHeader";let d=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-title",className:(0,t.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...a}));d.displayName="CardTitle";let o=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-description",className:(0,t.cn)("text-sm text-muted-foreground",e),...a}));o.displayName="CardDescription";let n=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-action",className:(0,t.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...a}));n.displayName="CardAction";let l=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-content",className:(0,t.cn)("px-(--card-spacing)",e),...a}));l.displayName="CardContent";let c=a.forwardRef(({className:e,...a},s)=>(0,r.jsx)("div",{ref:s,"data-slot":"card-footer",className:(0,t.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...a}));c.displayName="CardFooter",e.s(["Card",0,s,"CardAction",0,n,"CardContent",0,l,"CardDescription",0,o,"CardFooter",0,c,"CardHeader",0,i,"CardTitle",0,d])},972520,e=>{"use strict";let r=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,r],972520)},411929,e=>{"use strict";var r=e.i(843476),a=e.i(271645),t=e.i(972520),s=e.i(174886),i=e.i(519455),d=e.i(515288),o=e.i(624687),n=e.i(571303),l=e.i(602869),c=e.i(727749);let u=({accessToken:e})=>{let[u,m]=(0,a.useState)(`{ "model": "openai/gpt-4o", "messages": [ { diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/3-9r9qzlv5bdt.js b/litellm/proxy/_experimental/out/_next/static/chunks/1s1-y1y3dcjrr.js similarity index 66% rename from litellm/proxy/_experimental/out/_next/static/chunks/3-9r9qzlv5bdt.js rename to litellm/proxy/_experimental/out/_next/static/chunks/1s1-y1y3dcjrr.js index dff578eb7c5..214724e1c7f 100644 --- a/litellm/proxy/_experimental/out/_next/static/chunks/3-9r9qzlv5bdt.js +++ b/litellm/proxy/_experimental/out/_next/static/chunks/1s1-y1y3dcjrr.js @@ -1 +1 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,302747,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(115504);let a=i.forwardRef(({className:e,...i},a)=>(0,t.jsx)("div",{ref:a,"data-slot":"skeleton",className:(0,r.cn)("animate-pulse rounded-md bg-accent",e),...i}));a.displayName="Skeleton",e.s(["Skeleton",0,a])},463059,246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t],246349),e.s(["ChevronRight",0,t],463059)},555436,54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t],54943),e.s(["Search",0,t],555436)},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let r=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,a=t.serverRootPath)=>{let l;if(!e)return;if(r.test(e)||e.includes("/_next/static/"))return e;let s=(0,i.normalizeRootPath)(a);return s&&(e===s||e.startsWith(`${s}/`))?e:(l=(0,i.normalizeRootPath)(a),`${l}${e.startsWith("/")?e:`/${e}`}`)}],555987);let a={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,a],938137);let l={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,l],301035);let s={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,s],470524);let n={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,n],901539);let o={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,o],434339);let u={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,u],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let r={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,r],503119);let a={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],272896);let l={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],144923);let s={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],562171);let n={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,n],533881);let o={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,o],837957);let u={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,u],227247);let d={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,d],708889);let c={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,c],859320);let A={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],586455);let h={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],921117);let f={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,f],21296);let g={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let r={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],862493);let a={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,a],902860);let l={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,l],901372);let s={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],206258);let n={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],176228);let o={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let r={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],399495);let a={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],740876);let l={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],709103);let s={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],277207);let n={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],836473);let o={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,o],768493);let u={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,u],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),r=e.i(938137),a=e.i(301035),l=e.i(470524),s=e.i(901539),n=e.i(434339),o=e.i(857152),u=e.i(922158),d=e.i(896614),c=e.i(9774),A=e.i(503119),h=e.i(272896),f=e.i(144923),g=e.i(562171),p=e.i(533881),m=e.i(837957),x=e.i(227247),b=e.i(708889),v=e.i(859320),E=e.i(586455),_=e.i(921117),I=e.i(21296),C=e.i(579967),w=e.i(336712),O=e.i(770752),R=e.i(383963),S=e.i(862493),T=e.i(902860),y=e.i(901372),k=e.i(206258),N=e.i(176228),L=e.i(728685),M=e.i(39182),U=e.i(272967),H=e.i(551726),D=e.i(399495),B=e.i(740876),j=e.i(709103),P=e.i(277207),W=e.i(836473),z=e.i(768493),q=e.i(297720),G=e.i(980385);let V={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},F={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},Q={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},K={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},Y={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},X={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},Z={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},er={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},ea={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},es={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},en={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},eo={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},eu={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},ed={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},ec={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eA=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eh={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},ef=new Set(["bedrock_mantle"]),eg={"A2A Agent":r.default.src,Ai21:a.default.src,"Ai21 Chat":a.default.src,"AI/ML API":l.default.src,"Aiohttp Openai":G.default.src,Anthropic:s.default.src,"Anthropic Text":s.default.src,AssemblyAI:n.default.src,Azure:M.default.src,"Azure AI Foundry (Studio)":M.default.src,"Azure Text":M.default.src,Baseten:o.default.src,"Amazon Bedrock":u.default.src,"Amazon Bedrock Mantle":u.default.src,"AWS SageMaker":u.default.src,Cerebras:d.default.src,Cloudflare:c.default.src,Codestral:H.default.src,Cohere:A.default.src,"Cohere Chat":A.default.src,Cometapi:h.default.src,Cursor:f.default.src,"Databricks (Qwen API)":g.default.src,Dashscope:K.src,Deepseek:x.default.src,Deepgram:p.default.src,DeepInfra:m.default.src,ElevenLabs:b.default.src,"Fal AI":v.default.src,"Featherless Ai":E.default.src,"Fireworks AI":_.default.src,Friendliai:I.default.src,"Github Copilot":C.default.src,"Google AI Studio":w.default.src,Groq:O.default.src,vllm:es.src,Huggingface:R.default.src,Hyperbolic:S.default.src,Infinity:T.default.src,"Jina AI":y.default.src,"Lambda Ai":k.default.src,"Lm Studio":N.default.src,"Meta Llama":L.default.src,MiniMax:U.default.src,"Mistral AI":H.default.src,Moonshot:D.default.src,Morph:B.default.src,Nebius:j.default.src,Novita:P.default.src,"Nvidia Nim":W.default.src,Ollama:q.default.src,"Ollama Chat":q.default.src,Oobabooga:G.default.src,OpenAI:G.default.src,"Openai Like":G.default.src,"OpenAI Text Completion":G.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":G.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":G.default.src,Openrouter:V.src,"Oracle Cloud Infrastructure (OCI)":F.src,Perplexity:Q.src,Recraft:Y.src,Replicate:J.src,RunwayML:X.src,Sagemaker:u.default.src,Sambanova:Z.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":H.default.src,TogetherAI:ei.src,Topaz:er.src,Triton:z.default.src,V0:ea.src,"Vercel Ai Gateway":el.src,"Vertex AI (Anthropic, Gemini, etc.)":w.default.src,"Vertex Ai Beta":w.default.src,Vllm:es.src,VolcEngine:en.src,"Voyage AI":eo.src,Watsonx:eu.src,"Watsonx Text":eu.src,xAI:ed.src,Xinference:ec.src};e.s(["Providers",()=>eA,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(eg[e])??"",displayName:e}}let t=Object.keys(eh).find(t=>eh[t].toLowerCase()===e.toLowerCase())??Object.keys(eh).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=eA[t];return{logo:(0,i.resolveLogoSrc)(eg[r])??"",displayName:r}},"getProviderModels",0,(e,t)=>{let i=eh[e],r=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider,l="string"==typeof a&&(a.startsWith(`${i}_`)||a.startsWith(`${i}-`));(a===i||l&&!ef.has(a))&&r.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(e)})),r},"providerLogoMap",0,eg,"provider_map",0,eh],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(916925),a=e.i(555987);e.s(["Logo",0,({provider:e,src:l,label:s,className:n="w-4 h-4"})=>{let[o,u]=(0,i.useState)(null),d=void 0!==e?(0,r.getProviderLogoAndName)(e).logo:(0,a.resolveLogoSrc)(l)??"",c=s??e??"";return o!==d&&d?(0,t.jsx)("img",{src:d,alt:`${c||"-"} logo`,className:n,onError:()=>{console.warn(`Logo failed to load: ${d}`),u(d)}}):(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:c.charAt(0)||"-"})}])},677572,370359,405934,e=>{"use strict";var t,i,r,a=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var l=e.i(271645),s=e.i(951437),n=e.i(146376),o=e.i(667865),u=e.i(552245),d=e.i(53687),c=e.i(733332);let A=l.createContext(void 0);function h(){let e=l.useContext(A);if(void 0===e)throw Error((0,c.default)(64));return e}let f=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),g={tabActivationDirection:e=>({[f.activationDirection]:e})};var p=e.i(675606),m=e.i(56434);let x=l.forwardRef(function(e,t){let{className:i,defaultValue:r=0,onValueChange:c,orientation:h="horizontal",render:f,value:x,style:v,...E}=e,_=void 0!==e.defaultValue,I=l.useRef([]),[C,w]=l.useState(()=>new Map),[O,R]=(0,s.useControlled)({controlled:x,default:r,name:"Tabs",state:"value"}),S=void 0!==x,[T,y]=l.useState(()=>new Map),k=l.useRef(void 0),N=l.useCallback(e=>{if(void 0===e)return null;for(let[t,i]of T.entries())if(null!=i&&e===(i.value??i.index))return t;return null},[T]),[L,M]=l.useState(()=>({previousValue:O,tabActivationDirection:"none"})),{previousValue:U,tabActivationDirection:H}=L,D=H,B=!1;U!==O&&(D=b(U,O,h,T),B=null!=U&&null!=O&&null==N(O));let j=B?U:O,P=U!==j||H!==D;(0,n.useIsoLayoutEffect)(()=>{P&&M({previousValue:j,tabActivationDirection:D})},[j,P,D]);let W=(0,o.useStableCallback)((e,t)=>{t.activationDirection=b(O,e,h,T),c?.(e,t),t.isCanceled||R(e)}),z=(0,o.useStableCallback)((e,t)=>{c?.(e,(0,p.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),q=(0,o.useStableCallback)((e,t)=>{w(i=>{if(i.get(e)===t)return i;let r=new Map(i);return r.set(e,t),r})}),G=(0,o.useStableCallback)((e,t)=>{w(i=>{if(!i.has(e)||i.get(e)!==t)return i;let r=new Map(i);return r.delete(e),r})}),V=l.useCallback(e=>C.get(e),[C]),F=l.useCallback(e=>{for(let t of T.values())if(e===t?.value)return t?.id},[T]),Q=l.useMemo(()=>({getTabElementBySelectedValue:N,getTabIdByPanelValue:F,getTabPanelIdByValue:V,onValueChange:W,orientation:h,registerMountedTabPanel:q,setTabMap:y,unregisterMountedTabPanel:G,tabActivationDirection:D,value:O}),[N,F,V,W,h,q,y,G,D,O]),K=l.useMemo(()=>{for(let e of T.values())if(null!=e&&e.value===O)return e},[T,O]),Y=l.useMemo(()=>{for(let e of T.values())if(null!=e&&!e.disabled)return e.value},[T]),J=l.useRef(!_),X=l.useRef(r),Z=l.useRef(_),$=l.useRef(!1);(0,n.useIsoLayoutEffect)(()=>{if(S)return;function e(e,t){R(e),M(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),z(e,t),J.current=!1}if(0===T.size){$.current&&null!==O&&!k.current?.isConnected&&e(null,m.REASONS.missing);return}$.current=!0,k.current=T.keys().next().value;let t=K?.disabled,i=null==K&&null!==O;if(t||O!==X.current||(Z.current=!1),Z.current&&t&&O===X.current)return;let r=J.current;if(t||i){let i=Y??null;if(O===i){J.current=!1;return}let a=m.REASONS.missing;r?a=m.REASONS.initial:t&&(a=m.REASONS.disabled),e(i,a);return}r&&null!=K&&(z(O,m.REASONS.initial),J.current=!1)},[Y,S,z,K,R,T,O]);let ee={orientation:h,tabActivationDirection:D},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:E,stateAttributesMapping:g});return(0,a.jsx)(A.Provider,{value:Q,children:(0,a.jsx)(d.CompositeList,{elementsRef:I,children:et})})});function b(e,t,i,r){if(null==e||null==t)return"none";let a=null,l=null;for(let[i,s]of r.entries()){if(null==s)continue;let r=s.value??s.index;if(e===r&&(a=i),t===r&&(l=i),null!=a&&null!=l)break}if(null==a||null==l)return a!==l&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===i?t>e?"right":"left":t>e?"down":"up":"none";let s=a.getBoundingClientRect(),n=l.getBoundingClientRect();if("horizontal"===i){if(n.lefts.left)return"right"}else{if(n.tops.top)return"down"}return"none"}var v=e.i(108868),E=e.i(788015),_=e.i(540886);let I="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,I],370359);var C=e.i(395530);let w=l.createContext(void 0);function O(){let e=l.useContext(w);if(void 0===e)throw Error((0,c.default)(65));return e}var R=e.i(647554);let S=l.forwardRef(function(e,t){let{className:i,disabled:r=!1,render:a,value:s,id:o,nativeButton:d=!0,style:c,...A}=e,{value:f,getTabPanelIdByValue:x,orientation:b,tabActivationDirection:w}=h(),{activateOnFocus:S,highlightedTabIndex:T,onTabActivation:y,registerTabResizeObserverElement:k,setHighlightedTabIndex:N,tabsListElement:L}=O(),M=(0,E.useBaseUiId)(o),U=l.useMemo(()=>({disabled:r,id:M,value:s}),[r,M,s]),{compositeProps:H,compositeRef:D,index:B}=(0,C.useCompositeItem)({metadata:U}),j=s===f,P=l.useRef(!1),W=l.useRef(null);(0,n.useIsoLayoutEffect)(()=>{let e=W.current;if(e)return k(e)},[k]),(0,n.useIsoLayoutEffect)(()=>{if(P.current){P.current=!1;return}if(j&&B>-1&&T!==B){if(null!=L){let e=(0,R.activeElement)((0,v.ownerDocument)(L));if(e&&(0,R.contains)(L,e))return}r||N(B)}},[j,B,T,N,r,L]);let{getButtonProps:z,buttonRef:q}=(0,_.useButton)({disabled:r,native:d,focusableWhenDisabled:!0}),G=x(s),V=l.useRef(!1),F=l.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:r,active:j,orientation:b,tabActivationDirection:w},ref:[t,q,D,W],props:[H,{role:"tab","aria-controls":G,"aria-selected":j,id:M,onClick:function(e){j||r||y(s,(0,p.createChangeEventDetails)(m.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){j||(B>-1&&!r&&N(B),!r&&S&&(!V.current||V.current&&F.current)&&y(s,(0,p.createChangeEventDetails)(m.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){j||r||(V.current=!0,e.button&&0!==e.button||(F.current=!0,(0,v.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){V.current=!1,F.current=!1},{once:!0})))},[I]:j?"":void 0,onKeyDownCapture(){P.current=!0}},A,z],stateAttributesMapping:g})});var T=e.i(73364),y=e.i(802239),k=e.i(956789);function N(){return k.NOOP}function L(){return!1}function M(){return!0}let U=((i={}).activeTabLeft="--active-tab-left",i.activeTabRight="--active-tab-right",i.activeTabTop="--active-tab-top",i.activeTabBottom="--active-tab-bottom",i.activeTabWidth="--active-tab-width",i.activeTabHeight="--active-tab-height",i);var H=e.i(172410);let D={...g,activeTabPosition:()=>null,activeTabSize:()=>null},B=l.forwardRef(function(e,t){let{className:i,render:r,renderBeforeHydration:s=!1,style:n,...o}=e,{nonce:d}=(0,H.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:A,tabActivationDirection:f,value:g}=h(),{tabsListElement:p,registerIndicatorUpdateListener:m}=O(),x=(0,y.useSyncExternalStore)(N,L,M),b=function(){let[,e]=l.useState({});return l.useCallback(()=>{e({})},[])}();l.useEffect(()=>m(b),[m,b]);let v=0,E=0,_=0,I=0,C=0,w=0,R=!1;if(null!=g&&null!=p){let e=c(g);if(null!=e){R=!0;let{width:t,height:i}=(0,T.getCssDimensions)(e),{width:r,height:a}=(0,T.getCssDimensions)(p),l=e.getBoundingClientRect(),s=p.getBoundingClientRect(),n=r>0?s.width/r:1,o=a>0?s.height/a:1;if(Math.abs(n)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=l.left-s.left,t=l.top-s.top;v=e/n+p.scrollLeft-p.clientLeft,_=t/o+p.scrollTop-p.clientTop}else v=e.offsetLeft,_=e.offsetTop;C=t,w=i,E=p.scrollWidth-v-C,I=p.scrollHeight-_-w}}let S=R?{left:v,right:E,top:_,bottom:I}:null,k=R?{width:C,height:w}:null,B=R?{[U.activeTabLeft]:`${v}px`,[U.activeTabRight]:`${E}px`,[U.activeTabTop]:`${_}px`,[U.activeTabBottom]:`${I}px`,[U.activeTabWidth]:`${C}px`,[U.activeTabHeight]:`${w}px`}:void 0,j=R&&C>0&&w>0,P=(0,u.useRenderElement)("span",e,{state:{orientation:A,activeTabPosition:S,activeTabSize:k,tabActivationDirection:f},ref:t,props:[{role:"presentation",style:B,hidden:!j},o,{suppressHydrationWarning:!0}],stateAttributesMapping:D});return null==g?null:(0,a.jsxs)(l.Fragment,{children:[P,x&&s&&(0,a.jsx)("script",{nonce:d,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var j=e.i(144394),P=e.i(209407),W=e.i(137584),z=e.i(223910),q=e.i(673553);let G=((r={}).index="data-index",r.activationDirection="data-activation-direction",r.orientation="data-orientation",r.hidden="data-hidden",r[r.startingStyle=P.TransitionStatusDataAttributes.startingStyle]="startingStyle",r[r.endingStyle=P.TransitionStatusDataAttributes.endingStyle]="endingStyle",r),V={...g,...P.transitionStatusMapping},F=l.forwardRef(function(e,t){let{className:i,value:r,render:a,keepMounted:s=!1,style:o,...d}=e,{value:c,getTabIdByPanelValue:A,orientation:f,tabActivationDirection:g,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=h(),x=(0,E.useBaseUiId)(),b=l.useMemo(()=>({id:x,value:r}),[x,r]),{ref:v,index:_}=(0,q.useCompositeListItem)({metadata:b}),I=r===c,{mounted:C,transitionStatus:w,setMounted:O}=(0,z.useTransitionStatus)(I),R=!C,S=A(r),T=l.useRef(null),y=(0,u.useRenderElement)("div",e,{state:{hidden:R,orientation:f,tabActivationDirection:g,transitionStatus:w},ref:[t,v,T],props:[{"aria-labelledby":S,hidden:R,id:x,role:"tabpanel",tabIndex:I?0:-1,inert:(0,j.inertValue)(!I),[G.index]:_},d],stateAttributesMapping:V});return((0,W.useOpenChangeComplete)({open:I,ref:T,onComplete(){I||O(!1)}}),(0,n.useIsoLayoutEffect)(()=>{if((!R||s)&&null!=x)return p(r,x),()=>{m(r,x)}},[R,s,r,x,p,m]),s||C)?y:null});var Q=e.i(590803),K=e.i(828918),Y=e.i(673327),J=e.i(621082);let X=[];var Z=e.i(838452),$=e.i(872855);function ee(e){let{render:t,className:i,style:r,refs:s=k.EMPTY_ARRAY,props:c=k.EMPTY_ARRAY,state:A=k.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:f,onHighlightedIndexChange:g,orientation:p,grid:m,loopFocus:x,onLoop:b,enableHomeAndEndKeys:v,onMapChange:E,stopEventPropagation:_=!0,rootRef:C,disabledIndices:w,modifierKeys:O,highlightItemOnHover:S=!1,tag:T="div",...y}=e,{props:N,highlightedIndex:L,onHighlightedIndexChange:M,elementsRef:U,onMapChange:H,relayKeyboardEvent:D}=function(e){let{loopFocus:t=!0,orientation:i="both",grid:r,onLoop:a,direction:s,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:c,enableHomeAndEndKeys:A=!1,stopEventPropagation:h=!1,disabledIndices:f,modifierKeys:g=X}=e,[p,m]=l.useState(0),x=null!=r,b=l.useRef(null),v=(0,K.useMergedRefs)(b,c),E=l.useRef([]),_=l.useRef(!1),C=u??p,w=(0,o.useStableCallback)((e,t=!1)=>{if((d??m)(e),t){let t=E.current[e];(0,Y.scrollIntoViewIfNeeded)(b.current,t,s,i)}}),O=(0,o.useStableCallback)(e=>{if(0===e.size||_.current)return;_.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(I))??null,a=r?t.indexOf(r):-1;if(-1!==a)w(a);else if((0,J.isListIndexDisabled)(t,C,f)){let e=(0,J.findNonDisabledListIndex)(t,{disabledIndices:f});(0,J.isIndexOutOfListBounds)(t,e)||w(e)}(0,Y.scrollIntoViewIfNeeded)(b.current,r,s,i)});(0,n.useIsoLayoutEffect)(()=>{if(null==f||null!=u||!_.current)return;let e=E.current;if((0,J.isListIndexDisabled)(e,C,f)){let t=(0,J.findNonDisabledListIndex)(e,{disabledIndices:f});(0,J.isIndexOutOfListBounds)(e,t)||w(t)}},[f,u,C,E,w]);let S=(0,o.useStableCallback)((e,t,i)=>a?a(e,t,i,E):i),T=(0,o.useStableCallback)(e=>{let l=A?Y.COMPOSITE_KEYS:Y.ARROW_KEYS;if(!l.has(e.key)||function(e,t){for(let i of Y.MODIFIER_KEYS.values())if(!t.includes(i)&&e.getModifierState(i))return!0;return!1}(e,g)||!b.current)return;let n="rtl"===s,o=n?Y.ARROW_LEFT:Y.ARROW_RIGHT,u={horizontal:o,vertical:Y.ARROW_DOWN,both:o}[i],d=n?Y.ARROW_RIGHT:Y.ARROW_LEFT,c={horizontal:d,vertical:Y.ARROW_UP,both:d}[i],p=(0,R.getTarget)(e.nativeEvent);if(null!=p&&(0,Y.isNativeInput)(p)&&!(0,Q.isElementDisabled)(p)){let t=p.selectionStart,i=p.selectionEnd,r=p.value??"";if(null==t||e.shiftKey||t!==i||e.key!==c&&t0)return}let m=C,v=(0,J.getMinListIndex)(E,f),_=(0,J.getMaxListIndex)(E,f);null!=r&&(m=r({disabledIndices:f,elementsRef:E,event:e,highlightedIndex:C,loopFocus:t,maxIndex:_,minIndex:v,onLoop:S,orientation:i,rtl:n}));let I={horizontal:[o],vertical:[Y.ARROW_DOWN],both:[o,Y.ARROW_DOWN]}[i],O={horizontal:[d],vertical:[Y.ARROW_UP],both:[d,Y.ARROW_UP]}[i],T=x?l:({horizontal:A?Y.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:Y.HORIZONTAL_KEYS,vertical:A?Y.VERTICAL_KEYS_WITH_EXTRA_KEYS:Y.VERTICAL_KEYS,both:l})[i];A&&(e.key===Y.HOME?m=v:e.key===Y.END&&(m=_)),m===C&&(I.includes(e.key)||O.includes(e.key))&&(t&&m===_&&I.includes(e.key)?(m=v,a&&(m=a(e,C,m,E))):t&&m===v&&O.includes(e.key)?(m=_,a&&(m=a(e,C,m,E))):m=(0,J.findNonDisabledListIndex)(E.current,{startingIndex:m,decrement:O.includes(e.key),disabledIndices:f})),m===C||(0,J.isIndexOutOfListBounds)(E.current,m)||(h&&e.stopPropagation(),T.has(e.key)&&e.preventDefault(),w(m,!0),queueMicrotask(()=>{E.current[m]?.focus()}))});return{props:{ref:v,onFocus(e){let t=b.current,i=(0,R.getTarget)(e.nativeEvent);t&&null!=i&&(0,Y.isNativeInput)(i)&&i.setSelectionRange(0,i.value.length??0)},onKeyDown:T},highlightedIndex:C,onHighlightedIndexChange:w,elementsRef:E,disabledIndices:f,onMapChange:O,relayKeyboardEvent:T}}({grid:m,loopFocus:x,onLoop:b,orientation:p,highlightedIndex:f,onHighlightedIndexChange:g,rootRef:C,stopEventPropagation:_,enableHomeAndEndKeys:v,direction:(0,$.useDirection)(),disabledIndices:w,modifierKeys:O}),B=(0,u.useRenderElement)(T,e,{state:A,ref:s,props:[N,...c,y],stateAttributesMapping:h}),j=l.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:M,highlightItemOnHover:S,relayKeyboardEvent:D}),[L,M,S,D]);return(0,a.jsx)(Z.CompositeRootContext.Provider,{value:j,children:(0,a.jsx)(d.CompositeList,{elementsRef:U,onMapChange:e=>{E?.(e),H(e)},children:B})})}e.s(["CompositeRoot",0,ee],405934);let et=l.forwardRef(function(e,t){let{activateOnFocus:i=!1,className:r,loopFocus:s=!0,render:u,style:d,...c}=e,{onValueChange:A,orientation:f,value:p,setTabMap:m,tabActivationDirection:x}=h(),[b,v]=l.useState(0),[E,_]=l.useState(null),I=l.useRef(new Set),C=l.useRef(new Set),O=l.useRef(null);(0,n.useIsoLayoutEffect)(()=>{if("u"{I.current.forEach(e=>{e()})});return O.current=e,E&&e.observe(E),C.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),O.current=null}},[E]);let R=(0,o.useStableCallback)(e=>(I.current.add(e),()=>{I.current.delete(e)})),S=(0,o.useStableCallback)(e=>(C.current.add(e),O.current?.observe(e),()=>{C.current.delete(e),O.current?.unobserve(e)})),T=(0,o.useStableCallback)((e,t)=>{e!==p&&A(e,t)}),y=l.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:b,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:S,onTabActivation:T,setHighlightedTabIndex:v,tabsListElement:E}),[i,b,R,S,T,v,E]);return(0,a.jsx)(w.Provider,{value:y,children:(0,a.jsx)(ee,{render:u,className:r,style:d,state:{orientation:f,tabActivationDirection:x},refs:[t,_],props:[{"aria-orientation":"vertical"===f?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:g,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:s,orientation:f,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:k.EMPTY_ARRAY})})});e.s(["Indicator",0,B,"List",0,et,"Panel",0,F,"Root",0,x,"Tab",0,S],69281);var ei=e.i(69281),ei=ei,er=e.i(115504);let ea=(0,er.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...i}){return(0,a.jsx)(ei.Root,{"data-slot":"tabs","data-orientation":t,className:(0,er.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...i})},"TabsContent",0,function({className:e,...t}){return(0,a.jsx)(ei.Panel,{"data-slot":"tabs-content",className:(0,er.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...i}){return(0,a.jsx)(ei.List,{"data-slot":"tabs-list","data-variant":t,className:(0,er.cn)(ea({variant:t}),e),...i})},"TabsTrigger",0,function({className:e,...t}){return(0,a.jsx)(ei.Tab,{"data-slot":"tabs-trigger",className:(0,er.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},195116,e=>{"use strict";let t=(0,e.i(475254).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,t],195116)},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},292335,122520,165615,779129,280024,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",OAUTH2_TOKEN_EXCHANGE:"oauth2_token_exchange",AWS_SIGV4:"aws_sigv4",TRUE_PASSTHROUGH:"true_passthrough",OAUTH_DELEGATE:"oauth_delegate"},i=e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE,r={INTERACTIVE:"interactive",M2M:"m2m"},a=e=>{let t=e.credentials??{};return JSON.stringify({url:"string"==typeof e.url?e.url:null,spec_path:"string"==typeof e.spec_path?e.spec_path:null,auth_type:e.auth_type??null,oauth_flow_type:e.oauth_flow_type??null,client_id:t.client_id??null,client_secret:t.client_secret??null,scopes:t.scopes??null,upstream_resource:t.upstream_resource??null,issuer:e.issuer??null,authorization_url:e.authorization_url??null,token_url:e.token_url??null,registration_url:e.registration_url??null})},l=["client_id","client_secret"],s=["upstream_resource"],n=["access_token","refresh_token","expires_in","scope"],o=(e,t)=>{if(!e)return;let i=Object.fromEntries(t.filter(t=>"string"==typeof e[t]&&""!==e[t]).map(t=>[t,e[t]]));return Object.keys(i).length>0?i:void 0},u="client_credentials",d={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};e.s(["ADMIN_CONFIG_CREDENTIAL_KEYS",0,s,"AUTH_TYPE",0,t,"CLEARED_ON_INVALIDATION",0,["credentials"],"MCP_OAUTH2_FLOW_INTERACTIVE",0,"authorization_code","MCP_OAUTH2_FLOW_M2M",0,u,"OAUTH_FLOW",0,r,"TRANSPORT",0,d,"credentialAuthClass",0,e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE?"client_forwarded":e??null,"gatewayMintsClientFor",0,e=>e.auth_type===t.TRUE_PASSTHROUGH||e.auth_type===t.OAUTH_DELEGATE&&!e.dcr_bridge,"getMcpOAuthMode",0,function(e){return e.auth_type===t.OAUTH2_TOKEN_EXCHANGE?"token_exchange":e.auth_type!==t.OAUTH2?null:e.oauth2_flow===u?"m2m":e.delegate_auth_to_upstream?"passthrough":"authorization_code"},"getOAuthAuthorizationIdentity",0,a,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?d.SSE:t&&e!==d.STDIO?d.OPENAPI:e,"isClientForwardedTokenMode",0,i,"isHeldOAuthTokenStale",0,(e,t)=>void 0!==t&&a(e)!==t,"isUnsupportedOnGatewayConnect",0,e=>i(e)||e===t.OAUTH2_TOKEN_EXCHANGE,"oauth2FlowToFormValue",0,function(e){return e===u?r.M2M:e?r.INTERACTIVE:void 0},"preservedAdminCredentials",0,e=>o(e,[...l,...s]),"preservedDeclaredAppCredentials",0,e=>o(e,l),"withoutMintedTokenCredentials",0,e=>{if(!e)return;let t=Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)));return Object.keys(t).length>0?t:void 0}],292335);var c=e.i(271645),A=e.i(602869),h=e.i(727749);function f(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["extractErrorMessage",0,f],122520);let g=e=>{let t=new Uint8Array(e),i="";return t.forEach(e=>i+=String.fromCharCode(e)),btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},p=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),g(e.buffer)},m=async e=>{let t=new TextEncoder().encode(e);return g(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,m,"generateCodeVerifier",0,p],165615);var x=e.i(434166);let b=()=>{{let e=window.location.pathname||"",t=e.indexOf("/ui"),i=t>=0?e.slice(0,t+3).replace(/\/+$/,""):"";return`${window.location.origin}${i}/mcp/oauth/callback`}},v=(...e)=>{e.forEach(e=>{try{window.sessionStorage.removeItem(e)}catch(e){}})};e.s(["TOOLS_OAUTH_UI_STATE_KEY",0,"litellm-mcp-oauth-tools-state","buildCallbackUrl",0,b,"clearStorage",0,v],779129);let E="litellm-user-mcp-oauth-flow-state",_="litellm-user-mcp-oauth-result",I=(e,t)=>{(0,x.setSecureItem)(e,t)},C=e=>(0,x.getSecureItem)(e);e.s(["useUserMcpOAuthFlow",0,({accessToken:e,serverId:t,serverAlias:i,scopes:r,clientId:a,onSuccess:l})=>{let[s,n]=(0,c.useState)("idle"),[o,u]=(0,c.useState)(null),d=(0,c.useRef)(!1),g=(0,c.useCallback)(async()=>{try{let l;n("authorizing"),u(null);let s=a??void 0;if(!s)try{let r=await (0,A.registerMcpOAuthClient)(e,t,{client_name:i||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"});s=r?.client_id,l=r?.client_secret}catch(e){}let o=p(),d=await m(o),c=crypto.randomUUID(),h=b(),f=r?.filter(e=>e.trim()).join(" "),g=(0,A.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:s,redirectUri:h,state:c,codeChallenge:d,scope:f}),x={state:c,codeVerifier:o,serverId:t,redirectUri:h,clientId:s,clientSecret:l,scopes:r};I(E,JSON.stringify(x));let v=new URL(window.location.href);v.searchParams.set("mcpOauthReturn","apps"),I("litellm-mcp-oauth-return-url",v.toString()),window.location.href=g}catch(t){let e=f(t);u(e),n("error"),h.default.error(e)}},[e,t,i,r,a]),x=(0,c.useCallback)(async()=>{if(d.current)return;let i=C(_);if(!i)return;let r=C(E);if(!r)return;try{let e=JSON.parse(r);if(e.serverId&&e.serverId!==t)return}catch(e){}d.current=!0,v(_);let a=null,s=null;try{a=JSON.parse(i);let e=C(E);s=e?JSON.parse(e):null}catch(e){u("Failed to resume OAuth flow. Please retry."),n("error"),d.current=!1,v(E);return}try{if(!s?.state||!s.codeVerifier||!s.serverId)throw Error("OAuth session state was lost. Please retry.");if(!a?.state||a.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(a.error)throw Error(a.error_description||a.error);if(!a.code)throw Error("Authorization code missing in callback.");n("exchanging");let t=await (0,A.exchangeMcpOAuthToken)({serverId:s.serverId,code:a.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri,accessToken:e});await (0,A.storeMCPOAuthUserCredential)(e,s.serverId,{access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,scopes:s.scopes}),n("success"),u(null),h.default.success("Connected successfully"),l()}catch(t){let e=f(t);u(e),n("error"),h.default.error(e)}finally{v(E),setTimeout(()=>{d.current=!1},1e3)}},[e,t,l]);return(0,c.useEffect)(()=>{x()},[x]),{startOAuthFlow:g,status:s,error:o}}],280024)},269638,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",0,t],269638)},21040,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(266027),a=e.i(555436),l=e.i(871689),s=e.i(463059),n=e.i(195116),o=e.i(269638),u=e.i(531278),d=e.i(519455),c=e.i(793479),A=e.i(302747),h=e.i(677572),f=e.i(602869),g=e.i(292335),p=e.i(174553),m=e.i(888259),x=e.i(280024);let b=({server:e,accessToken:r,onConnect:a,variant:l="badge"})=>{let s=e.server_name??e.alias??e.server_id,{startOAuthFlow:n,status:o}=(0,x.useUserMcpOAuthFlow)({accessToken:r,serverId:e.server_id,serverAlias:s,onSuccess:(0,i.useCallback)(()=>a(e.server_id),[a,e.server_id])}),c="authorizing"===o||"exchanging"===o;return"button"===l?(0,t.jsxs)(d.Button,{onClick:n,disabled:c,className:"font-semibold h-[38px] min-w-[110px]",children:[c&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),c?"Connecting…":"Connect"]}):(0,t.jsx)("span",{onClick:e=>{e.stopPropagation(),c||n()},className:`text-[11px] font-semibold rounded-md px-2 py-0.5 shrink-0 whitespace-nowrap ${c?"text-muted-foreground bg-muted cursor-default":"text-primary-foreground bg-primary cursor-pointer hover:bg-primary/90"}`,children:c?"Connecting…":"Connect"})},v=["#1677ff","#52c41a","#fa8c16","#eb2f96","#722ed1","#13c2c2","#fa541c","#2f54eb","#a0d911","#faad14"];function E(e){let t=0;for(let i=0;i{let[I,C]=(0,i.useState)([]),[w,O]=(0,i.useState)(!0),[R,S]=(0,i.useState)(""),[T,y]=(0,i.useState)("all"),[k,N]=(0,i.useState)(new Set),[L,M]=(0,i.useState)(null),[U,H]=(0,i.useState)({}),[D,B]=(0,i.useState)(!1),[j,P]=(0,i.useState)(new Set),[W,z]=(0,i.useState)(new Set),q=(0,i.useRef)([]);(0,i.useEffect)(()=>{q.current=I},[I]);let G=(0,i.useRef)(x);(0,i.useEffect)(()=>{G.current=x},[x]);let V=(0,i.useRef)(v);(0,i.useEffect)(()=>{V.current=v},[v]);let F=e=>e.server_name??e.alias??e.server_id,Q=(0,i.useRef)(!1),K=(0,i.useCallback)(async t=>{try{let i=await (0,f.listMCPTools)(e,t.server_id);if(Q.current)return;let r=Array.isArray(i?.tools)?i.tools:[];H(e=>({...e,[F(t)]:r.length}))}catch{}},[e]),Y=(0,i.useCallback)(async t=>{try{let i=await (0,f.getMCPOAuthUserCredentialStatus)(e,t.server_id);if(Q.current)return;i.has_credential&&!i.is_expired&&P(e=>new Set(e).add(t.server_id))}catch{}finally{Q.current||z(e=>{let i=new Set(e);return i.delete(t.server_id),i})}},[e]);(0,i.useEffect)(()=>(Q.current=!1,(0,f.fetchMCPServers)(e).then(async e=>{if(Q.current)return;let t=Array.isArray(e)?e:e?.data??[],i=t.filter(e=>e.auth_type===g.AUTH_TYPE.OAUTH2);for(let e of(C(t),z(new Set(i.map(e=>e.server_id))),O(!1),i.forEach(e=>Y(e)),B(!0),Array.from({length:Math.ceil(t.length/5)},(e,i)=>t.slice(5*i,(i+1)*5)))){if(Q.current)return;await Promise.allSettled(e.map(e=>K(e)))}Q.current||B(!1)}).catch(()=>{Q.current||(C([]),O(!1))}),()=>{Q.current=!0}),[e,K,Y]),(0,i.useEffect)(()=>{if(0===j.size)return;let e=q.current.filter(e=>j.has(e.server_id)&&!G.current.includes(F(e))).map(F);e.length>0&&V.current([...G.current,...e])},[j]);let J=async(t,i,r)=>{if(!i){v(x.filter(e=>e!==t)),r&&P(e=>{let t=new Set(e);return t.delete(r),t});return}N(e=>new Set(e).add(t));try{let i=r??t,a=await (0,f.listMCPTools)(e,i);if(a?.error)return void m.default.warning(`Could not load tools for ${t}`);G.current.includes(t)||v([...G.current,t])}catch{m.default.warning(`Could not load tools for ${t}`)}finally{N(e=>{let i=new Set(e);return i.delete(t),i})}},{data:X,isLoading:Z}=(0,r.useQuery)({queryKey:["mcp-apps-panel-detail-tools",L?.server_id],queryFn:()=>(0,f.listMCPTools)(e,L.server_id),enabled:!!L}),$=Array.isArray(X?.tools)?X.tools:[],ee=I.filter(e=>{let t=F(e),i=!R.trim()||t.toLowerCase().includes(R.toLowerCase())||(e.description??"").toLowerCase().includes(R.toLowerCase()),r="all"===T||x.includes(t);return i&&r}),et=I.filter(e=>x.includes(F(e))).length,ei=Object.values(U).reduce((e,t)=>e+t,0);if(L){let i=F(L),r=x.includes(i),a=k.has(i),s=E(i);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)(d.Button,{variant:"ghost",size:"sm",onClick:()=>M(null),className:"-ml-3 mb-5 gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(l.ArrowLeft,{className:"h-3 w-3"}),"Back"]}),(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-7",children:[L.mcp_info?.logo_url?(0,t.jsx)(p.Logo,{src:L.mcp_info.logo_url,label:i,className:"w-16 h-16 rounded-2xl object-contain shrink-0 bg-muted/50"}):(0,t.jsx)("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center text-white font-bold text-[28px] shrink-0",style:{background:s},children:i.charAt(0).toUpperCase()}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"m-0 mb-1 text-[22px] font-bold text-foreground",children:i}),(0,t.jsx)("p",{className:"m-0 text-sm text-muted-foreground",children:L.description??"MCP server"})]}),L.auth_type===g.AUTH_TYPE.OAUTH2?j.has(L.server_id)?(0,t.jsx)(d.Button,{variant:"destructive",onClick:async()=>{try{await (0,f.deleteMCPOAuthUserCredential)(e,L.server_id)}catch(e){}P(e=>{let t=new Set(e);return t.delete(L.server_id),t}),V.current(G.current.filter(e=>e!==i))},className:"font-semibold h-[38px] min-w-[110px]",children:"Disconnect"}):(0,t.jsx)(b,{server:L,accessToken:e,onConnect:e=>{P(t=>new Set(t).add(e))},variant:"button"}):(0,t.jsxs)(d.Button,{variant:r?"outline":"default",disabled:a,onClick:()=>J(i,!r,L.server_id),className:"font-semibold h-[38px] min-w-[110px]",children:[a&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),r?"Disconnect":"Connect"]})]}),(0,t.jsx)("h3",{className:"m-0 mb-3 text-[15px] font-semibold text-foreground",children:"Information"}),(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden mb-7",children:[["Server ID",L.server_id],["Transport",(0,g.handleTransport)(L.transport,L.spec_path)],["Status",r?"Connected":"Not connected"]].filter(([,e])=>e).map(([e,i],r,a)=>(0,t.jsxs)("div",{className:`flex px-4 py-3 text-[13px] ${r(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30 flex flex-col gap-1.5",children:[(0,t.jsx)(A.Skeleton,{className:"h-3.5 w-1/3"}),(0,t.jsx)(A.Skeleton,{className:"h-3 w-2/3"})]},i))}):0===$.length?(0,t.jsx)("div",{className:"text-muted-foreground text-[13px] py-2",children:"No tools available"}):(0,t.jsx)("div",{className:"flex flex-col gap-2",children:$.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${e.description?"mb-1":""}`,children:[(0,t.jsx)(n.Wrench,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold text-foreground font-mono",children:e.name})]}),e.description&&(0,t.jsx)("p",{className:"m-0 text-xs text-muted-foreground pl-[21px]",children:e.description})]},e.name))})]})}return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("h2",{className:"m-0 text-lg font-semibold text-foreground",children:"MCP Servers"}),!_&&(0,t.jsx)("span",{className:"text-[10px] font-semibold text-primary bg-primary/10 rounded px-1.5 py-0.5 uppercase tracking-wider",children:"Beta"})]}),_?(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Click a server to see its tools and connect"}):(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Browse tools, authenticate once, use in chat"}),D?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}),"Loading tools..."]}):ei>0?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(n.Wrench,{className:"h-3 w-3"}),ei," tool",1!==ei?"s":""," available"]}):null]})]}),(0,t.jsxs)("div",{className:"relative w-[220px]",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)(c.Input,{placeholder:"Search servers...",value:R,onChange:e=>S(e.target.value),className:"pl-9 text-[13px] h-9"})]})]}),(0,t.jsx)(h.Tabs,{value:T,onValueChange:e=>y(e),className:"mb-4",children:(0,t.jsxs)(h.TabsList,{variant:"line",className:"border-b rounded-none w-full justify-start h-auto p-0",children:[(0,t.jsx)(h.TabsTrigger,{value:"all",className:"rounded-none px-4 py-2 text-[13px]",children:"All"}),(0,t.jsxs)(h.TabsTrigger,{value:"connected",className:"rounded-none px-4 py-2 text-[13px]",children:["Connected",et>0?` (${et})`:""]})]})}),w?(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:Array.from({length:6},(e,i)=>(0,t.jsxs)("div",{className:`flex items-center gap-3 p-4 ${i%2==0?"border-r":""} ${i<4?"border-b":""}`,children:[(0,t.jsx)(A.Skeleton,{className:"w-[38px] h-[38px] rounded-xl shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1.5",children:[(0,t.jsx)(A.Skeleton,{className:"h-3.5 w-2/3"}),(0,t.jsx)(A.Skeleton,{className:"h-3 w-1/2"})]})]},i))}):0===ee.length?(0,t.jsx)("div",{className:"text-center text-muted-foreground text-[13px] py-12 px-3",children:0===I.length?"No MCP servers configured. Add servers in Tools -> MCP Servers.":"connected"===T?"No servers connected yet.":"No servers match your search."}):(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:ee.map((i,r)=>{var a;let l=F(i),u=E(l),d=U[l],c=!!_&&(0,g.isUnsupportedOnGatewayConnect)(i.auth_type);return(0,t.jsxs)("div",{onClick:()=>M(i),className:`flex items-center gap-3 p-4 bg-card cursor-pointer transition-colors hover:bg-accent/30 min-w-0 ${r%2==0?"border-r":""} ${Math.floor(r/2)0?(0,t.jsxs)("span",{className:"shrink-0 flex items-center gap-1 text-muted-foreground",children:["· ",(0,t.jsx)(n.Wrench,{className:"h-2.5 w-2.5"})," ",d]}):null:D?(0,t.jsx)(A.Skeleton,{className:"w-7 h-3 shrink-0"}):null]})]}),(a=i,_&&(0,g.isUnsupportedOnGatewayConnect)(a.auth_type)?(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 whitespace-nowrap",children:"Not supported on this connection"}):a.auth_type===g.AUTH_TYPE.OAUTH2?j.has(a.server_id)?(0,t.jsx)(o.CheckCircle,{className:"h-3.5 w-3.5 text-emerald-600 shrink-0"}):W.has(a.server_id)?(0,t.jsx)(A.Skeleton,{className:"h-6 w-16 shrink-0 rounded-md"}):(0,t.jsx)(b,{server:a,accessToken:e,onConnect:e=>P(t=>new Set(t).add(e)),variant:"badge"}):x.includes(F(a))?(0,t.jsx)("span",{className:"w-[7px] h-[7px] rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}):null),(0,t.jsx)(s.ChevronRight,{className:"h-3 w-3 text-muted-foreground/40 shrink-0"})]},i.server_id)})})]})}])},178971,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(618566),a=e.i(135214),l=e.i(21040);function s(){let{accessToken:e}=(0,a.default)(),[s,n]=(0,i.useState)([]),o=(0,r.useRouter)(),u=(0,r.useSearchParams)().get("mcpOauthReturn");return(0,i.useEffect)(()=>{if(u){let e=new URL(window.location.href);e.searchParams.delete("mcpOauthReturn"),o.replace(e.pathname+e.search)}},[u,o]),(0,t.jsx)("div",{className:"mx-auto w-full max-w-5xl px-8 py-8",children:(0,t.jsx)(l.default,{accessToken:e??"",selectedServers:s,onChange:n})})}e.s(["default",0,function(){return(0,t.jsx)(i.Suspense,{children:(0,t.jsx)(s,{})})}])}]); \ No newline at end of file +(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,302747,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(115504);let a=i.forwardRef(({className:e,...i},a)=>(0,t.jsx)("div",{ref:a,"data-slot":"skeleton",className:(0,r.cn)("animate-pulse rounded-md bg-accent",e),...i}));a.displayName="Skeleton",e.s(["Skeleton",0,a])},463059,246349,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["default",0,t],246349),e.s(["ChevronRight",0,t],463059)},555436,54943,e=>{"use strict";let t=(0,e.i(475254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["default",0,t],54943),e.s(["Search",0,t],555436)},913383,e=>{e.q("/litellm-asset-prefix/_next/static/media/a2a_agent.14el5-6dflh1h.png")},238564,e=>{e.q("/litellm-asset-prefix/_next/static/media/ai21.0m_u-tih8nm0v.svg")},941533,e=>{e.q("/litellm-asset-prefix/_next/static/media/aiml_api.1dq6dbpwklhlg.svg")},994636,e=>{e.q("/litellm-asset-prefix/_next/static/media/anthropic.3s95kgy8jpc64.svg")},824770,e=>{e.q("/litellm-asset-prefix/_next/static/media/assemblyai_small.0w_dslsra91uw.png")},920076,e=>{e.q("/litellm-asset-prefix/_next/static/media/baseten.41k2lnwp3c5g9.svg")},519380,e=>{e.q("/litellm-asset-prefix/_next/static/media/bedrock.2vhamxr8q6y4o.svg")},96889,e=>{e.q("/litellm-asset-prefix/_next/static/media/cerebras.1ur1xyfqk9ncz.svg")},348026,e=>{e.q("/litellm-asset-prefix/_next/static/media/cloudflare.2n1spdq7u5yki.svg")},727148,e=>{e.q("/litellm-asset-prefix/_next/static/media/cohere.22i3i2e449j5i.svg")},411703,e=>{e.q("/litellm-asset-prefix/_next/static/media/cometapi.3w0xficbg3dkk.svg")},922480,e=>{e.q("/litellm-asset-prefix/_next/static/media/cursor.1q1ev-_5l7exg.svg")},769490,e=>{e.q("/litellm-asset-prefix/_next/static/media/databricks.2hiet9qlqzn-g.svg")},829789,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepgram.3-krp20p_xed3.png")},41730,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepinfra.3lr_lsr7mhui6.png")},662576,e=>{e.q("/litellm-asset-prefix/_next/static/media/deepseek.3n4cu0x32i_7w.svg")},987202,e=>{e.q("/litellm-asset-prefix/_next/static/media/elevenlabs.2982m_dk2-h_y.png")},953265,e=>{e.q("/litellm-asset-prefix/_next/static/media/fal_ai.3rahrirki8sby.jpg")},346512,e=>{e.q("/litellm-asset-prefix/_next/static/media/featherless.3hmlef3fhc0h5.svg")},84416,e=>{e.q("/litellm-asset-prefix/_next/static/media/fireworks.3t1b6p8edeqyo.svg")},104602,e=>{e.q("/litellm-asset-prefix/_next/static/media/friendli.0ymiswh6l35bq.svg")},888193,e=>{e.q("/litellm-asset-prefix/_next/static/media/github_copilot.3k-8jyadoaq2u.svg")},946013,e=>{e.q("/litellm-asset-prefix/_next/static/media/google.3y8ypywwtqob_.svg")},447500,e=>{e.q("/litellm-asset-prefix/_next/static/media/groq.20csmqzsusp1k.svg")},270039,e=>{e.q("/litellm-asset-prefix/_next/static/media/huggingface.1-07ypt9ii_-p.svg")},227733,e=>{e.q("/litellm-asset-prefix/_next/static/media/hyperbolic.3le20v59sebn8.svg")},823929,e=>{e.q("/litellm-asset-prefix/_next/static/media/infinity.0s9s12bl4lccx.png")},333845,e=>{e.q("/litellm-asset-prefix/_next/static/media/jina.0ukab8o-3-5m_.png")},813878,e=>{e.q("/litellm-asset-prefix/_next/static/media/lambda.26_vz7cmyuodo.svg")},767788,e=>{e.q("/litellm-asset-prefix/_next/static/media/lmstudio.35s3-83mlhcms.svg")},808630,e=>{e.q("/litellm-asset-prefix/_next/static/media/meta_llama.1kxk24vwsem49.svg")},641266,e=>{e.q("/litellm-asset-prefix/_next/static/media/microsoft_azure.3626-7zx7wf09.svg")},468732,e=>{e.q("/litellm-asset-prefix/_next/static/media/minimax.2mfkkqc-lnsen.svg")},610503,e=>{e.q("/litellm-asset-prefix/_next/static/media/mistral.0n8jv_67hgq4h.svg")},438969,e=>{e.q("/litellm-asset-prefix/_next/static/media/moonshot.3__i9wvf37ksm.svg")},852459,e=>{e.q("/litellm-asset-prefix/_next/static/media/morph.2av06eo-t0-ve.svg")},494696,e=>{e.q("/litellm-asset-prefix/_next/static/media/nebius.2ipf7rmjccira.svg")},148973,e=>{e.q("/litellm-asset-prefix/_next/static/media/novita.0_nzmm_rl4lrf.svg")},570036,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_nim.1fz-5ugf_um0v.svg")},151170,e=>{e.q("/litellm-asset-prefix/_next/static/media/nvidia_triton.1aotoxig_m2w1.png")},862330,e=>{e.q("/litellm-asset-prefix/_next/static/media/ollama.144cif369atc5.svg")},956529,e=>{e.q("/litellm-asset-prefix/_next/static/media/openai_small.3rj8nedgjpevh.svg")},788158,e=>{e.q("/litellm-asset-prefix/_next/static/media/openrouter.1xk7748-_jixf.svg")},350567,e=>{e.q("/litellm-asset-prefix/_next/static/media/oracle.43kws59xxr8ig.svg")},822797,e=>{e.q("/litellm-asset-prefix/_next/static/media/perplexity-ai.2do8hoc8tw__0.svg")},840911,e=>{e.q("/litellm-asset-prefix/_next/static/media/qwen.0a49x9i08_0gz.png")},445735,e=>{e.q("/litellm-asset-prefix/_next/static/media/recraft.2f4cv-c9ad-mo.svg")},635202,e=>{e.q("/litellm-asset-prefix/_next/static/media/replicate.445bidyix2tyh.svg")},669161,e=>{e.q("/litellm-asset-prefix/_next/static/media/runway.2zzwye1fddnnn.png")},159508,e=>{e.q("/litellm-asset-prefix/_next/static/media/sambanova.1vcyu0faw1x8h.svg")},544025,e=>{e.q("/litellm-asset-prefix/_next/static/media/sap.1367hgge0s0xl.png")},100588,e=>{e.q("/litellm-asset-prefix/_next/static/media/snowflake.2_p8qqpi0r3lr.svg")},183804,e=>{e.q("/litellm-asset-prefix/_next/static/media/soniox.3nhjmssy7ybh7.svg")},865502,e=>{e.q("/litellm-asset-prefix/_next/static/media/togetherai.1wk-mouzgw5ho.svg")},96912,e=>{e.q("/litellm-asset-prefix/_next/static/media/topaz.3rjp3zvx4eags.svg")},395073,e=>{e.q("/litellm-asset-prefix/_next/static/media/v0.15trd3tb1ulop.svg")},407829,e=>{e.q("/litellm-asset-prefix/_next/static/media/vercel.1mvnwxofolt8y.svg")},846077,e=>{e.q("/litellm-asset-prefix/_next/static/media/vllm.3_gqby46r7s3x.png")},914861,e=>{e.q("/litellm-asset-prefix/_next/static/media/volcengine.23ly9ik_qc138.png")},285328,e=>{e.q("/litellm-asset-prefix/_next/static/media/voyage.0krq6ew-yr8dk.webp")},779278,e=>{e.q("/litellm-asset-prefix/_next/static/media/watsonx.19rrg39yvhpk8.svg")},325532,e=>{e.q("/litellm-asset-prefix/_next/static/media/xai.2kc3gjiopn9om.svg")},288330,e=>{e.q("/litellm-asset-prefix/_next/static/media/xinference.063cy_ievvy5u.svg")},555987,938137,301035,470524,901539,434339,857152,e=>{"use strict";var t=e.i(221688),i=e.i(950643);let r=/^(https?:|data:|blob:|\/\/)/i;e.s(["resolveLogoSrc",0,(e,a=t.serverRootPath)=>{let l;if(!e)return;if(r.test(e)||e.includes("/_next/static/"))return e;let s=(0,i.normalizeRootPath)(a);return s&&(e===s||e.startsWith(`${s}/`))?e:(l=(0,i.normalizeRootPath)(a),`${l}${e.startsWith("/")?e:`/${e}`}`)}],555987);let a={src:e.i(913383).default,width:661,height:768,blurWidth:7,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAICAYAAAA1BOUGAAAAwUlEQVR42h2OvQpGcByFf5dK7oBJFoooJDaDZFA+BoVkNBikGJSUJINyGeft/Q+nznDO00O6rsM0Tfi+z6JpGizLgqqqIEVR0HUdqqqCbdus930PWZZBy7IgCAKkaYpxHJEkCaIowjAMoGmaEMcx8jxHURRo2xZ1XaMsS9B5nrjvG+u6Yp5nfN+H53nwJ9JxHMiyDO/7Mtx1Xey1bRvIcRzwPI993xGGIZqmgSAIMAwDJEkSPM9jphzHsYHruhBFET+hn6S8pf6D7AAAAABJRU5ErkJggg=="};e.s(["default",0,a],938137);let l={src:e.i(238564).default,width:103,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,l],301035);let s={src:e.i(941533).default,width:115,height:24,blurWidth:0,blurHeight:0};e.s(["default",0,s],470524);let n={src:e.i(994636).default,width:46,height:46,blurWidth:0,blurHeight:0};e.s(["default",0,n],901539);let o={src:e.i(824770).default,width:28,height:28,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAlElEQVR42m3OoQqDUBQGYF9mwzLbFiZsMNgwuGa4YFgYLC6PgcXuA5gFzdcgFkExGr33ogZRNIr6CAoKKgo/nAMfh/NTu3u4GWoY+0fIAsIC3C8LuIiRH9S2W5wBXsBPKaHTGGb+lZMJmCe2vPYjZe9/bMDswKMRbq9Yg9VRICcBq3p6FckINIf6o6ECwyOam/1YpwPFUFu+Lt2F2QAAAABJRU5ErkJggg=="};e.s(["default",0,o],434339);let u={src:e.i(920076).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,u],857152)},922158,e=>{"use strict";let t={src:e.i(519380).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},896614,9774,503119,272896,144923,562171,533881,837957,227247,708889,859320,586455,921117,21296,579967,e=>{"use strict";let t={src:e.i(96889).default,width:800,height:600,blurWidth:0,blurHeight:0};e.s(["default",0,t],896614);let i={src:e.i(348026).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],9774);let r={src:e.i(727148).default,width:75,height:75,blurWidth:0,blurHeight:0};e.s(["default",0,r],503119);let a={src:e.i(411703).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],272896);let l={src:e.i(922480).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],144923);let s={src:e.i(769490).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],562171);let n={src:e.i(829789).default,width:32,height:32,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAzklEQVR42k3PPWuDcBDHccUiiikYSwqhg+IkuKUpOLqK4OYrcBZcFCcH352mgy/Ch9mxEPg2+s+Q4W65zx33kyRJQpZlFOUNTdM4HN45Hi1Op0/O56+7tAHbtqmqiqZpKIqCy+Uby/rYkABhGLKuK+M4siwLt9sv1+sPpmkKEAQBwzCQpilxHDNNE3VdYxiGALqu47oujuMQRdEOyrJEVVUBFEUhSRK6rmOeZ/q+x/f97XkBHqfIsoy2bcnzHM/z9mSP2Q62dt/0c+O1/v4BYRxu3LgaR7UAAAAASUVORK5CYII="};e.s(["default",0,n],533881);let o={src:e.i(41730).default,width:225,height:225,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAfklEQVR42nVOvQqDMBjM+7+RpbQ0Ji2NQhwdzGIwCMZFiCAa9STqIPhxw/3A3UeW41w/AKck87w0tqvbngkFgEDCJOPoKc+fovxKzaUGiXkOk0zei1TRzDxYEbHiIw0kzD2Aji5BqHolW9Uv0+9U01AVxivr4r8CjHX7+N27K5WIrP56XsFTAAAAAElFTkSuQmCC"};e.s(["default",0,o],837957);let u={src:e.i(662576).default,width:293,height:215,blurWidth:0,blurHeight:0};e.s(["default",0,u],227247);let c={src:e.i(987202).default,width:1563,height:1563,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA5ElEQVR42h2PPwtBURjGj3wCk93sC1iUCYXFIlGSMjC4QiiTBSE3Ge5M3e0uPoJFBhOTP8NNukXduFL3uJ1Xzz11znCe93me38uitQSL11Pe8rAanKpycbSa5Ar9UiAmJT3QXHGwHGfvj/vJcRzOfz/7fLvsW4tuJFZLehicEIUQpOs6GYZBOIfrcZPp5f0MsXDatk2yLJOqqu6A9f2YjXk7zNCJWM45KYpCmqa5A6/P+ynNGiEGIHSiwjRNsiyLBAmxPezW6U7Gx0ALIHQiFk6I5WEl6G6BB7QAQqc0a4bgxD/uH4FYoVec8m3dAAAAAElFTkSuQmCC"};e.s(["default",0,c],708889);let d={src:e.i(953265).default,width:400,height:400,blurWidth:8,blurHeight:8,blurDataURL:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAAQABAAD/wAARCAAIAAgDAREAAhEBAxEB/9sAQwAKBwcIBwYKCAgICwoKCw4YEA4NDQ4dFRYRGCMfJSQiHyIhJis3LyYpNCkhIjBBMTQ5Oz4+PiUuRElDPEg3PT47/9sAQwEKCwsODQ4cEBAcOygiKDs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDtP9N/tL+PO/8A7ZeV/wDFUj6L917L+r3/AMj/2Q=="};e.s(["default",0,d],859320);let A={src:e.i(346512).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,A],586455);let h={src:e.i(84416).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,h],921117);let f={src:e.i(104602).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,f],21296);let g={src:e.i(888193).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,g],579967)},336712,e=>{"use strict";let t={src:e.i(946013).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,t])},770752,383963,862493,902860,901372,206258,176228,728685,e=>{"use strict";let t={src:e.i(447500).default,width:26,height:26,blurWidth:0,blurHeight:0};e.s(["default",0,t],770752);let i={src:e.i(270039).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],383963);let r={src:e.i(227733).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],862493);let a={src:e.i(823929).default,width:128,height:129,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAApklEQVR42oWPsQrCMBRFY51KaUuwNktBQbcgSenQ32hCTBAHXfSfulUK4g/0/7yvdO+FB5dzXhLC2FoiJE3TfZ7nYrskyzIBVpBjTdPcu677GGPGtm1fmDd1YnVd31gIYSrLUnLOjxC9tfaLfhBCXLz307xQVZUCODvnfljoceAEpskxKeUV1w0Qo1LqobV+Lk8McI5tkDiOeZIkO9SIBr0gRm71l38QASaqNz7VMwAAAABJRU5ErkJggg=="};e.s(["default",0,a],902860);let l={src:e.i(333845).default,width:200,height:200,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAXUlEQVR42p2MoRHAMAwDQwJzCcgCwQEZIDjA03gED2BzewSPWRe2qFcB3Z+kU0o/lXNea4U/0t77OYeIACDq4FLKnSKimYmIqjKzu885U6117z3GCGitxTbg/flJF7DAEmcR3WAqAAAAAElFTkSuQmCC"};e.s(["default",0,l],901372);let s={src:e.i(813878).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],206258);let n={src:e.i(767788).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],176228);let o={src:e.i(808630).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,o],728685)},39182,e=>{"use strict";let t={src:e.i(641266).default,width:200,height:58,blurWidth:0,blurHeight:0};e.s(["default",0,t])},272967,551726,399495,740876,709103,277207,836473,768493,297720,e=>{"use strict";let t={src:e.i(468732).default,width:490,height:412,blurWidth:0,blurHeight:0};e.s(["default",0,t],272967);let i={src:e.i(610503).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,i],551726);let r={src:e.i(438969).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,r],399495);let a={src:e.i(852459).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,a],740876);let l={src:e.i(494696).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,l],709103);let s={src:e.i(148973).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,s],277207);let n={src:e.i(570036).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,n],836473);let o={src:e.i(151170).default,width:95,height:81,blurWidth:8,blurHeight:7,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAA0UlEQVR42kXMvWrCUBjG8VxIL6KX0IvobXQSOrQd2kLSdMzQdMmaEErPUqoIIYtKOC5iFD9BEBwiaAY/AgpH/2oUfOGFh4cfj8blNmrNKK0zmFUZzmust2nea7u9IlkNkBMPv1Xgs3JHoXRDe1o+g8Vmyl/vnf++wU/7EdF54jW8JU6K14WTPgE3fjiCZ77kPa2kdAZZlrFcLpikXYLeN6Lxxm/zhfEsRimF5roupmli2zbGh4Gu61iWlX8URWhSSsIwxPM8hBA4jpNn3/cJgoADqC23HJzwo6wAAAAASUVORK5CYII="};e.s(["default",0,o],768493);let u={src:e.i(862330).default,width:646,height:854,blurWidth:0,blurHeight:0};e.s(["default",0,u],297720)},980385,e=>{"use strict";let t={src:e.i(956529).default,width:28,height:28,blurWidth:0,blurHeight:0};e.s(["default",0,t])},916925,247044,e=>{"use strict";var t,i=e.i(555987),r=e.i(938137),a=e.i(301035),l=e.i(470524),s=e.i(901539),n=e.i(434339),o=e.i(857152),u=e.i(922158),c=e.i(896614),d=e.i(9774),A=e.i(503119),h=e.i(272896),f=e.i(144923),g=e.i(562171),p=e.i(533881),m=e.i(837957),x=e.i(227247),b=e.i(708889),v=e.i(859320),E=e.i(586455),_=e.i(921117),I=e.i(21296),C=e.i(579967),w=e.i(336712),O=e.i(770752),R=e.i(383963),y=e.i(862493),S=e.i(902860),T=e.i(901372),k=e.i(206258),N=e.i(176228),L=e.i(728685),M=e.i(39182),U=e.i(272967),H=e.i(551726),D=e.i(399495),j=e.i(740876),B=e.i(709103),P=e.i(277207),W=e.i(836473),z=e.i(768493),q=e.i(297720),F=e.i(980385);let G={src:e.i(788158).default,width:300,height:300,blurWidth:0,blurHeight:0},V={src:e.i(350567).default,width:231,height:30,blurWidth:0,blurHeight:0},Q={src:e.i(822797).default,width:48,height:48,blurWidth:0,blurHeight:0},K={src:e.i(840911).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAABE0lEQVR42gEIAff+AAAAAAAAAAAAEQwmIT8ukIAgGUpBBwYQDQQECggAAAAAAAIBBQQJBhUTFw80LUIxloZbR8+5UUS3oUA4kH0HBxEOACMUUkolFlVNCAYTERwUPzgkHFJIIhxNRCsmYVQODSAbADYffnNFKaCSDgkgHD0tjX4+MI5+CQgVEhQSLCULChgUABAKJiJTM7+vJhlYTzEkb2MxJm9iIh1NQywnZFYhH0o/AA8JIh9RMrurNiR9cQkHFhMQDSUgUkW5o1hOx60pJlxPAAcEDw4qGmJYFw80LhENKCMyKHFjUEK0nhEOJSADAwYFAAAAAAADAgcGBQMLCRUPMClCNJeEIRtLQgAAAQAAAAAAfjQxsiCQipMAAAAASUVORK5CYII="},Y={src:e.i(445735).default,width:16,height:16,blurWidth:0,blurHeight:0},J={src:e.i(635202).default,width:16,height:16,blurWidth:0,blurHeight:0},X={src:e.i(669161).default,width:320,height:320,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7UlEQVR42lVQvc7BYBR+B/kM3w+fFm2p9m3fRhFRP7UQlTAQCVfAgE3EHZAQMTBIzBIrYbEgFhaza3ABrsF7bIYnOTl5/s5BVrvIY5MMvYTbUuy8hN8CcFIdW62CgHCKjFwie/So3PqH+b0Hc+GebkW6Lj9zUtJaHwEbFvGqWf7zOG5GJVmjcwUEAUOevQmhfKSTqJol+7f94RT+L7Yv25OV3PtsI699EByc85qpW5qcUCaMyB7orH9EgJLaTnPNgk/QfUsxKi0QtKWFzjRzA7a08IEPCivYKWkyQHAKtJUMPIVMQCAmz3FKHcELXnxEPy9E1lYCAAAAAElFTkSuQmCC"},Z={src:e.i(159508).default,width:52,height:46,blurWidth:0,blurHeight:0},$={src:e.i(544025).default,width:3300,height:2550,blurWidth:8,blurHeight:6,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAZklEQVR42oWNTQ5AMBhE3f8mEhux4BgiIRzAwoKWplrt146fBbVhkpnNvORF+El0jvMAV4RR2qtsJZD3DyA2h6xhiMsRSTUhrRm0DYBFE4qOI285yl5CGvdW0OEYhEE/G6jgvIGv7A4KupBwIVaNAAAAAElFTkSuQmCC"},ee={src:e.i(100588).default,width:146,height:139,blurWidth:0,blurHeight:0};e.s(["default",0,ee],247044);let et={src:e.i(183804).default,width:100,height:18,blurWidth:0,blurHeight:0},ei={src:e.i(865502).default,width:32,height:32,blurWidth:0,blurHeight:0},er={src:e.i(96912).default,width:16,height:16,blurWidth:0,blurHeight:0},ea={src:e.i(395073).default,width:16,height:16,blurWidth:0,blurHeight:0},el={src:e.i(407829).default,width:16,height:16,blurWidth:0,blurHeight:0},es={src:e.i(846077).default,width:64,height:64,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAo0lEQVR42lWOvQrCQBCE7718oUA6wVcQBF/AXhu1CIgcpgoi/qCNguBPwCaChYHDv9zt3e6ZeEFxq9n5GGaY/T8iq3QhWKFRkZGWzEPaaE/RDoiI5e7z0BILP7tMB2vyO3p2BJew8syvvJLGQTPEaheSVJeAQIi5F2+CWt80uHopLMEnNBpPuNc2vaXK+38A4RauTvUhbBNwDvsOlYD3DA2Se99kLK7hC5QFVQAAAABJRU5ErkJggg=="},en={src:e.i(914861).default,width:1024,height:1024,blurWidth:8,blurHeight:8,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAA7ElEQVR42l2LMUsCAQBG39GFFQ02ad1oq0QIRR2hER4EGdQqdBDdQZAFEudU0NZSQ0O1VUOjiuJvEBxc3BQFEVQQdFAU9OROFwf9lg/e48Hiti8vWJekBSoIODacLK04CP79IAX8815cW2X3IYL3JIhaKuKLGdNGmMUCTo+Hq1yO72yB6HDEeTrFjm8fUVwGt3uL00eD5+6AfMvixbS5bTR5/43jcm2CooT4KNf56ltUGzafA5uoZZGpdJDlABhPr7z1TJLtMbXamMT0702T//aQu0gM5GOFvRuNkKoTDuucqRpeXePoWuPg0D8BGkpJjYhKXN4AAAAASUVORK5CYII="},eo={src:e.i(285328).default,width:400,height:399,blurWidth:8,blurHeight:8,blurDataURL:"data:image/webp;base64,UklGRgwBAABXRUJQVlA4TAABAAAvB8ABEM1VICICHggIDgIAAIDzDAACD0FoAAARAAwAAAAAAAAAAAAAAACAAABAAcBCAoAWgGyoXwUAAA8E7QQCAADg/N+nrsYIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4CClZXkg5AQAAAAA538LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL0HIgEAAAAAcP4ZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMsHA39Qutr2AtkROu8CASWZ/nMlNyzz5AdgWmkK65oUI6AlgIkY/M3zxIW3iABq15KT/Uz7BXidCOONHieAz1v6HqAC"},eu={src:e.i(779278).default,width:16,height:16,blurWidth:0,blurHeight:0},ec={src:e.i(325532).default,width:1e3,height:1e3,blurWidth:0,blurHeight:0},ed={src:e.i(288330).default,width:16,height:16,blurWidth:0,blurHeight:0};var eA=((t={}).A2A_Agent="A2A Agent",t.AI21="Ai21",t.AI21_CHAT="Ai21 Chat",t.AIML="AI/ML API",t.AIOHTTP_OPENAI="Aiohttp Openai",t.Anthropic="Anthropic",t.ANTHROPIC_TEXT="Anthropic Text",t.AssemblyAI="AssemblyAI",t.AUTO_ROUTER="Auto Router",t.Bedrock="Amazon Bedrock",t.BedrockMantle="Amazon Bedrock Mantle",t.SageMaker="AWS SageMaker",t.Azure="Azure",t.Azure_AI_Studio="Azure AI Foundry (Studio)",t.AZURE_TEXT="Azure Text",t.BASETEN="Baseten",t.BYTEZ="Bytez",t.Cerebras="Cerebras",t.CLARIFAI="Clarifai",t.CLOUDFLARE="Cloudflare",t.CODESTRAL="Codestral",t.Cohere="Cohere",t.COHERE_CHAT="Cohere Chat",t.COMETAPI="Cometapi",t.COMPACTIFAI="Compactifai",t.Cursor="Cursor",t.Dashscope="Dashscope",t.Databricks="Databricks (Qwen API)",t.DATAROBOT="Datarobot",t.DeepInfra="DeepInfra",t.Deepgram="Deepgram",t.Deepseek="Deepseek",t.DOCKER_MODEL_RUNNER="Docker Model Runner",t.DOTPROMPT="Dotprompt",t.ElevenLabs="ElevenLabs",t.EMPOWER="Empower",t.FalAI="Fal AI",t.FEATHERLESS_AI="Featherless Ai",t.FireworksAI="Fireworks AI",t.FRIENDLIAI="Friendliai",t.GALADRIEL="Galadriel",t.GITHUB_COPILOT="Github Copilot",t.Google_AI_Studio="Google AI Studio",t.GradientAI="GradientAI",t.Groq="Groq",t.HEROKU="Heroku",t.Hosted_Vllm="vllm",t.HUGGINGFACE="Huggingface",t.HYPERBOLIC="Hyperbolic",t.Infinity="Infinity",t.JinaAI="Jina AI",t.LAMBDA_AI="Lambda Ai",t.LEMONADE="Lemonade",t.LLAMAFILE="Llamafile",t.LM_STUDIO="Lm Studio",t.LLAMA="Meta Llama",t.MARITALK="Maritalk",t.MiniMax="MiniMax",t.MistralAI="Mistral AI",t.MOONSHOT="Moonshot",t.MORPH="Morph",t.NEBIUS="Nebius",t.NLP_CLOUD="Nlp Cloud",t.NOVITA="Novita",t.NSCALE="Nscale",t.NVIDIA_NIM="Nvidia Nim",t.Ollama="Ollama",t.OLLAMA_CHAT="Ollama Chat",t.OOBABOOGA="Oobabooga",t.OpenAI="OpenAI",t.OPENAI_LIKE="Openai Like",t.OpenAI_Compatible="OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)",t.OpenAI_Text="OpenAI Text Completion",t.OpenAI_Text_Compatible="OpenAI-Compatible Completions (legacy /v1/completions)",t.Openrouter="Openrouter",t.Oracle="Oracle Cloud Infrastructure (OCI)",t.OVHCLOUD="Ovhcloud",t.Perplexity="Perplexity",t.PETALS="Petals",t.PG_VECTOR="Pg Vector",t.PREDIBASE="Predibase",t.RECRAFT="Recraft",t.REPLICATE="Replicate",t.RunwayML="RunwayML",t.SAGEMAKER_LEGACY="Sagemaker",t.Sambanova="Sambanova",t.SAP="SAP Generative AI Hub",t.Snowflake="Snowflake",t.Soniox="Soniox",t.TEXT_COMPLETION_CODESTRAL="Text-Completion-Codestral",t.TogetherAI="TogetherAI",t.TOPAZ="Topaz",t.Triton="Triton",t.V0="V0",t.VERCEL_AI_GATEWAY="Vercel Ai Gateway",t.Vertex_AI="Vertex AI (Anthropic, Gemini, etc.)",t.VERTEX_AI_BETA="Vertex Ai Beta",t.VLLM="Vllm",t.VolcEngine="VolcEngine",t.Voyage="Voyage AI",t.WANDB="Wandb",t.WATSONX="Watsonx",t.WATSONX_TEXT="Watsonx Text",t.xAI="xAI",t.XINFERENCE="Xinference",t.ZAI="Z.AI (Zhipu AI)",t);let eh={A2A_Agent:"a2a_agent",AI21:"ai21",AI21_CHAT:"ai21_chat",AIML:"aiml",AIOHTTP_OPENAI:"aiohttp_openai",Anthropic:"anthropic",ANTHROPIC_TEXT:"anthropic_text",AssemblyAI:"assemblyai",AUTO_ROUTER:"auto_router",Azure:"azure",Azure_AI_Studio:"azure_ai",AZURE_TEXT:"azure_text",BASETEN:"baseten",Bedrock:"bedrock",BedrockMantle:"bedrock_mantle",BYTEZ:"bytez",Cerebras:"cerebras",CLARIFAI:"clarifai",CLOUDFLARE:"cloudflare",CODESTRAL:"codestral",Cohere:"cohere",COHERE_CHAT:"cohere_chat",COMETAPI:"cometapi",COMPACTIFAI:"compactifai",Cursor:"cursor",Dashscope:"dashscope",Databricks:"databricks",DATAROBOT:"datarobot",DeepInfra:"deepinfra",Deepgram:"deepgram",Deepseek:"deepseek",DOCKER_MODEL_RUNNER:"docker_model_runner",DOTPROMPT:"dotprompt",ElevenLabs:"elevenlabs",EMPOWER:"empower",FalAI:"fal_ai",FEATHERLESS_AI:"featherless_ai",FireworksAI:"fireworks_ai",FRIENDLIAI:"friendliai",GALADRIEL:"galadriel",GITHUB_COPILOT:"github_copilot",Google_AI_Studio:"gemini",GradientAI:"gradient_ai",Groq:"groq",HEROKU:"heroku",Hosted_Vllm:"hosted_vllm",HUGGINGFACE:"huggingface",HYPERBOLIC:"hyperbolic",Infinity:"infinity",JinaAI:"jina_ai",LAMBDA_AI:"lambda_ai",LEMONADE:"lemonade",LLAMAFILE:"llamafile",LLAMA:"meta_llama",LM_STUDIO:"lm_studio",MARITALK:"maritalk",MiniMax:"minimax",MistralAI:"mistral",MOONSHOT:"moonshot",MORPH:"morph",NEBIUS:"nebius",NLP_CLOUD:"nlp_cloud",NOVITA:"novita",NSCALE:"nscale",NVIDIA_NIM:"nvidia_nim",Ollama:"ollama",OLLAMA_CHAT:"ollama_chat",OOBABOOGA:"oobabooga",OpenAI:"openai",OPENAI_LIKE:"openai_like",OpenAI_Compatible:"openai",OpenAI_Text:"text-completion-openai",OpenAI_Text_Compatible:"text-completion-openai",Openrouter:"openrouter",Oracle:"oci",OVHCLOUD:"ovhcloud",Perplexity:"perplexity",PETALS:"petals",PG_VECTOR:"pg_vector",PREDIBASE:"predibase",RECRAFT:"recraft",REPLICATE:"replicate",RunwayML:"runwayml",SAGEMAKER_LEGACY:"sagemaker",SageMaker:"sagemaker_chat",Sambanova:"sambanova",SAP:"sap",Snowflake:"snowflake",Soniox:"soniox",TEXT_COMPLETION_CODESTRAL:"text-completion-codestral",TogetherAI:"together_ai",TOPAZ:"topaz",Triton:"triton",V0:"v0",VERCEL_AI_GATEWAY:"vercel_ai_gateway",Vertex_AI:"vertex_ai",VERTEX_AI_BETA:"vertex_ai_beta",VLLM:"vllm",VolcEngine:"volcengine",Voyage:"voyage",WANDB:"wandb",WATSONX:"watsonx",WATSONX_TEXT:"watsonx_text",xAI:"xai",XINFERENCE:"xinference",ZAI:"zai"},ef=new Set(["bedrock_mantle"]),eg={"A2A Agent":r.default.src,Ai21:a.default.src,"Ai21 Chat":a.default.src,"AI/ML API":l.default.src,"Aiohttp Openai":F.default.src,Anthropic:s.default.src,"Anthropic Text":s.default.src,AssemblyAI:n.default.src,Azure:M.default.src,"Azure AI Foundry (Studio)":M.default.src,"Azure Text":M.default.src,Baseten:o.default.src,"Amazon Bedrock":u.default.src,"Amazon Bedrock Mantle":u.default.src,"AWS SageMaker":u.default.src,Cerebras:c.default.src,Cloudflare:d.default.src,Codestral:H.default.src,Cohere:A.default.src,"Cohere Chat":A.default.src,Cometapi:h.default.src,Cursor:f.default.src,"Databricks (Qwen API)":g.default.src,Dashscope:K.src,Deepseek:x.default.src,Deepgram:p.default.src,DeepInfra:m.default.src,ElevenLabs:b.default.src,"Fal AI":v.default.src,"Featherless Ai":E.default.src,"Fireworks AI":_.default.src,Friendliai:I.default.src,"Github Copilot":C.default.src,"Google AI Studio":w.default.src,Groq:O.default.src,vllm:es.src,Huggingface:R.default.src,Hyperbolic:y.default.src,Infinity:S.default.src,"Jina AI":T.default.src,"Lambda Ai":k.default.src,"Lm Studio":N.default.src,"Meta Llama":L.default.src,MiniMax:U.default.src,"Mistral AI":H.default.src,Moonshot:D.default.src,Morph:j.default.src,Nebius:B.default.src,Novita:P.default.src,"Nvidia Nim":W.default.src,Ollama:q.default.src,"Ollama Chat":q.default.src,Oobabooga:F.default.src,OpenAI:F.default.src,"Openai Like":F.default.src,"OpenAI Text Completion":F.default.src,"OpenAI-Compatible Completions (legacy /v1/completions)":F.default.src,"OpenAI-Compatible Chat Completions (Together AI, vLLM, etc.)":F.default.src,Openrouter:G.src,"Oracle Cloud Infrastructure (OCI)":V.src,Perplexity:Q.src,Recraft:Y.src,Replicate:J.src,RunwayML:X.src,Sagemaker:u.default.src,Sambanova:Z.src,"SAP Generative AI Hub":$.src,Snowflake:ee.src,Soniox:et.src,"Text-Completion-Codestral":H.default.src,TogetherAI:ei.src,Topaz:er.src,Triton:z.default.src,V0:ea.src,"Vercel Ai Gateway":el.src,"Vertex AI (Anthropic, Gemini, etc.)":w.default.src,"Vertex Ai Beta":w.default.src,Vllm:es.src,VolcEngine:en.src,"Voyage AI":eo.src,Watsonx:eu.src,"Watsonx Text":eu.src,xAI:ec.src,Xinference:ed.src};e.s(["Providers",()=>eA,"getPlaceholder",0,e=>{if("AI/ML API"===e)return"aiml/flux-pro/v1.1";if("Vertex AI (Anthropic, Gemini, etc.)"===e)return"gemini-pro";if("Anthropic"==e)return"claude-3-opus";if("Amazon Bedrock"==e)return"claude-3-opus";if("AWS SageMaker"==e)return"sagemaker/jumpstart-dft-meta-textgeneration-llama-2-7b";else if("Google AI Studio"==e)return"gemini-pro";else if("Azure AI Foundry (Studio)"==e)return"azure_ai/command-r-plus";else if("Azure"==e)return"my-deployment";else if("Oracle Cloud Infrastructure (OCI)"==e)return"oci/xai.grok-4";else if("Snowflake"==e)return"snowflake/mistral-7b";else if("Voyage AI"==e)return"voyage/";else if("Jina AI"==e)return"jina_ai/";else if("VolcEngine"==e)return"volcengine/";else if("DeepInfra"==e)return"deepinfra/";else if("Fal AI"==e)return"fal_ai/fal-ai/flux-pro/v1.1-ultra";else if("RunwayML"==e)return"runwayml/gen4_turbo";else if("Watsonx"===e)return"watsonx/ibm/granite-3-3-8b-instruct";else if("Cursor"===e)return"cursor/claude-4-sonnet";else if("Z.AI (Zhipu AI)"===e)return"zai/glm-4.5";else return"gpt-3.5-turbo"},"getProviderLogoAndName",0,e=>{if(!e)return{logo:"",displayName:"-"};if("gemini"===e.toLowerCase()){let e="Google AI Studio";return{logo:(0,i.resolveLogoSrc)(eg[e])??"",displayName:e}}let t=Object.keys(eh).find(t=>eh[t].toLowerCase()===e.toLowerCase())??Object.keys(eh).find(t=>t.toLowerCase()===e.toLowerCase());if(!t)return{logo:"",displayName:e};let r=eA[t];return{logo:(0,i.resolveLogoSrc)(eg[r])??"",displayName:r}},"getProviderModels",0,(e,t)=>{let i=eh[e],r=[];return e&&"object"==typeof t&&(Object.entries(t).forEach(([e,t])=>{if(null!==t&&"object"==typeof t&&"litellm_provider"in t){let a=t.litellm_provider,l="string"==typeof a&&(a.startsWith(`${i}_`)||a.startsWith(`${i}-`));(a===i||l&&!ef.has(a))&&r.push(e)}}),"Cohere"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"cohere_chat"===t.litellm_provider&&r.push(e)}),"AWS SageMaker"==e&&Object.entries(t).forEach(([e,t])=>{null!==t&&"object"==typeof t&&"litellm_provider"in t&&"sagemaker_chat"===t.litellm_provider&&r.push(e)})),r},"providerLogoMap",0,eg,"provider_map",0,eh],916925)},174553,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(916925),a=e.i(555987);e.s(["Logo",0,({provider:e,src:l,label:s,className:n="w-4 h-4"})=>{let[o,u]=(0,i.useState)(null),c=void 0!==e?(0,r.getProviderLogoAndName)(e).logo:(0,a.resolveLogoSrc)(l)??"",d=s??e??"";return o!==c&&c?(0,t.jsx)("img",{src:c,alt:`${d||"-"} logo`,className:n,onError:()=>{console.warn(`Logo failed to load: ${c}`),u(c)}}):(0,t.jsx)("div",{className:`${n} rounded-full bg-gray-200 flex items-center justify-center text-xs`,children:d.charAt(0)||"-"})}])},677572,370359,405934,e=>{"use strict";var t,i,r,a=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var l=e.i(271645),s=e.i(951437),n=e.i(146376),o=e.i(667865),u=e.i(552245),c=e.i(53687),d=e.i(733332);let A=l.createContext(void 0);function h(){let e=l.useContext(A);if(void 0===e)throw Error((0,d.default)(64));return e}let f=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),g={tabActivationDirection:e=>({[f.activationDirection]:e})};var p=e.i(675606),m=e.i(56434);let x=l.forwardRef(function(e,t){let{className:i,defaultValue:r=0,onValueChange:d,orientation:h="horizontal",render:f,value:x,style:v,...E}=e,_=void 0!==e.defaultValue,I=l.useRef([]),[C,w]=l.useState(()=>new Map),[O,R]=(0,s.useControlled)({controlled:x,default:r,name:"Tabs",state:"value"}),y=void 0!==x,[S,T]=l.useState(()=>new Map),k=l.useRef(void 0),N=l.useCallback(e=>{if(void 0===e)return null;for(let[t,i]of S.entries())if(null!=i&&e===(i.value??i.index))return t;return null},[S]),[L,M]=l.useState(()=>({previousValue:O,tabActivationDirection:"none"})),{previousValue:U,tabActivationDirection:H}=L,D=H,j=!1;U!==O&&(D=b(U,O,h,S),j=null!=U&&null!=O&&null==N(O));let B=j?U:O,P=U!==B||H!==D;(0,n.useIsoLayoutEffect)(()=>{P&&M({previousValue:B,tabActivationDirection:D})},[B,P,D]);let W=(0,o.useStableCallback)((e,t)=>{t.activationDirection=b(O,e,h,S),d?.(e,t),t.isCanceled||R(e)}),z=(0,o.useStableCallback)((e,t)=>{d?.(e,(0,p.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),q=(0,o.useStableCallback)((e,t)=>{w(i=>{if(i.get(e)===t)return i;let r=new Map(i);return r.set(e,t),r})}),F=(0,o.useStableCallback)((e,t)=>{w(i=>{if(!i.has(e)||i.get(e)!==t)return i;let r=new Map(i);return r.delete(e),r})}),G=l.useCallback(e=>C.get(e),[C]),V=l.useCallback(e=>{for(let t of S.values())if(e===t?.value)return t?.id},[S]),Q=l.useMemo(()=>({getTabElementBySelectedValue:N,getTabIdByPanelValue:V,getTabPanelIdByValue:G,onValueChange:W,orientation:h,registerMountedTabPanel:q,setTabMap:T,unregisterMountedTabPanel:F,tabActivationDirection:D,value:O}),[N,V,G,W,h,q,T,F,D,O]),K=l.useMemo(()=>{for(let e of S.values())if(null!=e&&e.value===O)return e},[S,O]),Y=l.useMemo(()=>{for(let e of S.values())if(null!=e&&!e.disabled)return e.value},[S]),J=l.useRef(!_),X=l.useRef(r),Z=l.useRef(_),$=l.useRef(!1);(0,n.useIsoLayoutEffect)(()=>{if(y)return;function e(e,t){R(e),M(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),z(e,t),J.current=!1}if(0===S.size){$.current&&null!==O&&!k.current?.isConnected&&e(null,m.REASONS.missing);return}$.current=!0,k.current=S.keys().next().value;let t=K?.disabled,i=null==K&&null!==O;if(t||O!==X.current||(Z.current=!1),Z.current&&t&&O===X.current)return;let r=J.current;if(t||i){let i=Y??null;if(O===i){J.current=!1;return}let a=m.REASONS.missing;r?a=m.REASONS.initial:t&&(a=m.REASONS.disabled),e(i,a);return}r&&null!=K&&(z(O,m.REASONS.initial),J.current=!1)},[Y,y,z,K,R,S,O]);let ee={orientation:h,tabActivationDirection:D},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:E,stateAttributesMapping:g});return(0,a.jsx)(A.Provider,{value:Q,children:(0,a.jsx)(c.CompositeList,{elementsRef:I,children:et})})});function b(e,t,i,r){if(null==e||null==t)return"none";let a=null,l=null;for(let[i,s]of r.entries()){if(null==s)continue;let r=s.value??s.index;if(e===r&&(a=i),t===r&&(l=i),null!=a&&null!=l)break}if(null==a||null==l)return a!==l&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===i?t>e?"right":"left":t>e?"down":"up":"none";let s=a.getBoundingClientRect(),n=l.getBoundingClientRect();if("horizontal"===i){if(n.lefts.left)return"right"}else{if(n.tops.top)return"down"}return"none"}var v=e.i(108868),E=e.i(788015),_=e.i(540886);let I="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,I],370359);var C=e.i(395530);let w=l.createContext(void 0);function O(){let e=l.useContext(w);if(void 0===e)throw Error((0,d.default)(65));return e}var R=e.i(647554);let y=l.forwardRef(function(e,t){let{className:i,disabled:r=!1,render:a,value:s,id:o,nativeButton:c=!0,style:d,...A}=e,{value:f,getTabPanelIdByValue:x,orientation:b,tabActivationDirection:w}=h(),{activateOnFocus:y,highlightedTabIndex:S,onTabActivation:T,registerTabResizeObserverElement:k,setHighlightedTabIndex:N,tabsListElement:L}=O(),M=(0,E.useBaseUiId)(o),U=l.useMemo(()=>({disabled:r,id:M,value:s}),[r,M,s]),{compositeProps:H,compositeRef:D,index:j}=(0,C.useCompositeItem)({metadata:U}),B=s===f,P=l.useRef(!1),W=l.useRef(null);(0,n.useIsoLayoutEffect)(()=>{let e=W.current;if(e)return k(e)},[k]),(0,n.useIsoLayoutEffect)(()=>{if(P.current){P.current=!1;return}if(B&&j>-1&&S!==j){if(null!=L){let e=(0,R.activeElement)((0,v.ownerDocument)(L));if(e&&(0,R.contains)(L,e))return}r||N(j)}},[B,j,S,N,r,L]);let{getButtonProps:z,buttonRef:q}=(0,_.useButton)({disabled:r,native:c,focusableWhenDisabled:!0}),F=x(s),G=l.useRef(!1),V=l.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:r,active:B,orientation:b,tabActivationDirection:w},ref:[t,q,D,W],props:[H,{role:"tab","aria-controls":F,"aria-selected":B,id:M,onClick:function(e){B||r||T(s,(0,p.createChangeEventDetails)(m.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){B||(j>-1&&!r&&N(j),!r&&y&&(!G.current||G.current&&V.current)&&T(s,(0,p.createChangeEventDetails)(m.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){B||r||(G.current=!0,e.button&&0!==e.button||(V.current=!0,(0,v.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){G.current=!1,V.current=!1},{once:!0})))},[I]:B?"":void 0,onKeyDownCapture(){P.current=!0}},A,z],stateAttributesMapping:g})});var S=e.i(73364),T=e.i(802239),k=e.i(956789);function N(){return k.NOOP}function L(){return!1}function M(){return!0}let U=((i={}).activeTabLeft="--active-tab-left",i.activeTabRight="--active-tab-right",i.activeTabTop="--active-tab-top",i.activeTabBottom="--active-tab-bottom",i.activeTabWidth="--active-tab-width",i.activeTabHeight="--active-tab-height",i);var H=e.i(172410);let D={...g,activeTabPosition:()=>null,activeTabSize:()=>null},j=l.forwardRef(function(e,t){let{className:i,render:r,renderBeforeHydration:s=!1,style:n,...o}=e,{nonce:c}=(0,H.useCSPContext)(),{getTabElementBySelectedValue:d,orientation:A,tabActivationDirection:f,value:g}=h(),{tabsListElement:p,registerIndicatorUpdateListener:m}=O(),x=(0,T.useSyncExternalStore)(N,L,M),b=function(){let[,e]=l.useState({});return l.useCallback(()=>{e({})},[])}();l.useEffect(()=>m(b),[m,b]);let v=0,E=0,_=0,I=0,C=0,w=0,R=!1;if(null!=g&&null!=p){let e=d(g);if(null!=e){R=!0;let{width:t,height:i}=(0,S.getCssDimensions)(e),{width:r,height:a}=(0,S.getCssDimensions)(p),l=e.getBoundingClientRect(),s=p.getBoundingClientRect(),n=r>0?s.width/r:1,o=a>0?s.height/a:1;if(Math.abs(n)>Number.EPSILON&&Math.abs(o)>Number.EPSILON){let e=l.left-s.left,t=l.top-s.top;v=e/n+p.scrollLeft-p.clientLeft,_=t/o+p.scrollTop-p.clientTop}else v=e.offsetLeft,_=e.offsetTop;C=t,w=i,E=p.scrollWidth-v-C,I=p.scrollHeight-_-w}}let y=R?{left:v,right:E,top:_,bottom:I}:null,k=R?{width:C,height:w}:null,j=R?{[U.activeTabLeft]:`${v}px`,[U.activeTabRight]:`${E}px`,[U.activeTabTop]:`${_}px`,[U.activeTabBottom]:`${I}px`,[U.activeTabWidth]:`${C}px`,[U.activeTabHeight]:`${w}px`}:void 0,B=R&&C>0&&w>0,P=(0,u.useRenderElement)("span",e,{state:{orientation:A,activeTabPosition:y,activeTabSize:k,tabActivationDirection:f},ref:t,props:[{role:"presentation",style:j,hidden:!B},o,{suppressHydrationWarning:!0}],stateAttributesMapping:D});return null==g?null:(0,a.jsxs)(l.Fragment,{children:[P,x&&s&&(0,a.jsx)("script",{nonce:c,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var B=e.i(144394),P=e.i(209407),W=e.i(137584),z=e.i(223910),q=e.i(673553);let F=((r={}).index="data-index",r.activationDirection="data-activation-direction",r.orientation="data-orientation",r.hidden="data-hidden",r[r.startingStyle=P.TransitionStatusDataAttributes.startingStyle]="startingStyle",r[r.endingStyle=P.TransitionStatusDataAttributes.endingStyle]="endingStyle",r),G={...g,...P.transitionStatusMapping},V=l.forwardRef(function(e,t){let{className:i,value:r,render:a,keepMounted:s=!1,style:o,...c}=e,{value:d,getTabIdByPanelValue:A,orientation:f,tabActivationDirection:g,registerMountedTabPanel:p,unregisterMountedTabPanel:m}=h(),x=(0,E.useBaseUiId)(),b=l.useMemo(()=>({id:x,value:r}),[x,r]),{ref:v,index:_}=(0,q.useCompositeListItem)({metadata:b}),I=r===d,{mounted:C,transitionStatus:w,setMounted:O}=(0,z.useTransitionStatus)(I),R=!C,y=A(r),S=l.useRef(null),T=(0,u.useRenderElement)("div",e,{state:{hidden:R,orientation:f,tabActivationDirection:g,transitionStatus:w},ref:[t,v,S],props:[{"aria-labelledby":y,hidden:R,id:x,role:"tabpanel",tabIndex:I?0:-1,inert:(0,B.inertValue)(!I),[F.index]:_},c],stateAttributesMapping:G});return((0,W.useOpenChangeComplete)({open:I,ref:S,onComplete(){I||O(!1)}}),(0,n.useIsoLayoutEffect)(()=>{if((!R||s)&&null!=x)return p(r,x),()=>{m(r,x)}},[R,s,r,x,p,m]),s||C)?T:null});var Q=e.i(590803),K=e.i(828918),Y=e.i(673327),J=e.i(621082);let X=[];var Z=e.i(838452),$=e.i(872855);function ee(e){let{render:t,className:i,style:r,refs:s=k.EMPTY_ARRAY,props:d=k.EMPTY_ARRAY,state:A=k.EMPTY_OBJECT,stateAttributesMapping:h,highlightedIndex:f,onHighlightedIndexChange:g,orientation:p,grid:m,loopFocus:x,onLoop:b,enableHomeAndEndKeys:v,onMapChange:E,stopEventPropagation:_=!0,rootRef:C,disabledIndices:w,modifierKeys:O,highlightItemOnHover:y=!1,tag:S="div",...T}=e,{props:N,highlightedIndex:L,onHighlightedIndexChange:M,elementsRef:U,onMapChange:H,relayKeyboardEvent:D}=function(e){let{loopFocus:t=!0,orientation:i="both",grid:r,onLoop:a,direction:s,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:d,enableHomeAndEndKeys:A=!1,stopEventPropagation:h=!1,disabledIndices:f,modifierKeys:g=X}=e,[p,m]=l.useState(0),x=null!=r,b=l.useRef(null),v=(0,K.useMergedRefs)(b,d),E=l.useRef([]),_=l.useRef(!1),C=u??p,w=(0,o.useStableCallback)((e,t=!1)=>{if((c??m)(e),t){let t=E.current[e];(0,Y.scrollIntoViewIfNeeded)(b.current,t,s,i)}}),O=(0,o.useStableCallback)(e=>{if(0===e.size||_.current)return;_.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(I))??null,a=r?t.indexOf(r):-1;if(-1!==a)w(a);else if((0,J.isListIndexDisabled)(t,C,f)){let e=(0,J.findNonDisabledListIndex)(t,{disabledIndices:f});(0,J.isIndexOutOfListBounds)(t,e)||w(e)}(0,Y.scrollIntoViewIfNeeded)(b.current,r,s,i)});(0,n.useIsoLayoutEffect)(()=>{if(null==f||null!=u||!_.current)return;let e=E.current;if((0,J.isListIndexDisabled)(e,C,f)){let t=(0,J.findNonDisabledListIndex)(e,{disabledIndices:f});(0,J.isIndexOutOfListBounds)(e,t)||w(t)}},[f,u,C,E,w]);let y=(0,o.useStableCallback)((e,t,i)=>a?a(e,t,i,E):i),S=(0,o.useStableCallback)(e=>{let l=A?Y.COMPOSITE_KEYS:Y.ARROW_KEYS;if(!l.has(e.key)||function(e,t){for(let i of Y.MODIFIER_KEYS.values())if(!t.includes(i)&&e.getModifierState(i))return!0;return!1}(e,g)||!b.current)return;let n="rtl"===s,o=n?Y.ARROW_LEFT:Y.ARROW_RIGHT,u={horizontal:o,vertical:Y.ARROW_DOWN,both:o}[i],c=n?Y.ARROW_RIGHT:Y.ARROW_LEFT,d={horizontal:c,vertical:Y.ARROW_UP,both:c}[i],p=(0,R.getTarget)(e.nativeEvent);if(null!=p&&(0,Y.isNativeInput)(p)&&!(0,Q.isElementDisabled)(p)){let t=p.selectionStart,i=p.selectionEnd,r=p.value??"";if(null==t||e.shiftKey||t!==i||e.key!==d&&t0)return}let m=C,v=(0,J.getMinListIndex)(E,f),_=(0,J.getMaxListIndex)(E,f);null!=r&&(m=r({disabledIndices:f,elementsRef:E,event:e,highlightedIndex:C,loopFocus:t,maxIndex:_,minIndex:v,onLoop:y,orientation:i,rtl:n}));let I={horizontal:[o],vertical:[Y.ARROW_DOWN],both:[o,Y.ARROW_DOWN]}[i],O={horizontal:[c],vertical:[Y.ARROW_UP],both:[c,Y.ARROW_UP]}[i],S=x?l:({horizontal:A?Y.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:Y.HORIZONTAL_KEYS,vertical:A?Y.VERTICAL_KEYS_WITH_EXTRA_KEYS:Y.VERTICAL_KEYS,both:l})[i];A&&(e.key===Y.HOME?m=v:e.key===Y.END&&(m=_)),m===C&&(I.includes(e.key)||O.includes(e.key))&&(t&&m===_&&I.includes(e.key)?(m=v,a&&(m=a(e,C,m,E))):t&&m===v&&O.includes(e.key)?(m=_,a&&(m=a(e,C,m,E))):m=(0,J.findNonDisabledListIndex)(E.current,{startingIndex:m,decrement:O.includes(e.key),disabledIndices:f})),m===C||(0,J.isIndexOutOfListBounds)(E.current,m)||(h&&e.stopPropagation(),S.has(e.key)&&e.preventDefault(),w(m,!0),queueMicrotask(()=>{E.current[m]?.focus()}))});return{props:{ref:v,onFocus(e){let t=b.current,i=(0,R.getTarget)(e.nativeEvent);t&&null!=i&&(0,Y.isNativeInput)(i)&&i.setSelectionRange(0,i.value.length??0)},onKeyDown:S},highlightedIndex:C,onHighlightedIndexChange:w,elementsRef:E,disabledIndices:f,onMapChange:O,relayKeyboardEvent:S}}({grid:m,loopFocus:x,onLoop:b,orientation:p,highlightedIndex:f,onHighlightedIndexChange:g,rootRef:C,stopEventPropagation:_,enableHomeAndEndKeys:v,direction:(0,$.useDirection)(),disabledIndices:w,modifierKeys:O}),j=(0,u.useRenderElement)(S,e,{state:A,ref:s,props:[N,...d,T],stateAttributesMapping:h}),B=l.useMemo(()=>({highlightedIndex:L,onHighlightedIndexChange:M,highlightItemOnHover:y,relayKeyboardEvent:D}),[L,M,y,D]);return(0,a.jsx)(Z.CompositeRootContext.Provider,{value:B,children:(0,a.jsx)(c.CompositeList,{elementsRef:U,onMapChange:e=>{E?.(e),H(e)},children:j})})}e.s(["CompositeRoot",0,ee],405934);let et=l.forwardRef(function(e,t){let{activateOnFocus:i=!1,className:r,loopFocus:s=!0,render:u,style:c,...d}=e,{onValueChange:A,orientation:f,value:p,setTabMap:m,tabActivationDirection:x}=h(),[b,v]=l.useState(0),[E,_]=l.useState(null),I=l.useRef(new Set),C=l.useRef(new Set),O=l.useRef(null);(0,n.useIsoLayoutEffect)(()=>{if("u"{I.current.forEach(e=>{e()})});return O.current=e,E&&e.observe(E),C.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),O.current=null}},[E]);let R=(0,o.useStableCallback)(e=>(I.current.add(e),()=>{I.current.delete(e)})),y=(0,o.useStableCallback)(e=>(C.current.add(e),O.current?.observe(e),()=>{C.current.delete(e),O.current?.unobserve(e)})),S=(0,o.useStableCallback)((e,t)=>{e!==p&&A(e,t)}),T=l.useMemo(()=>({activateOnFocus:i,highlightedTabIndex:b,registerIndicatorUpdateListener:R,registerTabResizeObserverElement:y,onTabActivation:S,setHighlightedTabIndex:v,tabsListElement:E}),[i,b,R,y,S,v,E]);return(0,a.jsx)(w.Provider,{value:T,children:(0,a.jsx)(ee,{render:u,className:r,style:c,state:{orientation:f,tabActivationDirection:x},refs:[t,_],props:[{"aria-orientation":"vertical"===f?"vertical":void 0,role:"tablist"},d],stateAttributesMapping:g,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:s,orientation:f,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:k.EMPTY_ARRAY})})});e.s(["Indicator",0,j,"List",0,et,"Panel",0,V,"Root",0,x,"Tab",0,y],69281);var ei=e.i(69281),ei=ei,er=e.i(115504);let ea=(0,er.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...i}){return(0,a.jsx)(ei.Root,{"data-slot":"tabs","data-orientation":t,className:(0,er.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...i})},"TabsContent",0,function({className:e,...t}){return(0,a.jsx)(ei.Panel,{"data-slot":"tabs-content",className:(0,er.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...i}){return(0,a.jsx)(ei.List,{"data-slot":"tabs-list","data-variant":t,className:(0,er.cn)(ea({variant:t}),e),...i})},"TabsTrigger",0,function({className:e,...t}){return(0,a.jsx)(ei.Tab,{"data-slot":"tabs-trigger",className:(0,er.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},195116,e=>{"use strict";let t=(0,e.i(475254).default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);e.s(["Wrench",0,t],195116)},180127,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["default",0,t])},871689,e=>{"use strict";var t=e.i(180127);e.s(["ArrowLeft",()=>t.default])},434166,e=>{"use strict";e.s(["getSecureItem",0,function(e){try{let t=window.sessionStorage.getItem(e);if(null===t)return null;return decodeURIComponent(atob(t).split("").map(e=>"%"+e.charCodeAt(0).toString(16).padStart(2,"0")).join(""))}catch{return null}},"setSecureItem",0,function(e,t){window.sessionStorage.setItem(e,btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(parseInt(t,16)))))}])},292335,122520,165615,779129,280024,e=>{"use strict";let t={NONE:"none",API_KEY:"api_key",BEARER_TOKEN:"bearer_token",TOKEN:"token",BASIC:"basic",OAUTH2:"oauth2",OAUTH2_TOKEN_EXCHANGE:"oauth2_token_exchange",AWS_SIGV4:"aws_sigv4",TRUE_PASSTHROUGH:"true_passthrough",OAUTH_DELEGATE:"oauth_delegate"},i=e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE,r={INTERACTIVE:"interactive",M2M:"m2m"},a=e=>{let t=e.credentials??{};return JSON.stringify({url:"string"==typeof e.url?e.url:null,spec_path:"string"==typeof e.spec_path?e.spec_path:null,auth_type:e.auth_type??null,oauth_flow_type:e.oauth_flow_type??null,client_id:t.client_id??null,client_secret:t.client_secret??null,scopes:t.scopes??null,upstream_resource:t.upstream_resource??null,issuer:e.issuer??null,authorization_url:e.authorization_url??null,token_url:e.token_url??null,registration_url:e.registration_url??null})},l=["client_id","client_secret"],s=["upstream_resource"],n=["access_token","refresh_token","expires_in","scope"],o=(e,t)=>{if(!e)return;let i=Object.fromEntries(t.filter(t=>"string"==typeof e[t]&&""!==e[t]).map(t=>[t,e[t]]));return Object.keys(i).length>0?i:void 0},u="client_credentials",c={SSE:"sse",HTTP:"http",STDIO:"stdio",OPENAPI:"openapi"};e.s(["ADMIN_CONFIG_CREDENTIAL_KEYS",0,s,"AUTH_TYPE",0,t,"CLEARED_ON_INVALIDATION",0,["credentials"],"MCP_OAUTH2_FLOW_INTERACTIVE",0,"authorization_code","MCP_OAUTH2_FLOW_M2M",0,u,"OAUTH_FLOW",0,r,"TRANSPORT",0,c,"credentialAuthClass",0,e=>e===t.TRUE_PASSTHROUGH||e===t.OAUTH_DELEGATE?"client_forwarded":e??null,"gatewayMintsClientFor",0,e=>e.auth_type===t.TRUE_PASSTHROUGH||e.auth_type===t.OAUTH_DELEGATE&&!e.dcr_bridge,"getMcpOAuthMode",0,function(e){return e.auth_type===t.OAUTH2_TOKEN_EXCHANGE?"token_exchange":e.auth_type!==t.OAUTH2?null:e.oauth2_flow===u?"m2m":e.delegate_auth_to_upstream?"passthrough":"authorization_code"},"getOAuthAuthorizationIdentity",0,a,"handleAuth",0,e=>null==e?t.NONE:e,"handleTransport",0,(e,t)=>null==e?c.SSE:t&&e!==c.STDIO?c.OPENAPI:e,"isClientForwardedTokenMode",0,i,"isHeldOAuthTokenStale",0,(e,t)=>void 0!==t&&a(e)!==t,"isUnsupportedOnGatewayConnect",0,e=>i(e)||e===t.OAUTH2_TOKEN_EXCHANGE,"oauth2FlowToFormValue",0,function(e){return e===u?r.M2M:e?r.INTERACTIVE:void 0},"preservedAdminCredentials",0,e=>o(e,[...l,...s]),"preservedDeclaredAppCredentials",0,e=>o(e,l),"withoutMintedTokenCredentials",0,e=>{if(!e)return;let t=Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)));return Object.keys(t).length>0?t:void 0}],292335);var d=e.i(271645),A=e.i(602869),h=e.i(727749);function f(e){if(e instanceof Error)return e.message;if(e&&"object"==typeof e){let t=e.detail;return"string"==typeof t?t:Array.isArray(t)?t.map(e=>e&&"object"==typeof e?"string"==typeof e.msg?e.msg:JSON.stringify(e):String(e)).join("; "):t&&"object"==typeof t&&"string"==typeof t.error?t.error:"string"==typeof e.message?e.message:JSON.stringify(e)}return String(e)}e.s(["extractErrorMessage",0,f],122520);let g=e=>{let t=new Uint8Array(e),i="";return t.forEach(e=>i+=String.fromCharCode(e)),btoa(i).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},p=()=>{let e=new Uint8Array(32);return window.crypto.getRandomValues(e),g(e.buffer)},m=async e=>{let t=new TextEncoder().encode(e);return g(await window.crypto.subtle.digest("SHA-256",t))};e.s(["generateCodeChallenge",0,m,"generateCodeVerifier",0,p],165615);var x=e.i(434166);let b=()=>{{let e=window.location.pathname||"",t=e.indexOf("/ui"),i=t>=0?e.slice(0,t+3).replace(/\/+$/,""):"";return`${window.location.origin}${i}/mcp/oauth/callback`}},v=(...e)=>{e.forEach(e=>{try{window.sessionStorage.removeItem(e)}catch(e){}})};e.s(["TOOLS_OAUTH_UI_STATE_KEY",0,"litellm-mcp-oauth-tools-state","buildCallbackUrl",0,b,"clearStorage",0,v],779129);let E="litellm-user-mcp-oauth-flow-state",_="litellm-user-mcp-oauth-result",I=(e,t)=>{(0,x.setSecureItem)(e,t)},C=e=>(0,x.getSecureItem)(e);e.s(["useUserMcpOAuthFlow",0,({accessToken:e,serverId:t,serverAlias:i,scopes:r,clientId:a,onSuccess:l})=>{let[s,n]=(0,d.useState)("idle"),[o,u]=(0,d.useState)(null),c=(0,d.useRef)(!1),g=(0,d.useCallback)(async()=>{try{let l;n("authorizing"),u(null);let s=a??void 0;if(!s)try{let r=await (0,A.registerMcpOAuthClient)(e,t,{client_name:i||t,grant_types:["authorization_code","refresh_token"],response_types:["code"],token_endpoint_auth_method:"none"});s=r?.client_id,l=r?.client_secret}catch(e){}let o=p(),c=await m(o),d=crypto.randomUUID(),h=b(),f=r?.filter(e=>e.trim()).join(" "),g=(0,A.buildMcpOAuthAuthorizeUrl)({serverId:t,clientId:s,redirectUri:h,state:d,codeChallenge:c,scope:f}),x={state:d,codeVerifier:o,serverId:t,redirectUri:h,clientId:s,clientSecret:l,scopes:r};I(E,JSON.stringify(x));let v=new URL(window.location.href);v.searchParams.set("mcpOauthReturn","apps"),I("litellm-mcp-oauth-return-url",v.toString()),window.location.href=g}catch(t){let e=f(t);u(e),n("error"),h.default.error(e)}},[e,t,i,r,a]),x=(0,d.useCallback)(async()=>{if(c.current)return;let i=C(_);if(!i)return;let r=C(E);if(!r)return;try{let e=JSON.parse(r);if(e.serverId&&e.serverId!==t)return}catch(e){}c.current=!0,v(_);let a=null,s=null;try{a=JSON.parse(i);let e=C(E);s=e?JSON.parse(e):null}catch(e){u("Failed to resume OAuth flow. Please retry."),n("error"),c.current=!1,v(E);return}try{if(!s?.state||!s.codeVerifier||!s.serverId)throw Error("OAuth session state was lost. Please retry.");if(!a?.state||a.state!==s.state)throw Error("OAuth state mismatch. Please retry.");if(a.error)throw Error(a.error_description||a.error);if(!a.code)throw Error("Authorization code missing in callback.");n("exchanging");let t=await (0,A.exchangeMcpOAuthToken)({serverId:s.serverId,code:a.code,clientId:s.clientId,clientSecret:s.clientSecret,codeVerifier:s.codeVerifier,redirectUri:s.redirectUri,accessToken:e});await (0,A.storeMCPOAuthUserCredential)(e,s.serverId,{access_token:t.access_token,refresh_token:t.refresh_token,expires_in:t.expires_in,scopes:s.scopes}),n("success"),u(null),h.default.success("Connected successfully"),l()}catch(t){let e=f(t);u(e),n("error"),h.default.error(e)}finally{v(E),setTimeout(()=>{c.current=!1},1e3)}},[e,t,l]);return(0,d.useEffect)(()=>{x()},[x]),{startOAuthFlow:g,status:s,error:o}}],280024)},269638,e=>{"use strict";let t=(0,e.i(475254).default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);e.s(["CheckCircle",0,t],269638)},21040,131913,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(266027),a=e.i(555436),l=e.i(871689),s=e.i(463059),n=e.i(195116),o=e.i(269638),u=e.i(531278),c=e.i(519455),d=e.i(793479),A=e.i(302747),h=e.i(677572),f=e.i(602869),g=e.i(292335),p=e.i(174553),m=e.i(888259),x=e.i(280024);let b=({server:e,accessToken:r,onConnect:a,variant:l="badge"})=>{let s=e.server_name??e.alias??e.server_id,{startOAuthFlow:n,status:o}=(0,x.useUserMcpOAuthFlow)({accessToken:r,serverId:e.server_id,serverAlias:s,onSuccess:(0,i.useCallback)(()=>a(e.server_id),[a,e.server_id])}),d="authorizing"===o||"exchanging"===o;return"button"===l?(0,t.jsxs)(c.Button,{onClick:n,disabled:d,className:"font-semibold h-[38px] min-w-[110px]",children:[d&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),d?"Connecting…":"Connect"]}):(0,t.jsx)("span",{onClick:e=>{e.stopPropagation(),d||n()},className:`text-[11px] font-semibold rounded-md px-2 py-0.5 shrink-0 whitespace-nowrap ${d?"text-muted-foreground bg-muted cursor-default":"text-primary-foreground bg-primary cursor-pointer hover:bg-primary/90"}`,children:d?"Connecting…":"Connect"})},v=["#1677ff","#52c41a","#fa8c16","#eb2f96","#722ed1","#13c2c2","#fa541c","#2f54eb","#a0d911","#faad14"];function E(e){let t=0;for(let i=0;i{let[I,C]=(0,i.useState)([]),[w,O]=(0,i.useState)(!0),[R,y]=(0,i.useState)(""),[S,T]=(0,i.useState)("all"),[k,N]=(0,i.useState)(new Set),[L,M]=(0,i.useState)(null),[U,H]=(0,i.useState)({}),[D,j]=(0,i.useState)(!1),[B,P]=(0,i.useState)(new Set),[W,z]=(0,i.useState)(new Set),q=(0,i.useRef)([]);(0,i.useEffect)(()=>{q.current=I},[I]);let F=(0,i.useRef)(x);(0,i.useEffect)(()=>{F.current=x},[x]);let G=(0,i.useRef)(v);(0,i.useEffect)(()=>{G.current=v},[v]);let V=e=>e.server_name??e.alias??e.server_id,Q=(0,i.useRef)(!1),K=(0,i.useCallback)(async t=>{try{let i=await (0,f.listMCPTools)(e,t.server_id);if(Q.current)return;let r=Array.isArray(i?.tools)?i.tools:[];H(e=>({...e,[V(t)]:r.length}))}catch{}},[e]),Y=(0,i.useCallback)(async t=>{try{let i=await (0,f.getMCPOAuthUserCredentialStatus)(e,t.server_id);if(Q.current)return;i.has_credential&&!i.is_expired&&P(e=>new Set(e).add(t.server_id))}catch{}finally{Q.current||z(e=>{let i=new Set(e);return i.delete(t.server_id),i})}},[e]);(0,i.useEffect)(()=>(Q.current=!1,(0,f.fetchMCPServers)(e).then(async e=>{if(Q.current)return;let t=Array.isArray(e)?e:e?.data??[],i=t.filter(e=>e.auth_type===g.AUTH_TYPE.OAUTH2);for(let e of(C(t),z(new Set(i.map(e=>e.server_id))),O(!1),i.forEach(e=>Y(e)),j(!0),Array.from({length:Math.ceil(t.length/5)},(e,i)=>t.slice(5*i,(i+1)*5)))){if(Q.current)return;await Promise.allSettled(e.map(e=>K(e)))}Q.current||j(!1)}).catch(()=>{Q.current||(C([]),O(!1))}),()=>{Q.current=!0}),[e,K,Y]),(0,i.useEffect)(()=>{if(0===B.size)return;let e=q.current.filter(e=>B.has(e.server_id)&&!F.current.includes(V(e))).map(V);e.length>0&&G.current([...F.current,...e])},[B]);let J=async(t,i,r)=>{if(!i){v(x.filter(e=>e!==t)),r&&P(e=>{let t=new Set(e);return t.delete(r),t});return}N(e=>new Set(e).add(t));try{let i=r??t,a=await (0,f.listMCPTools)(e,i);if(a?.error)return void m.default.warning(`Could not load tools for ${t}`);F.current.includes(t)||v([...F.current,t])}catch{m.default.warning(`Could not load tools for ${t}`)}finally{N(e=>{let i=new Set(e);return i.delete(t),i})}},{data:X,isLoading:Z}=(0,r.useQuery)({queryKey:["mcp-apps-panel-detail-tools",L?.server_id],queryFn:()=>(0,f.listMCPTools)(e,L.server_id),enabled:!!L}),$=Array.isArray(X?.tools)?X.tools:[],ee=I.filter(e=>{let t=V(e),i=!R.trim()||t.toLowerCase().includes(R.toLowerCase())||(e.description??"").toLowerCase().includes(R.toLowerCase()),r="all"===S||x.includes(t);return i&&r}),et=I.filter(e=>x.includes(V(e))).length,ei=Object.values(U).reduce((e,t)=>e+t,0);if(L){let i=V(L),r=x.includes(i),a=k.has(i),s=E(i);return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)(c.Button,{variant:"ghost",size:"sm",onClick:()=>M(null),className:"-ml-3 mb-5 gap-1.5 text-muted-foreground hover:text-foreground",children:[(0,t.jsx)(l.ArrowLeft,{className:"h-3 w-3"}),"Back"]}),(0,t.jsxs)("div",{className:"flex items-start gap-5 mb-7",children:[L.mcp_info?.logo_url?(0,t.jsx)(p.Logo,{src:L.mcp_info.logo_url,label:i,className:"w-16 h-16 rounded-2xl object-contain shrink-0 bg-muted/50"}):(0,t.jsx)("div",{className:"w-16 h-16 rounded-2xl flex items-center justify-center text-white font-bold text-[28px] shrink-0",style:{background:s},children:i.charAt(0).toUpperCase()}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h2",{className:"m-0 mb-1 text-[22px] font-bold text-foreground",children:i}),(0,t.jsx)("p",{className:"m-0 text-sm text-muted-foreground",children:L.description??"MCP server"})]}),L.auth_type===g.AUTH_TYPE.OAUTH2?B.has(L.server_id)?(0,t.jsx)(c.Button,{variant:"destructive",onClick:async()=>{try{await (0,f.deleteMCPOAuthUserCredential)(e,L.server_id)}catch(e){}P(e=>{let t=new Set(e);return t.delete(L.server_id),t}),G.current(F.current.filter(e=>e!==i))},className:"font-semibold h-[38px] min-w-[110px]",children:"Disconnect"}):(0,t.jsx)(b,{server:L,accessToken:e,onConnect:e=>{P(t=>new Set(t).add(e))},variant:"button"}):(0,t.jsxs)(c.Button,{variant:r?"outline":"default",disabled:a,onClick:()=>J(i,!r,L.server_id),className:"font-semibold h-[38px] min-w-[110px]",children:[a&&(0,t.jsx)(u.Loader2,{className:"h-4 w-4 animate-spin mr-1.5"}),r?"Disconnect":"Connect"]})]}),(0,t.jsx)("h3",{className:"m-0 mb-3 text-[15px] font-semibold text-foreground",children:"Information"}),(0,t.jsx)("div",{className:"border rounded-lg overflow-hidden mb-7",children:[["Server ID",L.server_id],["Transport",(0,g.handleTransport)(L.transport,L.spec_path)],["Status",r?"Connected":"Not connected"]].filter(([,e])=>e).map(([e,i],r,a)=>(0,t.jsxs)("div",{className:`flex px-4 py-3 text-[13px] ${r(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30 flex flex-col gap-1.5",children:[(0,t.jsx)(A.Skeleton,{className:"h-3.5 w-1/3"}),(0,t.jsx)(A.Skeleton,{className:"h-3 w-2/3"})]},i))}):0===$.length?(0,t.jsx)("div",{className:"text-muted-foreground text-[13px] py-2",children:"No tools available"}):(0,t.jsx)("div",{className:"flex flex-col gap-2",children:$.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg px-3.5 py-2.5 bg-muted/30",children:[(0,t.jsxs)("div",{className:`flex items-center gap-2 ${e.description?"mb-1":""}`,children:[(0,t.jsx)(n.Wrench,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"text-[13px] font-semibold text-foreground font-mono",children:e.name})]}),e.description&&(0,t.jsx)("p",{className:"m-0 text-xs text-muted-foreground pl-[21px]",children:e.description})]},e.name))})]})}return(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-5 gap-4 flex-wrap",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,t.jsx)("h2",{className:"m-0 text-lg font-semibold text-foreground",children:"MCP Servers"}),!_&&(0,t.jsx)("span",{className:"text-[10px] font-semibold text-primary bg-primary/10 rounded px-1.5 py-0.5 uppercase tracking-wider",children:"Beta"})]}),_?(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Click a server to see its tools and connect"}):(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("p",{className:"m-0 text-[13px] text-muted-foreground",children:"Browse tools, authenticate once, use in chat"}),D?(0,t.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[(0,t.jsx)(u.Loader2,{className:"h-3 w-3 animate-spin"}),"Loading tools..."]}):ei>0?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,t.jsx)(n.Wrench,{className:"h-3 w-3"}),ei," tool",1!==ei?"s":""," available"]}):null]})]}),(0,t.jsxs)("div",{className:"relative w-[220px]",children:[(0,t.jsx)(a.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground"}),(0,t.jsx)(d.Input,{placeholder:"Search servers...",value:R,onChange:e=>y(e.target.value),className:"pl-9 text-[13px] h-9"})]})]}),(0,t.jsx)(h.Tabs,{value:S,onValueChange:e=>T(e),className:"mb-4",children:(0,t.jsxs)(h.TabsList,{variant:"line",className:"border-b rounded-none w-full justify-start h-auto p-0",children:[(0,t.jsx)(h.TabsTrigger,{value:"all",className:"rounded-none px-4 py-2 text-[13px]",children:"All"}),(0,t.jsxs)(h.TabsTrigger,{value:"connected",className:"rounded-none px-4 py-2 text-[13px]",children:["Connected",et>0?` (${et})`:""]})]})}),w?(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:Array.from({length:6},(e,i)=>(0,t.jsxs)("div",{className:`flex items-center gap-3 p-4 ${i%2==0?"border-r":""} ${i<4?"border-b":""}`,children:[(0,t.jsx)(A.Skeleton,{className:"w-[38px] h-[38px] rounded-xl shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-1.5",children:[(0,t.jsx)(A.Skeleton,{className:"h-3.5 w-2/3"}),(0,t.jsx)(A.Skeleton,{className:"h-3 w-1/2"})]})]},i))}):0===ee.length?(0,t.jsx)("div",{className:"text-center text-muted-foreground text-[13px] py-12 px-3",children:0===I.length?"No MCP servers configured. Add servers in Tools -> MCP Servers.":"connected"===S?"No servers connected yet.":"No servers match your search."}):(0,t.jsx)("div",{className:"grid grid-cols-2 border rounded-lg overflow-hidden",children:ee.map((i,r)=>{var a;let l=V(i),u=E(l),c=U[l],d=!!_&&(0,g.isUnsupportedOnGatewayConnect)(i.auth_type);return(0,t.jsxs)("div",{onClick:()=>M(i),className:`flex items-center gap-3 p-4 bg-card cursor-pointer transition-colors hover:bg-accent/30 min-w-0 ${r%2==0?"border-r":""} ${Math.floor(r/2)0?(0,t.jsxs)("span",{className:"shrink-0 flex items-center gap-1 text-muted-foreground",children:["· ",(0,t.jsx)(n.Wrench,{className:"h-2.5 w-2.5"})," ",c]}):null:D?(0,t.jsx)(A.Skeleton,{className:"w-7 h-3 shrink-0"}):null]})]}),(a=i,_&&(0,g.isUnsupportedOnGatewayConnect)(a.auth_type)?(0,t.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 whitespace-nowrap",children:"Not supported on this connection"}):a.auth_type===g.AUTH_TYPE.OAUTH2?B.has(a.server_id)?(0,t.jsx)(o.CheckCircle,{className:"h-3.5 w-3.5 text-emerald-600 shrink-0"}):W.has(a.server_id)?(0,t.jsx)(A.Skeleton,{className:"h-6 w-16 shrink-0 rounded-md"}):(0,t.jsx)(b,{server:a,accessToken:e,onConnect:e=>P(t=>new Set(t).add(e)),variant:"badge"}):x.includes(V(a))?(0,t.jsx)("span",{className:"w-[7px] h-[7px] rounded-full bg-emerald-600 dark:bg-emerald-400 shrink-0"}):null),(0,t.jsx)(s.ChevronRight,{className:"h-3 w-3 text-muted-foreground/40 shrink-0"})]},i.server_id)})})]})}],21040),e.s(["default",0,({flowHandle:e,clientOrigin:i})=>{let r=`${(0,f.getProxyBaseUrl)()}/authorize/complete`,a=i??"the application";return(0,t.jsx)("div",{className:"mb-6 rounded-lg border border-primary/30 bg-primary/5 px-5 py-4",children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 min-w-0",children:[(0,t.jsx)(o.CheckCircle,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"text-sm font-semibold text-foreground",children:["Connect your MCP servers to ",a]}),(0,t.jsxs)("p",{className:"text-[13px] text-muted-foreground mt-0.5",children:["Authorize the servers you want to use below, then click Finish connecting to return to ",a,"."]})]})]}),(0,t.jsxs)("form",{method:"POST",action:r,className:"shrink-0",children:[(0,t.jsx)("input",{type:"hidden",name:"flow",value:e}),(0,t.jsx)("button",{type:"submit",className:"h-[38px] rounded-md bg-primary px-4 text-sm font-semibold text-primary-foreground hover:bg-primary/90",children:"Finish connecting"})]})]})})}],131913)},178971,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(618566),a=e.i(135214),l=e.i(21040),s=e.i(131913);function n(){let{accessToken:e}=(0,a.default)(),[n,o]=(0,i.useState)([]),u=(0,r.useRouter)(),c=(0,r.useSearchParams)(),d=c.get("mcpOauthReturn"),A=c.get("connect_flow"),h=c.get("connect_client");return(0,i.useEffect)(()=>{if(d){let e=new URL(window.location.href);e.searchParams.delete("mcpOauthReturn"),u.replace(e.pathname+e.search)}},[d,u]),(0,t.jsxs)("div",{className:"mx-auto w-full max-w-5xl px-8 py-8",children:[A&&(0,t.jsx)(s.default,{flowHandle:A,clientOrigin:h}),(0,t.jsx)(l.default,{accessToken:e??"",selectedServers:n,onChange:o,connectMode:!!A})]})}e.s(["default",0,function(){return(0,t.jsx)(i.Suspense,{children:(0,t.jsx)(n,{})})}])}]); \ No newline at end of file diff --git a/litellm/proxy/_experimental/out/_next/static/chunks/1uy2av_f_ojad.js b/litellm/proxy/_experimental/out/_next/static/chunks/1uy2av_f_ojad.js deleted file mode 100644 index 7465522ecde..00000000000 --- a/litellm/proxy/_experimental/out/_next/static/chunks/1uy2av_f_ojad.js +++ /dev/null @@ -1,2 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,515288,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(115504);let o=r.forwardRef(({className:e,size:r="default",...o},a)=>(0,t.jsx)("div",{ref:a,"data-slot":"card","data-size":r,className:(0,n.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...o}));o.displayName="Card";let a=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-header",className:(0,n.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",e),...r}));a.displayName="CardHeader";let i=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-title",className:(0,n.cn)("text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",e),...r}));i.displayName="CardTitle";let s=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-description",className:(0,n.cn)("text-sm text-muted-foreground",e),...r}));s.displayName="CardDescription";let l=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-action",className:(0,n.cn)("col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...r}));l.displayName="CardAction";let u=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-content",className:(0,n.cn)("px-(--card-spacing)",e),...r}));u.displayName="CardContent";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("div",{ref:o,"data-slot":"card-footer",className:(0,n.cn)("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",e),...r}));d.displayName="CardFooter",e.s(["Card",0,o,"CardAction",0,l,"CardContent",0,u,"CardDescription",0,s,"CardFooter",0,d,"CardHeader",0,a,"CardTitle",0,i])},695411,e=>{"use strict";var t=e.i(602869);let r=async e=>{try{let r=await (0,t.modelHubCall)(e);if(r?.data.length>0){let e=r.data.map(e=>({model_group:e.model_group,mode:e?.mode}));return e.sort((e,t)=>e.model_group.localeCompare(t.model_group)),e}return[]}catch(e){throw console.error("Error fetching model info:",e),e}};e.s(["fetchAvailableModels",0,r])},16715,e=>{"use strict";let t=(0,e.i(475254).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],16715)},409797,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDownIcon",()=>t.default])},112179,581070,e=>{"use strict";var t=e.i(843476),r=e.i(487486),n=e.i(115504),o=e.i(746798);function a({content:e,trigger:r}){return(0,t.jsx)(o.TooltipProvider,{delay:300,children:(0,t.jsxs)(o.Tooltip,{children:[(0,t.jsx)(o.TooltipTrigger,{render:r}),(0,t.jsx)(o.TooltipContent,{children:e})]})})}e.s(["CellTooltip",0,a],581070);let i={success:"border-green-200 bg-green-50 text-green-600",error:"border-red-200 bg-red-50 text-red-600",warning:"border-amber-200 bg-amber-50 text-amber-600",neutral:"border-gray-200 bg-gray-50 text-gray-600",info:"border-blue-200 bg-blue-50 text-blue-600"};e.s(["StatusBadge",0,function({tone:e,label:o,tooltip:s,dataTestId:l}){let u=(0,t.jsx)(r.Badge,{variant:"outline","data-testid":l,className:(0,n.cn)("whitespace-nowrap font-normal",i[e]),children:o});return s?(0,t.jsx)(a,{content:s,trigger:u}):u}],112179)},95779,e=>{"use strict";var t=e.i(480731);t.BaseColors.Blue,t.BaseColors.Cyan,t.BaseColors.Sky,t.BaseColors.Indigo,t.BaseColors.Violet,t.BaseColors.Purple,t.BaseColors.Fuchsia,t.BaseColors.Slate,t.BaseColors.Gray,t.BaseColors.Zinc,t.BaseColors.Neutral,t.BaseColors.Stone,t.BaseColors.Red,t.BaseColors.Orange,t.BaseColors.Amber,t.BaseColors.Yellow,t.BaseColors.Lime,t.BaseColors.Green,t.BaseColors.Emerald,t.BaseColors.Teal,t.BaseColors.Pink,t.BaseColors.Rose,e.s(["colorPalette",0,{canvasBackground:50,lightBackground:100,background:500,darkBackground:600,darkestBackground:800,lightBorder:200,border:500,darkBorder:700,lightRing:200,ring:300,iconRing:500,lightText:400,text:500,iconText:600,darkText:700,darkestText:900,icon:500}])},599724,936325,e=>{"use strict";var t=e.i(95779),r=e.i(444755),n=e.i(673706),o=e.i(271645);let a=o.default.forwardRef((e,a)=>{let{color:i,className:s,children:l}=e;return o.default.createElement("p",{ref:a,className:(0,r.tremorTwMerge)("text-tremor-default",i?(0,n.getColorClassNames)(i,t.colorPalette.text).textColor:(0,r.tremorTwMerge)("text-tremor-content","dark:text-dark-tremor-content"),s)},l)});a.displayName="Text",e.s(["default",0,a],936325),e.s(["Text",0,a],599724)},994388,e=>{"use strict";var t=e.i(290571),r=e.i(829087),n=e.i(271645);let o=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],a=e=>({_s:e,status:o[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),i=e=>e?6:5,s=(e,t,r,n,o)=>{clearTimeout(n.current);let i=a(e);t(i),r.current=i,o&&o({current:i})};var l=e.i(480731),u=e.i(444755),d=e.i(673706);let c=e=>{var r=(0,t.__rest)(e,[]);return n.default.createElement("svg",Object.assign({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor"}),n.default.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),n.default.createElement("path",{d:"M18.364 5.636L16.95 7.05A7 7 0 1 0 19 12h2a9 9 0 1 1-2.636-6.364z"}))};var f=e.i(95779);let p={xs:{height:"h-4",width:"w-4"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-6",width:"w-6"},xl:{height:"h-6",width:"w-6"}},m=(e,t)=>{switch(e){case"primary":return{textColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",hoverTextColor:t?(0,d.getColorClassNames)("white").textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,d.getColorClassNames)(t,f.colorPalette.background).bgColor:"bg-tremor-brand dark:bg-dark-tremor-brand",hoverBgColor:t?(0,d.getColorClassNames)(t,f.colorPalette.darkBackground).hoverBgColor:"hover:bg-tremor-brand-emphasis dark:hover:bg-dark-tremor-brand-emphasis",borderColor:t?(0,d.getColorClassNames)(t,f.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand",hoverBorderColor:t?(0,d.getColorClassNames)(t,f.colorPalette.darkBorder).hoverBorderColor:"hover:border-tremor-brand-emphasis dark:hover:border-dark-tremor-brand-emphasis"};case"secondary":return{textColor:t?(0,d.getColorClassNames)(t,f.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,f.colorPalette.text).textColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,hoverBgColor:t?(0,u.tremorTwMerge)((0,d.getColorClassNames)(t,f.colorPalette.background).hoverBgColor,"hover:bg-opacity-20 dark:hover:bg-opacity-20"):"hover:bg-tremor-brand-faint dark:hover:bg-dark-tremor-brand-faint",borderColor:t?(0,d.getColorClassNames)(t,f.colorPalette.border).borderColor:"border-tremor-brand dark:border-dark-tremor-brand"};case"light":return{textColor:t?(0,d.getColorClassNames)(t,f.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",hoverTextColor:t?(0,d.getColorClassNames)(t,f.colorPalette.darkText).hoverTextColor:"hover:text-tremor-brand-emphasis dark:hover:text-dark-tremor-brand-emphasis",bgColor:(0,d.getColorClassNames)("transparent").bgColor,borderColor:"",hoverBorderColor:""}}},g=(0,d.makeClassName)("Button"),h=({loading:e,iconSize:t,iconPosition:r,Icon:o,needMargin:a,transitionStatus:i})=>{let s=a?r===l.HorizontalPositions.Left?(0,u.tremorTwMerge)("-ml-1","mr-1.5"):(0,u.tremorTwMerge)("-mr-1","ml-1.5"):"",d=(0,u.tremorTwMerge)("w-0 h-0"),f={default:d,entering:d,entered:t,exiting:t,exited:d};return e?n.default.createElement(c,{className:(0,u.tremorTwMerge)(g("icon"),"animate-spin shrink-0",s,f.default,f[i]),style:{transition:"width 150ms"}}):n.default.createElement(o,{className:(0,u.tremorTwMerge)(g("icon"),"shrink-0",t,s)})},b=n.default.forwardRef((e,o)=>{let{icon:c,iconPosition:f=l.HorizontalPositions.Left,size:b=l.Sizes.SM,color:v,variant:x="primary",disabled:C,loading:y=!1,loadingText:E,children:w,tooltip:k,className:S}=e,R=(0,t.__rest)(e,["icon","iconPosition","size","color","variant","disabled","loading","loadingText","children","tooltip","className"]),T=y||C,N=void 0!==c||y,M=y&&E,I=!(!w&&!M),P=(0,u.tremorTwMerge)(p[b].height,p[b].width),O="light"!==x?(0,u.tremorTwMerge)("rounded-tremor-default border","shadow-tremor-input","dark:shadow-dark-tremor-input"):"",A=m(x,v),L=("light"!==x?{xs:{paddingX:"px-2.5",paddingY:"py-1.5",fontSize:"text-xs"},sm:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-sm"},md:{paddingX:"px-4",paddingY:"py-2",fontSize:"text-md"},lg:{paddingX:"px-4",paddingY:"py-2.5",fontSize:"text-lg"},xl:{paddingX:"px-4",paddingY:"py-3",fontSize:"text-xl"}}:{xs:{paddingX:"",paddingY:"",fontSize:"text-xs"},sm:{paddingX:"",paddingY:"",fontSize:"text-sm"},md:{paddingX:"",paddingY:"",fontSize:"text-md"},lg:{paddingX:"",paddingY:"",fontSize:"text-lg"},xl:{paddingX:"",paddingY:"",fontSize:"text-xl"}})[b],{tooltipProps:D,getReferenceProps:F}=(0,r.useTooltip)(300),[B,j]=(({enter:e=!0,exit:t=!0,preEnter:r,preExit:o,timeout:l,initialEntered:u,mountOnEnter:d,unmountOnExit:c,onStateChange:f}={})=>{let[p,m]=(0,n.useState)(()=>a(u?2:i(d))),g=(0,n.useRef)(p),h=(0,n.useRef)(0),[b,v]="object"==typeof l?[l.enter,l.exit]:[l,l],x=(0,n.useCallback)(()=>{let e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return i(t)}})(g.current._s,c);e&&s(e,m,g,h,f)},[f,c]);return[p,(0,n.useCallback)(n=>{let a=e=>{switch(s(e,m,g,h,f),e){case 1:b>=0&&(h.current=((...e)=>setTimeout(...e))(x,b));break;case 4:v>=0&&(h.current=((...e)=>setTimeout(...e))(x,v));break;case 0:case 3:h.current=((...e)=>setTimeout(...e))(()=>{isNaN(document.body.offsetTop)||a(e+1)},0)}},l=g.current.isEnter;"boolean"!=typeof n&&(n=!l),n?l||a(e?+!r:2):l&&a(t?o?3:4:i(c))},[x,f,e,t,r,o,b,v,c]),x]})({timeout:50});return(0,n.useEffect)(()=>{j(y)},[y]),n.default.createElement("button",Object.assign({ref:(0,d.mergeRefs)([o,D.refs.setReference]),className:(0,u.tremorTwMerge)(g("root"),"shrink-0 inline-flex justify-center items-center group font-medium outline-none",O,L.paddingX,L.paddingY,L.fontSize,A.textColor,A.bgColor,A.borderColor,A.hoverBorderColor,T?"opacity-50 cursor-not-allowed":(0,u.tremorTwMerge)(m(x,v).hoverTextColor,m(x,v).hoverBgColor,m(x,v).hoverBorderColor),S),disabled:T},F,R),n.default.createElement(r.default,Object.assign({text:k},D)),N&&f!==l.HorizontalPositions.Right?n.default.createElement(h,{loading:y,iconSize:P,iconPosition:f,Icon:c,transitionStatus:B.status,needMargin:I}):null,M||w?n.default.createElement("span",{className:(0,u.tremorTwMerge)(g("text"),"text-tremor-default whitespace-nowrap")},M?E:w):null,N&&f===l.HorizontalPositions.Right?n.default.createElement(h,{loading:y,iconSize:P,iconPosition:f,Icon:c,transitionStatus:B.status,needMargin:I}):null)});b.displayName="Button",e.s(["Button",0,b],994388)},652265,e=>{"use strict";let t,r,n,o,a;e.i(544508);var i=e.i(397701),s=e.i(402155);let l=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),u=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var d=((t=d||{})[t.First=1]="First",t[t.Previous=2]="Previous",t[t.Next=4]="Next",t[t.Last=8]="Last",t[t.WrapAround=16]="WrapAround",t[t.NoScroll=32]="NoScroll",t[t.AutoFocus=64]="AutoFocus",t),c=((r=c||{})[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r),f=((n=f||{})[n.Previous=-1]="Previous",n[n.Next=1]="Next",n);function p(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(l)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var m=((o=m||{})[o.Strict=0]="Strict",o[o.Loose=1]="Loose",o),g=((a=g||{})[a.Keyboard=0]="Keyboard",a[a.Mouse=1]="Mouse",a);function h(e,t=e=>e){return e.slice().sort((e,r)=>{let n=t(e),o=t(r);if(null===n||null===o)return 0;let a=n.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function b(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){var a,i,s;let l=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,d=Array.isArray(e)?r?h(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(u)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):p(e);o.length>0&&d.length>1&&(d=d.filter(e=>!o.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),n=null!=n?n:l.activeElement;let c=(()=>{if(5&t)return 1;if(10&t)return -1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,d.indexOf(n))-1;if(4&t)return Math.max(0,d.indexOf(n))+1;if(8&t)return d.length-1;throw Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=32&t?{preventScroll:!0}:{},g=0,v=d.length,x;do{if(g>=v||g+v<=0)return 0;let e=f+g;if(16&t)e=(e+v)%v;else{if(e<0)return 3;if(e>=v)return 1}null==(x=d[e])||x.focus(m),g+=c}while(x!==l.activeElement)return 6&t&&null!=(s=null==(i=null==(a=x)?void 0:a.matches)?void 0:i.call(a,"textarea,input"))&&s&&x.select(),2}"u">typeof window&&"u">typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0)),e.s(["Focus",0,d,"FocusResult",0,c,"FocusableMode",0,m,"focusFrom",0,function(e,t){return b(p(),t,{relativeTo:e})},"focusIn",0,b,"getFocusableElements",0,p,"isFocusableElement",0,function(e,t=0){var r;return e!==(null==(r=(0,s.getOwnerDocument)(e))?void 0:r.body)&&(0,i.match)(t,{0:()=>e.matches(l),1(){let t=e;for(;null!==t;){if(t.matches(l))return!0;t=t.parentElement}return!1}})},"sortByDomNode",0,h])},2788,e=>{"use strict";let t;var r=e.i(700020),n=((t=n||{})[t.None=1]="None",t[t.Focusable=2]="Focusable",t[t.Hidden=4]="Hidden",t);let o=(0,r.forwardRefWithAs)(function(e,t){var n;let{features:o=1,...a}=e,i={ref:t,"aria-hidden":(2&o)==2||(null!=(n=a["aria-hidden"])?n:void 0),hidden:(4&o)==4||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(4&o)==4&&(2&o)!=2&&{display:"none"}}};return(0,r.useRender)()({ourProps:i,theirProps:a,slot:{},defaultTag:"span",name:"Hidden"})});e.s(["Hidden",0,o,"HiddenFeatures",0,n])},553521,e=>{"use strict";var t=e.i(271645),r=e.i(835696);e.s(["useIsMounted",0,function(){let e=(0,t.useRef)(!1);return(0,r.useIsoMorphicEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}])},677572,370359,405934,e=>{"use strict";var t,r,n,o=e.i(843476);e.s([],559657),e.i(559657),e.i(247167);var a=e.i(271645),i=e.i(951437),s=e.i(146376),l=e.i(667865),u=e.i(552245),d=e.i(53687),c=e.i(733332);let f=a.createContext(void 0);function p(){let e=a.useContext(f);if(void 0===e)throw Error((0,c.default)(64));return e}let m=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),g={tabActivationDirection:e=>({[m.activationDirection]:e})};var h=e.i(675606),b=e.i(56434);let v=a.forwardRef(function(e,t){let{className:r,defaultValue:n=0,onValueChange:c,orientation:p="horizontal",render:m,value:v,style:C,...y}=e,E=void 0!==e.defaultValue,w=a.useRef([]),[k,S]=a.useState(()=>new Map),[R,T]=(0,i.useControlled)({controlled:v,default:n,name:"Tabs",state:"value"}),N=void 0!==v,[M,I]=a.useState(()=>new Map),P=a.useRef(void 0),O=a.useCallback(e=>{if(void 0===e)return null;for(let[t,r]of M.entries())if(null!=r&&e===(r.value??r.index))return t;return null},[M]),[A,L]=a.useState(()=>({previousValue:R,tabActivationDirection:"none"})),{previousValue:D,tabActivationDirection:F}=A,B=F,j=!1;D!==R&&(B=x(D,R,p,M),j=null!=D&&null!=R&&null==O(R));let _=j?D:R,z=D!==_||F!==B;(0,s.useIsoLayoutEffect)(()=>{z&&L({previousValue:_,tabActivationDirection:B})},[_,z,B]);let H=(0,l.useStableCallback)((e,t)=>{t.activationDirection=x(R,e,p,M),c?.(e,t),t.isCanceled||T(e)}),W=(0,l.useStableCallback)((e,t)=>{c?.(e,(0,h.createChangeEventDetails)(t,void 0,void 0,{activationDirection:"none"}))}),Y=(0,l.useStableCallback)((e,t)=>{S(r=>{if(r.get(e)===t)return r;let n=new Map(r);return n.set(e,t),n})}),K=(0,l.useStableCallback)((e,t)=>{S(r=>{if(!r.has(e)||r.get(e)!==t)return r;let n=new Map(r);return n.delete(e),n})}),V=a.useCallback(e=>k.get(e),[k]),X=a.useCallback(e=>{for(let t of M.values())if(e===t?.value)return t?.id},[M]),U=a.useMemo(()=>({getTabElementBySelectedValue:O,getTabIdByPanelValue:X,getTabPanelIdByValue:V,onValueChange:H,orientation:p,registerMountedTabPanel:Y,setTabMap:I,unregisterMountedTabPanel:K,tabActivationDirection:B,value:R}),[O,X,V,H,p,Y,I,K,B,R]),G=a.useMemo(()=>{for(let e of M.values())if(null!=e&&e.value===R)return e},[M,R]),$=a.useMemo(()=>{for(let e of M.values())if(null!=e&&!e.disabled)return e.value},[M]),q=a.useRef(!E),Z=a.useRef(n),J=a.useRef(E),Q=a.useRef(!1);(0,s.useIsoLayoutEffect)(()=>{if(N)return;function e(e,t){T(e),L(t=>t.previousValue===e&&"none"===t.tabActivationDirection?t:{previousValue:e,tabActivationDirection:"none"}),W(e,t),q.current=!1}if(0===M.size){Q.current&&null!==R&&!P.current?.isConnected&&e(null,b.REASONS.missing);return}Q.current=!0,P.current=M.keys().next().value;let t=G?.disabled,r=null==G&&null!==R;if(t||R!==Z.current||(J.current=!1),J.current&&t&&R===Z.current)return;let n=q.current;if(t||r){let r=$??null;if(R===r){q.current=!1;return}let o=b.REASONS.missing;n?o=b.REASONS.initial:t&&(o=b.REASONS.disabled),e(r,o);return}n&&null!=G&&(W(R,b.REASONS.initial),q.current=!1)},[$,N,W,G,T,M,R]);let ee={orientation:p,tabActivationDirection:B},et=(0,u.useRenderElement)("div",e,{state:ee,ref:t,props:y,stateAttributesMapping:g});return(0,o.jsx)(f.Provider,{value:U,children:(0,o.jsx)(d.CompositeList,{elementsRef:w,children:et})})});function x(e,t,r,n){if(null==e||null==t)return"none";let o=null,a=null;for(let[r,i]of n.entries()){if(null==i)continue;let n=i.value??i.index;if(e===n&&(o=r),t===n&&(a=r),null!=o&&null!=a)break}if(null==o||null==a)return o!==a&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===r?t>e?"right":"left":t>e?"down":"up":"none";let i=o.getBoundingClientRect(),s=a.getBoundingClientRect();if("horizontal"===r){if(s.lefti.left)return"right"}else{if(s.topi.top)return"down"}return"none"}var C=e.i(108868),y=e.i(788015),E=e.i(540886);let w="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,w],370359);var k=e.i(395530);let S=a.createContext(void 0);function R(){let e=a.useContext(S);if(void 0===e)throw Error((0,c.default)(65));return e}var T=e.i(647554);let N=a.forwardRef(function(e,t){let{className:r,disabled:n=!1,render:o,value:i,id:l,nativeButton:d=!0,style:c,...f}=e,{value:m,getTabPanelIdByValue:v,orientation:x,tabActivationDirection:S}=p(),{activateOnFocus:N,highlightedTabIndex:M,onTabActivation:I,registerTabResizeObserverElement:P,setHighlightedTabIndex:O,tabsListElement:A}=R(),L=(0,y.useBaseUiId)(l),D=a.useMemo(()=>({disabled:n,id:L,value:i}),[n,L,i]),{compositeProps:F,compositeRef:B,index:j}=(0,k.useCompositeItem)({metadata:D}),_=i===m,z=a.useRef(!1),H=a.useRef(null);(0,s.useIsoLayoutEffect)(()=>{let e=H.current;if(e)return P(e)},[P]),(0,s.useIsoLayoutEffect)(()=>{if(z.current){z.current=!1;return}if(_&&j>-1&&M!==j){if(null!=A){let e=(0,T.activeElement)((0,C.ownerDocument)(A));if(e&&(0,T.contains)(A,e))return}n||O(j)}},[_,j,M,O,n,A]);let{getButtonProps:W,buttonRef:Y}=(0,E.useButton)({disabled:n,native:d,focusableWhenDisabled:!0}),K=v(i),V=a.useRef(!1),X=a.useRef(!1);return(0,u.useRenderElement)("button",e,{state:{disabled:n,active:_,orientation:x,tabActivationDirection:S},ref:[t,Y,B,H],props:[F,{role:"tab","aria-controls":K,"aria-selected":_,id:L,onClick:function(e){_||n||I(i,(0,h.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){_||(j>-1&&!n&&O(j),!n&&N&&(!V.current||V.current&&X.current)&&I(i,(0,h.createChangeEventDetails)(b.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){_||n||(V.current=!0,e.button&&0!==e.button||(X.current=!0,(0,C.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){V.current=!1,X.current=!1},{once:!0})))},[w]:_?"":void 0,onKeyDownCapture(){z.current=!0}},f,W],stateAttributesMapping:g})});var M=e.i(73364),I=e.i(802239),P=e.i(956789);function O(){return P.NOOP}function A(){return!1}function L(){return!0}let D=((r={}).activeTabLeft="--active-tab-left",r.activeTabRight="--active-tab-right",r.activeTabTop="--active-tab-top",r.activeTabBottom="--active-tab-bottom",r.activeTabWidth="--active-tab-width",r.activeTabHeight="--active-tab-height",r);var F=e.i(172410);let B={...g,activeTabPosition:()=>null,activeTabSize:()=>null},j=a.forwardRef(function(e,t){let{className:r,render:n,renderBeforeHydration:i=!1,style:s,...l}=e,{nonce:d}=(0,F.useCSPContext)(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:m,value:g}=p(),{tabsListElement:h,registerIndicatorUpdateListener:b}=R(),v=(0,I.useSyncExternalStore)(O,A,L),x=function(){let[,e]=a.useState({});return a.useCallback(()=>{e({})},[])}();a.useEffect(()=>b(x),[b,x]);let C=0,y=0,E=0,w=0,k=0,S=0,T=!1;if(null!=g&&null!=h){let e=c(g);if(null!=e){T=!0;let{width:t,height:r}=(0,M.getCssDimensions)(e),{width:n,height:o}=(0,M.getCssDimensions)(h),a=e.getBoundingClientRect(),i=h.getBoundingClientRect(),s=n>0?i.width/n:1,l=o>0?i.height/o:1;if(Math.abs(s)>Number.EPSILON&&Math.abs(l)>Number.EPSILON){let e=a.left-i.left,t=a.top-i.top;C=e/s+h.scrollLeft-h.clientLeft,E=t/l+h.scrollTop-h.clientTop}else C=e.offsetLeft,E=e.offsetTop;k=t,S=r,y=h.scrollWidth-C-k,w=h.scrollHeight-E-S}}let N=T?{left:C,right:y,top:E,bottom:w}:null,P=T?{width:k,height:S}:null,j=T?{[D.activeTabLeft]:`${C}px`,[D.activeTabRight]:`${y}px`,[D.activeTabTop]:`${E}px`,[D.activeTabBottom]:`${w}px`,[D.activeTabWidth]:`${k}px`,[D.activeTabHeight]:`${S}px`}:void 0,_=T&&k>0&&S>0,z=(0,u.useRenderElement)("span",e,{state:{orientation:f,activeTabPosition:N,activeTabSize:P,tabActivationDirection:m},ref:t,props:[{role:"presentation",style:j,hidden:!_},l,{suppressHydrationWarning:!0}],stateAttributesMapping:B});return null==g?null:(0,o.jsxs)(a.Fragment,{children:[z,v&&i&&(0,o.jsx)("script",{nonce:d,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});var _=e.i(144394),z=e.i(209407),H=e.i(137584),W=e.i(223910),Y=e.i(673553);let K=((n={}).index="data-index",n.activationDirection="data-activation-direction",n.orientation="data-orientation",n.hidden="data-hidden",n[n.startingStyle=z.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=z.TransitionStatusDataAttributes.endingStyle]="endingStyle",n),V={...g,...z.transitionStatusMapping},X=a.forwardRef(function(e,t){let{className:r,value:n,render:o,keepMounted:i=!1,style:l,...d}=e,{value:c,getTabIdByPanelValue:f,orientation:m,tabActivationDirection:g,registerMountedTabPanel:h,unregisterMountedTabPanel:b}=p(),v=(0,y.useBaseUiId)(),x=a.useMemo(()=>({id:v,value:n}),[v,n]),{ref:C,index:E}=(0,Y.useCompositeListItem)({metadata:x}),w=n===c,{mounted:k,transitionStatus:S,setMounted:R}=(0,W.useTransitionStatus)(w),T=!k,N=f(n),M=a.useRef(null),I=(0,u.useRenderElement)("div",e,{state:{hidden:T,orientation:m,tabActivationDirection:g,transitionStatus:S},ref:[t,C,M],props:[{"aria-labelledby":N,hidden:T,id:v,role:"tabpanel",tabIndex:w?0:-1,inert:(0,_.inertValue)(!w),[K.index]:E},d],stateAttributesMapping:V});return((0,H.useOpenChangeComplete)({open:w,ref:M,onComplete(){w||R(!1)}}),(0,s.useIsoLayoutEffect)(()=>{if((!T||i)&&null!=v)return h(n,v),()=>{b(n,v)}},[T,i,n,v,h,b]),i||k)?I:null});var U=e.i(590803),G=e.i(828918),$=e.i(673327),q=e.i(621082);let Z=[];var J=e.i(838452),Q=e.i(872855);function ee(e){let{render:t,className:r,style:n,refs:i=P.EMPTY_ARRAY,props:c=P.EMPTY_ARRAY,state:f=P.EMPTY_OBJECT,stateAttributesMapping:p,highlightedIndex:m,onHighlightedIndexChange:g,orientation:h,grid:b,loopFocus:v,onLoop:x,enableHomeAndEndKeys:C,onMapChange:y,stopEventPropagation:E=!0,rootRef:k,disabledIndices:S,modifierKeys:R,highlightItemOnHover:N=!1,tag:M="div",...I}=e,{props:O,highlightedIndex:A,onHighlightedIndexChange:L,elementsRef:D,onMapChange:F,relayKeyboardEvent:B}=function(e){let{loopFocus:t=!0,orientation:r="both",grid:n,onLoop:o,direction:i,highlightedIndex:u,onHighlightedIndexChange:d,rootRef:c,enableHomeAndEndKeys:f=!1,stopEventPropagation:p=!1,disabledIndices:m,modifierKeys:g=Z}=e,[h,b]=a.useState(0),v=null!=n,x=a.useRef(null),C=(0,G.useMergedRefs)(x,c),y=a.useRef([]),E=a.useRef(!1),k=u??h,S=(0,l.useStableCallback)((e,t=!1)=>{if((d??b)(e),t){let t=y.current[e];(0,$.scrollIntoViewIfNeeded)(x.current,t,i,r)}}),R=(0,l.useStableCallback)(e=>{if(0===e.size||E.current)return;E.current=!0;let t=Array.from(e.keys()),n=t.find(e=>e?.hasAttribute(w))??null,o=n?t.indexOf(n):-1;if(-1!==o)S(o);else if((0,q.isListIndexDisabled)(t,k,m)){let e=(0,q.findNonDisabledListIndex)(t,{disabledIndices:m});(0,q.isIndexOutOfListBounds)(t,e)||S(e)}(0,$.scrollIntoViewIfNeeded)(x.current,n,i,r)});(0,s.useIsoLayoutEffect)(()=>{if(null==m||null!=u||!E.current)return;let e=y.current;if((0,q.isListIndexDisabled)(e,k,m)){let t=(0,q.findNonDisabledListIndex)(e,{disabledIndices:m});(0,q.isIndexOutOfListBounds)(e,t)||S(t)}},[m,u,k,y,S]);let N=(0,l.useStableCallback)((e,t,r)=>o?o(e,t,r,y):r),M=(0,l.useStableCallback)(e=>{let a=f?$.COMPOSITE_KEYS:$.ARROW_KEYS;if(!a.has(e.key)||function(e,t){for(let r of $.MODIFIER_KEYS.values())if(!t.includes(r)&&e.getModifierState(r))return!0;return!1}(e,g)||!x.current)return;let s="rtl"===i,l=s?$.ARROW_LEFT:$.ARROW_RIGHT,u={horizontal:l,vertical:$.ARROW_DOWN,both:l}[r],d=s?$.ARROW_RIGHT:$.ARROW_LEFT,c={horizontal:d,vertical:$.ARROW_UP,both:d}[r],h=(0,T.getTarget)(e.nativeEvent);if(null!=h&&(0,$.isNativeInput)(h)&&!(0,U.isElementDisabled)(h)){let t=h.selectionStart,r=h.selectionEnd,n=h.value??"";if(null==t||e.shiftKey||t!==r||e.key!==c&&t0)return}let b=k,C=(0,q.getMinListIndex)(y,m),E=(0,q.getMaxListIndex)(y,m);null!=n&&(b=n({disabledIndices:m,elementsRef:y,event:e,highlightedIndex:k,loopFocus:t,maxIndex:E,minIndex:C,onLoop:N,orientation:r,rtl:s}));let w={horizontal:[l],vertical:[$.ARROW_DOWN],both:[l,$.ARROW_DOWN]}[r],R={horizontal:[d],vertical:[$.ARROW_UP],both:[d,$.ARROW_UP]}[r],M=v?a:({horizontal:f?$.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:$.HORIZONTAL_KEYS,vertical:f?$.VERTICAL_KEYS_WITH_EXTRA_KEYS:$.VERTICAL_KEYS,both:a})[r];f&&(e.key===$.HOME?b=C:e.key===$.END&&(b=E)),b===k&&(w.includes(e.key)||R.includes(e.key))&&(t&&b===E&&w.includes(e.key)?(b=C,o&&(b=o(e,k,b,y))):t&&b===C&&R.includes(e.key)?(b=E,o&&(b=o(e,k,b,y))):b=(0,q.findNonDisabledListIndex)(y.current,{startingIndex:b,decrement:R.includes(e.key),disabledIndices:m})),b===k||(0,q.isIndexOutOfListBounds)(y.current,b)||(p&&e.stopPropagation(),M.has(e.key)&&e.preventDefault(),S(b,!0),queueMicrotask(()=>{y.current[b]?.focus()}))});return{props:{ref:C,onFocus(e){let t=x.current,r=(0,T.getTarget)(e.nativeEvent);t&&null!=r&&(0,$.isNativeInput)(r)&&r.setSelectionRange(0,r.value.length??0)},onKeyDown:M},highlightedIndex:k,onHighlightedIndexChange:S,elementsRef:y,disabledIndices:m,onMapChange:R,relayKeyboardEvent:M}}({grid:b,loopFocus:v,onLoop:x,orientation:h,highlightedIndex:m,onHighlightedIndexChange:g,rootRef:k,stopEventPropagation:E,enableHomeAndEndKeys:C,direction:(0,Q.useDirection)(),disabledIndices:S,modifierKeys:R}),j=(0,u.useRenderElement)(M,e,{state:f,ref:i,props:[O,...c,I],stateAttributesMapping:p}),_=a.useMemo(()=>({highlightedIndex:A,onHighlightedIndexChange:L,highlightItemOnHover:N,relayKeyboardEvent:B}),[A,L,N,B]);return(0,o.jsx)(J.CompositeRootContext.Provider,{value:_,children:(0,o.jsx)(d.CompositeList,{elementsRef:D,onMapChange:e=>{y?.(e),F(e)},children:j})})}e.s(["CompositeRoot",0,ee],405934);let et=a.forwardRef(function(e,t){let{activateOnFocus:r=!1,className:n,loopFocus:i=!0,render:u,style:d,...c}=e,{onValueChange:f,orientation:m,value:h,setTabMap:b,tabActivationDirection:v}=p(),[x,C]=a.useState(0),[y,E]=a.useState(null),w=a.useRef(new Set),k=a.useRef(new Set),R=a.useRef(null);(0,s.useIsoLayoutEffect)(()=>{if("u"{w.current.forEach(e=>{e()})});return R.current=e,y&&e.observe(y),k.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),R.current=null}},[y]);let T=(0,l.useStableCallback)(e=>(w.current.add(e),()=>{w.current.delete(e)})),N=(0,l.useStableCallback)(e=>(k.current.add(e),R.current?.observe(e),()=>{k.current.delete(e),R.current?.unobserve(e)})),M=(0,l.useStableCallback)((e,t)=>{e!==h&&f(e,t)}),I=a.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:x,registerIndicatorUpdateListener:T,registerTabResizeObserverElement:N,onTabActivation:M,setHighlightedTabIndex:C,tabsListElement:y}),[r,x,T,N,M,C,y]);return(0,o.jsx)(S.Provider,{value:I,children:(0,o.jsx)(ee,{render:u,className:n,style:d,state:{orientation:m,tabActivationDirection:v},refs:[t,E],props:[{"aria-orientation":"vertical"===m?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:g,highlightedIndex:x,enableHomeAndEndKeys:!0,loopFocus:i,orientation:m,onHighlightedIndexChange:C,onMapChange:b,disabledIndices:P.EMPTY_ARRAY})})});e.s(["Indicator",0,j,"List",0,et,"Panel",0,X,"Root",0,v,"Tab",0,N],69281);var er=e.i(69281),er=er,en=e.i(115504);let eo=(0,en.cva)({base:"group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-9 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:t="horizontal",...r}){return(0,o.jsx)(er.Root,{"data-slot":"tabs","data-orientation":t,className:(0,en.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...r})},"TabsContent",0,function({className:e,...t}){return(0,o.jsx)(er.Panel,{"data-slot":"tabs-content",className:(0,en.cn)("flex-1 text-sm outline-none",e),...t})},"TabsList",0,function({className:e,variant:t="default",...r}){return(0,o.jsx)(er.List,{"data-slot":"tabs-list","data-variant":t,className:(0,en.cn)(eo({variant:t}),e),...r})},"TabsTrigger",0,function({className:e,...t}){return(0,o.jsx)(er.Tab,{"data-slot":"tabs-trigger",className:(0,en.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...t})}],677572)},728889,e=>{"use strict";var t=e.i(290571),r=e.i(271645),n=e.i(829087),o=e.i(480731),a=e.i(444755),i=e.i(673706),s=e.i(95779);let l={xs:{paddingX:"px-1.5",paddingY:"py-1.5"},sm:{paddingX:"px-1.5",paddingY:"py-1.5"},md:{paddingX:"px-2",paddingY:"py-2"},lg:{paddingX:"px-2",paddingY:"py-2"},xl:{paddingX:"px-2.5",paddingY:"py-2.5"}},u={xs:{height:"h-3",width:"w-3"},sm:{height:"h-5",width:"w-5"},md:{height:"h-5",width:"w-5"},lg:{height:"h-7",width:"w-7"},xl:{height:"h-9",width:"w-9"}},d={simple:{rounded:"",border:"",ring:"",shadow:""},light:{rounded:"rounded-tremor-default",border:"",ring:"",shadow:""},shadow:{rounded:"rounded-tremor-default",border:"border",ring:"",shadow:"shadow-tremor-card dark:shadow-dark-tremor-card"},solid:{rounded:"rounded-tremor-default",border:"border-2",ring:"ring-1",shadow:""},outlined:{rounded:"rounded-tremor-default",border:"border",ring:"ring-2",shadow:""}},c=(0,i.makeClassName)("Icon"),f=r.default.forwardRef((e,f)=>{let{icon:p,variant:m="simple",tooltip:g,size:h=o.Sizes.SM,color:b,className:v}=e,x=(0,t.__rest)(e,["icon","variant","tooltip","size","color","className"]),C=((e,t)=>{switch(e){case"simple":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:"",borderColor:"",ringColor:""};case"light":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,a.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand-muted dark:bg-dark-tremor-brand-muted",borderColor:"",ringColor:""};case"shadow":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,a.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:"border-tremor-border dark:border-dark-tremor-border",ringColor:""};case"solid":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand-inverted dark:text-dark-tremor-brand-inverted",bgColor:t?(0,a.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-brand dark:bg-dark-tremor-brand",borderColor:"border-tremor-brand-inverted dark:border-dark-tremor-brand-inverted",ringColor:"ring-tremor-ring dark:ring-dark-tremor-ring"};case"outlined":return{textColor:t?(0,i.getColorClassNames)(t,s.colorPalette.text).textColor:"text-tremor-brand dark:text-dark-tremor-brand",bgColor:t?(0,a.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.background).bgColor,"bg-opacity-20"):"bg-tremor-background dark:bg-dark-tremor-background",borderColor:t?(0,i.getColorClassNames)(t,s.colorPalette.ring).borderColor:"border-tremor-brand-subtle dark:border-dark-tremor-brand-subtle",ringColor:t?(0,a.tremorTwMerge)((0,i.getColorClassNames)(t,s.colorPalette.ring).ringColor,"ring-opacity-40"):"ring-tremor-brand-muted dark:ring-dark-tremor-brand-muted"}}})(m,b),{tooltipProps:y,getReferenceProps:E}=(0,n.useTooltip)();return r.default.createElement("span",Object.assign({ref:(0,i.mergeRefs)([f,y.refs.setReference]),className:(0,a.tremorTwMerge)(c("root"),"inline-flex shrink-0 items-center justify-center",C.bgColor,C.textColor,C.borderColor,C.ringColor,d[m].rounded,d[m].border,d[m].shadow,d[m].ring,l[h].paddingX,l[h].paddingY,v)},E,x),r.default.createElement(n.default,Object.assign({text:g},y)),r.default.createElement(p,{className:(0,a.tremorTwMerge)(c("icon"),"shrink-0",u[h].height,u[h].width)}))});f.displayName="Icon",e.s(["default",0,f],728889)},888288,e=>{"use strict";var t=e.i(271645);e.s(["default",0,(e,r)=>{let n=void 0!==r,[o,a]=(0,t.useState)(e);return[n?r:o,e=>{n||a(e)}]}])},624687,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(115504);let o=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)("textarea",{ref:o,"data-slot":"textarea",className:(0,n.cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...r}));o.displayName="Textarea",e.s(["Textarea",0,o])},950594,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(115504),o=e.i(519455),a=e.i(793479),i=e.i(624687);let s=(0,n.cva)({base:"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}}),l=(0,n.cva)({base:"flex items-center gap-2 text-sm shadow-none",variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}}),u=r.forwardRef(({className:e,type:r="button",variant:a="ghost",size:i="xs",...s},u)=>(0,t.jsx)(o.Button,{ref:u,type:r,"data-size":i,variant:a,className:(0,n.cn)(l({size:i}),e),...s}));u.displayName="InputGroupButton";let d=r.forwardRef(({className:e,...r},o)=>(0,t.jsx)(a.Input,{ref:o,"data-slot":"input-group-control",className:(0,n.cn)("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r}));d.displayName="InputGroupInput",r.forwardRef(({className:e,...r},o)=>(0,t.jsx)(i.Textarea,{ref:o,"data-slot":"input-group-control",className:(0,n.cn)("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",e),...r})).displayName="InputGroupTextarea",e.s(["InputGroup",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"input-group",role:"group",className:(0,n.cn)("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",e),...r})},"InputGroupAddon",0,function({className:e,align:r="inline-start",...o}){return(0,t.jsx)("div",{role:"group","data-slot":"input-group-addon","data-align":r,className:(0,n.cn)(s({align:r}),e),onClick:e=>{e.target.closest("button")||e.currentTarget.parentElement?.querySelector("input")?.focus()},...o})},"InputGroupButton",0,u,"InputGroupInput",0,d,"InputGroupText",0,function({className:e,...r}){return(0,t.jsx)("span",{className:(0,n.cn)("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",e),...r})}])},954616,e=>{"use strict";var t=e.i(271645),r=e.i(114272),n=e.i(540143),o=e.i(915823),a=e.i(619273),i=class extends o.Subscribable{#e;#t=void 0;#r;#n;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.hashKey)(t.mutationKey)!==(0,a.hashKey)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#o(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#o(),this.#a()}mutate(e,t){return this.#n=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#o(){let e=this.#r?.state??(0,r.getDefaultState)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#a(e){n.notifyManager.batch(()=>{if(this.#n&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#n.onSuccess?.(e.data,t,r,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(e.data,null,t,r,n)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#n.onError?.(e.error,t,r,n)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,e.error,t,r,n)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},s=e.i(912598);e.s(["useMutation",0,function(e,r){let o=(0,s.useQueryClient)(r),[l]=t.useState(()=>new i(o,e));t.useEffect(()=>{l.setOptions(e)},[l,e]);let u=t.useSyncExternalStore(t.useCallback(e=>l.subscribe(n.notifyManager.batchCalls(e)),[l]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),d=t.useCallback((e,t)=>{l.mutate(e,t).catch(a.noop)},[l]);if(u.error&&(0,a.shouldThrowError)(l.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}],954616)},503269,214520,601893,694421,140721,942803,35889,722678,e=>{"use strict";var t=e.i(271645),r=e.i(914189);e.s(["useControllable",0,function(e,n,o){let[a,i]=(0,t.useState)(o),s=void 0!==e,l=(0,t.useRef)(s),u=(0,t.useRef)(!1),d=(0,t.useRef)(!1);return!s||l.current||u.current?s||!l.current||d.current||(d.current=!0,l.current=s,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(u.current=!0,l.current=s,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[s?e:a,(0,r.useEvent)(e=>(s||i(e),null==n?void 0:n(e)))]}],503269),e.s(["useDefaultValue",0,function(e){let[r]=(0,t.useState)(e);return r}],214520);let n=(0,t.createContext)(void 0);function o(){return(0,t.useContext)(n)}e.s(["useDisabled",0,o],601893);var a=e.i(174080),i=e.i(746725);function s(e={},t=null,r=[]){for(let[n,o]of Object.entries(e))!function e(t,r,n){if(Array.isArray(n))for(let[o,a]of n.entries())e(t,l(r,o.toString()),a);else n instanceof Date?t.push([r,n.toISOString()]):"boolean"==typeof n?t.push([r,n?"1":"0"]):"string"==typeof n?t.push([r,n]):"number"==typeof n?t.push([r,`${n}`]):null==n?t.push([r,""]):s(n,r,t)}(r,l(t,n),o);return r}function l(e,t){return e?e+"["+t+"]":t}e.s(["attemptSubmit",0,function(e){var t,r;let n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n){for(let t of n.elements)if(t!==e&&("INPUT"===t.tagName&&"submit"===t.type||"BUTTON"===t.tagName&&"submit"===t.type||"INPUT"===t.nodeName&&"image"===t.type))return void t.click();null==(r=n.requestSubmit)||r.call(n)}},"objectToFormEntries",0,s],694421);var u=e.i(700020),d=e.i(2788);let c=(0,t.createContext)(null);function f({children:e}){let r=(0,t.useContext)(c);if(!r)return t.default.createElement(t.default.Fragment,null,e);let{target:n}=r;return n?(0,a.createPortal)(t.default.createElement(t.default.Fragment,null,e),n):null}function p({setForm:e,formId:r}){return(0,t.useEffect)(()=>{if(r){let t=document.getElementById(r);t&&e(t)}},[e,r]),r?null:t.default.createElement(d.Hidden,{features:d.HiddenFeatures.Hidden,as:"input",type:"hidden",hidden:!0,readOnly:!0,ref:t=>{if(!t)return;let r=t.closest("form");r&&e(r)}})}e.s(["FormFields",0,function({data:e,form:r,disabled:n,onReset:o,overrides:a}){let[l,c]=(0,t.useState)(null),m=(0,i.useDisposables)();return(0,t.useEffect)(()=>{if(o&&l)return m.addEventListener(l,"reset",o)},[l,r,o]),t.default.createElement(f,null,t.default.createElement(p,{setForm:c,formId:r}),s(e).map(([e,o])=>t.default.createElement(d.Hidden,{features:d.HiddenFeatures.Hidden,...(0,u.compact)({key:e,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:n,name:e,value:o,...a})})))}],140721);let m=(0,t.createContext)(void 0);function g(){return(0,t.useContext)(m)}e.s(["useProvidedId",0,g],942803);var h=e.i(835696),b=e.i(294316);let v=(0,t.createContext)(null);v.displayName="DescriptionContext";let x=Object.assign((0,u.forwardRefWithAs)(function(e,r){let n=(0,t.useId)(),a=o(),{id:i=`headlessui-description-${n}`,...s}=e,l=function e(){let r=(0,t.useContext)(v);if(null===r){let t=Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,e),t}return r}(),d=(0,b.useSyncRefs)(r);(0,h.useIsoMorphicEffect)(()=>l.register(i),[i,l.register]);let c=a||!1,f=(0,t.useMemo)(()=>({...l.slot,disabled:c}),[l.slot,c]),p={ref:d,...l.props,id:i};return(0,u.useRender)()({ourProps:p,theirProps:s,slot:f,defaultTag:"p",name:l.name||"Description"})}),{});e.s(["Description",0,x,"useDescribedBy",0,function(){var e,r;return null!=(r=null==(e=(0,t.useContext)(v))?void 0:e.value)?r:void 0},"useDescriptions",0,function(){let[e,n]=(0,t.useState)([]);return[e.length>0?e.join(" "):void 0,(0,t.useMemo)(()=>function(e){let o=(0,r.useEvent)(e=>(n(t=>[...t,e]),()=>n(t=>{let r=t.slice(),n=r.indexOf(e);return -1!==n&&r.splice(n,1),r}))),a=(0,t.useMemo)(()=>({register:o,slot:e.slot,name:e.name,props:e.props,value:e.value}),[o,e.slot,e.name,e.props,e.value]);return t.default.createElement(v.Provider,{value:a},e.children)},[n])]}],35889);let C=(0,t.createContext)(null);function y(e){var r,n,o;let a=null!=(n=null==(r=(0,t.useContext)(C))?void 0:r.value)?n:void 0;return(null!=(o=null==e?void 0:e.length)?o:0)>0?[a,...e].filter(Boolean).join(" "):a}C.displayName="LabelContext";let E=Object.assign((0,u.forwardRefWithAs)(function(e,n){var a;let i=(0,t.useId)(),s=function e(){let r=(0,t.useContext)(C);if(null===r){let t=Error("You used a