9router 0.4.59 → 0.4.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +10 -10
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/routes-manifest.json +12 -12
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +43 -0
- package/app/.next-cli-build/server/app/api/{tunnel/tailscale-start-daemon → proxy-pools/cloudflare-deploy}/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/{tunnel/tailscale-start-daemon → proxy-pools/cloudflare-deploy}/route_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +40 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +10 -10
- package/app/.next-cli-build/server/chunks/1249.js +1 -1
- package/app/.next-cli-build/server/chunks/1435.js +1 -0
- package/app/.next-cli-build/server/chunks/{9129.js → 1574.js} +2 -2
- package/app/.next-cli-build/server/chunks/1578.js +1 -1
- package/app/.next-cli-build/server/chunks/1869.js +1 -0
- package/app/.next-cli-build/server/chunks/4185.js +1 -1
- package/app/.next-cli-build/server/chunks/4343.js +1 -1
- package/app/.next-cli-build/server/chunks/4447.js +7 -0
- package/app/.next-cli-build/server/chunks/450.js +1 -1
- package/app/.next-cli-build/server/chunks/504.js +1 -0
- package/app/.next-cli-build/server/chunks/5079.js +1 -0
- package/app/.next-cli-build/server/chunks/514.js +18 -4
- package/app/.next-cli-build/server/chunks/5412.js +1 -0
- package/app/.next-cli-build/server/chunks/586.js +1 -1
- package/app/.next-cli-build/server/chunks/6263.js +3 -3
- package/app/.next-cli-build/server/chunks/6283.js +1 -1
- package/app/.next-cli-build/server/chunks/6379.js +3 -3
- package/app/.next-cli-build/server/chunks/6560.js +1 -0
- package/app/.next-cli-build/server/chunks/666.js +4 -0
- package/app/.next-cli-build/server/chunks/7171.js +1 -1
- package/app/.next-cli-build/server/chunks/7686.js +1 -1
- package/app/.next-cli-build/server/chunks/7958.js +1 -0
- package/app/.next-cli-build/server/chunks/7973.js +1 -1
- package/app/.next-cli-build/server/chunks/8202.js +13 -5
- package/app/.next-cli-build/server/chunks/8395.js +1 -0
- package/app/.next-cli-build/server/chunks/8515.js +1 -1
- package/app/.next-cli-build/server/chunks/9737.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/{3771-c6aa0933e598758e.js → 3771-9c0300235faf81ff.js} +1 -1
- package/app/.next-cli-build/static/chunks/{4156-0129178d5950b9c2.js → 4156-c9429fb1c6c597c1.js} +1 -1
- package/app/.next-cli-build/static/chunks/{505-cd3b84480ae77abf.js → 505-e9e4c888178f0420.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-f9aa290f48f86415.js +4 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/{page-1dac36d6af075c54.js → page-442e7d7d2ff2814c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-1dac36d6af075c54.js → route-442e7d7d2ff2814c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-1dac36d6af075c54.js → route-442e7d7d2ff2814c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-1dac36d6af075c54.js → route-442e7d7d2ff2814c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-442e7d7d2ff2814c.js +1 -0
- package/app/.next-cli-build/static/css/4b7bd5878335a29b.css +1 -0
- package/app/.next-cli-build/static/{y2eEe1Y5KAz1b1viRdGY_ → vZzGp60X33yZYtn51xF65}/_buildManifest.js +1 -1
- package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.55-to-0.4.58-0.4.58-20260521-121905 → upgrade-0.4.62-to-0.4.63-0.4.63-20260526-231645}/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/jwt-secret +1 -1
- package/app/cli/.build-home/Library/Preferences/nextjs-nodejs/config.json +3 -3
- package/app/package.json +1 -1
- package/app/src/mitm/server.js +31 -27
- package/package.json +1 -1
- package/src/cli/menus/providers.js +7 -6
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +0 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +0 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route_client-reference-manifest.js +0 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +0 -2
- package/app/.next-cli-build/server/chunks/1071.js +0 -1
- package/app/.next-cli-build/server/chunks/1229.js +0 -1
- package/app/.next-cli-build/server/chunks/1729.js +0 -1
- package/app/.next-cli-build/server/chunks/1795.js +0 -1
- package/app/.next-cli-build/server/chunks/3774.js +0 -4
- package/app/.next-cli-build/server/chunks/5662.js +0 -1
- package/app/.next-cli-build/server/chunks/5882.js +0 -1
- package/app/.next-cli-build/server/chunks/6634.js +0 -7
- package/app/.next-cli-build/server/chunks/7188.js +0 -1
- package/app/.next-cli-build/server/chunks/8012.js +0 -15
- package/app/.next-cli-build/server/chunks/9603.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-884603e61682c07d.js +0 -4
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1dac36d6af075c54.js +0 -1
- package/app/.next-cli-build/static/css/b1cf370be2444f61.css +0 -1
- package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.49-to-0.4.50-0.4.50-20260516-134729/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.50-to-0.4.52-0.4.52-20260517-162943/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.52-to-0.4.55-0.4.55-20260518-162644/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.58-to-0.4.59-0.4.59-20260521-133932/data.sqlite +0 -0
- /package/app/.next-cli-build/static/{y2eEe1Y5KAz1b1viRdGY_ → vZzGp60X33yZYtn51xF65}/_ssgManifest.js +0 -0
package/app/.next-cli-build/static/chunks/{4156-0129178d5950b9c2.js → 4156-c9429fb1c6c597c1.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{292:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({children:e,title:t,subtitle:s,icon:n,action:i,padding:o="md",hover:d=!1,elev:c=!1,className:m,...x}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface border border-border-subtle",c?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",d&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],m),...x,children:[(t||i)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[n&&(0,r.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:n})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),i]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...l,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},1755:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({options:e=[],value:t,onChange:s,size:n="md",className:i}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,r.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",i),children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.value),className:(0,a.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[n],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},3242:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),n=s.n(l),i=s(74156),o=s(96459);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:n,oauthMeta:c,idcConfig:m}){let[x,u]=(0,a.useState)("waiting"),[p,h]=(0,a.useState)(null),[f,b]=(0,a.useState)(""),[g,j]=(0,a.useState)(null),[y,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(null),[k,C]=(0,a.useState)(!1),S=(0,a.useRef)(null),T=(0,a.useRef)(!1),{copied:O,copy:R}=(0,o.C)(),[P,$]=(0,a.useState)(!1),[E,I]=(0,a.useState)("/callback?code=..."),A=(0,a.useRef)(!1);(0,a.useEffect)(()=>{$("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),I(`${window.location.origin}/callback?code=...`)},[]);let M=(0,a.useCallback)(async(e,s)=>{if(p)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:p.redirectUri,codeVerifier:p.codeVerifier,state:s,...c?{meta:c}:{}})}),a=await r.json();if(!r.ok)throw Error(a.error);u("success"),l?.()}catch(e){j(e.message),u("error")}},[p,t,l]),L=(0,a.useCallback)(async e=>{if(p?.state)try{let t=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:p.state})}),s=await t.json();if(!t.ok)throw Error(s.error);u("success"),l?.()}catch(e){j(e.message),u("error")}},[p,l]),_=(0,a.useCallback)(async(e,s,r,a)=>{T.current=!1,C(!0);for(let n=0;n<60;n++){if(T.current){console.log("[OAuthModal] Polling aborted"),C(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),T.current){console.log("[OAuthModal] Polling aborted after sleep"),C(!1);return}try{let n=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),i=await n.json();if(i.success){T.current=!0,u("success"),C(!1),l?.();return}if("expired_token"===i.error||"access_denied"===i.error)throw Error(i.errorDescription||i.error);"slow_down"===i.error&&(r=Math.min(r+5,30))}catch(e){j(e.message),u("error"),C(!1);return}}j("Authorization timeout"),u("error"),C(!1)},[t,l]),z=(0,a.useCallback)(async()=>{if(t)try{let e;if(j(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy"].includes(t)){v(!0),u("waiting");let e=new URL(`/api/oauth/${t}/device-code`,window.location.origin);"kiro"===t&&m?.startUrl&&(e.searchParams.set("start_url",m.startUrl),m.region&&e.searchParams.set("region",m.region),e.searchParams.set("auth_method","idc"));let s=await fetch(e.toString()),r=await s.json();if(!s.ok)throw Error(r.error);w(r);let a=r.verification_uri_complete||r.verification_uri;a&&window.open(a,"_blank","noopener,noreferrer");let l="kiro"===t?{_clientId:r._clientId,_clientSecret:r._clientSecret,_region:r._region,_authMethod:r._authMethod,_startUrl:r._startUrl}:null;_(r.device_code,r.codeVerifier,r.interval||5,l);return}let s=window.location.port||("https:"===window.location.protocol?"443":"80");e="codex"===t?"http://localhost:1455/auth/callback":"xai"===t?"http://127.0.0.1:56121/callback":`http://localhost:${s}/callback`;let r=new URL(`/api/oauth/${t}/authorize`,window.location.origin);r.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&r.searchParams.set(e,t)});let a=await fetch(r.toString()),l=await a.json();if(!a.ok)throw Error(l.error);let n=!1,i=!1;if("codex"===t)try{let t=new URL("/api/oauth/codex/start-proxy",window.location.origin);t.searchParams.set("app_port",s),t.searchParams.set("state",l.state),t.searchParams.set("code_verifier",l.codeVerifier),t.searchParams.set("redirect_uri",e);let r=await fetch(t.toString()),a=await r.json();n=a.success,i=!!a.serverSide}catch{n=!1}let o=!1,d=!1;if("xai"===t)try{let t=new URL("/api/oauth/xai/start-proxy",window.location.origin);t.searchParams.set("app_port",s),t.searchParams.set("state",l.state),t.searchParams.set("code_verifier",l.codeVerifier),t.searchParams.set("redirect_uri",e);let r=await fetch(t.toString()),a=await r.json();if(o=a.success,d=!!a.serverSide,!o&&"port_busy"===a.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(e){if(e?.message)throw e;o=!1}h({...l,redirectUri:e,codexServerSide:i,xaiServerSide:d}),"codex"===t&&n||"xai"===t&&o||P&&"codex"!==t&&"xai"!==t?(u("waiting"),S.current=window.open(l.authUrl,"oauth_popup","width=600,height=700"),S.current||u("input")):(u("input"),window.open(l.authUrl,"_blank"))}catch(e){j(e.message),u("error")}},[t,P,_,c,m]);(0,a.useEffect)(()=>{e&&t?(h(null),b(""),j(null),v(!1),w(null),C(!1),T.current=!1,z()):e||(T.current=!0,"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}))},[e,t,z]),(0,a.useEffect)(()=>{let e=p?.codexServerSide?"codex":p?.xaiServerSide?"xai":null;if(!e||!p?.state||A.current)return;let t=!1,s=0,r=async()=>{if(!t&&!A.current){s+=1;try{let s=await fetch(`/api/oauth/${e}/poll-status?state=${encodeURIComponent(p.state)}`),r=await s.json();if(t||A.current)return;if("done"===r.status){A.current=!0,u("success"),l?.();return}if("error"===r.status){A.current=!0,j(r.error||"Authentication failed"),u("error");return}}catch{}if(s>=200){A.current=!0,j("Authentication timeout"),u("error");return}setTimeout(r,1500)}};return setTimeout(r,1500),()=>{t=!0}},[p,l]),(0,a.useEffect)(()=>{let e;if(!p)return;A.current=!1;let t=async e=>{if(A.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){A.current=!0,j(a||r),u("error");return}t&&(A.current=!0,await M(t,s))},s=e=>{let s=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),r=e.origin===window.location.origin;(s||r)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let s=JSON.parse(e.newValue);t(s),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let s=JSON.parse(e);s.timestamp&&Date.now()-s.timestamp<3e4&&t(s),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[p,M]);let q=async()=>{try{j(null);let e=f.trim();if(e.startsWith("eyJ")&&e.includes("."))return void await M(e,null);if("xai"===t&&e&&!e.includes("://")&&!e.includes("?")&&!e.includes("code="))return void await L(e);let s=new URL(e),r=s.searchParams.get("code"),a=s.searchParams.get("state"),l=s.searchParams.get("error");if(l)throw Error(s.searchParams.get("error_description")||l);if(!r)throw Error("xai"===t?"Paste the callback URL or copied xAI code":"No authorization code found in URL");await M(r,a)}catch(e){j(e.message),u("error")}},U=(0,a.useCallback)(()=>{"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}),n()},[n,t]);if(!t||!s)return null;let F="xai"===t,D=N?.verification_uri_complete||N?.verification_uri||"",W=F?"Connect Grok Build OAuth":`Connect ${s.name}`;return(0,r.jsx)(i.aF,{isOpen:e,title:W,onClose:U,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[("waiting"===x||"input"===x)&&!y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,r.jsx)("span",{className:"text-sm",children:F?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,r.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,r.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,r.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",F?"Grok Build OAuth URL":"URL"," in your browser"]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.pd,{value:p?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(i.$n,{variant:"secondary",icon:"auth_url"===O?"check":"content_copy",onClick:()=>R(p?.authUrl,"auth_url"),disabled:!p?.authUrl,children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===t?"callback URL or copied code":"callback URL"," here"]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===t?"If xAI shows a code instead of redirecting, paste that code here.":"After authorization, copy the full URL from your browser."}),(0,r.jsx)(i.pd,{value:f,onChange:e=>b(e.target.value),placeholder:F?"http://127.0.0.1:56121/callback?code=... or copied code":E,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:q,fullWidth:!0,disabled:!f,children:"Connect"}),(0,r.jsx)(i.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===x&&y&&N&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,r.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"flex-1 text-sm break-all",children:D}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"login_url"===O?"check":"content_copy",onClick:()=>R(D,"login_url"),disabled:!D}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(D,"_blank","noopener,noreferrer"),disabled:!D,children:"Open"})]})]}),(0,r.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:N.user_code}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"user_code"===O?"check":"content_copy",onClick:()=>R(N.user_code,"user_code")})]})]})]}),k&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"success"===x&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",s.name," account has been connected."]}),(0,r.jsx)(i.$n,{onClick:U,fullWidth:!0,children:"Done"})]}),"error"===x&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:g}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:z,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(i.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:n().bool.isRequired,provider:n().string,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired,oauthMeta:n().object,idcConfig:n().shape({startUrl:n().string,region:n().string})}},3412:(e,t,s)=>{s.d(t,{default:()=>V});var r=s(73365),a=s(1521),l=s(29717),n=s(82495),i=s(35045),o=s(292),d=s(86447),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,r.jsx)("span",{className:"truncate text-2xl font-bold",children:m(e.totalRequests)})]}),(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,r.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let u=e=>new Intl.NumberFormat().format(e||0),p=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function b({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":u(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":u(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:u(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":p(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":p(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:p(e.totalCost||e.cost)})]})}function g({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:p}){let[h,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&j(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let y=(0,a.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),v=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+v.length;return(0,r.jsxs)(o.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),v.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>y(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(b,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(b,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},b.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},g.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=s(70842),y=s(36629);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(j.h7,{type:"target",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function N({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(j.h7,{type:"source",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(97621),v.propTypes={data:c().object.isRequired},N.propTypes={data:c().object.isRequired};let w={provider:v,router:N};function k({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let i=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(i?i.split(","):[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),x=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),u=(0,a.useRef)({}),[p,h]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=u.current,t=Date.now();for(let s of c)e[s]||(e[s]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,a.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let f=(0,a.useMemo)(()=>{let e=Date.now(),t=new Set;for(let s of c){let r=u.current[s];(!r||e-r<6e4)&&t.add(s)}return t},[c,p]),{nodes:b,edges:g}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),i=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,x;let u,p,h=(m=e.provider,n.Q2[m]||{color:"#6b7280",name:m}),f=t.has(e.provider?.toLowerCase()),b=!f&&s.has(e.provider?.toLowerCase()),g=!f&&r.has(e.provider?.toLowerCase()),j=`provider-${e.provider}`,y={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(x=e.provider,`/providers/${x}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},v=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(v),w=i*Math.sin(v);Math.abs(v+Math.PI/2)<Math.PI/4||Math.abs(v-3*Math.PI/2)<Math.PI/4?(u="top",p="bottom"):Math.abs(v-Math.PI/2)<Math.PI/4?(u="bottom",p="top"):N>0?(u="right",p="left"):(u="left",p="right"),o.push({id:j,type:"provider",position:{x:N-90,y:w-15},data:y,draggable:!1}),d.push({id:`e-${j}`,source:"router",sourceHandle:u,target:j,targetHandle:p,animated:f,style:(h.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:b?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,f,m,x),[e,f,o,d]),y=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,a.useRef)(null),N=(0,a.useRef)(null),C={padding:.2,duration:200},S=(0,a.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(C),50)},[]);return(0,a.useEffect)(()=>{let e=N.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(C)});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(C),50);return()=>clearTimeout(e)}},[b.length]),(0,r.jsx)("div",{ref:N,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(j.Gc,{nodes:b,edges:g,nodeTypes:w,fitView:!0,fitViewOptions:C,minZoom:.1,maxZoom:2,onInit:S,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,r.jsx)(j.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},y)})}k.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var C=s(71220),S=s(51142),T=s(35692),O=s(39719),R=s(94580),P=s(38147),$=s(80900);let E=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),I=e=>`$${(e||0).toFixed(4)}`;function A({period:e="7d"}){let[t,s]=(0,a.useState)([]),[l,n]=(0,a.useState)(!0),[i,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{n(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{n(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,r.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,r.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsx)(C.u,{width:"100%",height:220,children:(0,r.jsxs)(S.Q,{data:t,margin:{top:4,right:8,left:0,bottom:0},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,r.jsx)(T.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)(O.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)(R.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?E:I,width:50}),(0,r.jsx)(P.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[E(e),"Tokens"]:[I(e),"Cost"]}),"tokens"===i?(0,r.jsx)($.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)($.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function M(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}function L({timestamp:e}){let t,[,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function _({requests:e=[]}){return(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[u(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[u(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(L,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function z(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=r>0?(s.promptTokens||0)*(a/r):0,n=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:n,pending:t[e]||0}}).sort((e,t)=>{let a=e[s],l=t[s];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===r?-1:1:a>l?"asc"===r?1:-1:0})}function q(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=s[r].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}A.propTypes={period:c().string};let U=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],D=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],W=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],K=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],B=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function V({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let o=(0,l.useRouter)(),d=(0,l.useSearchParams)(),c=d.get("sortBy")||"rawModel",m=d.get("sortOrder")||"asc",[p,f]=(0,a.useState)(null),[b,j]=(0,a.useState)(!0),[y,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)("model"),[C,S]=(0,a.useState)("costs"),[T,O]=(0,a.useState)([]),[R,P]=(0,a.useState)("today"),$=e??R,E=t??P;(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=new Set;O([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!M(e.provider)||t.has(e.provider))&&(t.add(e.provider),!0)),...Object.values(n.IS).filter(e=>e.noAuth&&!t.has(e.id)&&M(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{p?v(!0):j(!0),fetch(`/api/usage/stats?period=${$}`).then(e=>e.ok?e.json():null).then(e=>{e&&f(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{j(!1),v(!1)})},[$]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);f(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),j(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>j(!1),()=>e.close()},[]);let I=(0,a.useCallback)((e,t)=>{let s=new URLSearchParams(d.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),o.replace(`?${s.toString()}`,{scroll:!1})},[d,o]),L=(0,a.useMemo)(()=>{if(!p)return null;switch(N){case"model":{let e=p.pending?.byModel||{};return{columns:U,groupedData:q(z(p.byModel,e,c,m),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return p?.pending?.byAccount&&Object.entries(p.byAccount||{}).forEach(([t,s])=>{let r=p.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:F,groupedData:q(z(p.byAccount,e,c,m),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:D,groupedData:q(z(p.byApiKey,{},c,m),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:W,groupedData:q(z(p.byEndpoint,{},c,m),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[p,N,c,m]);if(!p&&!b)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let G=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,r.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,r.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:B.map(e=>(0,r.jsx)("button",{onClick:()=>E(e.value),disabled:y,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${$===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),y&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),b?G:(0,r.jsx)(x,{stats:p}),b?G:(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,r.jsx)(k,{providers:T,activeRequests:p.activeRequests||[],lastProvider:p.recentRequests?.[0]?.provider||"",errorProvider:p.errorProvider||""}),(0,r.jsx)(_,{requests:p.recentRequests||[]})]}),b?G:(0,r.jsx)(A,{period:$}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("select",{value:N,onChange:e=>w(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:K.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,r.jsx)("button",{onClick:()=>S("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===C?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>S("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===C?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),b?G:L&&(0,r.jsx)(g,{title:"",columns:L.columns,groupedData:L.groupedData,tableType:N,sortBy:c,sortOrder:m,onToggleSort:I,viewMode:C,storageKey:L.storageKey,renderSummaryCells:L.renderSummaryCells,renderDetailCells:L.renderDetailCells,emptyMessage:L.emptyMessage})]})]})}},5671:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(73365),a=s(1521),l=s(66911),n=s(38230),i=s(96459);function o({isOpen:e,onClose:t,title:s="Manual Configuration",configs:d=[]}){let{copy:c}=(0,i.C)(),[m,x]=(0,a.useState)(null);return(0,r.jsx)(l.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,r.jsxs)(n.default,{variant:"ghost",size:"sm",onClick:()=>{var s;return s=e.content,void(c(s,`manualconfig-${t}`),x(t),setTimeout(()=>x(null),2e3))},children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,r.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},8569:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(73365),a=s(292);let l={mode:{label:"Mode",format:e=>e},defaultModel:{label:"Model",format:e=>e,mono:!0},baseUrl:{label:"Endpoint",format:e=>e,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:e=>0===e?"Free":`$${e.toFixed(4)}`},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:e=>e},freeMonthlyQuota:{label:"Free quota",format:e=>0===e?"—":e>=999999?"Unlimited":`${e.toLocaleString()} / mo`},searchTypes:{label:"Types",format:e=>e.join(", ")},formats:{label:"Formats",format:e=>e.join(", ")},maxMaxResults:{label:"Max results",format:e=>e},maxCharacters:{label:"Max chars",format:e=>e.toLocaleString()}};function n({config:e,provider:t,title:s="Provider Info"}){if(!e)return null;let i=Object.entries(l).filter(([t])=>void 0!==e[t]&&null!==e[t]&&""!==e[t]).map(([t,s])=>({key:t,label:s.label,value:s.format(e[t]),isLink:s.isLink,mono:s.mono,raw:e[t]})),o=t?.notice?.apiKeyUrl||t?.website,d=t?.notice?.text;return(0,r.jsxs)(a.default,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:s}),o&&(0,r.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[i.map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:e.label}),e.isLink?(0,r.jsx)("a",{href:e.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${e.mono?"font-mono":""}`,children:e.value}):(0,r.jsx)("span",{className:`text-sm text-text-main truncate ${e.mono?"font-mono":""}`,children:e.value})]},e.key)),d&&(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,r.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:d})]})]})]})}},12003:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(98196),n=s(55348),i=s(84502);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:s,hideTrigger:c=!1}){let[m,x]=(0,a.useState)("en"),[u,p]=(0,a.useState)(!1),[h,f]=(0,a.useState)(!1),b=(0,a.useRef)(null),g="boolean"==typeof t,j=g?t:h,y=e=>{g?!e&&s&&s(m):f(e)};(0,a.useEffect)(()=>{x(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,n.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){b.current&&!b.current.contains(e.target)&&y(!1)}if(j)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let v=async e=>{if(e!==m&&!u){p(!0),y(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,i.wn)(),x(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,r.jsxs)("div",{className:e,children:[!c&&(0,r.jsxs)("button",{onClick:()=>y(!j),disabled:u,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:o(m).name}),(0,r.jsx)("span",{className:"text-lg",children:o(m).flag})]}),j&&(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>y(!1)}),(0,r.jsxs)("div",{ref:b,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,r.jsx)("button",{onClick:()=>y(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:n.YZ.map(e=>{let t=m===e,s=o(e);return(0,r.jsxs)("button",{onClick:()=>v(e),disabled:u,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${u?"opacity-70 cursor-wait":""}`,title:s.name,children:[(0,r.jsx)("span",{className:"text-2xl",children:s.flag}),(0,r.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:s.name}),t&&(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},12820:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),n=s.n(l),i=s(74156);let o="https://api.openai.com/v1";function d({isOpen:e,onClose:t,onCreated:s,onSaved:l,node:n}){let c=!!n,[m,x]=(0,a.useState)({name:"",prefix:"",baseUrl:o}),[u,p]=(0,a.useState)(!1),[h,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(""),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null);(0,a.useEffect)(()=>{e&&(N(null),f(""),g(""),c?x({name:n.name||"",prefix:n.prefix||"",baseUrl:n.baseUrl||o}):x({name:"",prefix:"",baseUrl:o}))},[e,c,n]);let w=async()=>{if(m.name.trim()&&m.prefix.trim()&&m.baseUrl.trim()){p(!0);try{let e=c?`/api/provider-nodes/${n.id}`:"/api/provider-nodes",t=c?"PUT":"POST",r={name:m.name,prefix:m.prefix,baseUrl:m.baseUrl};c||(r.type="custom-embedding");let a=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),i=await a.json();a.ok&&(c?l?.(i.node):s?.(i.node))}catch(e){console.log("Error saving custom embedding node:",e)}finally{p(!1)}}},k=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:m.baseUrl,apiKey:h,type:"custom-embedding",modelId:b.trim()||void 0})}),t=await e.json();N(t)}catch{N({valid:!1,error:"Network error"})}finally{y(!1)}};return(0,r.jsx)(i.aF,{isOpen:e,title:c?"Edit Custom Embedding":"Add Custom Embedding",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.pd,{label:"Name",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this embedding provider."}),(0,r.jsx)(i.pd,{label:"Prefix",value:m.prefix,onChange:e=>x({...m,prefix:e.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,r.jsx)(i.pd,{label:"Base URL",value:m.baseUrl,onChange:e=>x({...m,baseUrl:e.target.value}),placeholder:"https://api.voyageai.com/v1",hint:"Most embedding APIs are OpenAI-compatible: Voyage, Cohere, Jina, Mistral, Together..."}),(0,r.jsx)(i.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,r.jsx)(i.pd,{label:"Model ID (for Check)",value:b,onChange:e=>g(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",hint:"Required for validation. Will send a test embeddings request."}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(i.$n,{onClick:k,disabled:!h||!b.trim()||j||!m.baseUrl.trim(),variant:"secondary",children:j?"Checking...":"Check"}),(()=>{if(!v)return null;let{valid:e,error:t,dimensions:s}=v;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ex,{variant:"success",children:"Valid"}),s&&(0,r.jsxs)("span",{className:"text-sm text-text-muted",children:[s," dims"]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(i.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:w,fullWidth:!0,disabled:!m.name.trim()||!m.prefix.trim()||!m.baseUrl.trim()||u,children:u?c?"Saving...":"Creating...":c?"Save":"Create"}),(0,r.jsx)(i.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}d.propTypes={isOpen:n().bool.isRequired,onClose:n().func.isRequired,onCreated:n().func,onSaved:n().func,node:n().shape({id:n().string,name:n().string,prefix:n().string,baseUrl:n().string})}},13048:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(29717),n=s(14793),i=s(56550),o=s(19067);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,n.i)(e=>e.notifications),x=(0,n.i)(e=>e.removeNotification);return(0,r.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,r.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,r.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,r.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,r.jsx)("button",{type:"button",onClick:()=>x(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,r.jsx)("div",{className:"hidden lg:flex",children:(0,r.jsx)(i.default,{})}),(0,r.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,r.jsx)(i.default,{onClose:()=>s(!1)})}),(0,r.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,r.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,r.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,r.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,r.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},13333:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(73365);function a({text:e,children:t,position:s="top",color:l}){let n=l?"":"bg-gray-900";return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${n} text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,style:l?{backgroundColor:l}:{},children:e})]})}},14406:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({checked:e=!1,onChange:t,label:s,description:n,disabled:i=!1,size:o="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",i&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:i,onClick:()=>{!i&&t&&t(!e)},className:(0,a.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",c[o].track,i&&"cursor-not-allowed"),children:(0,r.jsx)("span",{className:(0,a.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[o].translate:"translate-x-0.5",c[o].thumb,"mt-0.5")})}),(s||n)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),n&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:n})]})]})}},14793:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(2074);let a=0,l=(0,r.v)((e,t)=>({notifications:[],addNotification:s=>{let r=++a,l={id:r,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(r),l.duration),r},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},19067:(e,t,s)=>{s.d(t,{default:()=>y});var r=s(73365),a=s(1521),l=s(29717),n=s(99568),i=s.n(n),o=s(86447),d=s.n(o),c=s(68266),m=s(80600),x=s(84675),u=s(98196),p=s(43202);function h({isOpen:e,onClose:t}){let[s,l]=(0,a.useState)(null),[n,i]=(0,a.useState)(!1),[o,d]=(0,a.useState)(""),c=(0,a.useRef)(null);return((0,a.useEffect)(()=>{e&&!s&&(i(!0),d(""),fetch(p.Nu.donateUrl,{cache:"no-store"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>l(e)).catch(e=>d(e.message||"Failed to load")).finally(()=>i(!1)))},[e,s]),(0,a.useEffect)(()=>{let s=e=>{c.current&&!c.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,t]),!e||"u"<typeof document)?null:(0,u.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,r.jsxs)("div",{ref:c,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-pink-500",children:"volunteer_activism"}),s?.title||"Support 9Router"]}),(0,r.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[n&&(0,r.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),o&&(0,r.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load donate info: ",o]}),!n&&!o&&s&&(0,r.jsxs)(r.Fragment,{children:[s.message&&(0,r.jsx)("p",{className:"text-text-muted text-sm mb-6 text-center",children:s.message}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:s.channels?.map(e=>(0,r.jsx)(f,{channel:e},e.id))})]})]})]})]}),document.body)}function f({channel:e}){let{label:t,description:s,icon:a,color:l,url:n,qr:i}=e,o=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-3",style:{backgroundColor:`${l}20`,color:l},children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:a})}),(0,r.jsx)("div",{className:"font-semibold text-text-main mb-1",children:t}),s&&(0,r.jsx)("div",{className:"text-xs text-text-muted mb-3 text-center",children:s}),i&&(0,r.jsx)("img",{src:i,alt:`${t} QR`,className:"w-full max-w-[180px] aspect-square object-contain rounded-lg bg-white p-1"})]});return(0,r.jsxs)("div",{className:"flex flex-col items-center p-4 rounded-xl border border-black/10 dark:border-white/10 bg-surface/50 hover:border-pink-500/40 transition-colors",children:[o,n&&(0,r.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium text-white hover:opacity-90 transition-opacity",style:{backgroundColor:l},children:["Open",(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})]})]})}h.propTypes={isOpen:d().bool.isRequired,onClose:d().func.isRequired};var b=s(84907),g=s(82495),j=s(84502);function y({onMenuClick:e,showMenuButton:t=!0}){let s=(0,l.usePathname)(),n=(0,l.useRouter)(),[o,d]=(0,a.useState)(""),[u,f]=(0,a.useState)(""),[b,N]=(0,a.useState)(!1),{title:w,description:k,icon:C,breadcrumbs:S}=(0,a.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(t){let e=t[1],s=t[2],r=g.rj.find(t=>t.id===e),a=g.Q2[s];return{title:a?.name||s,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:r?.label||e,href:`/dashboard/media-providers/${e}`},{label:a?.name||s,image:`/providers/${s}.png`}]}}let s=e.match(/\/media-providers\/([^/]+)$/);if(s){let e=s[1],t=g.rj.find(t=>t.id===e);return{title:t?.label||e,description:`Manage your ${t?.label||e} providers`,icon:t?.icon||"perm_media",breadcrumbs:[]}}let r=e.match(/\/providers\/([^/]+)$/);if(r){let e=r[1],t=p.zN[e]||p.fg[e];if(t)return{title:t.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:t.name,image:`/providers/${t.id}.png`}]}}return e.includes("/providers")&&!e.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:e.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:e.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through 9Router",icon:"security",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:e.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:e.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use 9Router — no install needed",icon:"extension",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),[s]);(0,a.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let s=await t.json();e||(d(s?.displayName||s?.oidcName||s?.oidcEmail||""),f(s?.loginMethod||""))}catch{e||(d(""),f(""))}}(),()=>{e=!0}},[]);let T=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(n.push("/login"),n.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,r.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,r.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:t&&(0,r.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,r.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:S.length>0?(0,r.jsx)("div",{className:"flex items-center gap-2",children:S.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,r.jsx)(i(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,r.jsx)(c.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,r.jsx)("h1",{className:"text-base lg:text-2xl font-semibold text-text-main tracking-tight truncate",children:(0,j.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):w?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[C&&(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-xl lg:text-2xl",children:C}),(0,r.jsx)("h1",{className:"text-base lg:text-2xl font-semibold tracking-tight truncate",children:(0,j.Tl)(w)})]}),k&&(0,r.jsx)("p",{className:"hidden lg:block text-sm text-text-muted truncate",children:(0,j.Tl)(k)})]}):null}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[o&&"OIDC"===u&&(0,r.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,r.jsx)("span",{className:"truncate",children:o}),(0,r.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:"OIDC"})]}),(0,r.jsx)(v,{}),(0,r.jsxs)("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 px-3 h-8 rounded-lg border border-pink-500/30 bg-pink-500/10 text-pink-600 dark:text-pink-400 hover:bg-pink-500/20 transition-colors text-sm font-medium","aria-label":"Donate",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"volunteer_activism"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Donate"})]}),(0,r.jsx)(x.default,{}),(0,r.jsx)(m.default,{onLogout:T})]}),(0,r.jsx)(h,{isOpen:b,onClose:()=>N(!1)})]})}function v(){let e=(0,b.C)(e=>e.visible),t=(0,b.C)(e=>e.query),s=(0,b.C)(e=>e.placeholder),a=(0,b.C)(e=>e.setQuery);return e?(0,r.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,r.jsx)("input",{type:"text",value:t,onChange:e=>a(e.target.value),placeholder:s,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),t&&(0,r.jsx)("button",{type:"button",onClick:()=>a(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}y.propTypes={onMenuClick:d().func,showMenuButton:d().bool}},24372:(e,t,s)=>{s.d(t,{default:()=>u});var r=s(73365),a=s(1521),l=s(86447),n=s.n(l),i=s(66911),o=s(68266),d=s(69633),c=s(82495);let m=[...Object.keys(c.zN),...Object.keys(c.IS),...Object.keys(c.nJ),...Object.keys(c.fg)],x=Object.keys(c.IS).filter(e=>c.IS[e].noAuth);function u({isOpen:e,onClose:t,onSelect:s,onDeselect:l,selectedModel:n,activeProviders:p=[],title:h="Select Model",modelAliases:f={},kindFilter:b=null,addedModelValues:g=[],closeOnSelect:j=!0}){let y=(0,a.useMemo)(()=>b?p.filter(e=>{let t=c.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(b)}):p,[p,b]),[v,N]=(0,a.useState)(""),[w,k]=(0,a.useState)([]),[C,S]=(0,a.useState)([]),[T,O]=(0,a.useState)([]),[R,P]=(0,a.useState)({}),$=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();k(t.combos||[])}catch(e){console.error("Error fetching combos:",e),k([])}};(0,a.useEffect)(()=>{e&&$()},[e]);let E=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();S(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),S([])}};(0,a.useEffect)(()=>{e&&E()},[e]);let I=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();O(t.models||[])}catch(e){console.error("Error fetching custom models:",e),O([])}};(0,a.useEffect)(()=>{e&&I()},[e]);let A=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();P(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),P({})}};(0,a.useEffect)(()=>{e&&A()},[e]);let M=(0,a.useMemo)(()=>({...c.zN,...c.IS,...c.nJ,...c.fg}),[]),L=(0,a.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),s=new Set(["image","tts","stt","embedding","imageToText"]),r=new Set(["tts","image","webFetch"]);return[...new Set([...y.map(e=>e.provider),...b?x.filter(e=>(c.Q2[e]?.serviceKinds||["llm"]).includes(b)):x])].sort((e,t)=>{let s=m.indexOf(e),r=m.indexOf(t);return(-1===s?999:s)-(-1===r?999:r)}).forEach(a=>{let l=(0,c.wG)(a),n=M[a]||{name:a,color:"#666"},i=(0,c.mq)(a)||(0,c.gb)(a);if(b&&t.has(b)){e[a]={name:n.name,alias:l,color:n.color,models:[{id:a,name:n.name,value:a}]};return}if(n.passthroughModels){let t=Object.entries(f).filter(([,e])=>e.startsWith(`${l}/`)).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t}));if(b&&s.has(b)&&0===(t=(0,d.KC)(a).filter(e=>e.type===b).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type}))).length&&r.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(t=[{id:a,name:n.name,value:l}]),t.length>0){let s=C.find(e=>e.id===a),r=s?.name||n.name;e[a]={name:r,alias:l,color:n.color,models:t}}}else if(i){if(b&&s.has(b))return;let t=p.find(e=>e.provider===a),r=C.find(e=>e.id===a),l=t?.name||r?.name||n.name,i=t?.providerSpecificData?.prefix||r?.prefix||a,o=Object.entries(f).filter(([,e])=>e.startsWith(`${a}/`)).map(([e,t])=>({id:t.replace(`${a}/`,""),name:e,value:`${i}/${t.replace(`${a}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${a}`,name:`${i}/model-id`,value:`${i}/model-id`,isPlaceholder:!0}];e[a]={name:l,alias:i,color:n.color,models:d,isCustom:!0,hasModels:o.length>0}}else{var o;let t=(0,d.KC)(a),i=new Set(t.map(e=>e.id)),c=t.length>0,m=Object.entries(f).filter(([e,t])=>t.startsWith(`${l}/`)&&(!c||e===t.replace(`${l}/`,""))&&!i.has(t.replace(`${l}/`,""))).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t,isCustom:!0})),x=new Set(m.map(e=>e.id)),u=T.filter(e=>e.providerAlias===l&&!i.has(e.id)&&!x.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),p=[...t.map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type})),...m,...u],h=new Set,g=(o=p.filter(e=>!h.has(e.value)&&(h.add(e.value),!0)),b?s.has(b)?o.filter(e=>e.isPlaceholder||e.type===b):o:o.filter(e=>e.isPlaceholder||!e.type||"llm"===e.type));0===g.length&&b&&r.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(g=[{id:a,name:n.name,value:l}]),g.length>0&&(e[a]={name:n.name,alias:l,color:n.color,models:g})}}),Object.entries(e).forEach(([t,s])=>{let r=new Set([...R[(0,c.wG)(t)]||[],...R[t]||[]]);0!==r.size&&(s.models=s.models.filter(e=>!r.has(e.id)),0===s.models.length&&delete e[t])}),e},[y,f,M,C,T,R,b,p]),_=(0,a.useMemo)(()=>{if(b)return[];if(!v.trim())return w;let e=v.toLowerCase();return w.filter(t=>t.name.toLowerCase().includes(e))},[w,v,b]),z=(0,a.useMemo)(()=>{let e=v.trim().toLowerCase(),t={};return Object.entries(L).forEach(([s,r])=>{var a;let l=r.models;if(e){let t=r.name.toLowerCase().includes(e);if(0===(l=l.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[s]={...r,models:[...(a=l).filter(e=>g.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...a.filter(e=>!g.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[L,v,g]),q=e=>{let r=e?.value||e?.name||e;g.includes(r)&&l?l(e):s(e),j&&(t(),N(""))};return(0,r.jsxs)(i.default,{isOpen:e,onClose:()=>{t(),N("")},title:h,size:"md",className:"p-4!",footer:null,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,r.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:v,onChange:e=>N(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,r.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[_.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",_.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:_.map(e=>{let t=n===e.name;return(0,r.jsxs)("button",{onClick:()=>q({id:e.name,name:e.name,value:e.name}),className:`
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{292:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({children:e,title:t,subtitle:s,icon:n,action:i,padding:o="md",hover:d=!1,elev:c=!1,className:m,...x}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-surface border border-border-subtle",c?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",d&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],m),...x,children:[(t||i)&&(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[n&&(0,r.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:n})}),(0,r.jsxs)("div",{children:[t&&(0,r.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,r.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),i]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...l,children:[(0,r.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},1755:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({options:e=[],value:t,onChange:s,size:n="md",className:i}){let o={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,r.jsx)("div",{className:(0,a.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",i),children:e.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.value),className:(0,a.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",o[n],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},3242:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),n=s.n(l),i=s(74156),o=s(96459);function d({isOpen:e,provider:t,providerInfo:s,onSuccess:l,onClose:n,oauthMeta:c,idcConfig:m}){let[x,u]=(0,a.useState)("waiting"),[p,h]=(0,a.useState)(null),[f,b]=(0,a.useState)(""),[g,j]=(0,a.useState)(null),[y,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)(null),[k,C]=(0,a.useState)(!1),S=(0,a.useRef)(null),T=(0,a.useRef)(!1),{copied:O,copy:R}=(0,o.C)(),[P,$]=(0,a.useState)(!1),[E,I]=(0,a.useState)("/callback?code=..."),A=(0,a.useRef)(!1);(0,a.useEffect)(()=>{$("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),I(`${window.location.origin}/callback?code=...`)},[]);let M=(0,a.useCallback)(async(e,s)=>{if(p)try{let r=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:p.redirectUri,codeVerifier:p.codeVerifier,state:s,...c?{meta:c}:{}})}),a=await r.json();if(!r.ok)throw Error(a.error);u("success"),l?.()}catch(e){j(e.message),u("error")}},[p,t,l]),L=(0,a.useCallback)(async e=>{if(p?.state)try{let t=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:p.state})}),s=await t.json();if(!t.ok)throw Error(s.error);u("success"),l?.()}catch(e){j(e.message),u("error")}},[p,l]),_=(0,a.useCallback)(async(e,s,r,a)=>{T.current=!1,C(!0);for(let n=0;n<60;n++){if(T.current){console.log("[OAuthModal] Polling aborted"),C(!1);return}if(await new Promise(e=>setTimeout(e,1e3*r)),T.current){console.log("[OAuthModal] Polling aborted after sleep"),C(!1);return}try{let n=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:s,extraData:a})}),i=await n.json();if(i.success){T.current=!0,u("success"),C(!1),l?.();return}if("expired_token"===i.error||"access_denied"===i.error)throw Error(i.errorDescription||i.error);"slow_down"===i.error&&(r=Math.min(r+5,30))}catch(e){j(e.message),u("error"),C(!1);return}}j("Authorization timeout"),u("error"),C(!1)},[t,l]),z=(0,a.useCallback)(async()=>{if(t)try{let e;if(j(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy"].includes(t)){v(!0),u("waiting");let e=new URL(`/api/oauth/${t}/device-code`,window.location.origin);"kiro"===t&&m?.startUrl&&(e.searchParams.set("start_url",m.startUrl),m.region&&e.searchParams.set("region",m.region),e.searchParams.set("auth_method","idc"));let s=await fetch(e.toString()),r=await s.json();if(!s.ok)throw Error(r.error);w(r);let a=r.verification_uri_complete||r.verification_uri;a&&window.open(a,"_blank","noopener,noreferrer");let l="kiro"===t?{_clientId:r._clientId,_clientSecret:r._clientSecret,_region:r._region,_authMethod:r._authMethod,_startUrl:r._startUrl}:null;_(r.device_code,r.codeVerifier,r.interval||5,l);return}let s=window.location.port||("https:"===window.location.protocol?"443":"80");e="codex"===t?"http://localhost:1455/auth/callback":"xai"===t?"http://127.0.0.1:56121/callback":`http://localhost:${s}/callback`;let r=new URL(`/api/oauth/${t}/authorize`,window.location.origin);r.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&r.searchParams.set(e,t)});let a=await fetch(r.toString()),l=await a.json();if(!a.ok)throw Error(l.error);let n=!1,i=!1;if("codex"===t)try{let t=new URL("/api/oauth/codex/start-proxy",window.location.origin);t.searchParams.set("app_port",s),t.searchParams.set("state",l.state),t.searchParams.set("code_verifier",l.codeVerifier),t.searchParams.set("redirect_uri",e);let r=await fetch(t.toString()),a=await r.json();n=a.success,i=!!a.serverSide}catch{n=!1}let o=!1,d=!1;if("xai"===t)try{let t=new URL("/api/oauth/xai/start-proxy",window.location.origin);t.searchParams.set("app_port",s),t.searchParams.set("state",l.state),t.searchParams.set("code_verifier",l.codeVerifier),t.searchParams.set("redirect_uri",e);let r=await fetch(t.toString()),a=await r.json();if(o=a.success,d=!!a.serverSide,!o&&"port_busy"===a.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(e){if(e?.message)throw e;o=!1}h({...l,redirectUri:e,codexServerSide:i,xaiServerSide:d}),"codex"===t&&n||"xai"===t&&o||P&&"codex"!==t&&"xai"!==t?(u("waiting"),S.current=window.open(l.authUrl,"oauth_popup","width=600,height=700"),S.current||u("input")):(u("input"),window.open(l.authUrl,"_blank"))}catch(e){j(e.message),u("error")}},[t,P,_,c,m]);(0,a.useEffect)(()=>{e&&t?(h(null),b(""),j(null),v(!1),w(null),C(!1),T.current=!1,z()):e||(T.current=!0,"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}))},[e,t,z]),(0,a.useEffect)(()=>{let e=p?.codexServerSide?"codex":p?.xaiServerSide?"xai":null;if(!e||!p?.state||A.current)return;let t=!1,s=0,r=async()=>{if(!t&&!A.current){s+=1;try{let s=await fetch(`/api/oauth/${e}/poll-status?state=${encodeURIComponent(p.state)}`),r=await s.json();if(t||A.current)return;if("done"===r.status){A.current=!0,u("success"),l?.();return}if("error"===r.status){A.current=!0,j(r.error||"Authentication failed"),u("error");return}}catch{}if(s>=200){A.current=!0,j("Authentication timeout"),u("error");return}setTimeout(r,1500)}};return setTimeout(r,1500),()=>{t=!0}},[p,l]),(0,a.useEffect)(()=>{let e;if(!p)return;A.current=!1;let t=async e=>{if(A.current)return;let{code:t,state:s,error:r,errorDescription:a}=e;if(r){A.current=!0,j(a||r),u("error");return}t&&(A.current=!0,await M(t,s))},s=e=>{let s=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),r=e.origin===window.location.origin;(s||r)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",s);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let r=e=>{if("oauth_callback"===e.key&&e.newValue)try{let s=JSON.parse(e.newValue);t(s),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",r);try{let e=localStorage.getItem("oauth_callback");if(e){let s=JSON.parse(e);s.timestamp&&Date.now()-s.timestamp<3e4&&t(s),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",s),window.removeEventListener("storage",r),e&&e.close()}},[p,M]);let q=async()=>{try{j(null);let e=f.trim();if(e.startsWith("eyJ")&&e.includes("."))return void await M(e,null);if("xai"===t&&e&&!e.includes("://")&&!e.includes("?")&&!e.includes("code="))return void await L(e);let s=new URL(e),r=s.searchParams.get("code"),a=s.searchParams.get("state"),l=s.searchParams.get("error");if(l)throw Error(s.searchParams.get("error_description")||l);if(!r)throw Error("xai"===t?"Paste the callback URL or copied xAI code":"No authorization code found in URL");await M(r,a)}catch(e){j(e.message),u("error")}},U=(0,a.useCallback)(()=>{"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}),n()},[n,t]);if(!t||!s)return null;let F="xai"===t,D=N?.verification_uri_complete||N?.verification_uri||"",W=F?"Connect Grok Build OAuth":`Connect ${s.name}`;return(0,r.jsx)(i.aF,{isOpen:e,title:W,onClose:U,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[("waiting"===x||"input"===x)&&!y&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,r.jsx)("span",{className:"text-sm",children:F?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,r.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,r.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,r.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",F?"Grok Build OAuth URL":"URL"," in your browser"]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.pd,{value:p?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,r.jsx)(i.$n,{variant:"secondary",icon:"auth_url"===O?"check":"content_copy",onClick:()=>R(p?.authUrl,"auth_url"),disabled:!p?.authUrl,children:"Copy"})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===t?"callback URL or copied code":"callback URL"," here"]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===t?"If xAI shows a code instead of redirecting, paste that code here.":"After authorization, copy the full URL from your browser."}),(0,r.jsx)(i.pd,{value:f,onChange:e=>b(e.target.value),placeholder:F?"http://127.0.0.1:56121/callback?code=... or copied code":E,className:"font-mono text-xs"})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:q,fullWidth:!0,disabled:!f,children:"Connect"}),(0,r.jsx)(i.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===x&&y&&N&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"text-center py-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,r.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("code",{className:"flex-1 text-sm break-all",children:D}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"login_url"===O?"check":"content_copy",onClick:()=>R(D,"login_url"),disabled:!D}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(D,"_blank","noopener,noreferrer"),disabled:!D,children:"Open"})]})]}),(0,r.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:N.user_code}),(0,r.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"user_code"===O?"check":"content_copy",onClick:()=>R(N.user_code,"user_code")})]})]})]}),k&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]})]}),"success"===x&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",s.name," account has been connected."]}),(0,r.jsx)(i.$n,{onClick:U,fullWidth:!0,children:"Done"})]}),"error"===x&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,r.jsx)("p",{className:"text-sm text-red-600 mb-4",children:g}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:z,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,r.jsx)(i.$n,{onClick:U,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:n().bool.isRequired,provider:n().string,providerInfo:n().shape({name:n().string}),onSuccess:n().func,onClose:n().func.isRequired,oauthMeta:n().object,idcConfig:n().shape({startUrl:n().string,region:n().string})}},3412:(e,t,s)=>{s.d(t,{default:()=>V});var r=s(73365),a=s(1521),l=s(29717),n=s(82495),i=s(35045),o=s(292),d=s(86447),c=s.n(d);let m=e=>new Intl.NumberFormat().format(e||0);function x({stats:e}){let t;return(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-4 sm:gap-4",children:[(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Requests"}),(0,r.jsx)("span",{className:"truncate text-2xl font-bold",children:m(e.totalRequests)})]}),(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Total Input Tokens"}),(0,r.jsx)("span",{className:"truncate text-2xl font-bold text-primary",children:m(e.totalPromptTokens)})]}),(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Output Tokens"}),(0,r.jsx)("span",{className:"truncate text-2xl font-bold text-success",children:m(e.totalCompletionTokens)})]}),(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-1 px-4 py-3",children:[(0,r.jsx)("span",{className:"text-text-muted text-sm uppercase font-semibold",children:"Est. Cost"}),(0,r.jsxs)("span",{className:"truncate text-2xl font-bold text-warning",children:["~",(t=e.totalCost,`$${(t||0).toFixed(2)}`)]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"Estimated, not actual billing"})]})]})}x.propTypes={stats:c().object.isRequired};let u=e=>new Intl.NumberFormat().format(e||0),p=e=>`$${(e||0).toFixed(2)}`;function h(e){if(!e)return"Never";let t=Math.floor((Date.now()-new Date(e))/6e4);return t<1?"Just now":t<60?`${t}m ago`:t<1440?`${Math.floor(t/60)}h ago`:new Date(e).toLocaleDateString()}function f({field:e,currentSort:t,currentOrder:s}){return t!==e?(0,r.jsx)("span",{className:"ml-1 opacity-20",children:"↕"}):(0,r.jsx)("span",{className:"ml-1",children:"asc"===s?"↑":"↓"})}function b({item:e,viewMode:t,isSummary:s=!1}){return"tokens"===t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.promptTokens?"—":u(e.promptTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.completionTokens?"—":u(e.completionTokens)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium",children:u(e.totalTokens)})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.inputCost?"—":p(e.inputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted",children:s&&void 0===e.outputCost?"—":p(e.outputCost)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right font-medium text-warning",children:p(e.totalCost||e.cost)})]})}function g({title:e,columns:t,groupedData:s,tableType:l,sortBy:n,sortOrder:i,onToggleSort:d,viewMode:c,storageKey:m,renderDetailCells:x,renderSummaryCells:u,emptyMessage:p}){let[h,j]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{try{let e=localStorage.getItem(m);e&&j(new Set(JSON.parse(e)))}catch(e){console.error(`Failed to load ${m}:`,e)}},[m]),(0,a.useEffect)(()=>{try{localStorage.setItem(m,JSON.stringify([...h]))}catch(e){console.error(`Failed to save ${m}:`,e)}},[h,m]);let y=(0,a.useCallback)(e=>{j(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),v=(0,a.useMemo)(()=>"tokens"===c?[{field:"promptTokens",label:"Input Tokens"},{field:"completionTokens",label:"Output Tokens"},{field:"totalTokens",label:"Total Tokens"}]:[{field:"promptTokens",label:"Input Cost"},{field:"completionTokens",label:"Output Cost"},{field:"cost",label:"Total Cost"}],[c]),N=t.length+v.length;return(0,r.jsxs)(o.default,{className:"overflow-hidden",children:[(0,r.jsx)("div",{className:"p-4 border-b border-border bg-bg-subtle/50",children:(0,r.jsx)("h3",{className:"font-semibold",children:e})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-sm text-left",children:[(0,r.jsx)("thead",{className:"bg-bg-subtle/30 text-text-muted uppercase text-xs",children:(0,r.jsxs)("tr",{children:[t.map(e=>(0,r.jsxs)("th",{className:`px-6 py-3 cursor-pointer hover:bg-bg-subtle/50 ${"right"===e.align?"text-right":""}`,onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:i})]},e.field)),v.map(e=>(0,r.jsxs)("th",{className:"px-6 py-3 text-right cursor-pointer hover:bg-bg-subtle/50",onClick:()=>d(l,e.field),children:[e.label," ",(0,r.jsx)(f,{field:e.field,currentSort:n,currentOrder:i})]},e.field))]})}),(0,r.jsxs)("tbody",{className:"divide-y divide-border",children:[s.map(e=>(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{className:"group-summary cursor-pointer hover:bg-bg-subtle/50 transition-colors",onClick:()=>y(e.groupKey),children:[(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${h.has(e.groupKey)?"rotate-90":""}`,children:"chevron_right"}),(0,r.jsx)("span",{className:`font-medium transition-colors ${e.summary.pending>0?"text-primary":""}`,children:e.groupKey})]})}),u(e),(0,r.jsx)(b,{item:e.summary,viewMode:c,isSummary:!0})]}),h.has(e.groupKey)&&e.items.map(e=>(0,r.jsxs)("tr",{className:"group-detail hover:bg-bg-subtle/20 transition-colors",children:[x(e),(0,r.jsx)(b,{item:e,viewMode:c})]},`detail-${e.key}`))]},e.groupKey)),0===s.length&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:N,className:"px-6 py-8 text-center text-text-muted",children:p})})]})]})})]})}f.propTypes={field:c().string.isRequired,currentSort:c().string.isRequired,currentOrder:c().string.isRequired},b.propTypes={item:c().object.isRequired,viewMode:c().string.isRequired,isSummary:c().bool},g.propTypes={title:c().string.isRequired,columns:c().arrayOf(c().shape({field:c().string.isRequired,label:c().string.isRequired,align:c().string})).isRequired,groupedData:c().array.isRequired,tableType:c().string.isRequired,sortBy:c().string.isRequired,sortOrder:c().string.isRequired,onToggleSort:c().func.isRequired,viewMode:c().string.isRequired,storageKey:c().string.isRequired,renderDetailCells:c().func.isRequired,renderSummaryCells:c().func.isRequired,emptyMessage:c().string.isRequired};var j=s(70842),y=s(36629);function v({data:e}){let{label:t,color:s,imageUrl:l,textIcon:n,active:i}=e,[o,d]=(0,a.useState)(!1);return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 px-4 py-2.5 rounded-lg border-2 transition-all duration-300 bg-bg",style:{borderColor:i?s:"var(--color-border)",boxShadow:i?`0 0 16px ${s}40`:"none",minWidth:"150px"},children:[(0,r.jsx)(j.h7,{type:"target",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"target",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("div",{className:"w-8 h-8 rounded-md flex items-center justify-center shrink-0",style:{backgroundColor:`${s}15`},children:o?(0,r.jsx)("span",{className:"text-sm font-bold",style:{color:s},children:n}):(0,r.jsx)("img",{src:l,alt:t,className:"w-6 h-6 rounded-sm object-contain",onError:()=>d(!0)})}),(0,r.jsx)("span",{className:"text-base font-medium truncate",style:{color:i?s:"var(--color-text)"},children:t}),i&&(0,r.jsxs)("span",{className:"relative flex h-2 w-2 shrink-0",children:[(0,r.jsx)("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full opacity-75",style:{backgroundColor:s}}),(0,r.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2",style:{backgroundColor:s}})]})]})}function N({data:e}){return(0,r.jsxs)("div",{className:"flex items-center justify-center px-5 py-3 rounded-xl border-2 border-primary bg-primary/5 shadow-md min-w-[130px]",children:[(0,r.jsx)(j.h7,{type:"source",position:y.yX.Top,id:"top",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Bottom,id:"bottom",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Left,id:"left",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)(j.h7,{type:"source",position:y.yX.Right,id:"right",className:"!bg-transparent !border-0 !w-0 !h-0"}),(0,r.jsx)("img",{src:"/favicon.svg",alt:"9Router",className:"w-6 h-6 mr-2"}),(0,r.jsx)("span",{className:"text-sm font-bold text-primary",children:"9Router"}),e.activeCount>0&&(0,r.jsx)("span",{className:"ml-2 px-1.5 py-0.5 rounded-full bg-primary text-white text-xs font-bold",children:e.activeCount})]})}s(97621),v.propTypes={data:c().object.isRequired},N.propTypes={data:c().object.isRequired};let w={provider:v,router:N};function k({providers:e=[],activeRequests:t=[],lastProvider:s="",errorProvider:l=""}){let i=(0,a.useMemo)(()=>t.map(e=>e.provider?.toLowerCase()).filter(Boolean).sort().join(","),[t]),o=s?.toLowerCase()||"",d=l?.toLowerCase()||"",c=(0,a.useMemo)(()=>new Set(i?i.split(","):[]),[i]),m=(0,a.useMemo)(()=>new Set(o?[o]:[]),[o]),x=(0,a.useMemo)(()=>new Set(d?[d]:[]),[d]),u=(0,a.useRef)({}),[p,h]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=u.current,t=Date.now();for(let s of c)e[s]||(e[s]=t);for(let t of Object.keys(e))c.has(t)||delete e[t]},[c]),(0,a.useEffect)(()=>{if(0===c.size)return;let e=setInterval(()=>h(e=>e+1),1e3);return()=>clearInterval(e)},[c]);let f=(0,a.useMemo)(()=>{let e=Date.now(),t=new Set;for(let s of c){let r=u.current[s];(!r||e-r<6e4)&&t.add(s)}return t},[c,p]),{nodes:b,edges:g}=(0,a.useMemo)(()=>(function(e,t,s,r){let a=e.length,l=Math.max(320,204*a/(2*Math.PI)),i=Math.max(200,.55*l);if(0===a)return{nodes:[{id:"router",type:"router",position:{x:0,y:0},data:{activeCount:0},draggable:!1}],edges:[]};let o=[],d=[];return o.push({id:"router",type:"router",position:{x:-60,y:-22},data:{activeCount:t.size},draggable:!1}),e.forEach((e,c)=>{var m,x;let u,p,h=(m=e.provider,n.Q2[m]||{color:"#6b7280",name:m}),f=t.has(e.provider?.toLowerCase()),b=!f&&s.has(e.provider?.toLowerCase()),g=!f&&r.has(e.provider?.toLowerCase()),j=`provider-${e.provider}`,y={label:(h.name!==e.provider?h.name:null)||e.name||e.provider,color:h.color||"#6b7280",imageUrl:(x=e.provider,`/providers/${x}.png`),textIcon:h.textIcon||(e.provider||"?").slice(0,2).toUpperCase(),active:f},v=-Math.PI/2+2*Math.PI*c/a,N=l*Math.cos(v),w=i*Math.sin(v);Math.abs(v+Math.PI/2)<Math.PI/4||Math.abs(v-3*Math.PI/2)<Math.PI/4?(u="top",p="bottom"):Math.abs(v-Math.PI/2)<Math.PI/4?(u="bottom",p="top"):N>0?(u="right",p="left"):(u="left",p="right"),o.push({id:j,type:"provider",position:{x:N-90,y:w-15},data:y,draggable:!1}),d.push({id:`e-${j}`,source:"router",sourceHandle:u,target:j,targetHandle:p,animated:f,style:(h.color,g?{stroke:"#ef4444",strokeWidth:2.5,opacity:.9}:f?{stroke:"#22c55e",strokeWidth:2.5,opacity:.9}:b?{stroke:"#f59e0b",strokeWidth:2,opacity:.7}:{stroke:"var(--color-border)",strokeWidth:1,opacity:.3})})}),{nodes:o,edges:d}})(e,f,m,x),[e,f,o,d]),y=(0,a.useMemo)(()=>e.map(e=>e.provider).sort().join(","),[e]),v=(0,a.useRef)(null),N=(0,a.useRef)(null),C={padding:.2,duration:200},S=(0,a.useCallback)(e=>{v.current=e,setTimeout(()=>e.fitView(C),50)},[]);return(0,a.useEffect)(()=>{let e=N.current;if(!e)return;let t=new ResizeObserver(()=>{v.current&&v.current.fitView(C)});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{if(v.current){let e=setTimeout(()=>v.current.fitView(C),50);return()=>clearTimeout(e)}},[b.length]),(0,r.jsx)("div",{ref:N,className:"h-[320px] w-full min-w-0 rounded-lg border border-border bg-bg-subtle/30 sm:h-[480px]",children:0===e.length?(0,r.jsx)("div",{className:"h-full flex items-center justify-center text-text-muted text-sm",children:"No providers connected"}):(0,r.jsx)(j.Gc,{nodes:b,edges:g,nodeTypes:w,fitView:!0,fitViewOptions:C,minZoom:.1,maxZoom:2,onInit:S,proOptions:{hideAttribution:!0},panOnDrag:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,preventScrolling:!1,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,children:(0,r.jsx)(j.H2,{showInteractive:!1,className:"react-flow-controls-custom"})},y)})}k.propTypes={providers:c().arrayOf(c().shape({id:c().string,provider:c().string,name:c().string})),activeRequests:c().arrayOf(c().shape({provider:c().string,model:c().string,account:c().string})),lastProvider:c().string,errorProvider:c().string};var C=s(71220),S=s(51142),T=s(35692),O=s(39719),R=s(94580),P=s(38147),$=s(80900);let E=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}K`:String(e||0),I=e=>`$${(e||0).toFixed(4)}`;function A({period:e="7d"}){let[t,s]=(0,a.useState)([]),[l,n]=(0,a.useState)(!0),[i,d]=(0,a.useState)("tokens"),c=(0,a.useCallback)(async()=>{n(!0);try{let t=await fetch(`/api/usage/chart?period=${e}`);if(t.ok){let e=await t.json();s(e)}}catch(e){console.error("Failed to fetch chart data:",e)}finally{n(!1)}},[e]);(0,a.useEffect)(()=>{c()},[c]);let m=t.some(e=>e.tokens>0||e.cost>0);return(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col gap-3 p-3 sm:p-4",children:[(0,r.jsxs)("div",{className:"grid w-full grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:w-auto sm:self-start",children:[(0,r.jsx)("button",{onClick:()=>d("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"}),(0,r.jsx)("button",{onClick:()=>d("cost"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"cost"===i?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Cost"})]}),l?(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"Loading..."}):m?(0,r.jsx)(C.u,{width:"100%",height:220,children:(0,r.jsxs)(S.Q,{data:t,margin:{top:4,right:8,left:0,bottom:0},children:[(0,r.jsxs)("defs",{children:[(0,r.jsxs)("linearGradient",{id:"gradTokens",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#6366f1",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#6366f1",stopOpacity:0})]}),(0,r.jsxs)("linearGradient",{id:"gradCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,r.jsx)("stop",{offset:"5%",stopColor:"#f59e0b",stopOpacity:.25}),(0,r.jsx)("stop",{offset:"95%",stopColor:"#f59e0b",stopOpacity:0})]})]}),(0,r.jsx)(T.d,{strokeDasharray:"3 3",strokeOpacity:.1}),(0,r.jsx)(O.W,{dataKey:"label",tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,interval:"preserveStartEnd"}),(0,r.jsx)(R.h,{tick:{fontSize:10,fill:"currentColor",fillOpacity:.5},tickLine:!1,axisLine:!1,tickFormatter:"tokens"===i?E:I,width:50}),(0,r.jsx)(P.m,{contentStyle:{backgroundColor:"var(--color-bg)",border:"1px solid var(--color-border)",borderRadius:"8px",fontSize:"12px"},formatter:(e,t)=>"tokens"===t?[E(e),"Tokens"]:[I(e),"Cost"]}),"tokens"===i?(0,r.jsx)($.Gk,{type:"monotone",dataKey:"tokens",stroke:"#6366f1",strokeWidth:2,fill:"url(#gradTokens)",dot:!1,activeDot:{r:4}}):(0,r.jsx)($.Gk,{type:"monotone",dataKey:"cost",stroke:"#f59e0b",strokeWidth:2,fill:"url(#gradCost)",dot:!1,activeDot:{r:4}})]})}):(0,r.jsx)("div",{className:"h-48 flex items-center justify-center text-text-muted text-sm",children:"No data for this period"})]})}function M(e){let t=n.Q2[e];return!t?.serviceKinds||t.serviceKinds.includes("llm")}function L({timestamp:e}){let t,[,s]=(0,a.useState)(0);return(0,a.useEffect)(()=>{let e=setInterval(()=>s(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,r.jsx)(r.Fragment,{children:(t=Math.floor((Date.now()-new Date(e))/1e3))<60?`${t}s ago`:t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`})}function _({requests:e=[]}){return(0,r.jsxs)(o.default,{className:"flex min-w-0 flex-col overflow-hidden",padding:"sm",style:{height:480},children:[(0,r.jsx)("div",{className:"px-1 py-2 border-b border-border shrink-0",children:(0,r.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wide",children:"Recent Requests"})}),e.length?(0,r.jsx)("div",{className:"flex-1 overflow-y-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[300px] border-collapse text-xs",children:[(0,r.jsx)("thead",{className:"sticky top-0 bg-bg z-10",children:(0,r.jsxs)("tr",{className:"border-b border-border",children:[(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted w-2"}),(0,r.jsx)("th",{className:"py-1.5 text-left font-semibold text-text-muted",children:"Model"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted whitespace-nowrap",children:"In / Out"}),(0,r.jsx)("th",{className:"py-1.5 text-right font-semibold text-text-muted",children:"When"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border/50",children:e.map((e,t)=>{let s=!e.status||"ok"===e.status||"success"===e.status;return(0,r.jsxs)("tr",{className:"hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("td",{className:"py-1.5",children:(0,r.jsx)("span",{className:`block w-1.5 h-1.5 rounded-full ${s?"bg-success":"bg-error"}`})}),(0,r.jsx)("td",{className:"py-1.5 font-mono truncate max-w-[120px]",title:e.model,children:e.model}),(0,r.jsxs)("td",{className:"py-1.5 text-right whitespace-nowrap",children:[(0,r.jsxs)("span",{className:"text-primary",children:[u(e.promptTokens),"↑"]})," ",(0,r.jsxs)("span",{className:"text-success",children:[u(e.completionTokens),"↓"]})]}),(0,r.jsx)("td",{className:"py-1.5 text-right text-text-muted whitespace-nowrap",children:(0,r.jsx)(L,{timestamp:e.timestamp})})]},t)})})]})}):(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center text-text-muted text-sm",children:"No requests yet."})]})}function z(e,t={},s,r){return Object.entries(e||{}).map(([e,s])=>{let r=(s.promptTokens||0)+(s.completionTokens||0),a=s.cost||0,l=r>0?(s.promptTokens||0)*(a/r):0,n=r>0?(s.completionTokens||0)*(a/r):0;return{...s,key:e,totalTokens:r,totalCost:a,inputCost:l,outputCost:n,pending:t[e]||0}}).sort((e,t)=>{let a=e[s],l=t[s];return("string"==typeof a&&(a=a.toLowerCase()),"string"==typeof l&&(l=l.toLowerCase()),a<l)?"asc"===r?-1:1:a>l?"asc"===r?1:-1:0})}function q(e,t){if(!Array.isArray(e))return[];let s={};return e.forEach(e=>{let r=function(e,t){switch(t){case"rawModel":return e.rawModel||"Unknown Model";case"accountName":return e.accountName||`Account ${e.connectionId?.slice(0,8)}...`||"Unknown Account";case"keyName":return e.keyName||"Unknown Key";case"endpoint":return e.endpoint||"Unknown Endpoint";default:return e[t]||"Unknown"}}(e,t);s[r]||(s[r]={groupKey:r,summary:{requests:0,promptTokens:0,completionTokens:0,totalTokens:0,cost:0,inputCost:0,outputCost:0,lastUsed:null,pending:0},items:[]});let a=s[r].summary;a.requests+=e.requests||0,a.promptTokens+=e.promptTokens||0,a.completionTokens+=e.completionTokens||0,a.totalTokens+=e.totalTokens||0,a.cost+=e.cost||0,a.inputCost+=e.inputCost||0,a.outputCost+=e.outputCost||0,a.pending+=e.pending||0,e.lastUsed&&(!a.lastUsed||new Date(e.lastUsed)>new Date(a.lastUsed))&&(a.lastUsed=e.lastUsed),s[r].items.push(e)}),Object.values(s)}A.propTypes={period:c().string};let U=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],F=[{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"accountName",label:"Account"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],D=[{field:"keyName",label:"API Key Name"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],W=[{field:"endpoint",label:"Endpoint"},{field:"rawModel",label:"Model"},{field:"provider",label:"Provider"},{field:"requests",label:"Requests",align:"right"},{field:"lastUsed",label:"Last Used",align:"right"}],K=[{value:"model",label:"Usage by Model"},{value:"account",label:"Usage by Account"},{value:"apiKey",label:"Usage by API Key"},{value:"endpoint",label:"Usage by Endpoint"}],B=[{value:"today",label:"Today"},{value:"24h",label:"24h"},{value:"7d",label:"7D"},{value:"30d",label:"30D"},{value:"60d",label:"60D"}];function V({period:e,setPeriod:t,hidePeriodSelector:s=!1}={}){let o=(0,l.useRouter)(),d=(0,l.useSearchParams)(),c=d.get("sortBy")||"rawModel",m=d.get("sortOrder")||"asc",[p,f]=(0,a.useState)(null),[b,j]=(0,a.useState)(!0),[y,v]=(0,a.useState)(!1),[N,w]=(0,a.useState)("model"),[C,S]=(0,a.useState)("costs"),[T,O]=(0,a.useState)([]),[R,P]=(0,a.useState)("today"),$=(0,a.useRef)(!0),E=e??R,I=t??P;(0,a.useEffect)(()=>{fetch("/api/providers").then(e=>e.ok?e.json():null).then(e=>{let t=new Set;O([...(e?.connections||[]).filter(e=>!(!1===e.isActive||!M(e.provider)||t.has(e.provider))&&(t.add(e.provider),!0)),...Object.values(n.IS).filter(e=>e.noAuth&&!t.has(e.id)&&M(e.id)).map(e=>({provider:e.id,name:e.name}))])}).catch(()=>{})},[]),(0,a.useEffect)(()=>{$.current?($.current=!1,j(!0)):v(!0),fetch(`/api/usage/stats?period=${E}`).then(e=>e.ok?e.json():null).then(e=>{e&&f(t=>({...t,...e}))}).catch(()=>{}).finally(()=>{j(!1),v(!1)})},[E]),(0,a.useEffect)(()=>{let e=new EventSource("/api/usage/stream");return e.onmessage=e=>{try{let t=JSON.parse(e.data);f(e=>({...e||{},activeRequests:t.activeRequests,recentRequests:t.recentRequests,errorProvider:t.errorProvider,pending:t.pending})),j(!1)}catch(e){console.error("[SSE CLIENT] parse error:",e)}},e.onerror=()=>j(!1),()=>e.close()},[]);let L=(0,a.useCallback)((e,t)=>{let s=new URLSearchParams(d.toString());s.get("sortBy")===t?s.set("sortOrder","asc"===s.get("sortOrder")?"desc":"asc"):(s.set("sortBy",t),s.set("sortOrder","asc")),o.replace(`?${s.toString()}`,{scroll:!1})},[d,o]),G=(0,a.useMemo)(()=>{if(!p)return null;switch(N){case"model":{let e=p.pending?.byModel||{};return{columns:U,groupedData:q(z(p.byModel,e,c,m),"rawModel"),storageKey:"usage-stats:expanded-models",emptyMessage:"No usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"account":{let e={};return p?.pending?.byAccount&&Object.entries(p.byAccount||{}).forEach(([t,s])=>{let r=p.pending.byAccount[s.connectionId];if(r){let a=s.provider?`${s.rawModel} (${s.provider})`:s.rawModel;e[t]=r[a]||0}}),{columns:F,groupedData:q(z(p.byAccount,e,c,m),"accountName"),storageKey:"usage-stats:expanded-accounts",emptyMessage:"No account-specific usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.accountName||`Account ${e.connectionId?.slice(0,8)}...`}),(0,r.jsx)("td",{className:`px-6 py-3 font-medium transition-colors ${e.pending>0?"text-primary":""}`,children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:e.pending>0?"primary":"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}case"apiKey":return{columns:D,groupedData:q(z(p.byApiKey,{},c,m),"keyName"),storageKey:"usage-stats:expanded-apikeys",emptyMessage:"No API key usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium",children:e.keyName}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})};default:return{columns:W,groupedData:q(z(p.byEndpoint,{},c,m),"endpoint"),storageKey:"usage-stats:expanded-endpoints",emptyMessage:"No endpoint usage recorded yet.",renderSummaryCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-text-muted",children:"—"}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.summary.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.summary.lastUsed)})]}),renderDetailCells:e=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("td",{className:"px-6 py-3 font-medium font-mono text-sm",children:e.endpoint}),(0,r.jsx)("td",{className:"px-6 py-3",children:e.rawModel}),(0,r.jsx)("td",{className:"px-6 py-3",children:(0,r.jsx)(i.default,{variant:"neutral",size:"sm",children:e.provider})}),(0,r.jsx)("td",{className:"px-6 py-3 text-right",children:u(e.requests)}),(0,r.jsx)("td",{className:"px-6 py-3 text-right text-text-muted whitespace-nowrap",children:h(e.lastUsed)})]})}}},[p,N,c,m]);if(!p&&!b)return(0,r.jsx)("div",{className:"text-text-muted",children:"Failed to load usage statistics."});let J=(0,r.jsx)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] animate-spin",children:"progress_activity"})});return(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[!s&&(0,r.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto sm:self-end",children:[(0,r.jsx)("div",{className:"grid flex-1 grid-cols-5 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex sm:flex-none",children:B.map(e=>(0,r.jsx)("button",{onClick:()=>I(e.value),disabled:y,className:`rounded-md px-3 py-1 text-sm font-medium transition-colors ${E===e.value?"bg-primary text-white shadow-sm":"text-text-muted hover:bg-bg-hover hover:text-text"}`,children:e.label},e.value))}),y&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted animate-spin",children:"progress_activity"})]}),b?J:(0,r.jsx)(x,{stats:p}),b?J:(0,r.jsxs)("div",{className:"grid min-w-0 grid-cols-1 items-stretch gap-2 lg:grid-cols-[minmax(0,2fr)_minmax(280px,1fr)]",children:[(0,r.jsx)(k,{providers:T,activeRequests:p.activeRequests||[],lastProvider:p.recentRequests?.[0]?.provider||"",errorProvider:p.errorProvider||""}),(0,r.jsx)(_,{requests:p.recentRequests||[]})]}),b?J:(0,r.jsx)(A,{period:E}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsx)("select",{value:N,onChange:e=>w(e.target.value),className:"w-full rounded-lg border border-border bg-surface px-3 py-1.5 text-sm font-medium text-text-main focus:outline-none focus:ring-2 focus:ring-primary/50 sm:w-auto",style:{colorScheme:"auto"},children:K.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("div",{className:"grid grid-cols-2 items-center gap-1 rounded-lg border border-border bg-bg-subtle p-1 sm:flex",children:[(0,r.jsx)("button",{onClick:()=>S("costs"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"costs"===C?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Costs"}),(0,r.jsx)("button",{onClick:()=>S("tokens"),className:`px-3 py-1 rounded-md text-sm font-medium transition-colors ${"tokens"===C?"bg-primary text-white shadow-sm":"text-text-muted hover:text-text hover:bg-bg-hover"}`,children:"Tokens"})]})]}),b?J:G&&(0,r.jsx)(g,{title:"",columns:G.columns,groupedData:G.groupedData,tableType:N,sortBy:c,sortOrder:m,onToggleSort:L,viewMode:C,storageKey:G.storageKey,renderSummaryCells:G.renderSummaryCells,renderDetailCells:G.renderDetailCells,emptyMessage:G.emptyMessage})]})]})}},5671:(e,t,s)=>{s.d(t,{default:()=>o});var r=s(73365),a=s(1521),l=s(66911),n=s(38230),i=s(96459);function o({isOpen:e,onClose:t,title:s="Manual Configuration",configs:d=[]}){let{copy:c}=(0,i.C)(),[m,x]=(0,a.useState)(null);return(0,r.jsx)(l.default,{isOpen:e,onClose:t,title:s,size:"xl",children:(0,r.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,r.jsxs)(n.default,{variant:"ghost",size:"sm",onClick:()=>{var s;return s=e.content,void(c(s,`manualconfig-${t}`),x(t),setTimeout(()=>x(null),2e3))},children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,r.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},8569:(e,t,s)=>{s.d(t,{default:()=>n});var r=s(73365),a=s(292);let l={mode:{label:"Mode",format:e=>e},defaultModel:{label:"Model",format:e=>e,mono:!0},baseUrl:{label:"Endpoint",format:e=>e,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:e=>0===e?"Free":`$${e.toFixed(4)}`},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:e=>e},freeMonthlyQuota:{label:"Free quota",format:e=>0===e?"—":e>=999999?"Unlimited":`${e.toLocaleString()} / mo`},searchTypes:{label:"Types",format:e=>e.join(", ")},formats:{label:"Formats",format:e=>e.join(", ")},maxMaxResults:{label:"Max results",format:e=>e},maxCharacters:{label:"Max chars",format:e=>e.toLocaleString()}};function n({config:e,provider:t,title:s="Provider Info"}){if(!e)return null;let i=Object.entries(l).filter(([t])=>void 0!==e[t]&&null!==e[t]&&""!==e[t]).map(([t,s])=>({key:t,label:s.label,value:s.format(e[t]),isLink:s.isLink,mono:s.mono,raw:e[t]})),o=t?.notice?.apiKeyUrl||t?.website,d=t?.notice?.text;return(0,r.jsxs)(a.default,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:s}),o&&(0,r.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[i.map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:e.label}),e.isLink?(0,r.jsx)("a",{href:e.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${e.mono?"font-mono":""}`,children:e.value}):(0,r.jsx)("span",{className:`text-sm text-text-main truncate ${e.mono?"font-mono":""}`,children:e.value})]},e.key)),d&&(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,r.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:d})]})]})]})}},12003:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(98196),n=s(55348),i=s(84502);let o=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:s,hideTrigger:c=!1}){let[m,x]=(0,a.useState)("en"),[u,p]=(0,a.useState)(!1),[h,f]=(0,a.useState)(!1),b=(0,a.useRef)(null),g="boolean"==typeof t,j=g?t:h,y=e=>{g?!e&&s&&s(m):f(e)};(0,a.useEffect)(()=>{x(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${n.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,n.QC)(t)}())},[]),(0,a.useEffect)(()=>{function e(e){b.current&&!b.current.contains(e.target)&&y(!1)}if(j)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let v=async e=>{if(e!==m&&!u){p(!0),y(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,i.wn)(),x(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,r.jsxs)("div",{className:e,children:[!c&&(0,r.jsxs)("button",{onClick:()=>y(!j),disabled:u,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:o(m).name}),(0,r.jsx)("span",{className:"text-lg",children:o(m).flag})]}),j&&(0,l.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>y(!1)}),(0,r.jsxs)("div",{ref:b,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,r.jsx)("button",{onClick:()=>y(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,r.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:n.YZ.map(e=>{let t=m===e,s=o(e);return(0,r.jsxs)("button",{onClick:()=>v(e),disabled:u,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${u?"opacity-70 cursor-wait":""}`,title:s.name,children:[(0,r.jsx)("span",{className:"text-2xl",children:s.flag}),(0,r.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:s.name}),t&&(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},12820:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(86447),n=s.n(l),i=s(74156);let o="https://api.openai.com/v1";function d({isOpen:e,onClose:t,onCreated:s,onSaved:l,node:n}){let c=!!n,[m,x]=(0,a.useState)({name:"",prefix:"",baseUrl:o}),[u,p]=(0,a.useState)(!1),[h,f]=(0,a.useState)(""),[b,g]=(0,a.useState)(""),[j,y]=(0,a.useState)(!1),[v,N]=(0,a.useState)(null);(0,a.useEffect)(()=>{e&&(N(null),f(""),g(""),c?x({name:n.name||"",prefix:n.prefix||"",baseUrl:n.baseUrl||o}):x({name:"",prefix:"",baseUrl:o}))},[e,c,n]);let w=async()=>{if(m.name.trim()&&m.prefix.trim()&&m.baseUrl.trim()){p(!0);try{let e=c?`/api/provider-nodes/${n.id}`:"/api/provider-nodes",t=c?"PUT":"POST",r={name:m.name,prefix:m.prefix,baseUrl:m.baseUrl};c||(r.type="custom-embedding");let a=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),i=await a.json();a.ok&&(c?l?.(i.node):s?.(i.node))}catch(e){console.log("Error saving custom embedding node:",e)}finally{p(!1)}}},k=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:m.baseUrl,apiKey:h,type:"custom-embedding",modelId:b.trim()||void 0})}),t=await e.json();N(t)}catch{N({valid:!1,error:"Network error"})}finally{y(!1)}};return(0,r.jsx)(i.aF,{isOpen:e,title:c?"Edit Custom Embedding":"Add Custom Embedding",onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)(i.pd,{label:"Name",value:m.name,onChange:e=>x({...m,name:e.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this embedding provider."}),(0,r.jsx)(i.pd,{label:"Prefix",value:m.prefix,onChange:e=>x({...m,prefix:e.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,r.jsx)(i.pd,{label:"Base URL",value:m.baseUrl,onChange:e=>x({...m,baseUrl:e.target.value}),placeholder:"https://api.voyageai.com/v1",hint:"Most embedding APIs are OpenAI-compatible: Voyage, Cohere, Jina, Mistral, Together..."}),(0,r.jsx)(i.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,r.jsx)(i.pd,{label:"Model ID (for Check)",value:b,onChange:e=>g(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",hint:"Required for validation. Will send a test embeddings request."}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)(i.$n,{onClick:k,disabled:!h||!b.trim()||j||!m.baseUrl.trim(),variant:"secondary",children:j?"Checking...":"Check"}),(()=>{if(!v)return null;let{valid:e,error:t,dimensions:s}=v;return e?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.Ex,{variant:"success",children:"Valid"}),s&&(0,r.jsxs)("span",{className:"text-sm text-text-muted",children:[s," dims"]})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)(i.Ex,{variant:"error",children:"Invalid"}),t&&(0,r.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(i.$n,{onClick:w,fullWidth:!0,disabled:!m.name.trim()||!m.prefix.trim()||!m.baseUrl.trim()||u,children:u?c?"Saving...":"Creating...":c?"Save":"Create"}),(0,r.jsx)(i.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}d.propTypes={isOpen:n().bool.isRequired,onClose:n().func.isRequired,onCreated:n().func,onSaved:n().func,node:n().shape({id:n().string,name:n().string,prefix:n().string,baseUrl:n().string})}},13048:(e,t,s)=>{s.d(t,{default:()=>d});var r=s(73365),a=s(1521),l=s(29717),n=s(14793),i=s(56550),o=s(19067);function d({children:e}){let[t,s]=(0,a.useState)(!1),c=(0,l.usePathname)(),m=(0,n.i)(e=>e.notifications),x=(0,n.i)(e=>e.removeNotification);return(0,r.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg",children:[(0,r.jsx)("div",{className:"fixed top-4 right-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:m.map(e=>{var t;let s="success"===(t=e.type)?{wrapper:"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400",icon:"check_circle"}:"error"===t?{wrapper:"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400",icon:"error"}:"warning"===t?{wrapper:"border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400",icon:"warning"}:{wrapper:"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",icon:"info"};return(0,r.jsx)("div",{className:`rounded-lg border px-3 py-2 shadow-lg backdrop-blur-sm ${s.wrapper}`,children:(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:s.icon}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,r.jsx)("p",{className:"text-xs font-semibold mb-0.5",children:e.title}):null,(0,r.jsx)("p",{className:"text-xs whitespace-pre-wrap break-words",children:e.message})]}),e.dismissible?(0,r.jsx)("button",{type:"button",onClick:()=>x(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/20 lg:hidden",onClick:()=>s(!1)}),(0,r.jsx)("div",{className:"hidden lg:flex",children:(0,r.jsx)(i.default,{})}),(0,r.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform lg:hidden transition-transform duration-300 ease-in-out ${t?"translate-x-0":"-translate-x-full"}`,children:(0,r.jsx)(i.default,{onClose:()=>s(!1)})}),(0,r.jsxs)("main",{className:"flex flex-col flex-1 h-full min-w-0 relative transition-colors duration-300 isolate",children:[(0,r.jsx)("div",{className:"landing-grid absolute inset-0 pointer-events-none -z-10","aria-hidden":"true"}),(0,r.jsx)(o.default,{onMenuClick:()=>s(!0)},c),(0,r.jsx)("div",{className:`flex-1 overflow-y-auto custom-scrollbar ${"/dashboard/basic-chat"===c?"":"p-6 lg:p-10"} ${"/dashboard/basic-chat"===c?"flex flex-col overflow-hidden":""}`,children:(0,r.jsx)("div",{className:`${"/dashboard/basic-chat"===c?"flex-1 w-full h-full flex flex-col":"max-w-7xl mx-auto"}`,children:e})})]})]})}},13333:(e,t,s)=>{s.d(t,{default:()=>a});var r=s(73365);function a({text:e,children:t,position:s="top",color:l}){let n=l?"":"bg-gray-900";return(0,r.jsxs)("div",{className:"relative inline-flex group",children:[t,(0,r.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[s]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${n} text-white opacity-0 group-hover:opacity-100 transition-opacity duration-150 whitespace-normal`,style:l?{backgroundColor:l}:{},children:e})]})}},14406:(e,t,s)=>{s.d(t,{default:()=>l});var r=s(73365),a=s(87706);function l({checked:e=!1,onChange:t,label:s,description:n,disabled:i=!1,size:o="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,r.jsxs)("div",{className:(0,a.cn)("flex items-center gap-3",i&&"opacity-50 cursor-not-allowed",d),children:[(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:i,onClick:()=>{!i&&t&&t(!e)},className:(0,a.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",c[o].track,i&&"cursor-not-allowed"),children:(0,r.jsx)("span",{className:(0,a.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[o].translate:"translate-x-0.5",c[o].thumb,"mt-0.5")})}),(s||n)&&(0,r.jsxs)("div",{className:"flex flex-col",children:[s&&(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s}),n&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:n})]})]})}},14793:(e,t,s)=>{s.d(t,{i:()=>l});var r=s(2074);let a=0,l=(0,r.v)((e,t)=>({notifications:[],addNotification:s=>{let r=++a,l={id:r,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,l]})),l.duration>0&&setTimeout(()=>t().removeNotification(r),l.duration),r},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},19067:(e,t,s)=>{s.d(t,{default:()=>y});var r=s(73365),a=s(1521),l=s(29717),n=s(99568),i=s.n(n),o=s(86447),d=s.n(o),c=s(68266),m=s(80600),x=s(84675),u=s(98196),p=s(43202);function h({isOpen:e,onClose:t}){let[s,l]=(0,a.useState)(null),[n,i]=(0,a.useState)(!1),[o,d]=(0,a.useState)(""),c=(0,a.useRef)(null);return((0,a.useEffect)(()=>{e&&!s&&(i(!0),d(""),fetch(p.Nu.donateUrl,{cache:"no-store"}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>l(e)).catch(e=>d(e.message||"Failed to load")).finally(()=>i(!1)))},[e,s]),(0,a.useEffect)(()=>{let s=e=>{c.current&&!c.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[e,t]),!e||"u"<typeof document)?null:(0,u.createPortal)((0,r.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,r.jsxs)("div",{ref:c,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-pink-500",children:"volunteer_activism"}),s?.title||"Support 9Router"]}),(0,r.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,r.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[n&&(0,r.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),o&&(0,r.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load donate info: ",o]}),!n&&!o&&s&&(0,r.jsxs)(r.Fragment,{children:[s.message&&(0,r.jsx)("p",{className:"text-text-muted text-sm mb-6 text-center",children:s.message}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:s.channels?.map(e=>(0,r.jsx)(f,{channel:e},e.id))})]})]})]})]}),document.body)}function f({channel:e}){let{label:t,description:s,icon:a,color:l,url:n,qr:i}=e,o=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"w-12 h-12 rounded-full flex items-center justify-center mb-3",style:{backgroundColor:`${l}20`,color:l},children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:a})}),(0,r.jsx)("div",{className:"font-semibold text-text-main mb-1",children:t}),s&&(0,r.jsx)("div",{className:"text-xs text-text-muted mb-3 text-center",children:s}),i&&(0,r.jsx)("img",{src:i,alt:`${t} QR`,className:"w-full max-w-[180px] aspect-square object-contain rounded-lg bg-white p-1"})]});return(0,r.jsxs)("div",{className:"flex flex-col items-center p-4 rounded-xl border border-black/10 dark:border-white/10 bg-surface/50 hover:border-pink-500/40 transition-colors",children:[o,n&&(0,r.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"mt-3 inline-flex items-center gap-1 px-3 py-1.5 rounded-lg text-sm font-medium text-white hover:opacity-90 transition-opacity",style:{backgroundColor:l},children:["Open",(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})]})]})}h.propTypes={isOpen:d().bool.isRequired,onClose:d().func.isRequired};var b=s(84907),g=s(82495),j=s(84502);function y({onMenuClick:e,showMenuButton:t=!0}){let s=(0,l.usePathname)(),n=(0,l.useRouter)(),[o,d]=(0,a.useState)(""),[u,f]=(0,a.useState)(""),[b,N]=(0,a.useState)(!1),{title:w,description:k,icon:C,breadcrumbs:S}=(0,a.useMemo)(()=>(e=>{if(!e)return{title:"",description:"",breadcrumbs:[]};let t=e.match(/\/media-providers\/([^/]+)\/([^/]+)$/);if(t){let e=t[1],s=t[2],r=g.rj.find(t=>t.id===e),a=g.Q2[s];return{title:a?.name||s,description:"",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${e}`},{label:r?.label||e,href:`/dashboard/media-providers/${e}`},{label:a?.name||s,image:`/providers/${s}.png`}]}}let s=e.match(/\/media-providers\/([^/]+)$/);if(s){let e=s[1],t=g.rj.find(t=>t.id===e);return{title:t?.label||e,description:`Manage your ${t?.label||e} providers`,icon:t?.icon||"perm_media",breadcrumbs:[]}}let r=e.match(/\/providers\/([^/]+)$/);if(r){let e=r[1],t=p.zN[e]||p.fg[e];if(t)return{title:t.name,description:"",breadcrumbs:[{label:"Providers",href:"/dashboard/providers"},{label:t.name,image:`/providers/${t.id}.png`}]}}return e.includes("/providers")&&!e.includes("/media-providers")?{title:"Providers",description:"Manage your AI provider connections",icon:"dns",breadcrumbs:[]}:e.includes("/combos")?{title:"Combos",description:"Model combos with fallback",icon:"layers",breadcrumbs:[]}:e.includes("/usage")?{title:"Usage & Analytics",description:"Monitor your API usage, token consumption, and request logs",icon:"bar_chart",breadcrumbs:[]}:e.includes("/auth-files")?{title:"Auth Files",description:"Map provider credentials stored in the local database",icon:"vpn_key",breadcrumbs:[]}:e.includes("/quota")?{title:"Quota Tracker",description:"Track and manage your API quota limits",icon:"data_usage",breadcrumbs:[]}:e.includes("/mitm")?{title:"MITM Proxy",description:"Intercept CLI tool traffic and route through 9Router",icon:"security",breadcrumbs:[]}:e.includes("/cli-tools")?{title:"CLI Tools",description:"Configure CLI tools",icon:"terminal",breadcrumbs:[]}:e.includes("/proxy-pools")?{title:"Proxy Pools",description:"Manage your proxy pool configurations",icon:"lan",breadcrumbs:[]}:e.includes("/skills")?{title:"Agent Skills",description:"Copy a link and paste to your AI to use 9Router — no install needed",icon:"extension",breadcrumbs:[]}:e.includes("/endpoint")?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:e.includes("/profile")?{title:"Settings",description:"Manage your preferences",icon:"settings",breadcrumbs:[]}:e.includes("/translator")?{title:"Translator",description:"Debug translation flow between formats",icon:"translate",breadcrumbs:[]}:e.includes("/console-log")?{title:"Console Log",description:"Live server console output",icon:"monitor",breadcrumbs:[]}:"/dashboard"===e?{title:"Endpoint",description:"API endpoint configuration",icon:"api",breadcrumbs:[]}:{title:"",description:"",breadcrumbs:[]}})(s),[s]);(0,a.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let s=await t.json();e||(d(s?.displayName||s?.oidcName||s?.oidcEmail||""),f(s?.loginMethod||""))}catch{e||(d(""),f(""))}}(),()=>{e=!0}},[]);let T=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(n.push("/login"),n.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,r.jsxs)("header",{className:"shrink-0 flex items-center justify-between gap-3 px-4 lg:px-8 pt-3 pb-2 border-b border-border-subtle bg-surface/60 backdrop-blur-xl lg:bg-transparent lg:backdrop-blur-none z-20",children:[(0,r.jsx)("div",{className:"flex items-center gap-3 lg:hidden shrink-0",children:t&&(0,r.jsx)("button",{onClick:e,className:"text-text-main hover:text-primary transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,r.jsx)("div",{className:"flex flex-col min-w-0 flex-1",children:S.length>0?(0,r.jsx)("div",{className:"flex items-center gap-2",children:S.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-base",children:"chevron_right"}),e.href?(0,r.jsx)(i(),{href:e.href,className:"text-text-muted hover:text-primary transition-colors",children:e.label}):(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[e.image&&(0,r.jsx)(c.A,{src:e.image,alt:e.label,size:28,className:"object-contain rounded max-w-[28px] max-h-[28px]",fallbackText:e.label.slice(0,2).toUpperCase()}),(0,r.jsx)("h1",{className:"text-base lg:text-2xl font-semibold text-text-main tracking-tight truncate",children:(0,j.Tl)(e.label)})]})]},`${e.label}-${e.href||"current"}`))}):w?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[C&&(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-xl lg:text-2xl",children:C}),(0,r.jsx)("h1",{className:"text-base lg:text-2xl font-semibold tracking-tight truncate",children:(0,j.Tl)(w)})]}),k&&(0,r.jsx)("p",{className:"hidden lg:block text-sm text-text-muted truncate",children:(0,j.Tl)(k)})]}):null}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[o&&"OIDC"===u&&(0,r.jsxs)("div",{className:"hidden sm:flex items-center max-w-[220px] px-3 py-1.5 rounded-full border border-border bg-surface/70 text-xs text-text-muted truncate",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1.5 text-primary",children:"person"}),(0,r.jsx)("span",{className:"truncate",children:o}),(0,r.jsx)("span",{className:"ml-2 shrink-0 rounded-full bg-primary/10 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-primary",children:"OIDC"})]}),(0,r.jsx)(v,{}),(0,r.jsxs)("button",{onClick:()=>N(!0),className:"flex items-center gap-1.5 px-3 h-8 rounded-lg border border-pink-500/30 bg-pink-500/10 text-pink-600 dark:text-pink-400 hover:bg-pink-500/20 transition-colors text-sm font-medium","aria-label":"Donate",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"volunteer_activism"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Donate"})]}),(0,r.jsx)(x.default,{}),(0,r.jsx)(m.default,{onLogout:T})]}),(0,r.jsx)(h,{isOpen:b,onClose:()=>N(!1)})]})}function v(){let e=(0,b.C)(e=>e.visible),t=(0,b.C)(e=>e.query),s=(0,b.C)(e=>e.placeholder),a=(0,b.C)(e=>e.setQuery);return e?(0,r.jsxs)("div",{className:"relative w-[160px] sm:w-[220px]",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2 top-1/2 -translate-y-1/2 text-text-muted text-[16px] pointer-events-none",children:"search"}),(0,r.jsx)("input",{type:"text",value:t,onChange:e=>a(e.target.value),placeholder:s,className:"w-full h-8 pl-7 pr-7 rounded-lg border border-border bg-surface/60 text-sm focus:outline-none focus:border-primary/50 transition-colors"}),t&&(0,r.jsx)("button",{type:"button",onClick:()=>a(""),className:"absolute right-1 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-main p-0.5 rounded","aria-label":"Clear search",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}):null}y.propTypes={onMenuClick:d().func,showMenuButton:d().bool}},24372:(e,t,s)=>{s.d(t,{default:()=>u});var r=s(73365),a=s(1521),l=s(86447),n=s.n(l),i=s(66911),o=s(68266),d=s(69633),c=s(82495);let m=[...Object.keys(c.zN),...Object.keys(c.IS),...Object.keys(c.nJ),...Object.keys(c.fg)],x=Object.keys(c.IS).filter(e=>c.IS[e].noAuth);function u({isOpen:e,onClose:t,onSelect:s,onDeselect:l,selectedModel:n,activeProviders:p=[],title:h="Select Model",modelAliases:f={},kindFilter:b=null,addedModelValues:g=[],closeOnSelect:j=!0}){let y=(0,a.useMemo)(()=>b?p.filter(e=>{let t=c.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(b)}):p,[p,b]),[v,N]=(0,a.useState)(""),[w,k]=(0,a.useState)([]),[C,S]=(0,a.useState)([]),[T,O]=(0,a.useState)([]),[R,P]=(0,a.useState)({}),$=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();k(t.combos||[])}catch(e){console.error("Error fetching combos:",e),k([])}};(0,a.useEffect)(()=>{e&&$()},[e]);let E=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();S(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),S([])}};(0,a.useEffect)(()=>{e&&E()},[e]);let I=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();O(t.models||[])}catch(e){console.error("Error fetching custom models:",e),O([])}};(0,a.useEffect)(()=>{e&&I()},[e]);let A=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();P(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),P({})}};(0,a.useEffect)(()=>{e&&A()},[e]);let M=(0,a.useMemo)(()=>({...c.zN,...c.IS,...c.nJ,...c.fg}),[]),L=(0,a.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),s=new Set(["image","tts","stt","embedding","imageToText"]),r=new Set(["tts","image","webFetch"]);return[...new Set([...y.map(e=>e.provider),...b?x.filter(e=>(c.Q2[e]?.serviceKinds||["llm"]).includes(b)):x])].sort((e,t)=>{let s=m.indexOf(e),r=m.indexOf(t);return(-1===s?999:s)-(-1===r?999:r)}).forEach(a=>{let l=(0,c.wG)(a),n=M[a]||{name:a,color:"#666"},i=(0,c.mq)(a)||(0,c.gb)(a);if(b&&t.has(b)){e[a]={name:n.name,alias:l,color:n.color,models:[{id:a,name:n.name,value:a}]};return}if(n.passthroughModels){let t=Object.entries(f).filter(([,e])=>e.startsWith(`${l}/`)).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t}));if(b&&s.has(b)&&0===(t=(0,d.KC)(a).filter(e=>e.type===b).map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type}))).length&&r.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(t=[{id:a,name:n.name,value:l}]),t.length>0){let s=C.find(e=>e.id===a),r=s?.name||n.name;e[a]={name:r,alias:l,color:n.color,models:t}}}else if(i){if(b&&s.has(b))return;let t=p.find(e=>e.provider===a),r=C.find(e=>e.id===a),l=t?.name||r?.name||n.name,i=t?.providerSpecificData?.prefix||r?.prefix||a,o=Object.entries(f).filter(([,e])=>e.startsWith(`${a}/`)).map(([e,t])=>({id:t.replace(`${a}/`,""),name:e,value:`${i}/${t.replace(`${a}/`,"")}`})),d=o.length>0?o:[{id:`__placeholder__${a}`,name:`${i}/model-id`,value:`${i}/model-id`,isPlaceholder:!0}];e[a]={name:l,alias:i,color:n.color,models:d,isCustom:!0,hasModels:o.length>0}}else{var o;let t=(0,d.KC)(a),i=new Set(t.map(e=>e.id)),c=t.length>0,m=Object.entries(f).filter(([e,t])=>t.startsWith(`${l}/`)&&(!c||e===t.replace(`${l}/`,""))&&!i.has(t.replace(`${l}/`,""))).map(([e,t])=>({id:t.replace(`${l}/`,""),name:e,value:t,isCustom:!0})),x=new Set(m.map(e=>e.id)),u=T.filter(e=>e.providerAlias===l&&!i.has(e.id)&&!x.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${l}/${e.id}`,isCustom:!0})),p=[...t.map(e=>({id:e.id,name:e.name,value:`${l}/${e.id}`,type:e.type})),...m,...u],h=new Set,g=(o=p.filter(e=>!h.has(e.value)&&(h.add(e.value),!0)),b?s.has(b)?o.filter(e=>e.isPlaceholder||e.type===b):o:o.filter(e=>e.isPlaceholder||!e.type||"llm"===e.type));0===g.length&&b&&r.has(b)&&(n.serviceKinds||["llm"]).includes(b)&&(g=[{id:a,name:n.name,value:l}]),g.length>0&&(e[a]={name:n.name,alias:l,color:n.color,models:g})}}),Object.entries(e).forEach(([t,s])=>{let r=new Set([...R[(0,c.wG)(t)]||[],...R[t]||[]]);0!==r.size&&(s.models=s.models.filter(e=>!r.has(e.id)),0===s.models.length&&delete e[t])}),e},[y,f,M,C,T,R,b,p]),_=(0,a.useMemo)(()=>{if(b)return[];if(!v.trim())return w;let e=v.toLowerCase();return w.filter(t=>t.name.toLowerCase().includes(e))},[w,v,b]),z=(0,a.useMemo)(()=>{let e=v.trim().toLowerCase(),t={};return Object.entries(L).forEach(([s,r])=>{var a;let l=r.models;if(e){let t=r.name.toLowerCase().includes(e);if(0===(l=l.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[s]={...r,models:[...(a=l).filter(e=>g.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...a.filter(e=>!g.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[L,v,g]),q=e=>{let r=e?.value||e?.name||e;g.includes(r)&&l?l(e):s(e),j&&(t(),N(""))};return(0,r.jsxs)(i.default,{isOpen:e,onClose:()=>{t(),N("")},title:h,size:"md",className:"p-4!",footer:null,children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,r.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,r.jsx)("input",{type:"text",placeholder:"Search...",value:v,onChange:e=>N(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,r.jsxs)("div",{className:"max-h-[400px] overflow-y-auto space-y-3",children:[_.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",_.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:_.map(e=>{let t=n===e.name;return(0,r.jsxs)("button",{onClick:()=>q({id:e.name,name:e.name,value:e.name}),className:`
|
|
2
2
|
px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
|
|
3
3
|
${t?"bg-primary text-white border-primary":g.includes(e.name)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
|
|
4
4
|
`,children:[g.includes(e.name)&&(0,r.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),Object.entries(z).map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,r.jsx)(o.A,{src:`/providers/${e}.png`,alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,r.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=n===e.value,s=e.isPlaceholder;return(0,r.jsx)("button",{onClick:()=>q(e),title:s?"Select to pre-fill, then edit model ID in the input":void 0,className:`
|