@rsalmn/extremerouter 0.6.7 → 0.6.9
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 +5 -0
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +24 -0
- package/app/.next-cli-build/routes-manifest.json +34 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -0
- 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 +2 -2
- 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/health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/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 +2 -2
- 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/overview/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/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/playground/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/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 +4 -4
- 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 +3 -3
- 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/swarm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/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 +3 -3
- 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 +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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/alerts/test/route.js +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
- 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/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/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/cache/route.js +1 -0
- package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/cache/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/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/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/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/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/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/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/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/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/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]/health-timeline/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route_client-reference-manifest.js +1 -0
- 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/[id]/vault-pool/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route_client-reference-manifest.js +1 -0
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- 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/swarm/active/route.js +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/swarm/stream/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 +1 -1
- 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]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/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/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/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/retry-stats/route.js +1 -0
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/usage/retry-stats/route_client-reference-manifest.js +1 -0
- 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 +1 -1
- 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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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/alerts.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.meta +17 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.rsc +25 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts/__PAGE__.segment.rsc +9 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_full.segment.rsc +25 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_head.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_index.segment.rsc +9 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_tree.segment.rsc +3 -0
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/playground.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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +8 -8
- 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 +8 -8
- 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 +5 -5
- 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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- 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 +5 -5
- 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 +2 -2
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +7 -7
- 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 +7 -7
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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 +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- 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 +5 -5
- 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 +5 -0
- package/app/.next-cli-build/server/chunks/1129.js +4 -0
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1719.js +1 -1
- package/app/.next-cli-build/server/chunks/212.js +1 -1
- package/app/.next-cli-build/server/chunks/2231.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/4452.js +1 -0
- package/app/.next-cli-build/server/chunks/5141.js +1 -1
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5781.js +6 -0
- package/app/.next-cli-build/server/chunks/5961.js +1 -1
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6316.js +2 -2
- package/app/.next-cli-build/server/chunks/6630.js +1 -1
- package/app/.next-cli-build/server/chunks/6777.js +1 -1
- package/app/.next-cli-build/server/chunks/7914.js +1 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8833.js +2 -2
- package/app/.next-cli-build/server/chunks/8895.js +19 -19
- package/app/.next-cli-build/server/chunks/9422.js +13 -0
- package/app/.next-cli-build/server/chunks/9573.js +2 -2
- package/app/.next-cli-build/server/chunks/9703.js +14 -0
- package/app/.next-cli-build/server/chunks/9903.js +2 -2
- 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/static/A3MT7HriWgGsipwlBgRY7/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/{1321-4a7a9ee14e7c1d60.js → 1321-a9f1e563607e27d2.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-b52a89f9755eb560.js +7 -0
- package/app/.next-cli-build/static/chunks/705-88c44a85ef2fa706.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/page-9f05c495f92fb578.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-f83681329e5612b2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-c996eca2209ec67d.js → page-1b18b64a9ced4e9f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-944559757580c50e.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-92152010fe3fda37.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2ebb6e5a67759dda.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-79901f3a01b79627.js → page-f2b0f4a782580e21.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f15c4c0893999b8c.js +1 -0
- package/app/.next-cli-build/static/css/aec867583ca6b35b.css +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/9248.js +0 -24
- package/app/.next-cli-build/static/chunks/5497-a9063203a149ed58.js +0 -7
- package/app/.next-cli-build/static/chunks/705-c516b80d4469541b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-503d94f002901e45.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e78f58ada6b70744.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-87fcc6ce7d4004b5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d1f50f77018f738e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-937d036ce54449cc.js +0 -1
- package/app/.next-cli-build/static/css/4ab17be64cde47af.css +0 -1
- package/app/.next-cli-build/static/v68eSfZDt6D04piWfJX-7/_buildManifest.js +0 -1
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.6.3-to-0.6.4-0.6.4-20260705-031259/data.sqlite +0 -0
- /package/app/.next-cli-build/static/{v68eSfZDt6D04piWfJX-7 → A3MT7HriWgGsipwlBgRY7}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.2-to-0.6.3-0.6.3-20260704-134754 → upgrade-0.6.7-to-0.6.8-0.6.8-20260712-041517}/data.sqlite +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,h]=(0,r.useState)("en"),[u,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,T]=(0,r.useState)(!1),[L,D]=(0,r.useState)(!1),[U,R]=(0,r.useState)({type:"",message:""}),[A,E]=(0,r.useState)({open:!1,mode:"",password:""}),M=(0,r.useRef)(null),[$,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[J,H]=(0,r.useState)(""),[q,_]=(0,r.useState)({type:"",message:""}),[W,z]=(0,r.useState)(!1),[Z,B]=(0,r.useState)(!1),[K,G]=(0,r.useState)({type:"",message:""}),[Q,Y]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{h(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[u]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),H(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{Y(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});T(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{T(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eu=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=$.authMode||"password")=>{let t=$.oidcIssuerUrl.trim(),s=$.oidcClientId.trim(),a=$.oidcScopes.trim(),r=$.oidcLoginLabel.trim(),o=J.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void _({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});z(!0),_({type:"",message:""}),G({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),H(""),_({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):_({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){_({type:"error",message:"An error occurred"})}finally{z(!1)}},ej=async()=>{let e=$.oidcIssuerUrl.trim(),t=$.oidcClientId.trim(),s=$.oidcScopes.trim(),a=J.trim();if(!e||!t)return void G({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),_({type:"",message:""}),G({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:$.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:$.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void G({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;G({type:"success",message:e})}else G({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){G({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),R({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),R({type:"success",message:"Database backup downloaded"})}catch(e){R({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=M.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),R({type:"success",message:"Database imported successfully"})}catch(e){R({type:"error",message:e.message||"Invalid backup file"})}finally{M.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;E({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>E({open:!0,mode:"export",password:""}),loading:L,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:L,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&(M.current=t,R({type:"",message:""}),E({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=$.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||W,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:$.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:$.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:J,onChange:e=>H(e.target.value),disabled:v||W}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:$.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:$.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||W})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Q})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:W,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:Z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),K.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===K.type?"text-red-500":"text-green-500"}`,children:K.message}),q.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===q.type?"text-red-500":"text-green-500"}`,children:q.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eu(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eh("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Webhook Alerts"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Get notified when providers go down, get rate-limited, or health degrades."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(o.lM,{checked:!0===w.webhookEnabled,onChange:async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookEnabled:e})}),N(t=>({...t,webhookEnabled:e}))}catch{}},label:"Enable Webhook Alerts"}),!0===w.webhookEnabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.pd,{label:"Discord Webhook URL",type:"text",value:w.webhookDiscordUrl||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookDiscordUrl:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookDiscordUrl:t})})}catch{}},placeholder:"https://discord.com/api/webhooks/...",className:"flex-1"}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsx)(o.pd,{label:"Telegram Bot Token",type:"password",value:w.webhookTelegramToken||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookTelegramToken:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookTelegramToken:t})})}catch{}},placeholder:"123456:ABC-DEF...",className:"flex-1"}),(0,a.jsx)(o.pd,{label:"Telegram Chat ID",type:"text",value:w.webhookTelegramChatId||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookTelegramChatId:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookTelegramChatId:t})})}catch{}},placeholder:"-1001234567890",className:"flex-1"})]}),(0,a.jsx)(o.pd,{label:"Generic Webhook URL",type:"text",value:w.webhookGenericUrl||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookGenericUrl:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookGenericUrl:t})})}catch{}},placeholder:"https://your-server.com/webhook",className:"flex-1"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:[{key:"providerDown",label:"Provider Down"},{key:"rateLimited",label:"Rate Limited"},{key:"healthDegraded",label:"Health Degraded"}].map(e=>(0,a.jsx)(o.lM,{size:"sm",checked:w.webhookAlertEvents?.[e.key]===!0,onChange:async t=>{let s={...w.webhookAlertEvents,[e.key]:t};N(e=>({...e,webhookAlertEvents:s}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookAlertEvents:s})})}catch{}},label:e.label},e.key))}),(0,a.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"send",onClick:async()=>{try{let e=await fetch("/api/alerts/test",{method:"POST"});(await e.json()).success?alert("Test alert sent! Check your configured channels."):alert("Failed to send test alert.")}catch{alert("Failed to send test alert.")}},children:"Send Test Alert"})]})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:u,onClose:e=>{b(!1),h(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>E({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>E({open:!1,mode:"",password:""}),disabled:L,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:L,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>E(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,u]=(0,r.useState)("en"),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[E,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,J]=(0,r.useState)(""),[_,H]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)({type:"",message:""}),[Y,G]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[h]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),J(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{G(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});L(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eh=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Z(!0),H({type:"",message:""}),Q({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),J(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{Z(!1)}},ej=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void Q({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),Q({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Q({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Q({type:"success",message:e})}else Q({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),T({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=$.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;M({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>M({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&($.current=t,T({type:"",message:""}),M({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||K,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:E.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:E.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>J(e.target.value),disabled:v||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||K})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:K,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),_.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===_.type?"text-red-500":"text-green-500"}`,children:_.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eh(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eu("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:h,onClose:e=>{b(!1),u(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>M({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>M({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:R,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>M(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{6953:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>q});var a=s(95155),l=s(12115),i=s(73321),n=s(98500),r=s.n(n),o=s(5772),d=s(35497),c=s(88105),m=s(28777),p=s(11059),x=s(53593),u=s(73006);let h=new Map;async function f(e){if(!e?.url||!e?.type)return[];let t=h.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return h.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}function g({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:a=[],type:l="llm",includeLegacyAliases:i=!0}){let n=new Set(a.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||n.has(t.id))continue;let a=`${s}/${t.id}`;r.has(a)||(r.add(a),o.push({id:t.id,name:t.name||t.id,fullModel:a,source:"custom",type:e}))}if(!i)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||n.has(t)||r.has(s)||(r.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:l||"llm"}))}return o}var y=s(14051),b=s.n(y);let v=[{value:"auto",label:"Auto",hint:"No override"},{value:"none",label:"Off",hint:"Disable thinking"},{value:"minimal",label:"Minimal",hint:"512 tokens"},{value:"low",label:"Low",hint:"1,024 tokens"},{value:"medium",label:"Medium",hint:"8,192 tokens"},{value:"high",label:"High",hint:"24,576 tokens"},{value:"xhigh",label:"X-High",hint:"32,768 tokens"},{value:"max",label:"Max",hint:"128,000 tokens"}];function j({caps:e,selectedLevel:t,onSelect:s}){let[i,n]=(0,l.useState)(!1),r=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!i)return;let e=e=>{r.current&&!r.current.contains(e.target)&&n(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let o=v.filter(t=>"auto"===t.value||"none"!==t.value||e?.thinkingCanDisable!==!1),d=o.find(e=>e.value===t)||o[0];return(0,a.jsxs)("div",{className:"relative",ref:r,children:[(0,a.jsx)("button",{onClick:()=>n(e=>!e),title:`Thinking: ${d.label}${d.hint?` (${d.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==t?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),i&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[140px] rounded-lg border border-border bg-panel shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),o.map(e=>(0,a.jsxs)("button",{onClick:()=>{s(e.value),n(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${e.value===t?"text-primary font-semibold":"text-text-main"}`,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:e.hint})]},e.value))]})]})}function w({model:e,fullModel:t,alias:s,copied:i,onCopy:n,testStatus:r,isCustom:o,isFree:c,onDeleteAlias:m,onTest:p,isTesting:x,onDisable:u,caps:h}){let[f,g]=(0,l.useState)("auto"),y="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0,b=!!h?.reasoning,v="auto"!==f&&"none"!==f?`${t}(${f})`:"none"===f?`${t}(none)`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:y?{color:y}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:v}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,a.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,a.jsx)(d.nh,{caps:h,colorOverride:"text-text-muted/70",size:12})]})]}),b&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)(j,{caps:h,selectedLevel:f,onSelect:g}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:"Thinking"})]}),p&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:p,disabled:x,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${x?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:x?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>n(v,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function N({modelId:e,fullModel:t,copied:s,onCopy:l,onDeleteAlias:i,onTest:n,testStatus:r,isTesting:o}){let d="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),n&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:n,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function k({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:i,copied:n,onCopy:r,onDeleteAlias:o,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[u,h]=(0,l.useState)(""),[f,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[j,w]=(0,l.useState)(null),[C,S]=(0,l.useState)({}),$=async t=>{if(!j){w(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();S(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{S(e=>({...e,[t]:"error"}))}finally{w(null)}}},A=g({customModels:i,modelAliases:s,providerAlias:e,type:"llm"}),T=async()=>{if(!u.trim()||f)return;let e=u.trim();if(A.some(t=>t.id===e))return void alert("Model already exists for this provider.");y(!0);try{await c(e),h("")}catch(e){console.log("Error adding model:",e)}finally{y(!1)}},P=async()=>{if(b)return;let e=p.find(e=>!1!==e.isActive);if(e){v(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let l=0;for(let e of a){let t=e.id||e.name||e.model;t&&(A.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},E=p.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",x?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&T(),placeholder:x?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:T,disabled:!u.trim()||f,children:f?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:P,disabled:!E||b,children:b?"Importing...":"Import from /models"})]}),!E&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),A.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:A.map(({id:s,alias:l,source:i})=>(0,a.jsx)(N,{modelId:s,fullModel:`${t}/${s}`,copied:n,onCopy:r,onDeleteAlias:()=>"custom"===i?m(s):o(l),onTest:p.length>0?()=>$(s):void 0,testStatus:C[s],isTesting:j===s},`${i}-${e}/${s}`))})]})}w.propTypes={model:b().shape({id:b().string.isRequired}).isRequired,fullModel:b().string.isRequired,alias:b().string,copied:b().string,onCopy:b().func.isRequired,testStatus:b().oneOf(["ok","error"]),isCustom:b().bool,isFree:b().bool,onDeleteAlias:b().func,onTest:b().func,isTesting:b().bool,onDisable:b().func,caps:b().object},k.propTypes={providerStorageAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,modelAliases:b().object.isRequired,customModels:b().arrayOf(b().object),copied:b().string,onCopy:b().func.isRequired,onDeleteAlias:b().func.isRequired,onAddCustomModel:b().func.isRequired,onDeleteCustomModel:b().func.isRequired,connections:b().arrayOf(b().shape({id:b().string,isActive:b().bool})).isRequired,isAnthropic:b().bool};var C=s(70217);function S({until:e}){let[t,s]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function $({connection:e,proxyPools:t,isOAuth:s,isFirst:i,isLast:n,onMoveUp:r,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,N=w?j.get(w):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,A=!!w||k,T=N?`Pool: ${N.name}`:w?`Pool: ${w} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",P=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",E="";if(N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=N?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);E=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{E=t}}let O=N?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";N?.isActive===!0?I="success":(w||k)&&(I="error"),(0,l.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let D=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},z=e.authType||(s?"oauth":"apikey"),_="oauth"===z,R="cookie"===z,U=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(_?"OAuth Account":R?"Cookie Account":"API Key"),M=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[q,L]=(0,l.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=()=>{L(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=K?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[K]);let F="unavailable"!==e.testStatus||q?e.testStatus:"active",J=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:r,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:R?"cookie":_?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:U}),M&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:M}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(0,C.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:_?"OAuth":R?"Cookie":"API Key"}),A&&(0,a.jsx)(d.Ex,{variant:I,size:"sm",children:"Proxy"}),q&&!1!==e.isActive&&(0,a.jsx)(S,{until:K}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),J()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:J()})]}),A&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),E&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:E}),O&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:O,children:["no_proxy: ",O]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:v,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${A?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>D("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>D(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsx)(d.m_,{text:P,children:(0,a.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}S.propTypes={until:b().string.isRequired},$.propTypes={connection:b().shape({id:b().string,name:b().string,email:b().string,displayName:b().string,modelLockUntil:b().string,testStatus:b().string,isActive:b().bool,lastError:b().string,priority:b().number,globalPriority:b().number}).isRequired,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string,proxyUrl:b().string,noProxy:b().string,isActive:b().bool})),isOAuth:b().bool.isRequired,isFirst:b().bool.isRequired,isLast:b().bool.isRequired,onMoveUp:b().func.isRequired,onMoveDown:b().func.isRequired,onToggleActive:b().func.isRequired,onUpdateProxy:b().func,onEdit:b().func.isRequired,onDelete:b().func.isRequired,oneByOneStatus:b().shape({state:b().string,error:b().string}),autoPing:b().shape({on:b().bool,onToggle:b().func,provider:b().string})};let A=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function T({isOpen:e,provider:t,providerName:s,isCompatible:i,isAnthropic:n,authType:r,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===r,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",w=b?"grok-web"===t?"sso=xxxxx... or just the raw value":"chatglm-cn"===t?"Paste your full chatglm.cn cookies, or just the chatglm_refresh_token value (eyJhbGc...)":"eyJhbGciOi...":v?"xai-...":"",N="azure"===t,k="cloudflare-ai"===t,C=c.Q2?.[t]?.regions||null,S=c.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[$,P]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[E,O]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,D]=(0,l.useState)({accountId:""}),[z,_]=(0,l.useState)(S),[R,U]=(0,l.useState)(!1),[M,q]=(0,l.useState)(null),[L,K]=(0,l.useState)(!1),[F,J]=(0,l.useState)("single"),[W,B]=(0,l.useState)(""),[H,G]=(0,l.useState)(null),V=()=>y&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:N?{azureEndpoint:E.azureEndpoint,apiVersion:E.apiVersion,deployment:E.deployment,organization:E.organization}:k?{accountId:I.accountId}:C&&z?{region:z}:void 0,Q=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{U(!1)}},Z=async()=>{if(t&&(y||$.apiKey)&&(y||$.name)&&(!i||$.defaultModel.trim())){K(!0);try{let e=!1;try{U(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{U(!1)}await u({name:$.name||(y?"Ollama Local":""),apiKey:$.apiKey,defaultModel:i?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},X=async()=>{let e=W.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),G(null);let s=0,a=0;for(let l=0;l<e.length;l++){let i=e[l].split("|"),n=i.length>=2?i.slice(1).join("|").trim():i[0].trim(),r=i.length>=2?i[0].trim():"Key",o=`${r} ${l+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:n,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),G({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{J("single"),G(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{J("bulk"),G(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:A,value:W,onChange:e=>B(e.target.value)}),H&&(0,a.jsxs)("div",{className:`text-sm font-medium ${H.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",H.success," added",H.failed>0?`, ✗ ${H.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:X,fullWidth:!0,disabled:L||!W.trim(),children:L?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:$.name,onChange:e=>P({...$,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>P({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:R||L,variant:"secondary",children:R?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[b?(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:j}),(0,a.jsx)("textarea",{value:$.apiKey,onChange:e=>P({...$,apiKey:e.target.value}),placeholder:w,rows:5,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:"w-full rounded-lg border border-border bg-input px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary font-mono resize-y"})]}):(0,a.jsx)(d.pd,{label:j,type:"password",value:$.apiKey,onChange:e=>P({...$,apiKey:e.target.value}),placeholder:w,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:!$.apiKey||R||L,variant:"secondary",children:R?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),C&&(0,a.jsx)(d.l6,{label:"Region",value:z,onChange:e=>_(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),i&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>P({...$,defaultModel:e.target.value}),placeholder:n?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,a.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),i&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>D({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:E.azureEndpoint,onChange:e=>O({...E,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:E.deployment,onChange:e=>O({...E,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:E.apiVersion,onChange:e=>O({...E,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:E.organization,onChange:e=>O({...E,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>P({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>P({...$,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:L||!y&&(!$.name||!$.apiKey)||i&&!$.defaultModel.trim()||N&&(!E.azureEndpoint||!E.deployment||!E.organization)||k&&!I.accountId,children:L?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function P({isOpen:e,node:t,onSave:s,onClose:i,isAnthropic:n}){let[r,o]=(0,l.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null);(0,l.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(n?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,n]);let v=async()=>{if(r.name.trim()&&r.prefix.trim()&&r.baseUrl.trim()){m(!0);try{let e={name:r.name,prefix:r.prefix,baseUrl:r.baseUrl};n||(e.apiType=r.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:r.baseUrl,apiKey:p,type:n?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${n?"Anthropic":"OpenAI"} Compatible`,onClose:i,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:r.name,onChange:e=>o({...r,name:e.target.value}),placeholder:`${n?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:r.prefix,onChange:e=>o({...r,prefix:e.target.value}),placeholder:n?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!n&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:r.apiType,onChange:e=>o({...r,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:r.baseUrl,onChange:e=>o({...r,baseUrl:e.target.value}),placeholder:n?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${n?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!p||f||!r.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!r.name.trim()||!r.prefix.trim()||!r.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function E({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:i,onClose:n}){let[r,o]=(0,l.useState)(""),[c,m]=(0,l.useState)(null),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(r.trim());if(e){m("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),x(a.error||"")}catch(e){m("error"),x(e.message)}}},y=async()=>{let e=f(r.trim());if(e&&!u){h(!0);try{await i(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:r,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!r.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(r.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:p||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!r.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}T.propTypes={isOpen:b().bool.isRequired,provider:b().string,providerName:b().string,isCompatible:b().bool,isAnthropic:b().bool,authType:b().string,authHint:b().string,website:b().string,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string})),error:b().string,onSave:b().func.isRequired,onBulkDone:b().func,onClose:b().func.isRequired},P.propTypes={isOpen:b().bool.isRequired,node:b().shape({id:b().string,name:b().string,prefix:b().string,apiType:b().string,baseUrl:b().string}),onSave:b().func.isRequired,onClose:b().func.isRequired,isAnthropic:b().bool},E.propTypes={isOpen:b().bool.isRequired,providerAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,onSave:b().func.isRequired,onClose:b().func.isRequired};let O=`[
|
|
4
|
+
{
|
|
5
|
+
"accessToken": "eyJhbGc...",
|
|
6
|
+
"refreshToken": "rt_...",
|
|
7
|
+
"idToken": "eyJhbGc...",
|
|
8
|
+
"email": "user@example.com"
|
|
9
|
+
}
|
|
10
|
+
]`;function I({isOpen:e,onClose:t,onSuccess:s}){let[i,n]=(0,l.useState)(""),[r,o]=(0,l.useState)(!1),[c,m]=(0,l.useState)(""),[p,x]=(0,l.useState)(null),h=()=>{r||(n(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=i.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void m((0,u.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,u.Tl)("Request failed"))}finally{o(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,u.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,u.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:O,value:i,onChange:e=>n(e.target.value),disabled:r}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,u.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,u.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:r||!i.trim(),children:r?(0,u.Tl)("Importing..."):(0,u.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:r,children:(0,u.Tl)("Close")})]})]})})}I.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let D={healthy:{variant:"success",label:"Pool healthy",icon:"shield"},degraded:{variant:"warning",label:"Pool degraded",icon:"warning"},exhausted:{variant:"error",label:"Pool exhausted",icon:"error"}};function z({providerId:e}){let[t,s]=(0,l.useState)(null);if((0,l.useEffect)(()=>{let t;if(!e)return;let a=!1,l=async()=>{try{let t=await fetch(`/api/providers/${e}/vault-pool`,{cache:"no-store"});if(!t.ok)return;let l=await t.json();a||s(l)}catch{}};l();let i=()=>{t||(t=setInterval(l,1e4))},n=()=>{t&&(clearInterval(t),t=null)},r=()=>document.hidden?n():i();return i(),document.addEventListener("visibilitychange",r),()=>{a=!0,n(),document.removeEventListener("visibilitychange",r)}},[e]),!t||!t.hasPool)return null;let i=D[t.status]||D.healthy;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",title:"Admin-provided shared key pool. Keys are hidden; only counts are shown.",children:[(0,a.jsx)(d.Ex,{variant:i.variant,size:"sm",icon:i.icon,children:i.label}),(0,a.jsxs)(d.Ex,{variant:"info",size:"sm",icon:"key",children:[t.total," pool keys"]}),(0,a.jsxs)(d.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[t.available," available"]}),t.rateLimited>0&&(0,a.jsxs)(d.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[t.rateLimited," cooling"]})]})}function _({connectionId:e,cookie:t,currentPlan:s="free",onPlanChanged:i}){let n,[r,o]=(0,l.useState)([]),[c,m]=(0,l.useState)(s),[p,x]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null),v=(n=String(t||"").match(/ctoken=([^;]+)/),n?.[1]||"");(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{cache:"no-store"});if(!t.ok)return;let s=await t.json();!e&&Array.isArray(s.plans)&&o(s.plans)}catch{}})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(!v)return;let e=!1;return h(!0),(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ctoken:v})});if(!t.ok)return;let a=await t.json();!e&&a.planKey&&(x(a.planKey),s&&"free"!==s||m(a.planKey))}catch{}finally{e||h(!1)}})(),()=>{e=!0}},[v,s]);let j=async t=>{let a=t.target.value;m(a),g(!0),b(null);try{if(!(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:a}})})).ok)throw Error("Failed to save plan");i?.(a)}catch(e){b(e.message),m(s)}finally{g(!1)}},w=p&&p===c;return 0===r.length?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsx)("select",{value:c,onChange:j,disabled:!0,className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-muted [-webkit-appearance:none] [-moz-appearance:none]",children:(0,a.jsxs)("option",{value:c,children:[c," (loading…)"]})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{value:c,onChange:j,disabled:f,title:"Select your ZenMux subscription plan. Models from this plan will be available.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:r.map(e=>(0,a.jsxs)("option",{value:e.planKey,children:[e.name," (",e.modelCount," models",e.price>0?`, $${e.price}/mo`:", free",")"]},e.planKey))}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),u&&(0,a.jsx)(d.Ex,{variant:"info",size:"sm",children:"Detecting…"}),w&&!u&&(0,a.jsx)(d.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),f&&(0,a.jsx)(d.Ex,{variant:"info",size:"sm",children:"Saving…"}),y&&(0,a.jsx)(d.Ex,{variant:"error",size:"sm",icon:"error",children:y})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:p?`Plan auto-detected from your ctoken: ${p}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}function R({providerId:e,hours:t=24}){let[s,i]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e)return;let s=!1,a=async()=>{try{let a=await fetch(`/api/providers/${e}/health-timeline?hours=${t}`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();s||i(l.timeline||[])}catch{}};a();let l=setInterval(a,6e4),n=()=>{document.hidden?clearInterval(l):(a(),setInterval(a,6e4))};return document.addEventListener("visibilitychange",n),()=>{s=!0,clearInterval(l),document.removeEventListener("visibilitychange",n)}},[e,t]),!s)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===s.length||s.every(e=>0===e.ok&&0===e.err))return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let n=s.length,r=s.reduce((e,t)=>e+t.ok+t.err,0),o=s.reduce((e,t)=>e+t.err,0),d=Math.max(...s.map(e=>e.ok+e.err),1),c=Math.max(...s.map(e=>e.latency),1),m=Math.max(6*n,120),p=Math.max(m/n-1,2),x=s.filter(e=>e.latency>0).map((e,t)=>{let s=t/Math.max(n-1,1)*m,a=32-e.latency/c*19.2-2;return`${s.toFixed(1)},${a.toFixed(1)}`}),u=x.length>1?`M${x.join(" L")}`:"",h=r>0?Math.round((r-o)/r*100):null;return(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==h&&(0,a.jsxs)("span",{className:`text-[10px] font-bold ${h>=90?"text-success":h>=70?"text-warning":"text-danger"}`,children:[h,"% success \xb7 ",r," requests \xb7 ",o," errors"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,a.jsxs)("svg",{width:m,height:32,className:"overflow-visible",children:[s.map((e,t)=>{let s=m/n*t;if(0===e.ok+e.err)return null;let l=e.ok/d*32,i=e.err/d*32;return(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:s,y:32-l-i,width:p,height:i,rx:.5,className:"fill-danger/60"}),(0,a.jsx)("rect",{x:s,y:32-l,width:p,height:l,rx:.5,className:"fill-success/60"})]},t)}),u&&(0,a.jsx)("path",{d:u,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}var U=s(67098);let M={claude:"claudeAutoPing",codex:"codexAutoPing"};function q(){let e,t,s,n=(0,i.useParams)(),h=(0,i.useRouter)(),y=n.id,{getCaps:b}=(0,x.y)(),{markSeen:v}=(0,U.P)("providers");(0,l.useEffect)(()=>{y&&v(y)},[y,v]);let[j,N]=(0,l.useState)([]),[C,S]=(0,l.useState)(!0),[A,O]=(0,l.useState)(null),[D,q]=(0,l.useState)([]),[L,K]=(0,l.useState)(!1),[F,J]=(0,l.useState)(!1),[W,B]=(0,l.useState)(!1),[H,G]=(0,l.useState)(""),[V,Q]=(0,l.useState)(!1),[Z,X]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(null),[ei,en]=(0,l.useState)({}),[er,eo]=(0,l.useState)([]),[ed,ec]=(0,l.useState)(!1),[em,ep]=(0,l.useState)({}),[ex,eu]=(0,l.useState)(""),[eh,ef]=(0,l.useState)(()=>new Set),[eg,ey]=(0,l.useState)(""),[eb,ev]=(0,l.useState)(!1),[ej,ew]=(0,l.useState)(!1),[eN,ek]=(0,l.useState)([]),[eC,eS]=(0,l.useState)("__none__"),[e$,eA]=(0,l.useState)(!1),[eT,eP]=(0,l.useState)(null),[eE,eO]=(0,l.useState)(""),[eI,eD]=(0,l.useState)("auto"),[ez,e_]=(0,l.useState)({enabled:!1,connections:{}}),[eR,eU]=(0,l.useState)([]),[eM,eq]=(0,l.useState)([]),[eL,eK]=(0,l.useState)([]),[eF,eJ]=(0,l.useState)(null),[eW,eB]=(0,l.useState)(!1),[eH,eG]=(0,l.useState)(!1),[eV,eQ]=(0,l.useState)(!1),[eZ,eX]=(0,l.useState)(null),[eY,e0]=(0,l.useState)({}),[e1,e2]=(0,l.useState)(null),e5=(0,l.useRef)(!1),[e3,e4]=(0,l.useState)(!1),{copied:e6,copy:e7}=(0,p.C)(),e8="ag_risk_confirmed",e9=()=>{K(!0)},te=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(e8)?eB(!0):ti?e9():(G(""),B(!0))},tt=()=>{G(""),B(!0)},ts=()=>{ti?te():tt()},ta=A?{id:A.id,name:A.name||("anthropic-compatible"===A.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===A.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===A.type?"AC":"OC",apiType:A.apiType,baseUrl:A.baseUrl,type:A.type}:c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y]||c.br[y],tl=ta?.authModes||[],ti=(!!c.zN[y]||!!c.IS[y]||tl.includes("oauth"))&&ta?.hasOAuth!==!1,tn=!!c.fg[y]||tl.includes("apikey")||ta?.hasOAuth===!1,tr=!!c.IS[y]?.noAuth,to=(0,m.KC)(y),td=(0,c.wG)(y),tc=(0,c.mq)(y),tm=(0,c.gb)(y),tp=tc||tm,tx=!tp&&ti&&tn,tu="xai"===y?"Grok Build OAuth":"OAuth",th="xai"===y?"xAI API Key":"API Key";c.Q2[y]?.thinkingConfig||c.s9.extended;let tf=tp?y:td,tg=tp?A?.prefix||y:td,ty=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tf)}`,{cache:"no-store"}),t=await e.json();e.ok&&eK(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tf]),tb=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tf,ids:[e]})})).ok&&await ty()}catch(e){console.log("Error disabling model:",e)}},tv=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tf)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error enabling model:",e)}},tj=async e=>{e.length&&eJ({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eJ(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tf,ids:e})})).ok&&await ty()}catch(e){console.log("Error disabling all models:",e)}}})},tw=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tf)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error enabling all models:",e)}},tN=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&en(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tk=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eo(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eq(e.models)}).catch(()=>{})},[y]);let tC=(0,l.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),i=await t.json(),n=await s.json(),r=a.ok?await a.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===y);N(e)}s.ok&&q(n.proxyPools||[]);let o=(r.providerStrategies||{})[y]||{};eP(o.fallbackStrategy||null),eO(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(r.providerThinking||{})[y]||{};eD(d.mode||"auto");let c=M[y],m=c&&r[c]||{};if(e_({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(i.nodes||[]).find(e=>e.id===y)||null;if(!e&&tp)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===y)||null))break}O(e)}}catch(e){console.log("Error fetching connections:",e)}finally{S(!1)}},[y,tp]),tS=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(O(s.node),await tC(),ee(!1))}catch(e){console.log("Error updating provider node:",e)}},t$=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let i={...a};0===Object.keys(l).length?delete i[y]:i[y]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})})}catch(e){console.log("Error saving provider strategy:",e)}},tA=async e=>{let t=M[y];if(t){e_(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{tC(),tN(),tk(),ty()},[tC,tN,tk,ty]),(0,l.useEffect)(()=>{let e=(c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y])?.modelsFetcher;e&&f(e).then(eU)},[y]);let tT=async(e,t,s=td)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tN();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tP=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tN()}catch(e){console.log("Error deleting alias:",e)}},tE=async(e,t="llm",s=tf)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t})});if(a.ok)await tk(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tO=async(e,t="llm",s=tf)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tk(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tI=async()=>{if(e3)return;let e=j.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e4(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,u.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,u.Tl)("No models returned"));let l=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");er.some(e=>e.providerAlias===tf&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(ei).includes(`${tf}/${s}`)||(await tE(s,"llm",tf),l+=1)}0===l?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${l} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e4(!1)}},tD=async()=>{if(eH||0===j.length)return;let e=Object.fromEntries(j.map(e=>[e.id,{state:"queued",error:null}]));e5.current=!1,eG(!0),eQ(!1),eX(null),e0(e),e2({total:j.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<j.length;e+=1){if(e5.current){e2({total:j.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=j[e];eX(a.id),e0(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:s+=1,e0(e=>({...e,[a.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){s+=1,e0(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}e2({total:j.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<j.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eX(null),eG(!1),eQ(!1),e5.current=!1}},tz=async e=>{eJ({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eJ(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&N(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},t_=()=>{tC(),K(!1)},tR=async e=>{G("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tC(),B(!1);return}G(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),G("Failed to save connection")}},tU=async e=>{try{(await fetch(`/api/providers/${ea.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tC(),X(!1))}catch(e){console.log("Error updating connection:",e)}},tM=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&N(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tq=async(e,t)=>{let s=[...j];[s[e],s[t]]=[s[t],s[e]],N(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tC()}},tL=j.filter(e=>eN.includes(e.id)),tK=j.length>0&&eN.length===j.length;(0,l.useEffect)(()=>{ek(e=>e.filter(e=>j.some(t=>t.id===e)))},[j]),(()=>{if(0===tL.length)return;let e=new Set(tL.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=D.find(e=>e.id===t);return s?.name}})();let tF=()=>{e$||es(!1)},tJ=async e=>{eA(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tC(),es(!1)}finally{eA(!1)}},tW=e=>tJ(j.map(t=>({connectionId:t.id,proxyPoolId:e}))),tB=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:j.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,eN.includes(s)),onChange:()=>{var t;return t=e.id,void ek(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)($,{connection:e,proxyPools:D,isOAuth:ti,isFirst:0===t,isLast:t===j.length-1,onMoveUp:()=>tq(t,t-1),onMoveDown:()=>tq(t,t+1),onToggleActive:t=>tM(e.id,t),autoPing:M[y]&&"oauth"===e.authType?{on:!0===ez.connections[e.id],onToggle:t=>{var s;return s=e.id,void tA({...ez,connections:{...ez.connections,[s]:t}})},provider:y}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&N(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{el(e),X(!0)},onDelete:()=>tz(e.id),oneByOneStatus:eY[e.id]||null})})]},e.id)})}),tH=D.filter(e=>!0===e.isActive),tG=(0,a.jsx)(d.aF,{isOpen:et,onClose:tF,title:`Apply Proxy (${j.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=D.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tJ(j.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:e$||0===tH.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tW(null),disabled:e$,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),D.map(e=>(0,a.jsxs)("button",{onClick:()=>tW(e.id),disabled:e$||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),e$&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tF,variant:"ghost",fullWidth:!0,disabled:e$,children:"Cancel"})]})}),tV=async e=>{if(!eh.has(e)){ef(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tf}/${e}`})}),s=await t.json();ep(t=>({...t,[e]:s.ok?"ok":"error"})),eu(s.ok?"":s.error||"Model not reachable")}catch{ep(t=>({...t,[e]:"error"})),eu("Network error")}finally{ef(t=>{let s=new Set(t);return s.delete(e),s})}}},tQ=async e=>{eb||0===e.length||(ev(!0),eu(""),await Promise.all(e.map(e=>tV(e))),ev(!1))};return C?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):ta?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${ta.color}15`},children:ed?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:ta.color},children:ta.textIcon||ta.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tc&&ta.apiType?"responses"===ta.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tm?"/providers/anthropic-m.png":`/providers/${ta.id}.png`,alt:ta.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ec(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:ta.name}),(ta.notice?.apiKeyUrl||ta.notice?.signupUrl||ta.website)&&(0,a.jsxs)("a",{href:ta.notice?.apiKeyUrl||ta.notice?.signupUrl||ta.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),ta.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[j.length," connection",1===j.length?"":"s"]})]})]})]}),ta.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:ta.deprecationNotice})]}),ta.notice?.text&&!ta.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-info shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:ta.notice.text}),ta.notice.apiKeyUrl&&(0,a.jsx)("a",{href:ta.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tp&&A&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tm?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tm?"Messages API":"responses"===A.apiType?"Responses API":"Chat Completions"," \xb7 ",(A.baseUrl||"").replace(/\/$/,""),"/",tm?"messages":"responses"===A.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{G(""),B(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ee(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eJ({title:"Delete Compatible Node",message:`Delete this ${tm?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eJ(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tr?(0,a.jsx)(d.gw,{providerId:y}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsx)(z,{providerId:y})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[j.length>0&&D.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>es(!0),children:"Apply Proxy"}),j.length>0&&(0,a.jsxs)(a.Fragment,{children:[eN.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eN.length;0!==e&&eJ({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eJ(null);let e=0,t=[...eN];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}N(e=>e.filter(e=>!t.includes(e.id))),ek([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eN.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tD,disabled:eH,children:eH?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eH&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eH&&(e5.current=!0,eQ(!0))},disabled:eV,children:eV?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eT,onChange:e=>{let t=e?"round-robin":null,s=e?eE||"1":eE;e&&!eE&&eO("1"),eP(t),t$(t,s)}}),"round-robin"===eT&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eE,onChange:e=>{var t;eO(t=e.target.value),t$("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),"zenmux-free"===y&&j.length>0&&(0,a.jsx)(_,{connectionId:j[0].id,cookie:j[0].apiKey||"",currentPlan:j[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:()=>{tC()}})]})]}),0===j.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:ti?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tx&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tu," or ",th,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tx?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:te,children:tu}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tt,children:th})]}):(0,a.jsxs)(a.Fragment,{children:[!tp&&"iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>J(!0),children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Q(!0),children:(0,u.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:ts,children:tp?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[e1&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",e1.total]}),(0,a.jsxs)("span",{children:["Completed: ",e1.completed]}),(0,a.jsxs)("span",{children:["Passed: ",e1.passed]}),(0,a.jsxs)("span",{children:["Failed: ",e1.failed]}),e1.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),eH&&eZ&&(0,a.jsxs)("span",{children:["Running: ",j.find(e=>e.id===eZ)?.name||eZ]})]})}),j.length>0&&(0,a.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:tK,onChange:()=>{tK?ek([]):ek(j.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tB,!tp&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>J(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Q(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),tx?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:te,className:"w-full sm:w-auto",children:tu}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tt,className:"w-full sm:w-auto",children:th})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:ts,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsx)(d.Zp,{children:(0,a.jsx)("div",{className:"py-1",children:(0,a.jsx)(R,{providerId:y})})}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!tp&&(e=[...to,...eM.filter(e=>!to.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eL.includes(e)),t=eg.trim().toLowerCase(),s=e.filter(e=>!t||e.toLowerCase().includes(t)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[eL.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tw,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tj(e),children:"Disable All"}),(j.length>0||tr)&&s.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:eb?"progress_activity":"play_arrow",onClick:()=>tQ(s),disabled:eb,children:eb?"Testing...":`Test All (${s.length})`})]}))]}),(0,a.jsx)("div",{className:"sm:max-w-xs",children:(0,a.jsx)(d.pd,{type:"search",placeholder:"Search models...",value:eg,onChange:e=>ey(e.target.value),className:"w-full"})})]}),!!ex&&(0,a.jsx)("p",{className:"text-xs text-danger mb-3 break-words",children:ex}),(()=>{let e,t,s;if(tp)return(0,a.jsx)(k,{providerStorageAlias:tf,providerDisplayAlias:tg,modelAliases:ei,customModels:er,copied:e6,onCopy:e7,onSetAlias:tT,onDeleteAlias:tP,onAddCustomModel:e=>tE(e,"llm",tf),onDeleteCustomModel:e=>tO(e,"llm",tf),connections:j,isAnthropic:tm});let l=[...to,...eM.filter(e=>!to.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),i=new Set(eL),n=l.filter(e=>!i.has(e.id)),r=l.filter(e=>i.has(e.id)),o=g({customModels:er,modelAliases:ei,providerAlias:tf,builtInModels:to,type:"llm"}),d=eg.trim().toLowerCase(),c=(e,t="")=>!d||e.toLowerCase().includes(d)||String(t).toLowerCase().includes(d),p=n.filter(e=>c(e.id,e.name)),x=o.filter(e=>c(e.id,e.name));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[x.map(e=>(0,a.jsx)(w,{model:{id:e.id,name:e.name},fullModel:`${tg}/${e.id}`,alias:e.alias,copied:e6,onCopy:e7,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tO(e.id,"llm",tf):tP(e.alias)},testStatus:em[e.id],onTest:j.length>0||tr?()=>tV(e.id):void 0,isTesting:eh.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`)},`${e.source}-${e.fullModel}`)),p.map(e=>{let t=`${tf}/${e.id}`,s=`${y}/${e.id}`,l=Object.entries(ei).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(w,{model:e,fullModel:`${tg}/${e.id}`,alias:l,copied:e6,onCopy:e7,onSetAlias:t=>tT(e.id,t,tf),onDeleteAlias:()=>tP(l),testStatus:em[e.id],onTest:j.length>0||tr?()=>tV(e.id):void 0,isTesting:eh.has(e.id),isFree:e.isFree,onDisable:()=>tb(e.id),caps:b(`${y}/${e.id}`)},e.id)}),eg.trim()&&0===p.length&&0===x.length&&(0,a.jsxs)("p",{className:"w-full text-center text-sm text-text-muted py-4",children:["No models match “",eg,"”"]}),(0,a.jsxs)("button",{onClick:()=>ew(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===y&&j.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tI,disabled:e3,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e3?{animation:"spin 1s linear infinite"}:void 0,children:e3?"progress_activity":"download"}),e3?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),eR.length>0&&(e=new Set([...Object.values(ei),...o.map(e=>e.fullModel)]),t=new Set(to.map(e=>e.id)),0===(s=eR.filter(s=>!e.has(`${tf}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tE(e.id,"llm",tf)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),r.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(e=>(0,a.jsxs)("button",{onClick:()=>tv(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tG,"kiro"===y?(0,a.jsx)(d.Mh,{isOpen:L,providerInfo:ta,onSuccess:t_,onClose:()=>K(!1)}):"cursor"===y?(0,a.jsx)(d.G9,{isOpen:L,onSuccess:t_,onClose:()=>K(!1)}):"gitlab"===y?(0,a.jsx)(d.vj,{isOpen:L,providerInfo:ta,onSuccess:t_,onClose:()=>K(!1)}):(0,a.jsx)(d.LF,{isOpen:L,provider:y,providerInfo:ta,onSuccess:t_,onClose:()=>K(!1)}),"iflow"===y&&(0,a.jsx)(d.vE,{isOpen:F,onSuccess:()=>{tC(),J(!1)},onClose:()=>J(!1)}),(0,a.jsx)(T,{isOpen:W,provider:y,providerName:ta.name,isCompatible:tp,isAnthropic:tm,authType:ta?.authType,authHint:ta?.authHint,website:ta?.website,proxyPools:D,error:H,onSave:tR,onBulkDone:tC,onClose:()=>{G(""),B(!1)}}),(0,a.jsx)(d.wI,{isOpen:Z,connection:ea,proxyPools:D,onSave:tU,onClose:()=>X(!1)}),tp&&(0,a.jsx)(P,{isOpen:Y,node:A,onSave:tS,onClose:()=>ee(!1),isAnthropic:tm}),!tp&&(0,a.jsx)(E,{isOpen:ej,providerAlias:tf,providerDisplayAlias:tg,onSave:async e=>{await tE(e,"llm",tf),ew(!1)},onClose:()=>ew(!1)}),"codex"===y&&(0,a.jsx)(I,{isOpen:V,onClose:()=>Q(!1),onSuccess:tC}),(0,a.jsx)(d.uo,{isOpen:eW,onClose:()=>eB(!1),onConfirm:()=>{(window.localStorage.setItem(e8,"true"),eB(!1),ti)?e9():tt()},title:"Risk Notice",message:ta?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eF,onClose:()=>eJ(null),onConfirm:eF?.onConfirm,title:eF?.title||"Confirm",message:eF?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},88845:(e,t,s)=>{Promise.resolve().then(s.bind(s,6953))}},e=>{e.O(0,[27,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{34695:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>T});var a=s(95155),r=s(12115),i=s(98500),n=s.n(i),l=s(35497),o=s(90620),d=s(88105),c=s(65921),p=s(38003),m=s(67098),h=s(14051),u=s.n(h),x=s(57250);let g=new Set(["windsurf","trae","cody","kimchi","chatglm-cn","blackbox-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat","api-airforce"]);function f({providerId:e,provider:t,stats:s,onToggle:r,isNoAuth:i=!1,comingSoon:o=!1,isNew:c=!1}){let p=e.startsWith(d.JH),m=e.startsWith(d.DI),{connected:h,error:u,errorCode:b,errorTime:v,allDisabled:y}=s;return(0,a.jsxs)("div",{className:"group relative flex items-center justify-between gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsxs)(n(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,a.jsx)(x.A,{src:p?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":m?"/providers/anthropic-m.png":`/providers/${t.id}.${g.has(t.id)?"svg":"png"}`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("h3",{className:"truncate text-sm font-semibold text-text-main",children:[t.name,c&&(0,a.jsx)("span",{className:"ml-1.5 inline-flex items-center rounded-full bg-primary/12 px-1.5 py-0.5 text-[10px] font-bold text-primary ring-1 ring-primary/20",children:"NEW"})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:[y?(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):i&&0===h&&0===u?(0,a.jsx)(l.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):h>0?(0,a.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}):null,u>0&&(0,a.jsx)(l.Ex,{variant:"error",size:"sm",dot:!0,children:b?`${u} Error (${b})`:`${u} Error`}),0===h&&0===u&&!i&&0===s.total&&(0,a.jsx)("span",{className:"text-text-muted",children:"No connections"}),o&&(0,a.jsx)(l.Ex,{variant:"warning",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Coming Soon"]})}),p&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),m&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"Messages"}),v&&(0,a.jsx)("span",{className:"text-text-muted",children:v})]})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.total>0&&r&&(0,a.jsx)("div",{className:"opacity-60 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!!y)},children:(0,a.jsx)(l.lM,{size:"sm",checked:!y,onChange:()=>{}})})})]})}function b({title:e,icon:t,count:s,connectedCount:r,isExpanded:i,onToggle:n,isSearching:o,onTestAll:d,testingMode:c,testModeKey:p,children:m,hasContent:h=!0,emptyTitle:u="No providers in this category",emptyDescription:x="Providers you add will appear here."}){let g=i||o;return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex items-center gap-2 text-lg font-semibold leading-tight text-text-main transition-colors hover:text-primary","aria-expanded":g,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] transition-transform ${g?"rotate-90":""}`,children:"chevron_right"}),e,(0,a.jsxs)("span",{className:"text-xs font-normal text-text-muted",children:["(",s,")"]})]}),d&&h&&(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:c===p?"progress_activity":"play_arrow",onClick:d,disabled:!!c,className:c===p?"animate-pulse":"",children:c===p?"Testing...":"Test All"})]}),g&&(h?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:m}):(0,a.jsx)(l.pp,{icon:t||"dns",title:u,description:x}))]})}f.propTypes={providerId:u().string.isRequired,provider:u().shape({id:u().string,name:u().string,color:u().string,textIcon:u().string,apiType:u().string}).isRequired,stats:u().shape({connected:u().number,error:u().number,total:u().number,errorCode:u().string,errorTime:u().string,allDisabled:u().bool}).isRequired,onToggle:u().func,isNoAuth:u().bool,comingSoon:u().bool},b.propTypes={title:u().string.isRequired,icon:u().string,count:u().number.isRequired,connectedCount:u().number,isExpanded:u().bool.isRequired,onToggle:u().func.isRequired,isSearching:u().bool,onTestAll:u().func,testingMode:u().string,testModeKey:u().string,children:u().node,hasContent:u().bool,emptyTitle:u().string,emptyDescription:u().string};let v={oauth:"OAuth",free:"Free",apikey:"API Key",cookie:"Cookies",compatible:"Custom",provider:"Provider",all:"All"};function y({results:e}){if(e.error&&!e.results)return(0,a.jsxs)("div",{className:"py-6 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mb-2 block text-[32px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-danger",children:e.error})]});let{summary:t,mode:s}=e,r=e.results||[],i=v[s]||s;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,a.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2 text-xs sm:gap-3",children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[i," Test"]}),(0,a.jsxs)("span",{className:"rounded bg-success/15 px-2 py-0.5 font-medium text-success",children:[t.passed," passed"]}),t.failed>0&&(0,a.jsxs)("span",{className:"rounded bg-danger/15 px-2 py-0.5 font-medium text-danger",children:[t.failed," failed"]}),(0,a.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-2 px-3 py-2 text-xs sm:flex-nowrap",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-success":"text-danger"}`,children:e.valid?"check_circle":"error"}),(0,a.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,a.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,a.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"shrink-0 font-mono tabular-nums text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase ${e.valid?"bg-success/15 text-success":"bg-danger/15 text-danger"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===r.length&&(0,a.jsx)("div",{className:"py-4 text-center text-sm text-text-muted",children:"No active connections found for this group."})]})}function j({totalProviders:e,connectedProviders:t,errorCount:s,onTestAll:r,testingMode:i}){return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-brand border border-border-subtle bg-panel p-4 shadow-[var(--shadow-soft)] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"dns"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:e}),(0,a.jsx)("span",{className:"text-text-muted",children:"providers"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-success"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:t}),(0,a.jsx)("span",{className:"text-text-muted",children:"connected"})]}),s>0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-danger"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:s}),(0,a.jsx)("span",{className:"text-text-muted",children:"errors"})]})]}),r&&(0,a.jsx)(l.$n,{size:"sm",variant:"primary",icon:"all"===i?"progress_activity":"bolt",onClick:r,disabled:!!i,className:"all"===i?"animate-pulse":"",children:"all"===i?"Testing All...":"Test All Providers"})]})}y.propTypes={results:u().shape({mode:u().string,results:u().array,summary:u().shape({total:u().number,passed:u().number,failed:u().number}),error:u().string}).isRequired},j.propTypes={totalProviders:u().number,connectedProviders:u().number,errorCount:u().number,onTestAll:u().func,testingMode:u().string};let N={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},w=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function C({variant:e,isOpen:t,onClose:s,onCreated:i}){let n=N[e],o=()=>({name:"",prefix:"",...n.hasApiType?{apiType:"chat"}:{},baseUrl:n.defaultBaseUrl}),[d,c]=(0,r.useState)(o),[p,m]=(0,r.useState)(!1),[h,u]=(0,r.useState)(""),[x,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null);(0,r.useEffect)(()=>{n.hasApiType?c(e=>({...e,baseUrl:n.defaultBaseUrl})):t&&(y(null),u(""),g(""))},[n.hasApiType?d.apiType:t]);let j=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...n.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:n.type})}),t=await e.json();e.ok&&(i(t.node),c(o()),u(""),y(null))}catch(e){console.log(`Error creating ${n.errorLabel} node:`,e)}finally{m(!1)}}},k=async()=>{b(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:n.type,modelId:x.trim()||void 0})}),t=await e.json();y(t)}catch{y({valid:!1,error:"Network error"})}finally{b(!1)}};return(0,a.jsx)(l.aF,{isOpen:t,title:n.title,onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(l.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:n.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,a.jsx)(l.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:n.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),n.hasApiType&&(0,a.jsx)(l.l6,{label:"API Type",options:w,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,a.jsx)(l.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:n.defaultBaseUrl,hint:n.baseUrlHint}),(0,a.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>u(e.target.value)}),(0,a.jsx)(l.pd,{label:"Model ID (optional)",value:x,onChange:e=>g(e.target.value),placeholder:n.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,a.jsx)(l.$n,{onClick:k,disabled:!h||f||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:f?"Checking...":"Check"}),(()=>{if(!v)return null;let{valid:e,error:t,method:s}=v;return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,a.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function k(e,t){return e?.hasOAuth===!1?"apikey":t}function T(){let e,[t,s]=(0,r.useState)([]),[i,n]=(0,r.useState)([]),[h,u]=(0,r.useState)(!0),[x,g]=(0,r.useState)(!1),{isNew:v,markSeen:N}=(0,m.P)("providers"),[w,T]=(0,r.useState)(!1),[A,S]=(0,r.useState)(!1),[P,I]=(0,r.useState)(!0),[O,$]=(0,r.useState)(!0),[E,U]=(0,r.useState)(!0),[R,z]=(0,r.useState)(!1),[M,_]=(0,r.useState)(!1),[D,q]=(0,r.useState)(null),[L,K]=(0,r.useState)(null),J=(0,r.useRef)(!1),W=(0,c.i)(),F=(0,p.C)(e=>e.query),B=(0,p.C)(e=>e.register),H=(0,p.C)(e=>e.unregister),Q=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&s(t.connections||[])}catch{}},[]);(0,r.useEffect)(()=>(B("Search providers..."),()=>H()),[B,H]),(0,r.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),a=await e.json(),r=await t.json();e.ok&&s(a.connections||[]),t.ok&&n(r.nodes||[])}catch{}u(!1)})()},[]);let V=!!F.trim(),Y=(e=F.trim().toLowerCase(),(t,s="",a="")=>!e||t.toLowerCase().includes(e)||s.toLowerCase().includes(e)||a.toLowerCase().includes(e)),G=(e,s)=>{let a=Array.isArray(s)?s:[s],r=t.filter(t=>t.provider===e&&a.includes(t.authType)),i=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},n=r.filter(e=>{let t=i(e);return"active"===t||"success"===t}).length,l=r.filter(e=>{let t=i(e);return"error"===t||"failed"===t}),o=l.length,d=l[0],c=d?Object.entries(d).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now())?"COOLDOWN":d.errorCode||null:null,p=d?.lastErrorAt?function(e){if(!e)return null;let t=new Date(e),s=Math.floor((new Date().getTime()-t.getTime())/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;let a=Math.floor(s/60);if(a<24)return`${a}h ago`;let r=Math.floor(a/24);return r<7?`${r}d ago`:t.toLocaleDateString()}(d.lastErrorAt):null,m=r.length>0&&r.every(e=>!1===e.isActive);return{connected:n,error:o,total:r.length,errorCode:c,errorTime:p,allDisabled:m}},X=(e,t)=>[...e].sort(([e,s],[a,r])=>{let i=s.priority??999,n=r.priority??999;if(i!==n)return i-n;let l=G(e,t),o=G(a,t),d=l.total>0?0:1,c=o.total>0?0:1;return d!==c?d-c:(s.name||"").localeCompare(r.name||"")}),Z=(0,r.useCallback)((e,t,a)=>{let r=Array.isArray(t)?t:[t],i=t=>t.provider===e&&r.includes(t.authType);s(e=>(Promise.allSettled(e.filter(i).map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})}))),e.map(e=>i(e)?{...e,isActive:a}:e)))},[]),ee=(0,r.useCallback)(async(e,t=null)=>{if(!J.current){J.current=!0,q("provider"===e?t:e),K(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),a=await s.json();if(K(a),a.summary){let{passed:e,failed:t,total:s}=a.summary;0===t?W.success(`All ${s} tests passed`):W.warning(`${e}/${s} passed, ${t} failed`)}Q()}catch{K({error:"Test request failed"}),W.error("Provider test failed")}finally{q(null),J.current=!1}}},[W,Q]),et=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>Y(e.name,e.id)),es=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>Y(e.name,e.id)),ea=X(Object.entries(o.zN).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)),"oauth"),er=Object.entries(d.IS).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)).sort(([,e],[,t])=>!!t.noAuth-!!e.noAuth),ei=X(Object.entries(d.nJ).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)),"apikey"),en=Object.entries(o.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&Y(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=G(e,"apikey").total>0?0:1,i=G(s,"apikey").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),el=Object.entries(d.br).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=G(e,"cookie").total>0?0:1,i=G(s,"cookie").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),eo=V||x?en:en.slice(0,20),ed=ea.length+er.length+ei.length+en.length+el.length,ec=[...ea,...er,...ei,...en,...el].map(([e])=>e),ep=ec.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return G(e,k(t,t?.authType||"apikey")).connected>0}).length,em=ec.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return G(e,k(t,t?.authType||"apikey")).error>0}).length;if(h)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]});let eh=et.length>0||es.length>0||ea.length>0||er.length>0||ei.length>0||en.length>0||el.length>0;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Providers",description:"Connect, configure, and manage AI providers",icon:"dns",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:"add",onClick:()=>_(!0),children:"Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>z(!0),children:"OpenAI"})]})}),(0,a.jsx)(j,{totalProviders:ed,connectedProviders:ep,errorCount:em,onTestAll:()=>ee("all"),testingMode:D}),V&&!eh&&(0,a.jsx)(l.pp,{icon:"search_off",title:`No providers match "${F}"`,description:"Try a different search term, or browse the sections below."}),(0,a.jsxs)(b,{title:"Custom Providers (OpenAI/Anthropic Compatible)",icon:"extension",count:et.length+es.length,isExpanded:w,onToggle:()=>T(e=>!e),isSearching:V,hasContent:et.length>0||es.length>0,emptyTitle:"No custom providers",emptyDescription:"Add OpenAI or Anthropic compatible endpoints to get started.",children:[(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>_(!0),children:"Add Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>z(!0),children:"Add OpenAI"}),[...et,...es].map(e=>(0,a.jsx)(f,{providerId:e.id,provider:e,stats:G(e.id,"apikey"),isNew:v(e.id),onToggle:t=>Z(e.id,"apikey",t)},e.id))]}),(0,a.jsx)(b,{title:"Cookies Provider",icon:"cookie",count:el.length,isExpanded:A,onToggle:()=>S(e=>!e),isSearching:V,onTestAll:()=>ee("cookie"),testingMode:D,testModeKey:"cookie",hasContent:el.length>0,children:el.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"cookie"),isNoAuth:!!t.noAuth,isNew:v(e),onToggle:t=>Z(e,"cookie",t)},e))}),(0,a.jsx)(b,{title:"OAuth Providers",icon:"lock",count:ea.length,isExpanded:P,onToggle:()=>I(e=>!e),isSearching:V,onTestAll:()=>ee("oauth"),testingMode:D,testModeKey:"oauth",hasContent:ea.length>0,children:ea.map(([e,t])=>{let s=k(t,"oauth");return(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,s),comingSoon:!!t.comingSoon,isNew:v(e),onToggle:t=>Z(e,s,t)},e)})}),(0,a.jsxs)(b,{title:"Free Tier Providers",icon:"redeem",count:er.length+ei.length,isExpanded:O,onToggle:()=>$(e=>!e),isSearching:V,onTestAll:()=>ee("free"),testingMode:D,testModeKey:"free",hasContent:er.length>0||ei.length>0,children:[er.map(([e,t])=>{let s="kiro"===e?["oauth","apikey","api_key"]:"oauth";return(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,s),isNoAuth:!!t.noAuth,isNew:v(e),onToggle:t=>Z(e,s,t)},e)}),ei.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"apikey"),isNew:v(e),onToggle:t=>Z(e,"apikey",t)},e))]}),(0,a.jsxs)(b,{title:"API Key Providers",icon:"key",count:en.length,isExpanded:E,onToggle:()=>U(e=>!e),isSearching:V,onTestAll:()=>ee("apikey"),testingMode:D,testModeKey:"apikey",hasContent:en.length>0,children:[eo.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"apikey"),isNew:v(e),onToggle:t=>Z(e,"apikey",t)},e)),!V&&!x&&en.length>20&&(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-brand border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",en.length," providers"]})]}),L&&(0,a.jsx)(l.aF,{isOpen:!!L,onClose:()=>K(null),title:"Provider Test Results",size:"md",children:(0,a.jsx)(y,{results:L})}),(0,a.jsx)(C,{variant:"openai",isOpen:R,onClose:()=>z(!1),onCreated:e=>{n(t=>[...t,e]),z(!1)}}),(0,a.jsx)(C,{variant:"anthropic",isOpen:M,onClose:()=>_(!1),onCreated:e=>{n(t=>[...t,e]),_(!1)}})]})}C.propTypes={variant:u().oneOf(["openai","anthropic"]).isRequired,isOpen:u().bool.isRequired,onClose:u().func.isRequired,onCreated:u().func.isRequired}},86296:(e,t,s)=>{Promise.resolve().then(s.bind(s,34695))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=86296)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>d,Nv:()=>x,RL:()=>o,ev:()=>m,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,c=5,o=1e4,d=5e3,m=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],x=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var a=s(95155),l=s(12115),r=s(35497),n=s(11059),i=s(73006),c=s(15536);function o(){let[e,t]=(0,l.useState)(!0),[s,o]=(0,l.useState)(!1),[d,m]=(0,l.useState)("http://localhost:8787"),[x,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[b,y]=(0,l.useState)(""),[g,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,H]=(0,l.useState)(.85),[P,R]=(0,l.useState)(null),[$,z]=(0,l.useState)("en"),{copied:M,copy:_}=(0,n.C)();(0,l.useEffect)(()=>(z((0,i.kk)()),(0,i.oQ)(()=>z((0,i.kk)()))),[]);let A=c.hT.includes($),I=A?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!A&&(w("ultra"),O({cavemanLevel:"ultra"}))},[A,N]);let O=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},D=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},F=async()=>{let e=d.trim()||"http://localhost:8787";m(e),await O({headroomUrl:e}),W()},W=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),B=(0,l.useCallback)(async()=>{y(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await W()}catch(e){y(e.message)}finally{j(!1)}},[W]),J=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await W()}finally{j(!1)}},[W]),Y=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),o(!!s.headroomEnabled),m(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),H("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),W()}}catch{}})()},[W]);let G=!!x.running,K=x.loading?"Checking…":G?"Running":!1===x.localUrl||x.installed?!1!==x.localUrl?"Stopped":"External":"Not installed",Z=!1!==x.localUrl,q=!!x.canStart,Q=Z&&!!x.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(r.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(r.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(r.lM,{checked:e,onChange:()=>D(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${G?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:K}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:G?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(r.lM,{checked:s&&G,disabled:!G,onChange:()=>{var e;let t;return e=!s,void(m(t=d.trim()||"http://localhost:8787"),o(e),O({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[g&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:I.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),O({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(r.lM,{checked:g,onChange:()=>{var e;v(e=!g),O({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),O({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(r.lM,{checked:k,onChange:()=>{var e;C(e=!k),O({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(r.lM,{checked:T,onChange:()=>{var e;L(e=!T),O({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;H(t=parseFloat(e.target.value)),O({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),P&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",P.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",P.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",P.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",P.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",P.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(r.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:Y,children:"Clear Cache"})]})]})]}),(0,a.jsx)(r.aF,{isOpen:p,title:G?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:G?"text-success":"text-warning",children:K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(r.pd,{value:d,onChange:e=>m(e.target.value),onBlur:F,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),Q?(0,a.jsx)(r.$n,{onClick:J,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):G?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):q?(0,a.jsx)(r.$n,{onClick:B,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):Z?x.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>_('pip install "headroom-ai[proxy]"'),children:M?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),b&&(0,a.jsx)("p",{className:"text-sm text-warning",children:b}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>W(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(r.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
|