@jheavenknows/bluerouter 5.5.38 → 5.5.39
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 +15 -15
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +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.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/model-profiles/page_client-reference-manifest.js +1 -1
- 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/cluster/page_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- 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/logs/console/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +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_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- 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/personal/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudcombo/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +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/prompt-logs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +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/embedding/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/embedding/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/image/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/image/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/image-to-text/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/image-to-text/page_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/web/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/web/page_client-reference-manifest.js +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_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +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/token-saver/page_client-reference-manifest.js +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_client-reference-manifest.js +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/_tree.segment.rsc +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/_not-found/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/me/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/root-ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/users/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +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.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/model-catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
- 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/copilot-settings/route.js.nft.json +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/cluster/config/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/codex-catalog/download/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/codex-catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/codex-catalog/upload/route.js.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.nft.json +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.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.nft.json +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.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +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/import/route.js.nft.json +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/personal-cloud-combos/[id]/api-key-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/account-emails/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/account-policy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/pending-accounts/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-oauth-email/verify/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +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-health/route.js.nft.json +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/combo-references/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/custom-embedding/manage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +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/providers/[id]/models/route.js.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.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/test-batch/route.js.nft.json +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.nft.json +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.nft.json +1 -1
- 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.nft.json +1 -1
- 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/resource-monitor/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/export/route.js.nft.json +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/prompt-log-db/route.js.nft.json +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/settings/smtp/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/stream/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.nft.json +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.nft.json +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.nft.json +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.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- 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.nft.json +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.nft.json +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.nft.json +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/route.js.nft.json +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/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/rate-limits/route.js.nft.json +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.nft.json +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.nft.json +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.nft.json +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/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_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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/logs.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/logs.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/logs.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/personal.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/personal.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/personal.segments/!KGRhc2hib2FyZCk/dashboard/personal/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/personal.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/personal.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/embedding.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/embedding.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/embedding.segments/!KGRhc2hib2FyZCk/dashboard/providers/embedding/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/embedding.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/embedding.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/image-to-text.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/image-to-text.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/image-to-text.segments/!KGRhc2hib2FyZCk/dashboard/providers/image-to-text/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/image-to-text.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/image-to-text.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/image.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/image.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/image.segments/!KGRhc2hib2FyZCk/dashboard/providers/image/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/image.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/image.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/stt.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/stt.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/!KGRhc2hib2FyZCk/dashboard/providers/stt/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/tts.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/tts.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/!KGRhc2hib2FyZCk/dashboard/providers/tts/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/web.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/web.segments/!KGRhc2hib2FyZCk/dashboard/providers/web/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/web.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- 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 +8 -8
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +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/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.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/_tree.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 +7 -7
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- 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 +7 -7
- 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/_tree.segment.rsc +1 -1
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +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 +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +5 -5
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +15 -15
- package/app/.next-cli-build/server/chunks/2428.js +1 -1
- package/app/.next-cli-build/server/chunks/3399.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/6811.js +1 -1
- package/app/.next-cli-build/server/chunks/6992.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.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/chunks/{5263-590e483e70c53bd2.js → 5263-1a67349f9f3fb868.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-3b6388d9159858f0.js +19 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-d75db816f1e4c98e.js +0 -19
- /package/app/.next-cli-build/static/{fC_wkmbl2XMRNOffI4oJ7 → UrAlUQ5EZi9l0W8ArxbsH}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{fC_wkmbl2XMRNOffI4oJ7 → UrAlUQ5EZi9l0W8ArxbsH}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.5.32-to-5.5.33-5.5.33-20260924-173620 → upgrade-5.5.36-to-5.5.37-5.5.37-20261005-215036}/data.sqlite +0 -0
package/app/.next-cli-build/static/chunks/{5263-590e483e70c53bd2.js → 5263-1a67349f9f3fb868.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5263],{28777:(e,i,a)=>{a.d(i,{KC:()=>t.KC,Xg:()=>t.Xg});var t=a(72218);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(t.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},44656:(e,i,a)=>{a.d(i,{BrandingProvider:()=>m,notifyBrandingChanged:()=>d,useBranding:()=>p});var t=a(95155),o=a(12115),s=a(14051),n=a.n(s);let r={siteTitle:"",siteShortName:"",siteDescription:"",logoUrl:null,faviconUrl:null,logoMime:null,faviconMime:null,hasLogo:!1,hasFavicon:!1},c=(0,o.createContext)({...r,loading:!0,refresh:async()=>{}}),l="bluerouter:branding-updated";function d(){window.dispatchEvent(new CustomEvent(l))}function m({initialBranding:e,children:i}){let[a,s]=(0,o.useState)(e||r),[n,d]=(0,o.useState)(!e),p=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/branding",{cache:"no-store"});if(!e.ok)return;let i=await e.json();s({...r,...i})}catch{}finally{d(!1)}},[]);(0,o.useEffect)(()=>{p()},[p]),(0,o.useEffect)(()=>{let e=()=>p();return window.addEventListener(l,e),()=>window.removeEventListener(l,e)},[p]);let h=(0,o.useMemo)(()=>({...a,loading:n,refresh:p}),[a,n,p]);return(0,t.jsx)(c.Provider,{value:h,children:i})}function p(){return(0,o.useContext)(c)}m.propTypes={initialBranding:n().object,children:n().node}},52679:(e,i,a)=>{a.d(i,{DI:()=>g,IS:()=>o,JH:()=>u,MA:()=>M,Ox:()=>k,Q2:()=>C,U_:()=>T,_8:()=>v,ad:()=>h,br:()=>d,dV:()=>p,fg:()=>l,gC:()=>w,gb:()=>x,hb:()=>y,mq:()=>f,nJ:()=>s,o5:()=>A,rj:()=>m,rs:()=>I,s9:()=>n,wG:()=>K,wb:()=>P,zN:()=>c,zt:()=>U});let t="⚠️ Lưu \xfd: Mỗi t\xe0i khoản OAuth chỉ n\xean d\xf9ng cho một user. Kh\xf4ng chia sẻ OAuth account cho nhiều user/API key để tr\xe1nh lỗi quota, kh\xf3a phi\xean hoặc bị provider hạn chế.",o={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35",deprecated:!0,deprecationNotice:t,website:"https://kiro.dev",notice:{signupUrl:"https://kiro.dev"}},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationNotice:t,website:"https://github.com/google-gemini/gemini-cli",notice:{signupUrl:"https://github.com/google-gemini/gemini-cli"}},opencode:{id:"opencode",alias:"oc",name:"OpenCode Free",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0,passthroughModels:!0,modelsFetcher:{url:"https://opencode.ai/zen/v1/models",type:"opencode-free"}}},s={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"},passthroughModels:!0,serviceKinds:["llm","embedding","tts","imageToText"],embeddingConfig:{baseUrl:"https://openrouter.ai/api/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"openai/text-embedding-3-small",name:"Text Embedding 3 Small (OpenRouter)",dimensions:1536},{id:"openai/text-embedding-3-large",name:"Text Embedding 3 Large (OpenRouter)",dimensions:3072},{id:"openai/text-embedding-ada-002",name:"Text Embedding Ada 002 (OpenRouter)",dimensions:1536}]}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"},serviceKinds:["llm","tts","embedding"],ttsConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"nvidia-tts",models:[{id:"fastpitch",name:"FastPitch"},{id:"tacotron2",name:"Tacotron2"}]},embeddingConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",dimensions:1024}]}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",mediaPriority:1,website:"https://ai.google.dev",notice:{apiKeyUrl:"https://aistudio.google.com/app/apikey"},serviceKinds:["llm","embedding","image","imageToText","webSearch","tts","stt"],sttConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-stt",models:[{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash"}]},searchViaChat:{defaultModel:"gemini-2.5-flash",pricingUrl:"https://ai.google.dev/pricing",freeTier:"Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio."},embeddingConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",models:[{id:"text-embedding-004",name:"Text Embedding 004",dimensions:768},{id:"embedding-001",name:"Embedding 001",dimensions:768}]},ttsConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-tts",models:[{id:"gemini-2.5-flash-preview-tts",name:"Gemini 2.5 Flash TTS"},{id:"gemini-2.5-pro-preview-tts",name:"Gemini 2.5 Pro TTS"}]}},"cloudflare-ai":{id:"cloudflare-ai",alias:"cf",name:"Cloudflare",icon:"cloud",color:"#F38020",textIcon:"CF",website:"https://developers.cloudflare.com/workers-ai/",notice:{text:"Workers AI free tier. Requires a Cloudflare API token and Account ID.",apiKeyUrl:"https://dash.cloudflare.com/profile/api-tokens"},serviceKinds:["llm","image"],hasProviderSpecificData:!0},byteplus:{id:"byteplus",alias:"bpm",name:"BytePlus ModelArk",icon:"cloud",color:"#2563EB",textIcon:"BP",website:"https://console.byteplus.com/ark",notice:{text:"Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.",apiKeyUrl:"https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey"},serviceKinds:["llm"]}},n={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},r=[{id:"speech-2.8-hd",name:"Speech 2.8 HD"},{id:"speech-2.8-turbo",name:"Speech 2.8 Turbo"},{id:"speech-2.6-hd",name:"Speech 2.6 HD"},{id:"speech-2.6-turbo",name:"Speech 2.6 Turbo"},{id:"speech-02-hd",name:"Speech 02 HD"},{id:"speech-02-turbo",name:"Speech 02 Turbo"},{id:"speech-01-hd",name:"Speech 01 HD"},{id:"speech-01-turbo",name:"Speech 01 Turbo"}],c={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757",deprecated:!0,deprecationNotice:t,website:"https://claude.ai",notice:{signupUrl:"https://claude.ai"}},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"⚠️ Cảnh b\xe1o rủi ro: Provider n\xe0y d\xf9ng subscription/OAuth session kh\xf4ng được cấp ph\xe9p ch\xednh thức cho mục đ\xedch proxy/router. T\xe0i khoản c\xf3 thể bị provider hạn chế hoặc kh\xf3a. Sử dụng v\xe0 tự chịu rủi ro.",website:"https://antigravity.google",notice:{signupUrl:"https://antigravity.google"}},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6",deprecated:!0,deprecationNotice:t,thinkingConfig:n.effort,serviceKinds:["llm","image"],kindNotice:{image:"Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."},website:"https://chatgpt.com/codex",notice:{signupUrl:"https://chatgpt.com/codex"}},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333",deprecated:!0,deprecationNotice:t,serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://models.github.ai/inference/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",dimensions:3072}]},website:"https://github.com/features/copilot",notice:{signupUrl:"https://github.com/features/copilot"}},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA",website:"https://cursor.com",notice:{signupUrl:"https://cursor.com"}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai",signupUrl:"https://x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC",website:"https://kilocode.ai",notice:{signupUrl:"https://kilocode.ai"}},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL",website:"https://cline.bot",notice:{signupUrl:"https://cline.bot"}}},l={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn",notice:{apiKeyUrl:"https://platform.moonshot.ai/console/api-keys"},serviceKinds:["llm","webSearch"],searchViaChat:{defaultModel:"kimi-k2.5",pricingUrl:"https://platform.moonshot.ai/docs/pricing/chat"}},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","image","imageToText","webSearch","tts"],searchViaChat:{defaultModel:"MiniMax-M2.7",pricingUrl:"https://www.minimaxi.com/document/price"},ttsConfig:{baseUrl:"https://api.minimax.io/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.minimaxi.com/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com",notice:{apiKeyUrl:"https://bailian.console.aliyun.com/?apiKey=1"}},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl Coding Plan",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"alims-intl":{id:"alims-intl",alias:"alims-intl",name:"Alibaba Intl Model Studio",icon:"cloud",color:"#FF6A00",textIcon:"AMS",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"xiaomi-mimo":{id:"xiaomi-mimo",alias:"mimo",name:"Xiaomi MiMo",icon:"smart_toy",color:"#FF6900",textIcon:"XM",website:"https://xiaomimimo.com",notice:{apiKeyUrl:"https://xiaomimimo.com"}},"xiaomi-tokenplan":{id:"xiaomi-tokenplan",alias:"xmtp",name:"Xiaomi MiMo (Token Plan)",icon:"smart_toy",color:"#FF6700",textIcon:"XT",website:"https://mimo.xiaomi.com",notice:{text:"Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",apiKeyUrl:"https://mimo.xiaomi.com"},hasProviderSpecificData:!0,regions:[{id:"sgp",label:"Singapore",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1"},{id:"cn",label:"China",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1"},{id:"ams",label:"Europe",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1"}],defaultRegion:"sgp"},"volcengine-ark":{id:"volcengine-ark",alias:"ark",name:"Volcengine Ark",icon:"cloud",color:"#1677FF",textIcon:"ARK",website:"https://ark.cn-beijing.volces.com",notice:{apiKeyUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey"}},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",notice:{apiKeyUrl:"https://platform.openai.com/api-keys"},serviceKinds:["llm","embedding","tts","stt","image","imageToText","webSearch"],thinkingConfig:n.effort,searchViaChat:{defaultModel:"gpt-4o-mini",pricingUrl:"https://openai.com/api/pricing"},ttsConfig:{baseUrl:"https://api.openai.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"tts-1",name:"TTS-1"},{id:"tts-1-hd",name:"TTS-1 HD"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},sttConfig:{baseUrl:"https://api.openai.com/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-1",name:"Whisper 1"},{id:"gpt-4o-transcribe",name:"GPT-4o Transcribe"},{id:"gpt-4o-mini-transcribe",name:"GPT-4o Mini Transcribe"}]},embeddingConfig:{baseUrl:"https://api.openai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",dimensions:3072},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",dimensions:1536}]}},"vercel-ai-gateway":{id:"vercel-ai-gateway",alias:"vercel",name:"Vercel AI Gateway",icon:"deployed_code",color:"#111827",textIcon:"VG",website:"https://vercel.com/ai-gateway",notice:{text:"Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.",apiKeyUrl:"https://vercel.com/dashboard/~/ai-gateway"},passthroughModels:!0,serviceKinds:["llm"]},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",notice:{apiKeyUrl:"https://console.anthropic.com/settings/keys"},serviceKinds:["llm","imageToText"]},"opencode-go":{id:"opencode-go",alias:"ocg",name:"OpenCode Go",icon:"terminal",color:"#E87040",textIcon:"OC",website:"https://opencode.ai/auth",notice:{text:"OpenCode Go subscription: $5/mo (then $10/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",apiKeyUrl:"https://opencode.ai/auth"}},azure:{id:"azure",alias:"azure",name:"Azure OpenAI",icon:"cloud",color:"#0078D4",textIcon:"AZ",website:"https://azure.microsoft.com/en-us/products/ai-services/openai-service",notice:{apiKeyUrl:"https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI"},hasProviderSpecificData:!0},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com",notice:{apiKeyUrl:"https://platform.deepseek.com/api_keys"}},commandcode:{id:"commandcode",alias:"cmc",name:"Command Code",icon:"smart_toy",color:"#000000",textIcon:"CC",website:"https://commandcode.ai",notice:{text:"Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.",apiKeyUrl:"https://commandcode.ai/studio"}},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",notice:{apiKeyUrl:"https://console.groq.com/keys"},serviceKinds:["llm","imageToText","stt"],sttConfig:{baseUrl:"https://api.groq.com/openai/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-large-v3",name:"Whisper Large v3"},{id:"whisper-large-v3-turbo",name:"Whisper Large v3 Turbo"},{id:"distil-whisper-large-v3-en",name:"Distil Whisper Large v3 EN"}]}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai",notice:{apiKeyUrl:"https://console.mistral.ai/api-keys"},serviceKinds:["llm","imageToText","embedding"],embeddingConfig:{baseUrl:"https://api.mistral.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"mistral-embed",name:"Mistral Embed",dimensions:1024}]}},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai",notice:{apiKeyUrl:"https://www.perplexity.ai/settings/api"},serviceKinds:["llm","webSearch"],searchConfig:{baseUrl:"https://api.perplexity.ai/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",notice:{apiKeyUrl:"https://api.together.xyz/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.together.xyz/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",dimensions:1024},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",dimensions:768}]}},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai",notice:{apiKeyUrl:"https://fireworks.ai/account/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.fireworks.ai/inference/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",dimensions:768}]}},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai",notice:{apiKeyUrl:"https://cloud.cerebras.ai/platform"}},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com",notice:{apiKeyUrl:"https://dashboard.cohere.com/api-keys"}},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com",notice:{apiKeyUrl:"https://studio.nebius.com/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.tokenfactory.nebius.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",dimensions:4096}]}},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com",notice:{apiKeyUrl:"https://cloud.siliconflow.com/account/ak"}},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz",notice:{apiKeyUrl:"https://app.hyperbolic.xyz/settings"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.hyperbolic.xyz/v1/audio/generation",authType:"apikey",authHeader:"bearer",format:"hyperbolic",models:[{id:"melo-tts",name:"Melo TTS"}]}},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",notice:{text:"$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).",apiKeyUrl:"https://console.deepgram.com/api-keys"},serviceKinds:["stt","imageToText","tts"],ttsConfig:{baseUrl:"https://api.deepgram.com/v1/speak",authType:"apikey",authHeader:"token",format:"deepgram",models:[]},sttConfig:{baseUrl:"https://api.deepgram.com/v1/listen",authType:"apikey",authHeader:"token",format:"deepgram",models:[{id:"nova-3",name:"Nova 3"},{id:"nova-2",name:"Nova 2"},{id:"whisper-large",name:"Whisper Large"}]}},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",notice:{apiKeyUrl:"https://www.assemblyai.com/app/api-keys"},serviceKinds:["stt"],sttConfig:{baseUrl:"https://api.assemblyai.com/v2/transcript",authType:"apikey",authHeader:"bearer",format:"assemblyai",async:!0,models:[{id:"universal-3-pro",name:"Universal 3 Pro"},{id:"universal-2",name:"Universal 2"}]}},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana API",icon:"extension",color:"#FFD700",textIcon:"\uD83C\uDF4C",website:"https://nanobananaapi.ai",notice:{text:"3rd-party proxy for Google Nano Banana (Gemini 2.5/3 Flash Image). For official, use Gemini provider.",apiKeyUrl:"https://nanobananaapi.ai/dashboard"},serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",notice:{apiKeyUrl:"https://elevenlabs.io/app/settings/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.elevenlabs.io/v1/text-to-speech",authType:"apikey",authHeader:"xi-api-key",format:"elevenlabs",models:[{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]}},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",notice:{apiKeyUrl:"https://play.cartesia.ai/keys"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.cartesia.ai/tts/bytes",authType:"apikey",authHeader:"x-api-key",format:"cartesia",models:[{id:"sonic-2",name:"Sonic 2"},{id:"sonic-3",name:"Sonic 3"}]}},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",notice:{apiKeyUrl:"https://play.ht/studio/api-access"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.play.ht/api/v2/tts/stream",authType:"apikey",authHeader:"playht",format:"playht",models:[{id:"PlayDialog",name:"PlayDialog"},{id:"Play3.0-mini",name:"Play 3.0 Mini"}]}},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"local-device",authType:"none",authHeader:"none",format:"local-device",models:[]}},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"google-tts",authType:"none",authHeader:"none",format:"google-tts",models:[]}},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"edge-tts",authType:"none",authHeader:"none",format:"edge-tts",models:[]}},coqui:{id:"coqui",alias:"coqui",name:"Coqui TTS",icon:"record_voice_over",color:"#10B981",textIcon:"CQ",website:"https://github.com/coqui-ai/TTS",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5002/api/tts",authType:"none",authHeader:"none",format:"coqui",models:[{id:"tts_models/en/ljspeech/tacotron2-DDC",name:"Tacotron2 DDC (LJSpeech)"}]}},tortoise:{id:"tortoise",alias:"tortoise",name:"Tortoise TTS",icon:"record_voice_over",color:"#7C3AED",textIcon:"TT",website:"https://github.com/neonbjb/tortoise-tts",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5000/api/tts",authType:"none",authHeader:"none",format:"tortoise",models:[{id:"tortoise-v2",name:"Tortoise v2"}]}},inworld:{id:"inworld",alias:"inworld",name:"Inworld TTS",icon:"record_voice_over",color:"#FF6B6B",textIcon:"IW",website:"https://inworld.ai",notice:{text:"Free tier: 40 minutes/month TTS. Paid: TTS-1.5 Mini $0.01/min ($15/1M chars), TTS-1.5 Max $0.025/min ($30/1M chars). 270+ voices, 15 languages.",apiKeyUrl:"https://platform.inworld.ai/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.inworld.ai/tts/v1/voice",authType:"apikey",authHeader:"basic",format:"inworld",models:[{id:"inworld-tts-1.5-mini",name:"Inworld TTS 1.5 Mini ($0.01/min)"},{id:"inworld-tts-1.5-max",name:"Inworld TTS 1.5 Max ($0.025/min)"}]}},"voyage-ai":{id:"voyage-ai",alias:"voyage",name:"Voyage AI",icon:"data_array",color:"#0EA5E9",textIcon:"VG",website:"https://www.voyageai.com",notice:{apiKeyUrl:"https://dash.voyageai.com/api-keys"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.voyageai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"voyage-3-large",name:"Voyage 3 Large",dimensions:1024},{id:"voyage-3.5",name:"Voyage 3.5",dimensions:1024},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",dimensions:1024},{id:"voyage-code-3",name:"Voyage Code 3",dimensions:1024},{id:"voyage-finance-2",name:"Voyage Finance 2",dimensions:1024},{id:"voyage-law-2",name:"Voyage Law 2",dimensions:1024},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",dimensions:1024}]}},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",notice:{apiKeyUrl:"https://huggingface.co/settings/tokens"},serviceKinds:["image","imageToText","tts","stt"],hiddenKinds:["tts"],ttsConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-tts",models:[{id:"facebook/mms-tts-eng",name:"MMS TTS English"},{id:"microsoft/speecht5_tts",name:"SpeechT5 TTS"}]},sttConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-asr",models:[{id:"openai/whisper-large-v3",name:"Whisper Large v3 (HF)"},{id:"openai/whisper-small",name:"Whisper Small (HF)"}]}},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"smart_toy",color:"#5B5FEF",textIcon:"BB",website:"https://blackbox.ai",notice:{apiKeyUrl:"https://www.blackbox.ai/api-management"},serviceKinds:["llm"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai",notice:{apiKeyUrl:"https://chutes.ai/app/api"}},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"developer_board",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",deploymentType:"local"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models",notice:{apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},tavily:{id:"tavily",alias:"tavily",name:"Tavily",icon:"search",color:"#5B21B6",textIcon:"TV",website:"https://tavily.com",notice:{apiKeyUrl:"https://app.tavily.com/home"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.tavily.com/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.tavily.com/extract",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,formats:["markdown","text"],maxCharacters:1e5,timeoutMs:15e3}},"brave-search":{id:"brave-search",alias:"brave",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",notice:{apiKeyUrl:"https://api-dashboard.search.brave.com/app/keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.search.brave.com/res/v1",method:"GET",authType:"apikey",authHeader:"x-subscription-token",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},serper:{id:"serper",alias:"serper",name:"Serper",icon:"search",color:"#4F46E5",textIcon:"SP",website:"https://serper.dev",notice:{apiKeyUrl:"https://serper.dev/api-key"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://google.serper.dev",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:2500,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},exa:{id:"exa",alias:"exa",name:"Exa",icon:"manage_search",color:"#2563EB",textIcon:"EX",website:"https://exa.ai",notice:{apiKeyUrl:"https://dashboard.exa.ai/api-keys"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.exa.ai/search",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.007,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.exa.ai/contents",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:1e3,formats:["text","markdown"],maxCharacters:1e5,timeoutMs:15e3}},searxng:{id:"searxng",alias:"searxng",name:"SearXNG",icon:"saved_search",color:"#3B82F6",textIcon:"SX",website:"https://docs.searxng.org",serviceKinds:["webSearch"],noAuth:!0,searchConfig:{baseUrl:"http://localhost:8888/search",method:"GET",authType:"none",authHeader:"none",costPerQuery:0,freeMonthlyQuota:999999,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:18e4}},"google-pse":{id:"google-pse",alias:"gpse",name:"Google PSE",icon:"search",color:"#4285F4",textIcon:"GP",website:"https://programmablesearchengine.google.com",notice:{apiKeyUrl:"https://programmablesearchengine.google.com/controlpanel/create"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.googleapis.com/customsearch/v1",method:"GET",authType:"apikey",authHeader:"key",costPerQuery:.005,freeMonthlyQuota:3e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:10,timeoutMs:1e4,cacheTTLMs:3e5}},linkup:{id:"linkup",alias:"linkup",name:"Linkup",icon:"link",color:"#0EA5E9",textIcon:"LK",website:"https://linkup.so",notice:{apiKeyUrl:"https://app.linkup.so/api-keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.linkup.so/v1/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:3e5}},searchapi:{id:"searchapi",alias:"searchapi",name:"SearchAPI",icon:"search",color:"#0EA5A4",textIcon:"SA",website:"https://www.searchapi.io",notice:{apiKeyUrl:"https://www.searchapi.io/dashboard"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.searchapi.io/api/v1/search",method:"GET",authType:"apikey",authHeader:"api_key",costPerQuery:.004,freeMonthlyQuota:100,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},youcom:{id:"youcom",alias:"youcom",name:"You.com Search",icon:"search",color:"#7C3AED",textIcon:"YC",website:"https://you.com",notice:{apiKeyUrl:"https://api.you.com"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://ydc-index.io/v1/search",method:"GET",authType:"apikey",authHeader:"x-api-key",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},firecrawl:{id:"firecrawl",alias:"firecrawl",name:"Firecrawl",icon:"local_fire_department",color:"#F59E0B",textIcon:"FC",website:"https://firecrawl.dev",notice:{apiKeyUrl:"https://www.firecrawl.dev/app/api-keys"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://api.firecrawl.dev/v1/scrape",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.002,freeMonthlyQuota:500,formats:["markdown","html","text"],maxCharacters:2e5,timeoutMs:3e4}},"fal-ai":{id:"fal-ai",alias:"fal",name:"Fal.ai",icon:"image",color:"#2563EB",textIcon:"FL",website:"https://fal.ai",notice:{apiKeyUrl:"https://fal.ai/dashboard/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.fal.ai/v1/models?limit=1",method:"GET",authType:"apikey",authHeader:"key"}},"stability-ai":{id:"stability-ai",alias:"stability",name:"Stability AI",icon:"image",color:"#8B5CF6",textIcon:"SA",website:"https://stability.ai",notice:{apiKeyUrl:"https://platform.stability.ai/account/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.stability.ai/v1/user/account",method:"GET",authType:"apikey",authHeader:"bearer"}},"black-forest-labs":{id:"black-forest-labs",alias:"bfl",name:"Black Forest Labs",icon:"image",color:"#111827",textIcon:"BF",website:"https://blackforestlabs.ai",notice:{apiKeyUrl:"https://api.bfl.ai"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.bfl.ai/v1/get_result?id=ping",method:"GET",authType:"apikey",authHeader:"x-key"}},recraft:{id:"recraft",alias:"recraft",name:"Recraft",icon:"image",color:"#EC4899",textIcon:"RC",website:"https://recraft.ai",notice:{apiKeyUrl:"https://www.recraft.ai/profile/api"},serviceKinds:["image"],imageConfig:{baseUrl:"https://external.api.recraft.ai/v1/users/me",method:"GET",authType:"apikey",authHeader:"bearer"}},topaz:{id:"topaz",alias:"topaz",name:"Topaz",icon:"image",color:"#059669",textIcon:"TP",website:"https://topazlabs.com",notice:{apiKeyUrl:"https://topazlabs.com/account"},serviceKinds:["image"]},runwayml:{id:"runwayml",alias:"runway",name:"Runway ML",icon:"movie",color:"#000000",textIcon:"RW",website:"https://runwayml.com",notice:{apiKeyUrl:"https://dev.runwayml.com"},serviceKinds:["image","video"],imageConfig:{baseUrl:"https://api.dev.runwayml.com/v1/organization",method:"GET",authType:"apikey",authHeader:"bearer",extraHeaders:{"X-Runway-Version":"2024-11-06"}}},"aws-polly":{id:"aws-polly",alias:"polly",name:"AWS Polly",icon:"record_voice_over",color:"#FF9900",textIcon:"PL",website:"https://aws.amazon.com/polly/",notice:{text:"Use AWS Secret Access Key as API key; set providerSpecificData.accessKeyId and optional region.",apiKeyUrl:"https://console.aws.amazon.com/iam/home#/security_credentials"},serviceKinds:["tts"],hasProviderSpecificData:!0,ttsConfig:{baseUrl:"https://polly.{region}.amazonaws.com/v1/speech",authType:"apikey",authHeader:"aws-sigv4",format:"aws-polly",models:[{id:"standard",name:"Standard"},{id:"neural",name:"Neural"},{id:"long-form",name:"Long-form"},{id:"generative",name:"Generative"}]}},"jina-ai":{id:"jina-ai",alias:"jina",name:"Jina AI",icon:"blur_on",color:"#2563EB",textIcon:"JA",website:"https://jina.ai",notice:{text:"10M free tokens on signup (non-commercial), no credit card required.",apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.jina.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"jina-embeddings-v3",name:"Jina Embeddings v3",dimensions:1024},{id:"jina-embeddings-v2-base-en",name:"Jina Embeddings v2 Base EN",dimensions:768},{id:"jina-embeddings-v2-base-code",name:"Jina Embeddings v2 Base Code",dimensions:768}]}},"jina-reader":{id:"jina-reader",alias:"jina",name:"Jina Reader",icon:"menu_book",color:"#000000",textIcon:"JR",website:"https://jina.ai/reader",notice:{apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://r.jina.ai",method:"GET",authType:"apikey",authHeader:"bearer",costPerQuery:0,freeMonthlyQuota:1e6,formats:["markdown","text","html"],maxCharacters:2e5,timeoutMs:3e4}}},d={"grok-web":{id:"grok-web",alias:"gw",name:"Grok Web (Subscription)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"GW",website:"https://grok.com",authType:"cookie",authHint:"Paste your sso= cookie value from grok.com",passthroughModels:!0,serviceKinds:["llm"]},"perplexity-web":{id:"perplexity-web",alias:"pw",name:"Perplexity Web (Pro/Max)",icon:"search",color:"#20808D",textIcon:"PW",website:"https://www.perplexity.ai",authType:"cookie",authHint:"Paste your __Secure-next-auth.session-token cookie value from perplexity.ai",serviceKinds:["llm"]}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"Speech To Text",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],p={embedding:"/dashboard/providers/embedding",image:"/dashboard/providers/image",imageToText:"/dashboard/providers/image-to-text",tts:"/dashboard/providers/tts",stt:"/dashboard/providers/stt",webSearch:"/dashboard/providers/web",webFetch:"/dashboard/providers/web"},h={embedding:"embedding",image:"image","image-to-text":"imageToText",tts:"tts",stt:"stt"},u="openai-compatible-",g="anthropic-compatible-",b=Object.freeze({GENERIC:"generic",LLAMA_CPP:"llamacpp",VLLM:"vllm",OLLAMA:"ollama"}),y=b.LLAMA_CPP,v=[{value:b.GENERIC,label:"Generic OpenAI-compatible",description:"Only standard request fields are forwarded. Thinking/reasoning-specific fields are not injected."},{value:b.LLAMA_CPP,label:"llama.cpp / llama-server",description:"Supports chat_template_kwargs.enable_thinking, reasoning_budget and the top_k/min_p sampling fields."},{value:b.VLLM,label:"vLLM",description:"Supports chat_template_kwargs.enable_thinking, top_k/min_p and maps reasoning budget to thinking_token_budget."},{value:b.OLLAMA,label:"Ollama OpenAI-compatible",description:"Uses standard OpenAI-compatible fields only. Thinking/reasoning fields are not injected."}];function f(e){return"string"==typeof e&&e.startsWith(u)}function x(e){return"string"==typeof e&&e.startsWith(g)}function w(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}function k(e){return"string"==typeof e&&e.startsWith("custom-stt-")}function T(e){return"string"==typeof e&&e.startsWith("custom-tts-")}Object.freeze({generic:b.GENERIC,default:b.GENERIC,openai:b.GENERIC,strict:b.GENERIC,llama:b.LLAMA_CPP,llamacpp:b.LLAMA_CPP,"llama.cpp":b.LLAMA_CPP,"llama-cpp":b.LLAMA_CPP,"llama-server":b.LLAMA_CPP,llamaserver:b.LLAMA_CPP,vllm:b.VLLM,"v-llm":b.VLLM,ollama:b.OLLAMA,"ollama-openai":b.OLLAMA});let C={...o,...s,...c,...l,...d},M={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"},cookie:{id:"cookie",name:"Browser Cookie",icon:"cookie"}};function U(e){for(let i of Object.values(C))if(i.alias===e||i.id===e)return i;return null}function I(e){let i=U(e);return i?.id||e}function K(e){let i=C[e];return i?.alias||e}function A(e){return Object.values(C).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e))).sort((e,i)=>(e.mediaPriority??100)-(i.mediaPriority??100))}Object.values(C).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(C).reduce((e,i)=>(e[i.id]=i.alias,e),{});let P=["claude","antigravity","kiro","github","codex","kimi-coding","ollama","gemini-cli","glm","glm-cn","minimax","minimax-cn"]},90620:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>o,MA:()=>t.MA,UY:()=>c,Nu:()=>s,zN:()=>t.zN,X3:()=>l,B2:()=>r,h0:()=>n});var t=a(52679);a(28777);let o={name:"AI Router Gateway",description:"AI Infrastructure Management",version:"5.5.37"},s={changelogUrl:"https://raw.githubusercontent.com/decolua/bluerouter/refs/heads/master/CHANGELOG.md",donateUrl:"https://bluerouter.com/api/donate"},n={npmPackageName:"@jheavenknows/bluerouter",installCmd:"npm i -g @jheavenknows/bluerouter",installCmdLatest:"npm install -g @jheavenknows/bluerouter@latest",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},r={storageKey:"theme",defaultTheme:"system"},c={maxLines:200,pollIntervalMs:1e3},l={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","alims-intl":"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5263],{28777:(e,i,a)=>{a.d(i,{KC:()=>t.KC,Xg:()=>t.Xg});var t=a(72218);Object.entries(a(52679).Q2).filter(([,e])=>e.passthroughModels).map(([e])=>e),Object.entries(t.vq).flatMap(([e,i])=>i.map(i=>({provider:e,model:i.id,name:i.name})))},44656:(e,i,a)=>{a.d(i,{BrandingProvider:()=>m,notifyBrandingChanged:()=>d,useBranding:()=>p});var t=a(95155),o=a(12115),s=a(14051),n=a.n(s);let r={siteTitle:"",siteShortName:"",siteDescription:"",logoUrl:null,faviconUrl:null,logoMime:null,faviconMime:null,hasLogo:!1,hasFavicon:!1},c=(0,o.createContext)({...r,loading:!0,refresh:async()=>{}}),l="bluerouter:branding-updated";function d(){window.dispatchEvent(new CustomEvent(l))}function m({initialBranding:e,children:i}){let[a,s]=(0,o.useState)(e||r),[n,d]=(0,o.useState)(!e),p=(0,o.useCallback)(async()=>{try{let e=await fetch("/api/branding",{cache:"no-store"});if(!e.ok)return;let i=await e.json();s({...r,...i})}catch{}finally{d(!1)}},[]);(0,o.useEffect)(()=>{p()},[p]),(0,o.useEffect)(()=>{let e=()=>p();return window.addEventListener(l,e),()=>window.removeEventListener(l,e)},[p]);let h=(0,o.useMemo)(()=>({...a,loading:n,refresh:p}),[a,n,p]);return(0,t.jsx)(c.Provider,{value:h,children:i})}function p(){return(0,o.useContext)(c)}m.propTypes={initialBranding:n().object,children:n().node}},52679:(e,i,a)=>{a.d(i,{DI:()=>g,IS:()=>o,JH:()=>u,MA:()=>M,Ox:()=>k,Q2:()=>C,U_:()=>T,_8:()=>v,ad:()=>h,br:()=>d,dV:()=>p,fg:()=>l,gC:()=>w,gb:()=>x,hb:()=>y,mq:()=>f,nJ:()=>s,o5:()=>A,rj:()=>m,rs:()=>I,s9:()=>n,wG:()=>K,wb:()=>P,zN:()=>c,zt:()=>U});let t="⚠️ Lưu \xfd: Mỗi t\xe0i khoản OAuth chỉ n\xean d\xf9ng cho một user. Kh\xf4ng chia sẻ OAuth account cho nhiều user/API key để tr\xe1nh lỗi quota, kh\xf3a phi\xean hoặc bị provider hạn chế.",o={kiro:{id:"kiro",alias:"kr",name:"Kiro AI",icon:"psychology_alt",color:"#FF6B35",deprecated:!0,deprecationNotice:t,website:"https://kiro.dev",notice:{signupUrl:"https://kiro.dev"}},"gemini-cli":{id:"gemini-cli",alias:"gc",name:"Gemini CLI",icon:"terminal",color:"#4285F4",deprecated:!0,deprecationNotice:t,website:"https://github.com/google-gemini/gemini-cli",notice:{signupUrl:"https://github.com/google-gemini/gemini-cli"}},opencode:{id:"opencode",alias:"oc",name:"OpenCode Free",icon:"terminal",color:"#E87040",textIcon:"OC",noAuth:!0,passthroughModels:!0,modelsFetcher:{url:"https://opencode.ai/zen/v1/models",type:"opencode-free"}}},s={openrouter:{id:"openrouter",alias:"openrouter",name:"OpenRouter",icon:"router",color:"#F97316",textIcon:"OR",website:"https://openrouter.ai",notice:{text:"Free tier: 27+ free models, no credit card needed, 200 req/day. After $10 credit: 1,000 req/day.",apiKeyUrl:"https://openrouter.ai/settings/keys"},modelsFetcher:{url:"https://openrouter.ai/api/v1/models",type:"openrouter-free"},passthroughModels:!0,serviceKinds:["llm","embedding","tts","imageToText"],embeddingConfig:{baseUrl:"https://openrouter.ai/api/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"openai/text-embedding-3-small",name:"Text Embedding 3 Small (OpenRouter)",dimensions:1536},{id:"openai/text-embedding-3-large",name:"Text Embedding 3 Large (OpenRouter)",dimensions:3072},{id:"openai/text-embedding-ada-002",name:"Text Embedding Ada 002 (OpenRouter)",dimensions:1536}]}},nvidia:{id:"nvidia",alias:"nvidia",name:"NVIDIA NIM",icon:"developer_board",color:"#76B900",textIcon:"NV",website:"https://developer.nvidia.com/nim",notice:{text:"Free access for NVIDIA Developer Program members (prototyping & testing).",apiKeyUrl:"https://build.nvidia.com/settings/api-keys"},serviceKinds:["llm","tts","embedding"],ttsConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"nvidia-tts",models:[{id:"fastpitch",name:"FastPitch"},{id:"tacotron2",name:"Tacotron2"}]},embeddingConfig:{baseUrl:"https://integrate.api.nvidia.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nvidia/nv-embedqa-e5-v5",name:"NV EmbedQA E5 v5",dimensions:1024}]}},ollama:{id:"ollama",alias:"ollama",name:"Ollama Cloud",icon:"cloud",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",notice:{text:"Free tier: light usage, 1 cloud model at a time (limits reset every 5h & 7d). Pro $20/mo \xb7 Max $100/mo.",apiKeyUrl:"https://ollama.com/settings/keys"}},vertex:{id:"vertex",alias:"vx",name:"Vertex AI",icon:"cloud",color:"#4285F4",textIcon:"VX",website:"https://cloud.google.com/vertex-ai",notice:{text:"New Google Cloud accounts get $300 free credits. Requires GCP project + Service Account with Vertex AI API enabled.",apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},gemini:{id:"gemini",alias:"gemini",name:"Gemini",icon:"diamond",color:"#4285F4",textIcon:"GE",mediaPriority:1,website:"https://ai.google.dev",notice:{apiKeyUrl:"https://aistudio.google.com/app/apikey"},serviceKinds:["llm","embedding","image","imageToText","webSearch","tts","stt"],sttConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-stt",models:[{id:"gemini-3.6-flash",name:"Gemini 3.6 Flash"}]},searchViaChat:{defaultModel:"gemini-2.5-flash",pricingUrl:"https://ai.google.dev/pricing",freeTier:"Free tier: 15 RPM, 1M tokens/day on gemini-2.5-flash via AI Studio."},embeddingConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",models:[{id:"text-embedding-004",name:"Text Embedding 004",dimensions:768},{id:"embedding-001",name:"Embedding 001",dimensions:768}]},ttsConfig:{baseUrl:"https://generativelanguage.googleapis.com/v1beta/models",authType:"apikey",authHeader:"key",format:"gemini-tts",models:[{id:"gemini-2.5-flash-preview-tts",name:"Gemini 2.5 Flash TTS"},{id:"gemini-2.5-pro-preview-tts",name:"Gemini 2.5 Pro TTS"}]}},"cloudflare-ai":{id:"cloudflare-ai",alias:"cf",name:"Cloudflare",icon:"cloud",color:"#F38020",textIcon:"CF",website:"https://developers.cloudflare.com/workers-ai/",notice:{text:"Workers AI free tier. Requires a Cloudflare API token and Account ID.",apiKeyUrl:"https://dash.cloudflare.com/profile/api-tokens"},serviceKinds:["llm","image"],hasProviderSpecificData:!0},byteplus:{id:"byteplus",alias:"bpm",name:"BytePlus ModelArk",icon:"cloud",color:"#2563EB",textIcon:"BP",website:"https://console.byteplus.com/ark",notice:{text:"Free credits for new accounts. Access to Seed 2.0, Kimi K2 Thinking, GLM 4.7, GPT-OSS-120B models.",apiKeyUrl:"https://console.byteplus.com/ark/region:ark+ap-southeast-1/apiKey"},serviceKinds:["llm"]}},n={extended:{options:["auto","on","off"],defaultMode:"auto",defaultBudgetTokens:1e4},effort:{options:["auto","none","low","medium","high"],defaultMode:"auto"}},r=[{id:"speech-2.8-hd",name:"Speech 2.8 HD"},{id:"speech-2.8-turbo",name:"Speech 2.8 Turbo"},{id:"speech-2.6-hd",name:"Speech 2.6 HD"},{id:"speech-2.6-turbo",name:"Speech 2.6 Turbo"},{id:"speech-02-hd",name:"Speech 02 HD"},{id:"speech-02-turbo",name:"Speech 02 Turbo"},{id:"speech-01-hd",name:"Speech 01 HD"},{id:"speech-01-turbo",name:"Speech 01 Turbo"}],c={claude:{id:"claude",alias:"cc",name:"Claude Code",icon:"smart_toy",color:"#D97757",deprecated:!0,deprecationNotice:t,website:"https://claude.ai",notice:{signupUrl:"https://claude.ai"}},antigravity:{id:"antigravity",alias:"ag",name:"Antigravity",icon:"rocket_launch",color:"#F59E0B",deprecated:!0,deprecationNotice:"⚠️ Cảnh b\xe1o rủi ro: Provider n\xe0y d\xf9ng subscription/OAuth session kh\xf4ng được cấp ph\xe9p ch\xednh thức cho mục đ\xedch proxy/router. T\xe0i khoản c\xf3 thể bị provider hạn chế hoặc kh\xf3a. Sử dụng v\xe0 tự chịu rủi ro.",website:"https://antigravity.google",notice:{signupUrl:"https://antigravity.google"}},codex:{id:"codex",alias:"cx",name:"OpenAI Codex",icon:"code",color:"#3B82F6",deprecated:!0,deprecationNotice:t,thinkingConfig:n.effort,serviceKinds:["llm","image"],kindNotice:{image:"Requires a ChatGPT Plus (or higher) account. Free accounts are not supported for image generation."},website:"https://chatgpt.com/codex",notice:{signupUrl:"https://chatgpt.com/codex"}},github:{id:"github",alias:"gh",name:"GitHub Copilot",icon:"code",color:"#333333",deprecated:!0,deprecationNotice:t,serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://models.github.ai/inference/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small (GitHub)",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large (GitHub)",dimensions:3072}]},website:"https://github.com/features/copilot",notice:{signupUrl:"https://github.com/features/copilot"}},cursor:{id:"cursor",alias:"cu",name:"Cursor IDE",icon:"edit_note",color:"#00D4AA",website:"https://cursor.com",notice:{signupUrl:"https://cursor.com"}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai",signupUrl:"https://x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},kilocode:{id:"kilocode",alias:"kc",name:"Kilo Code",icon:"code",color:"#FF6B35",textIcon:"KC",website:"https://kilocode.ai",notice:{signupUrl:"https://kilocode.ai"}},cline:{id:"cline",alias:"cl",name:"Cline",icon:"smart_toy",color:"#5B9BD5",textIcon:"CL",website:"https://cline.bot",notice:{signupUrl:"https://cline.bot"}}},l={glm:{id:"glm",alias:"glm",name:"GLM Coding",icon:"code",color:"#2563EB",textIcon:"GL",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},"glm-cn":{id:"glm-cn",alias:"glm-cn",name:"GLM (China)",icon:"code",color:"#DC2626",textIcon:"GC",website:"https://open.bigmodel.cn",notice:{apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys"}},kimi:{id:"kimi",alias:"kimi",name:"Kimi",icon:"psychology",color:"#1E3A8A",textIcon:"KM",website:"https://kimi.moonshot.cn",notice:{apiKeyUrl:"https://platform.moonshot.ai/console/api-keys"},serviceKinds:["llm","webSearch"],searchViaChat:{defaultModel:"kimi-k2.5",pricingUrl:"https://platform.moonshot.ai/docs/pricing/chat"}},minimax:{id:"minimax",alias:"minimax",name:"Minimax Coding",icon:"memory",color:"#7C3AED",textIcon:"MM",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","image","imageToText","webSearch","tts"],searchViaChat:{defaultModel:"MiniMax-M2.7",pricingUrl:"https://www.minimaxi.com/document/price"},ttsConfig:{baseUrl:"https://api.minimax.io/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},"minimax-cn":{id:"minimax-cn",alias:"minimax-cn",name:"Minimax (China)",icon:"memory",color:"#DC2626",textIcon:"MC",website:"https://www.minimaxi.com",notice:{apiKeyUrl:"https://platform.minimaxi.com/user-center/basic-information/interface-key"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.minimaxi.com/v1/t2a_v2",authType:"apikey",authHeader:"bearer",format:"minimax-tts",models:r}},alicode:{id:"alicode",alias:"alicode",name:"Alibaba",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://bailian.console.aliyun.com",notice:{apiKeyUrl:"https://bailian.console.aliyun.com/?apiKey=1"}},"alicode-intl":{id:"alicode-intl",alias:"alicode-intl",name:"Alibaba Intl Coding Plan",icon:"cloud",color:"#FF6A00",textIcon:"ALi",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"alims-intl":{id:"alims-intl",alias:"alims-intl",name:"Alibaba Intl Model Studio",icon:"cloud",color:"#FF6A00",textIcon:"AMS",website:"https://modelstudio.console.alibabacloud.com",notice:{apiKeyUrl:"https://modelstudio.console.alibabacloud.com/?apiKey=1"}},"xiaomi-mimo":{id:"xiaomi-mimo",alias:"mimo",name:"Xiaomi MiMo",icon:"smart_toy",color:"#FF6900",textIcon:"XM",website:"https://xiaomimimo.com",notice:{apiKeyUrl:"https://xiaomimimo.com"}},"xiaomi-tokenplan":{id:"xiaomi-tokenplan",alias:"xmtp",name:"Xiaomi MiMo (Token Plan)",icon:"smart_toy",color:"#FF6700",textIcon:"XT",website:"https://mimo.xiaomi.com",notice:{text:"Xiaomi MiMo Token Plan subscription (API key starts with tp-). Token Plan keys are cluster-specific — select the region matching your subscription.",apiKeyUrl:"https://mimo.xiaomi.com"},hasProviderSpecificData:!0,regions:[{id:"sgp",label:"Singapore",baseUrl:"https://token-plan-sgp.xiaomimimo.com/v1"},{id:"cn",label:"China",baseUrl:"https://token-plan-cn.xiaomimimo.com/v1"},{id:"ams",label:"Europe",baseUrl:"https://token-plan-ams.xiaomimimo.com/v1"}],defaultRegion:"sgp"},"volcengine-ark":{id:"volcengine-ark",alias:"ark",name:"Volcengine Ark",icon:"cloud",color:"#1677FF",textIcon:"ARK",website:"https://ark.cn-beijing.volces.com",notice:{apiKeyUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey"}},openai:{id:"openai",alias:"openai",name:"OpenAI",icon:"auto_awesome",color:"#10A37F",textIcon:"OA",website:"https://platform.openai.com",notice:{apiKeyUrl:"https://platform.openai.com/api-keys"},serviceKinds:["llm","embedding","tts","stt","image","imageToText","webSearch"],thinkingConfig:n.effort,searchViaChat:{defaultModel:"gpt-4o-mini",pricingUrl:"https://openai.com/api/pricing"},ttsConfig:{baseUrl:"https://api.openai.com/v1/audio/speech",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"tts-1",name:"TTS-1"},{id:"tts-1-hd",name:"TTS-1 HD"},{id:"gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},sttConfig:{baseUrl:"https://api.openai.com/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-1",name:"Whisper 1"},{id:"gpt-4o-transcribe",name:"GPT-4o Transcribe"},{id:"gpt-4o-mini-transcribe",name:"GPT-4o Mini Transcribe"}]},embeddingConfig:{baseUrl:"https://api.openai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"text-embedding-3-small",name:"Text Embedding 3 Small",dimensions:1536},{id:"text-embedding-3-large",name:"Text Embedding 3 Large",dimensions:3072},{id:"text-embedding-ada-002",name:"Text Embedding Ada 002",dimensions:1536}]}},"vercel-ai-gateway":{id:"vercel-ai-gateway",alias:"vercel",name:"Vercel AI Gateway",icon:"deployed_code",color:"#111827",textIcon:"VG",website:"https://vercel.com/ai-gateway",notice:{text:"Unified OpenAI-compatible endpoint from Vercel. Use your AI Gateway API key, then pick models with provider/model IDs like anthropic/claude-sonnet-4.6 or openai/gpt-5.4.",apiKeyUrl:"https://vercel.com/dashboard/~/ai-gateway"},passthroughModels:!0,serviceKinds:["llm"]},anthropic:{id:"anthropic",alias:"anthropic",name:"Anthropic",icon:"smart_toy",color:"#D97757",textIcon:"AN",website:"https://console.anthropic.com",notice:{apiKeyUrl:"https://console.anthropic.com/settings/keys"},serviceKinds:["llm","imageToText"]},"opencode-go":{id:"opencode-go",alias:"ocg",name:"OpenCode Go",icon:"terminal",color:"#E87040",textIcon:"OC",website:"https://opencode.ai/auth",notice:{text:"OpenCode Go subscription: $5/mo (then $10/mo). Access to Kimi, GLM, Qwen, MiMo, MiniMax models.",apiKeyUrl:"https://opencode.ai/auth"}},azure:{id:"azure",alias:"azure",name:"Azure OpenAI",icon:"cloud",color:"#0078D4",textIcon:"AZ",website:"https://azure.microsoft.com/en-us/products/ai-services/openai-service",notice:{apiKeyUrl:"https://portal.azure.com/#view/Microsoft_Azure_ProjectOxford/CognitiveServicesHub/~/OpenAI"},hasProviderSpecificData:!0},deepseek:{id:"deepseek",alias:"ds",name:"DeepSeek",icon:"bolt",color:"#4D6BFE",textIcon:"DS",website:"https://deepseek.com",notice:{apiKeyUrl:"https://platform.deepseek.com/api_keys"}},commandcode:{id:"commandcode",alias:"cmc",name:"Command Code",icon:"smart_toy",color:"#000000",textIcon:"CC",website:"https://commandcode.ai",notice:{text:"Use your CommandCode CLI API key (starts with user_...) from ~/.commandcode/auth.json or commandcode.ai/studio.",apiKeyUrl:"https://commandcode.ai/studio"}},groq:{id:"groq",alias:"groq",name:"Groq",icon:"speed",color:"#F55036",textIcon:"GQ",website:"https://groq.com",notice:{apiKeyUrl:"https://console.groq.com/keys"},serviceKinds:["llm","imageToText","stt"],sttConfig:{baseUrl:"https://api.groq.com/openai/v1/audio/transcriptions",authType:"apikey",authHeader:"bearer",format:"openai",models:[{id:"whisper-large-v3",name:"Whisper Large v3"},{id:"whisper-large-v3-turbo",name:"Whisper Large v3 Turbo"},{id:"distil-whisper-large-v3-en",name:"Distil Whisper Large v3 EN"}]}},xai:{id:"xai",alias:"xai",name:"xAI (Grok)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"XA",website:"https://x.ai",notice:{apiKeyUrl:"https://console.x.ai"},serviceKinds:["llm","imageToText","webSearch","image"],searchViaChat:{defaultModel:"grok-4.20-reasoning",pricingUrl:"https://x.ai/api#pricing"},authModes:["oauth","apikey"],hasOAuth:!0},mistral:{id:"mistral",alias:"mistral",name:"Mistral",icon:"air",color:"#FF7000",textIcon:"MI",website:"https://mistral.ai",notice:{apiKeyUrl:"https://console.mistral.ai/api-keys"},serviceKinds:["llm","imageToText","embedding"],embeddingConfig:{baseUrl:"https://api.mistral.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"mistral-embed",name:"Mistral Embed",dimensions:1024}]}},perplexity:{id:"perplexity",alias:"pplx",name:"Perplexity",icon:"search",color:"#20808D",textIcon:"PP",website:"https://www.perplexity.ai",notice:{apiKeyUrl:"https://www.perplexity.ai/settings/api"},serviceKinds:["llm","webSearch"],searchConfig:{baseUrl:"https://api.perplexity.ai/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},together:{id:"together",alias:"together",name:"Together AI",icon:"group_work",color:"#0F6FFF",textIcon:"TG",website:"https://www.together.ai",notice:{apiKeyUrl:"https://api.together.xyz/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.together.xyz/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"BAAI/bge-large-en-v1.5",name:"BGE Large EN v1.5",dimensions:1024},{id:"togethercomputer/m2-bert-80M-8k-retrieval",name:"M2 BERT 80M 8K",dimensions:768}]}},fireworks:{id:"fireworks",alias:"fireworks",name:"Fireworks AI",icon:"local_fire_department",color:"#7B2EF2",textIcon:"FW",website:"https://fireworks.ai",notice:{apiKeyUrl:"https://fireworks.ai/account/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.fireworks.ai/inference/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"nomic-ai/nomic-embed-text-v1.5",name:"Nomic Embed Text v1.5",dimensions:768}]}},cerebras:{id:"cerebras",alias:"cerebras",name:"Cerebras",icon:"memory",color:"#FF4F00",textIcon:"CB",website:"https://www.cerebras.ai",notice:{apiKeyUrl:"https://cloud.cerebras.ai/platform"}},cohere:{id:"cohere",alias:"cohere",name:"Cohere",icon:"hub",color:"#39594D",textIcon:"CO",website:"https://cohere.com",notice:{apiKeyUrl:"https://dashboard.cohere.com/api-keys"}},nebius:{id:"nebius",alias:"nebius",name:"Nebius AI",icon:"cloud",color:"#6C5CE7",textIcon:"NB",website:"https://nebius.com",notice:{apiKeyUrl:"https://studio.nebius.com/settings/api-keys"},serviceKinds:["llm","embedding"],embeddingConfig:{baseUrl:"https://api.tokenfactory.nebius.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"Qwen/Qwen3-Embedding-8B",name:"Qwen3 Embedding 8B",dimensions:4096}]}},siliconflow:{id:"siliconflow",alias:"siliconflow",name:"SiliconFlow",icon:"cloud_queue",color:"#5B6EF5",textIcon:"SF",website:"https://cloud.siliconflow.com",notice:{apiKeyUrl:"https://cloud.siliconflow.com/account/ak"}},hyperbolic:{id:"hyperbolic",alias:"hyp",name:"Hyperbolic",icon:"bolt",color:"#00D4FF",textIcon:"HY",website:"https://hyperbolic.xyz",notice:{apiKeyUrl:"https://app.hyperbolic.xyz/settings"},serviceKinds:["llm","tts"],ttsConfig:{baseUrl:"https://api.hyperbolic.xyz/v1/audio/generation",authType:"apikey",authHeader:"bearer",format:"hyperbolic",models:[{id:"melo-tts",name:"Melo TTS"}]}},deepgram:{id:"deepgram",alias:"dg",name:"Deepgram",icon:"mic",color:"#13EF93",textIcon:"DG",website:"https://deepgram.com",notice:{text:"$200 free credit on signup (no card required). Aura-1: $0.015/1k chars, Aura-2: $0.030/1k chars (Pay-As-You-Go).",apiKeyUrl:"https://console.deepgram.com/api-keys"},serviceKinds:["stt","imageToText","tts"],ttsConfig:{baseUrl:"https://api.deepgram.com/v1/speak",authType:"apikey",authHeader:"token",format:"deepgram",models:[]},sttConfig:{baseUrl:"https://api.deepgram.com/v1/listen",authType:"apikey",authHeader:"token",format:"deepgram",models:[{id:"nova-3",name:"Nova 3"},{id:"nova-2",name:"Nova 2"},{id:"whisper-large",name:"Whisper Large"}]}},assemblyai:{id:"assemblyai",alias:"aai",name:"AssemblyAI",icon:"record_voice_over",color:"#0062FF",textIcon:"AA",website:"https://assemblyai.com",notice:{apiKeyUrl:"https://www.assemblyai.com/app/api-keys"},serviceKinds:["stt"],sttConfig:{baseUrl:"https://api.assemblyai.com/v2/transcript",authType:"apikey",authHeader:"bearer",format:"assemblyai",async:!0,models:[{id:"universal-3-pro",name:"Universal 3 Pro"},{id:"universal-2",name:"Universal 2"}]}},nanobanana:{id:"nanobanana",alias:"nb",name:"NanoBanana API",icon:"extension",color:"#FFD700",textIcon:"\uD83C\uDF4C",website:"https://nanobananaapi.ai",notice:{text:"3rd-party proxy for Google Nano Banana (Gemini 2.5/3 Flash Image). For official, use Gemini provider.",apiKeyUrl:"https://nanobananaapi.ai/dashboard"},serviceKinds:["image"]},elevenlabs:{id:"elevenlabs",alias:"el",name:"ElevenLabs",icon:"record_voice_over",color:"#6C47FF",textIcon:"EL",website:"https://elevenlabs.io",notice:{apiKeyUrl:"https://elevenlabs.io/app/settings/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.elevenlabs.io/v1/text-to-speech",authType:"apikey",authHeader:"xi-api-key",format:"elevenlabs",models:[{id:"eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]}},cartesia:{id:"cartesia",alias:"cartesia",name:"Cartesia",icon:"spatial_audio",color:"#FF4F8B",textIcon:"CA",website:"https://cartesia.ai",notice:{apiKeyUrl:"https://play.cartesia.ai/keys"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.cartesia.ai/tts/bytes",authType:"apikey",authHeader:"x-api-key",format:"cartesia",models:[{id:"sonic-2",name:"Sonic 2"},{id:"sonic-3",name:"Sonic 3"}]}},playht:{id:"playht",alias:"playht",name:"PlayHT",icon:"play_circle",color:"#00B4D8",textIcon:"PH",website:"https://play.ht",notice:{apiKeyUrl:"https://play.ht/studio/api-access"},serviceKinds:["tts"],hidden:!0,ttsConfig:{baseUrl:"https://api.play.ht/api/v2/tts/stream",authType:"apikey",authHeader:"playht",format:"playht",models:[{id:"PlayDialog",name:"PlayDialog"},{id:"Play3.0-mini",name:"Play 3.0 Mini"}]}},"local-device":{id:"local-device",alias:"local-device",name:"Local Device",icon:"speaker",color:"#64748B",textIcon:"LD",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"local-device",authType:"none",authHeader:"none",format:"local-device",models:[]}},"google-tts":{id:"google-tts",alias:"google-tts",name:"Google TTS",icon:"record_voice_over",color:"#4285F4",textIcon:"GT",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"google-tts",authType:"none",authHeader:"none",format:"google-tts",models:[]}},"edge-tts":{id:"edge-tts",alias:"edge-tts",name:"Edge TTS",icon:"record_voice_over",color:"#0078D4",textIcon:"ET",mediaPriority:5,serviceKinds:["tts"],noAuth:!0,ttsConfig:{baseUrl:"edge-tts",authType:"none",authHeader:"none",format:"edge-tts",models:[]}},coqui:{id:"coqui",alias:"coqui",name:"Coqui TTS",icon:"record_voice_over",color:"#10B981",textIcon:"CQ",website:"https://github.com/coqui-ai/TTS",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5002/api/tts",authType:"none",authHeader:"none",format:"coqui",models:[{id:"tts_models/en/ljspeech/tacotron2-DDC",name:"Tacotron2 DDC (LJSpeech)"}]}},tortoise:{id:"tortoise",alias:"tortoise",name:"Tortoise TTS",icon:"record_voice_over",color:"#7C3AED",textIcon:"TT",website:"https://github.com/neonbjb/tortoise-tts",serviceKinds:["tts"],hidden:!0,noAuth:!0,ttsConfig:{baseUrl:"http://localhost:5000/api/tts",authType:"none",authHeader:"none",format:"tortoise",models:[{id:"tortoise-v2",name:"Tortoise v2"}]}},inworld:{id:"inworld",alias:"inworld",name:"Inworld TTS",icon:"record_voice_over",color:"#FF6B6B",textIcon:"IW",website:"https://inworld.ai",notice:{text:"Free tier: 40 minutes/month TTS. Paid: TTS-1.5 Mini $0.01/min ($15/1M chars), TTS-1.5 Max $0.025/min ($30/1M chars). 270+ voices, 15 languages.",apiKeyUrl:"https://platform.inworld.ai/api-keys"},serviceKinds:["tts"],ttsConfig:{baseUrl:"https://api.inworld.ai/tts/v1/voice",authType:"apikey",authHeader:"basic",format:"inworld",models:[{id:"inworld-tts-1.5-mini",name:"Inworld TTS 1.5 Mini ($0.01/min)"},{id:"inworld-tts-1.5-max",name:"Inworld TTS 1.5 Max ($0.025/min)"}]}},"voyage-ai":{id:"voyage-ai",alias:"voyage",name:"Voyage AI",icon:"data_array",color:"#0EA5E9",textIcon:"VG",website:"https://www.voyageai.com",notice:{apiKeyUrl:"https://dash.voyageai.com/api-keys"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.voyageai.com/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"voyage-3-large",name:"Voyage 3 Large",dimensions:1024},{id:"voyage-3.5",name:"Voyage 3.5",dimensions:1024},{id:"voyage-3.5-lite",name:"Voyage 3.5 Lite",dimensions:1024},{id:"voyage-code-3",name:"Voyage Code 3",dimensions:1024},{id:"voyage-finance-2",name:"Voyage Finance 2",dimensions:1024},{id:"voyage-law-2",name:"Voyage Law 2",dimensions:1024},{id:"voyage-multilingual-2",name:"Voyage Multilingual 2",dimensions:1024}]}},sdwebui:{id:"sdwebui",alias:"sdwebui",name:"SD WebUI",icon:"brush",color:"#FF7043",textIcon:"SD",website:"https://github.com/AUTOMATIC1111/stable-diffusion-webui",serviceKinds:["image"]},comfyui:{id:"comfyui",alias:"comfyui",name:"ComfyUI",icon:"account_tree",color:"#4CAF50",textIcon:"CF",website:"https://github.com/comfyanonymous/ComfyUI",serviceKinds:["image"]},huggingface:{id:"huggingface",alias:"hf",name:"HuggingFace",icon:"face",color:"#FFD21E",textIcon:"HF",website:"https://huggingface.co",notice:{apiKeyUrl:"https://huggingface.co/settings/tokens"},serviceKinds:["image","imageToText","tts","stt"],hiddenKinds:["tts"],ttsConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-tts",models:[{id:"facebook/mms-tts-eng",name:"MMS TTS English"},{id:"microsoft/speecht5_tts",name:"SpeechT5 TTS"}]},sttConfig:{baseUrl:"https://api-inference.huggingface.co/models",authType:"apikey",authHeader:"bearer",format:"huggingface-asr",models:[{id:"openai/whisper-large-v3",name:"Whisper Large v3 (HF)"},{id:"openai/whisper-small",name:"Whisper Small (HF)"}]}},blackbox:{id:"blackbox",alias:"bb",name:"Blackbox AI",icon:"smart_toy",color:"#5B5FEF",textIcon:"BB",website:"https://blackbox.ai",notice:{apiKeyUrl:"https://www.blackbox.ai/api-management"},serviceKinds:["llm"]},chutes:{id:"chutes",alias:"ch",name:"Chutes AI",icon:"water_drop",color:"#ffffffff",textIcon:"CH",website:"https://chutes.ai",notice:{apiKeyUrl:"https://chutes.ai/app/api"}},"ollama-local":{id:"ollama-local",alias:"ollama-local",name:"Ollama Local",icon:"developer_board",color:"#ffffffff",textIcon:"OL",website:"https://ollama.com",deploymentType:"local"},"vertex-partner":{id:"vertex-partner",alias:"vxp",name:"Vertex Partner",icon:"cloud",color:"#34A853",textIcon:"VP",website:"https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models",notice:{apiKeyUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts"}},tavily:{id:"tavily",alias:"tavily",name:"Tavily",icon:"search",color:"#5B21B6",textIcon:"TV",website:"https://tavily.com",notice:{apiKeyUrl:"https://app.tavily.com/home"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.tavily.com/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.tavily.com/extract",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.008,freeMonthlyQuota:1e3,formats:["markdown","text"],maxCharacters:1e5,timeoutMs:15e3}},"brave-search":{id:"brave-search",alias:"brave",name:"Brave Search",icon:"travel_explore",color:"#FB542B",textIcon:"BR",website:"https://brave.com/search/api",notice:{apiKeyUrl:"https://api-dashboard.search.brave.com/app/keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.search.brave.com/res/v1",method:"GET",authType:"apikey",authHeader:"x-subscription-token",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:20,timeoutMs:1e4,cacheTTLMs:3e5}},serper:{id:"serper",alias:"serper",name:"Serper",icon:"search",color:"#4F46E5",textIcon:"SP",website:"https://serper.dev",notice:{apiKeyUrl:"https://serper.dev/api-key"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://google.serper.dev",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:2500,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},exa:{id:"exa",alias:"exa",name:"Exa",icon:"manage_search",color:"#2563EB",textIcon:"EX",website:"https://exa.ai",notice:{apiKeyUrl:"https://dashboard.exa.ai/api-keys"},serviceKinds:["webSearch","webFetch"],searchConfig:{baseUrl:"https://api.exa.ai/search",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.007,freeMonthlyQuota:1e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5},fetchConfig:{baseUrl:"https://api.exa.ai/contents",method:"POST",authType:"apikey",authHeader:"x-api-key",costPerQuery:.001,freeMonthlyQuota:1e3,formats:["text","markdown"],maxCharacters:1e5,timeoutMs:15e3}},searxng:{id:"searxng",alias:"searxng",name:"SearXNG",icon:"saved_search",color:"#3B82F6",textIcon:"SX",website:"https://docs.searxng.org",serviceKinds:["webSearch"],noAuth:!0,searchConfig:{baseUrl:"http://localhost:8888/search",method:"GET",authType:"none",authHeader:"none",costPerQuery:0,freeMonthlyQuota:999999,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:18e4}},"google-pse":{id:"google-pse",alias:"gpse",name:"Google PSE",icon:"search",color:"#4285F4",textIcon:"GP",website:"https://programmablesearchengine.google.com",notice:{apiKeyUrl:"https://programmablesearchengine.google.com/controlpanel/create"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.googleapis.com/customsearch/v1",method:"GET",authType:"apikey",authHeader:"key",costPerQuery:.005,freeMonthlyQuota:3e3,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:10,timeoutMs:1e4,cacheTTLMs:3e5}},linkup:{id:"linkup",alias:"linkup",name:"Linkup",icon:"link",color:"#0EA5E9",textIcon:"LK",website:"https://linkup.so",notice:{apiKeyUrl:"https://app.linkup.so/api-keys"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://api.linkup.so/v1/search",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.005,freeMonthlyQuota:1e3,searchTypes:["web"],defaultMaxResults:5,maxMaxResults:50,timeoutMs:1e4,cacheTTLMs:3e5}},searchapi:{id:"searchapi",alias:"searchapi",name:"SearchAPI",icon:"search",color:"#0EA5A4",textIcon:"SA",website:"https://www.searchapi.io",notice:{apiKeyUrl:"https://www.searchapi.io/dashboard"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://www.searchapi.io/api/v1/search",method:"GET",authType:"apikey",authHeader:"api_key",costPerQuery:.004,freeMonthlyQuota:100,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},youcom:{id:"youcom",alias:"youcom",name:"You.com Search",icon:"search",color:"#7C3AED",textIcon:"YC",website:"https://you.com",notice:{apiKeyUrl:"https://api.you.com"},serviceKinds:["webSearch"],searchConfig:{baseUrl:"https://ydc-index.io/v1/search",method:"GET",authType:"apikey",authHeader:"x-api-key",costPerQuery:.005,freeMonthlyQuota:0,searchTypes:["web","news"],defaultMaxResults:5,maxMaxResults:100,timeoutMs:1e4,cacheTTLMs:3e5}},firecrawl:{id:"firecrawl",alias:"firecrawl",name:"Firecrawl",icon:"local_fire_department",color:"#F59E0B",textIcon:"FC",website:"https://firecrawl.dev",notice:{apiKeyUrl:"https://www.firecrawl.dev/app/api-keys"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://api.firecrawl.dev/v1/scrape",method:"POST",authType:"apikey",authHeader:"bearer",costPerQuery:.002,freeMonthlyQuota:500,formats:["markdown","html","text"],maxCharacters:2e5,timeoutMs:3e4}},"fal-ai":{id:"fal-ai",alias:"fal",name:"Fal.ai",icon:"image",color:"#2563EB",textIcon:"FL",website:"https://fal.ai",notice:{apiKeyUrl:"https://fal.ai/dashboard/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.fal.ai/v1/models?limit=1",method:"GET",authType:"apikey",authHeader:"key"}},"stability-ai":{id:"stability-ai",alias:"stability",name:"Stability AI",icon:"image",color:"#8B5CF6",textIcon:"SA",website:"https://stability.ai",notice:{apiKeyUrl:"https://platform.stability.ai/account/keys"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.stability.ai/v1/user/account",method:"GET",authType:"apikey",authHeader:"bearer"}},"black-forest-labs":{id:"black-forest-labs",alias:"bfl",name:"Black Forest Labs",icon:"image",color:"#111827",textIcon:"BF",website:"https://blackforestlabs.ai",notice:{apiKeyUrl:"https://api.bfl.ai"},serviceKinds:["image"],imageConfig:{baseUrl:"https://api.bfl.ai/v1/get_result?id=ping",method:"GET",authType:"apikey",authHeader:"x-key"}},recraft:{id:"recraft",alias:"recraft",name:"Recraft",icon:"image",color:"#EC4899",textIcon:"RC",website:"https://recraft.ai",notice:{apiKeyUrl:"https://www.recraft.ai/profile/api"},serviceKinds:["image"],imageConfig:{baseUrl:"https://external.api.recraft.ai/v1/users/me",method:"GET",authType:"apikey",authHeader:"bearer"}},topaz:{id:"topaz",alias:"topaz",name:"Topaz",icon:"image",color:"#059669",textIcon:"TP",website:"https://topazlabs.com",notice:{apiKeyUrl:"https://topazlabs.com/account"},serviceKinds:["image"]},runwayml:{id:"runwayml",alias:"runway",name:"Runway ML",icon:"movie",color:"#000000",textIcon:"RW",website:"https://runwayml.com",notice:{apiKeyUrl:"https://dev.runwayml.com"},serviceKinds:["image","video"],imageConfig:{baseUrl:"https://api.dev.runwayml.com/v1/organization",method:"GET",authType:"apikey",authHeader:"bearer",extraHeaders:{"X-Runway-Version":"2024-11-06"}}},"aws-polly":{id:"aws-polly",alias:"polly",name:"AWS Polly",icon:"record_voice_over",color:"#FF9900",textIcon:"PL",website:"https://aws.amazon.com/polly/",notice:{text:"Use AWS Secret Access Key as API key; set providerSpecificData.accessKeyId and optional region.",apiKeyUrl:"https://console.aws.amazon.com/iam/home#/security_credentials"},serviceKinds:["tts"],hasProviderSpecificData:!0,ttsConfig:{baseUrl:"https://polly.{region}.amazonaws.com/v1/speech",authType:"apikey",authHeader:"aws-sigv4",format:"aws-polly",models:[{id:"standard",name:"Standard"},{id:"neural",name:"Neural"},{id:"long-form",name:"Long-form"},{id:"generative",name:"Generative"}]}},"jina-ai":{id:"jina-ai",alias:"jina",name:"Jina AI",icon:"blur_on",color:"#2563EB",textIcon:"JA",website:"https://jina.ai",notice:{text:"10M free tokens on signup (non-commercial), no credit card required.",apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["embedding"],embeddingConfig:{baseUrl:"https://api.jina.ai/v1/embeddings",authType:"apikey",authHeader:"bearer",models:[{id:"jina-embeddings-v3",name:"Jina Embeddings v3",dimensions:1024},{id:"jina-embeddings-v2-base-en",name:"Jina Embeddings v2 Base EN",dimensions:768},{id:"jina-embeddings-v2-base-code",name:"Jina Embeddings v2 Base Code",dimensions:768}]}},"jina-reader":{id:"jina-reader",alias:"jina",name:"Jina Reader",icon:"menu_book",color:"#000000",textIcon:"JR",website:"https://jina.ai/reader",notice:{apiKeyUrl:"https://jina.ai/?sui=apikey"},serviceKinds:["webFetch"],fetchConfig:{baseUrl:"https://r.jina.ai",method:"GET",authType:"apikey",authHeader:"bearer",costPerQuery:0,freeMonthlyQuota:1e6,formats:["markdown","text","html"],maxCharacters:2e5,timeoutMs:3e4}}},d={"grok-web":{id:"grok-web",alias:"gw",name:"Grok Web (Subscription)",icon:"auto_awesome",color:"#1DA1F2",textIcon:"GW",website:"https://grok.com",authType:"cookie",authHint:"Paste your sso= cookie value from grok.com",passthroughModels:!0,serviceKinds:["llm"]},"perplexity-web":{id:"perplexity-web",alias:"pw",name:"Perplexity Web (Pro/Max)",icon:"search",color:"#20808D",textIcon:"PW",website:"https://www.perplexity.ai",authType:"cookie",authHint:"Paste your __Secure-next-auth.session-token cookie value from perplexity.ai",serviceKinds:["llm"]}},m=[{id:"embedding",label:"Embedding",icon:"data_array",endpoint:{method:"POST",path:"/v1/embeddings"}},{id:"image",label:"Text to Image",icon:"brush",endpoint:{method:"POST",path:"/v1/images/generations"}},{id:"imageToText",label:"Image to Text",icon:"image_search",endpoint:{method:"POST",path:"/v1/images/understanding"}},{id:"tts",label:"Text To Speech",icon:"record_voice_over",endpoint:{method:"POST",path:"/v1/audio/speech"}},{id:"stt",label:"Speech To Text",icon:"mic",endpoint:{method:"POST",path:"/v1/audio/transcriptions"}},{id:"webSearch",label:"Web Search",icon:"travel_explore",endpoint:{method:"POST",path:"/v1/search"}},{id:"webFetch",label:"Web Fetch",icon:"language",endpoint:{method:"POST",path:"/v1/web/fetch"}},{id:"video",label:"Video",icon:"movie",endpoint:{method:"POST",path:"/v1/video/generations"}},{id:"music",label:"Music",icon:"music_note",endpoint:{method:"POST",path:"/v1/audio/music"}}],p={embedding:"/dashboard/providers/embedding",image:"/dashboard/providers/image",imageToText:"/dashboard/providers/image-to-text",tts:"/dashboard/providers/tts",stt:"/dashboard/providers/stt",webSearch:"/dashboard/providers/web",webFetch:"/dashboard/providers/web"},h={embedding:"embedding",image:"image","image-to-text":"imageToText",tts:"tts",stt:"stt"},u="openai-compatible-",g="anthropic-compatible-",b=Object.freeze({GENERIC:"generic",LLAMA_CPP:"llamacpp",VLLM:"vllm",OLLAMA:"ollama"}),y=b.LLAMA_CPP,v=[{value:b.GENERIC,label:"Generic OpenAI-compatible",description:"Only standard request fields are forwarded. Thinking/reasoning-specific fields are not injected."},{value:b.LLAMA_CPP,label:"llama.cpp / llama-server",description:"Supports chat_template_kwargs.enable_thinking, reasoning_budget and the top_k/min_p sampling fields."},{value:b.VLLM,label:"vLLM",description:"Supports chat_template_kwargs.enable_thinking, top_k/min_p and maps reasoning budget to thinking_token_budget."},{value:b.OLLAMA,label:"Ollama OpenAI-compatible",description:"Uses standard OpenAI-compatible fields only. Thinking/reasoning fields are not injected."}];function f(e){return"string"==typeof e&&e.startsWith(u)}function x(e){return"string"==typeof e&&e.startsWith(g)}function w(e){return"string"==typeof e&&e.startsWith("custom-embedding-")}function k(e){return"string"==typeof e&&e.startsWith("custom-stt-")}function T(e){return"string"==typeof e&&e.startsWith("custom-tts-")}Object.freeze({generic:b.GENERIC,default:b.GENERIC,openai:b.GENERIC,strict:b.GENERIC,llama:b.LLAMA_CPP,llamacpp:b.LLAMA_CPP,"llama.cpp":b.LLAMA_CPP,"llama-cpp":b.LLAMA_CPP,"llama-server":b.LLAMA_CPP,llamaserver:b.LLAMA_CPP,vllm:b.VLLM,"v-llm":b.VLLM,ollama:b.OLLAMA,"ollama-openai":b.OLLAMA});let C={...o,...s,...c,...l,...d},M={oauth:{id:"oauth",name:"OAuth",icon:"lock"},apikey:{id:"apikey",name:"API Key",icon:"key"},cookie:{id:"cookie",name:"Browser Cookie",icon:"cookie"}};function U(e){for(let i of Object.values(C))if(i.alias===e||i.id===e)return i;return null}function I(e){let i=U(e);return i?.id||e}function K(e){let i=C[e];return i?.alias||e}function A(e){return Object.values(C).filter(i=>!(!(i.serviceKinds??["llm"]).includes(e)||i.hidden||i.hiddenKinds?.includes(e))).sort((e,i)=>(e.mediaPriority??100)-(i.mediaPriority??100))}Object.values(C).reduce((e,i)=>(e[i.alias]=i.id,e),{}),Object.values(C).reduce((e,i)=>(e[i.id]=i.alias,e),{});let P=["claude","antigravity","kiro","github","codex","kimi-coding","ollama","gemini-cli","glm","glm-cn","minimax","minimax-cn"]},90620:(e,i,a)=>{a.d(i,{Q2:()=>t.Q2,fg:()=>t.fg,vQ:()=>o,MA:()=>t.MA,UY:()=>c,Nu:()=>s,zN:()=>t.zN,X3:()=>l,B2:()=>r,h0:()=>n});var t=a(52679);a(28777);let o={name:"AI Router Gateway",description:"AI Infrastructure Management",version:"5.5.38"},s={changelogUrl:"https://raw.githubusercontent.com/decolua/bluerouter/refs/heads/master/CHANGELOG.md",donateUrl:"https://bluerouter.com/api/donate"},n={npmPackageName:"@jheavenknows/bluerouter",installCmd:"npm i -g @jheavenknows/bluerouter",installCmdLatest:"npm install -g @jheavenknows/bluerouter@latest",shutdownCountdownSec:3,exitDelayMs:500,statusPort:20129,statusPollIntervalMs:1e3,statusLogTailLines:8,installRetries:3,installRetryDelayMs:5e3,lingerAfterDoneMs:3e4,waitForExitMinMs:5e3,waitForExitMaxMs:2e4,waitForExitCheckMs:500,appPort:20128},r={storageKey:"theme",defaultTheme:"system"},c={maxLines:200,pollIntervalMs:1e3},l={openrouter:"https://openrouter.ai/api/v1/chat/completions",glm:"https://api.z.ai/api/anthropic/v1/messages","glm-cn":"https://open.bigmodel.cn/api/coding/paas/v4/chat/completions",kimi:"https://api.kimi.com/coding/v1/messages",minimax:"https://api.minimax.io/anthropic/v1/messages","minimax-cn":"https://api.minimaxi.com/anthropic/v1/messages",alicode:"https://coding.dashscope.aliyuncs.com/v1/chat/completions","alicode-intl":"https://coding-intl.dashscope.aliyuncs.com/v1/chat/completions","alims-intl":"https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions","volcengine-ark":"https://ark.cn-beijing.volces.com/api/coding/v3/chat/completions",byteplus:"https://ark.ap-southeast.bytepluses.com/api/coding/v3/chat/completions",openai:"https://api.openai.com/v1/chat/completions","vercel-ai-gateway":"https://ai-gateway.vercel.sh/v1/chat/completions",anthropic:"https://api.anthropic.com/v1/messages",gemini:"https://generativelanguage.googleapis.com/v1beta/models",ollama:"https://ollama.com/api/chat","ollama-local":"http://localhost:11434/api/chat"}}}]);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5236],{23371:(e,t,s)=>{Promise.resolve().then(s.bind(s,77333)),Promise.resolve().then(s.bind(s,35696))},35696:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(12115),n=s(83163);function i({ok:e,children:t}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${e?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"border-border bg-surface text-text-muted"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e?"check_circle":"radio_button_unchecked"}),t]})}function l(){let[e,t]=(0,a.useState)(null),[s,l]=(0,a.useState)(""),[d,o]=(0,a.useState)("access"),c=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/audit-proxy/me",{cache:"no-store"}),s=await e.json().catch(()=>({}));if(!e.ok)throw Error(s.error||"Kh\xf4ng tải được th\xf4ng tin truy cập Audit Proxy của bạn");t(s)}catch(e){l(e.message||"Kh\xf4ng tải được th\xf4ng tin truy cập Audit Proxy của bạn")}},[]);if((0,a.useEffect)(()=>{c();let e=setInterval(c,15e3);return()=>clearInterval(e)},[c]),s&&!e)return(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:s});if(!e)return(0,r.jsx)("div",{className:"rounded-xl border border-border bg-surface p-5 text-sm text-text-muted",children:"Đang tải Proxy Mode…"});let x=e.rootCA||{},m=e.session||null;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"rounded-2xl border border-primary/20 bg-primary/5 p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"policy"}),(0,r.jsx)("h1",{className:"text-lg font-bold text-text-main",children:"Proxy Mode"}),(0,r.jsx)(i,{ok:!0===e.running,children:e.running?"Đang chạy":"Đ\xe3 dừng"}),(0,r.jsx)(i,{ok:!0===x.validated,children:"Root CA"})]}),(0,r.jsx)("p",{className:"mt-2 max-w-4xl text-sm leading-6 text-text-muted",children:"T\xe0i khoản của bạn được ph\xe9p d\xf9ng Proxy Mode cho Claude Code, Codex v\xe0 Kiro. Xem quyền truy cập ở tab Truy cập, v\xe0 c\xe1ch cấu h\xecnh m\xe1y trạm ở tab Hướng dẫn."})]}),s?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:s}):null,(0,r.jsx)("div",{className:"flex w-fit items-center gap-1 rounded-xl border border-border bg-surface p-1",role:"tablist",children:[{id:"access",label:"Truy cập"},{id:"guide",label:"Hướng dẫn"}].map(e=>(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":d===e.id,onClick:()=>o(e.id),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${d===e.id?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:e.label},e.id))}),(0,r.jsx)("div",{className:"guide"===d?"space-y-4":"hidden",children:(0,r.jsx)(n.Ay,{clientProxyHost:e.endpoint?.clientProxyHost,port:e.endpoint?.port,onError:l})}),(0,r.jsx)("div",{className:"access"===d?"space-y-4":"hidden",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Quyền truy cập của bạn"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Bạn kh\xf4ng cần khai b\xe1o IP. Ngay khi đăng nhập dashboard th\xe0nh c\xf4ng, địa chỉ bạn vừa đăng nhập được tin cậy để d\xf9ng proxy — từ địa chỉ kh\xe1c, kết nối sẽ bị đ\xf3ng. Phi\xean tự gia hạn khi c\xf2n hoạt động; ngừng d\xf9ng một thời gian sẽ hết hạn v\xe0 bạn chỉ cần đăng nhập lại."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"T\xe0i khoản"}),(0,r.jsx)("span",{className:"break-all font-mono text-text-main",children:e.grant?.userId||e.userId||"-"})]}),e.grant?.note?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Ghi ch\xfa"}),(0,r.jsx)("span",{className:"break-all text-text-main",children:e.grant.note})]}):null]}),(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Phi\xean hiện tại"}),m?(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[(0,r.jsx)("span",{className:"rounded-full border border-green-500/30 bg-green-500/5 px-2.5 py-1 font-mono text-[11px] text-green-600 dark:text-green-400",children:m.ip}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:["c\xf2n hiệu lực tới ",new Date(m.expiresAt).toLocaleString()]})]}):(0,r.jsx)("p",{className:"mt-1.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] leading-5 text-amber-700 dark:text-amber-300",children:e.isAdmin?"T\xe0i khoản admin của bạn kh\xf4ng c\xf3 grant ri\xeang — grant chỉ d\xf9ng cho user thường.":`Địa chỉ hiện tại (${e.clientIp||"kh\xf4ng x\xe1c định"}) chưa c\xf3 phi\xean hoạt động. Tải lại trang n\xe0y (hoặc đăng nhập lại dashboard) từ đ\xfang m\xe1y trạm bạn định chạy CLI để k\xedch hoạt.`})]})]}),(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Root CA"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Tải certificate v\xe0 lưu v\xe0o đ\xfang đường dẫn ghi ở tab Hướng dẫn. Đ\xe2y l\xe0 certificate c\xf4ng khai, kh\xf4ng chứa private key."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Trạng th\xe1i"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:x.validated?"Đ\xe3 x\xe1c thực":x.certExists?"Cần kiểm tra lại":"Chưa tạo"})]}),x.subject?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Subject"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:x.subject})]}):null,x.fingerprint?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Fingerprint public key"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:x.fingerprint})]}):null,x.notAfter?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Hết hạn"}),(0,r.jsx)("span",{className:"text-text-main",children:new Date(x.notAfter).toLocaleString()})]}):null]}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)("a",{href:"/api/audit-proxy/ca?download=cert",className:`inline-flex rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary ${x.certExists?"":"pointer-events-none opacity-50"}`,children:"Tải Root CA"})})]})]})})]})}},77333:(e,t,s)=>{"use strict";s.d(t,{default:()=>B});var r=s(95155),a=s(12115),n=s(35497);async function i(e){return e?await e.text():""}function l({serverRunning:e,onChanged:t}){let[s,d]=(0,a.useState)(null),[o,c]=(0,a.useState)(!1),[x,m]=(0,a.useState)(""),[h,u]=(0,a.useState)(""),[p,b]=(0,a.useState)(null),[g,y]=(0,a.useState)(null),[j,f]=(0,a.useState)(null),[N,v]=(0,a.useState)("Blue Router Gateway Root CA"),[C,k]=(0,a.useState)("Blue Router Gateway"),[w,S]=(0,a.useState)("VN"),A=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/audit-proxy/root-ca");if(e.ok){let t=await e.json();d(t.rootCA||null)}}catch{}},[]);(0,a.useEffect)(()=>{A()},[A]);let T=async(e,s)=>{c(!0),m(""),u("");try{let r=await fetch("/api/audit-proxy/root-ca",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.error||"Root CA operation failed");u(s),d(a.rootCA||null),t?.(a.rootCA||null),await A()}catch(e){m(e.message||"Root CA operation failed")}finally{c(!1)}},P=async()=>{if(!p||!g)return void m("Choose both certificate and private key files");let e=await i(p),t=await i(g);await T({action:"upload-pair",certPem:e,keyPem:t},"Root CA certificate + private key imported. Restart the Audit Proxy to use it.")},E=async()=>{await T({action:"generate-csr",commonName:N,organizationName:C,countryName:w},"CSR generated. Download it, sign it on your CA server, then upload the signed CA certificate.")},R=async()=>{if(!j)return void m("Choose signed CA certificate file");let e=await i(j);await T({action:"upload-signed-cert",certPem:e},"Signed Root CA certificate imported. Restart the Audit Proxy to use it.")},$=async e=>{c(!0),m("");try{var t;let s=await fetch(`/api/audit-proxy/root-ca?download=${e}`);if(!s.ok){let t=await s.json().catch(()=>({}));throw Error(t.error||`Failed to download ${e}`)}await (t="csr"===e?"bluerouter-root-ca.csr":"bluerouter-root-ca.crt",s.blob().then(e=>{let r=(s.headers.get("Content-Disposition")||"").match(/filename=\"?([^\";]+)\"?/i),a=r?.[1]||t,n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=a,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(n)}))}catch(t){m(t.message||`Failed to download ${e}`)}finally{c(!1)}},I=s?.certExists&&s?.keyExists,O=s?.csrExists&&s?.pendingKeyExists;return(0,r.jsx)(n.Zp,{padding:"sm",className:"border-border/60 bg-surface/60",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"workspace_premium"}),(0,r.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"Audit Root CA"}),I?(0,r.jsx)(n.Ex,{variant:"success",size:"sm",children:"Ready"}):(0,r.jsx)(n.Ex,{variant:"default",size:"sm",children:"Missing"}),O&&(0,r.jsx)(n.Ex,{variant:"warning",size:"sm",children:"CSR Pending"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(n.$n,{variant:"ghost",size:"sm",onClick:()=>$("cert"),disabled:o||!s?.certExists,children:"Download Cert"}),(0,r.jsx)(n.$n,{variant:"ghost",size:"sm",onClick:()=>$("csr"),disabled:o||!s?.csrExists,children:"Download CSR"})]})]}),(0,r.jsx)("div",{className:"rounded-lg border border-border/50 bg-background/40 p-3 text-xs text-text-muted",children:(0,r.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_1fr]",children:[(0,r.jsx)("span",{className:"font-medium text-text-main",children:"Subject"}),(0,r.jsx)("span",{className:"font-mono break-all","data-i18n-skip":"true",children:s?.subject||"-"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:"Issuer"}),(0,r.jsx)("span",{className:"font-mono break-all","data-i18n-skip":"true",children:s?.issuer||"-"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:"Valid until"}),(0,r.jsx)("span",{"data-i18n-skip":"true",children:s?.notAfter?new Date(s.notAfter).toLocaleString():"-"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:"Type"}),(0,r.jsx)("span",{children:s?.isSelfSigned===!1?"Externally signed CA / intermediate":"Self-signed or generated CA"})]})}),e&&(0,r.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-xs text-yellow-700 dark:text-yellow-300",children:"Restart the Audit Proxy after replacing the Root CA. Existing TLS cache/connections keep using the old CA until restart."}),(0,r.jsxs)("div",{className:"grid gap-4 lg:grid-cols-2",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 bg-surface/40 p-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm font-medium text-text-main",children:"1. Upload cert + private key"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Use this when you already have a CA certificate and matching private key."})]}),(0,r.jsx)("label",{className:"text-xs font-medium text-text-main",children:"CA certificate (.crt/.pem)"}),(0,r.jsx)("input",{type:"file",accept:".crt,.pem,.cer",onChange:e=>b(e.target.files?.[0]||null),className:"text-xs text-text-muted"}),(0,r.jsx)("label",{className:"text-xs font-medium text-text-main",children:"Private key (.key/.pem)"}),(0,r.jsx)("input",{type:"file",accept:".key,.pem",onChange:e=>y(e.target.files?.[0]||null),className:"text-xs text-text-muted"}),(0,r.jsx)(n.$n,{variant:"primary",size:"sm",onClick:P,loading:o,disabled:o,children:"Upload Cert + Key"})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 bg-surface/40 p-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-sm font-medium text-text-main",children:"2. Generate CSR, sign externally"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Generate CSR here, sign it on your CA server with CA:true/keyCertSign, then upload the signed certificate."})]}),(0,r.jsx)(n.pd,{value:N,onChange:e=>v(e.target.value),placeholder:"Common Name"}),(0,r.jsx)(n.pd,{value:C,onChange:e=>k(e.target.value),placeholder:"Organization"}),(0,r.jsx)(n.pd,{value:w,onChange:e=>S(e.target.value),placeholder:"Country, e.g. VN",maxLength:2}),(0,r.jsx)(n.$n,{variant:"ghost",size:"sm",onClick:E,loading:o,disabled:o,children:"Generate CSR"}),(0,r.jsx)("label",{className:"text-xs font-medium text-text-main",children:"Signed CA certificate from CA server"}),(0,r.jsx)("input",{type:"file",accept:".crt,.pem,.cer",onChange:e=>f(e.target.files?.[0]||null),className:"text-xs text-text-muted"}),(0,r.jsx)(n.$n,{variant:"primary",size:"sm",onClick:R,loading:o,disabled:o||!O,children:"Upload Signed Cert"})]})]}),h&&(0,r.jsx)("div",{className:"rounded border border-green-500/20 bg-green-500/10 px-3 py-2 text-xs text-green-600 dark:text-green-400",children:h}),x&&(0,r.jsx)("div",{className:"rounded border border-red-500/20 bg-red-500/10 px-3 py-2 text-xs text-red-600 dark:text-red-400",children:x})]})})}function d(){let[e,t]=(0,a.useState)(!1),[s,n]=(0,a.useState)(!1),[i,l]=(0,a.useState)([]),[d,o]=(0,a.useState)(!1),[c,x]=(0,a.useState)(""),[m,h]=(0,a.useState)(""),u=(e,s)=>{n(e?.proxyAuthEnabled===!0),l((e?.proxyAuthUsers||[]).map(e=>({username:e.username,hasPassword:!0===e.hasPassword,password:""}))),s&&t(!0===s.running)},p=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/audit-proxy?limit=1",{cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t.error||"Cannot load proxy authentication");u(t.config,t.status)}catch(e){x(e.message||"Cannot load proxy authentication")}},[]);(0,a.useEffect)(()=>{p()},[p]);let b=(e,t)=>{l(s=>s.map((s,r)=>r===e?{...s,...t}:s))},g=async()=>{let e=i.map(e=>({...e,username:e.username.trim()}));if(s&&0===e.length)return void x("Add at least one account before enabling proxy authentication.");let t=e.find(e=>!e.hasPassword&&!e.password);if(t)return void x(`Set a password for ${t.username||"the new account"}.`);o(!0),x(""),h("");try{let t=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save-proxy-auth",enabled:s,users:e.map(e=>e.password?{username:e.username,password:e.password}:{username:e.username})})}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||"Failed to save proxy authentication");h(r.restarted?"Proxy authentication saved and Audit Proxy restarted.":"Proxy authentication saved."),u(r.config,r.status)}catch(e){x(e.message||"Failed to save proxy authentication")}finally{o(!1)}};return(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"max-w-3xl",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Proxy authentication"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Requires a username and password on every CONNECT, and records which account opened each tunnel, so the audit table answers who rather than only which IP. Give each person or CI job its own account: removing one leaves the others working."}),(0,r.jsx)("p",{className:"mt-2 rounded-lg border border-amber-500/30 bg-amber-500/5 p-2 text-[11px] leading-5 text-amber-700 dark:text-amber-300",children:"The proxy listener speaks plain HTTP, so the credential crosses the client-to-proxy hop unencrypted (Basic is base64, not encryption). This keeps out anyone without the password and attributes traffic to a person; it does not hide the password from someone capturing packets on that network. On an untrusted network use it alongside the client IP allowlist, not instead of it. The password also ends up in HTTPS_PROXY, and so in the process list and shell history."})]}),(0,r.jsxs)("label",{className:"flex shrink-0 items-center gap-2 text-sm text-text-main",children:[(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:e=>n(e.target.checked),disabled:d,className:"h-4 w-4 accent-[var(--color-primary)]"}),"Require credentials"]})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-2",children:[0===i.length?(0,r.jsx)("p",{className:"rounded-xl border border-border bg-background/50 p-3 text-xs text-text-muted",children:"No accounts yet."}):null,i.map((e,t)=>(0,r.jsxs)("div",{className:"grid gap-2 rounded-xl border border-border bg-background/50 p-3 sm:grid-cols-[1fr_1fr_auto]",children:[(0,r.jsx)("input",{type:"text",value:e.username,onChange:e=>b(t,{username:e.target.value}),disabled:d,placeholder:"username",className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("input",{type:"password",value:e.password,onChange:e=>b(t,{password:e.target.value}),disabled:d,placeholder:e.hasPassword?"Saved — leave blank to keep":"Set a password",className:"min-w-0 rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("button",{type:"button",onClick:()=>{let e;(!(e=i[t]).hasPassword||window.confirm(`Remove ${e.username}? Anything using this account stops working after the restart.`))&&l(e=>e.filter((e,s)=>s!==t))},disabled:d,className:"rounded-lg border border-border px-3 py-2 text-xs text-text-muted transition hover:border-red-500/40 hover:text-red-600 disabled:opacity-50",children:"Remove"})]},t))]}),(0,r.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>l(e=>[...e,{username:"",hasPassword:!1,password:""}]),disabled:d,className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-muted transition hover:border-primary hover:text-primary disabled:opacity-50",children:"Add account"}),(0,r.jsx)("button",{type:"button",onClick:g,disabled:d,className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-white transition hover:opacity-90 disabled:opacity-50",children:d?"Saving…":e?"Save & Restart Proxy":"Save"}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Clients pass credentials in the proxy URL: ",(0,r.jsx)("code",{className:"font-mono",children:"http://USER:PASSWORD@host:port"})," ","— URL-encode ",(0,r.jsx)("code",{className:"font-mono",children:"@ : / #"})," if the password contains them."]})]}),c?(0,r.jsx)("p",{className:"mt-3 rounded-lg border border-red-500/30 bg-red-500/5 p-2 text-xs text-red-600 dark:text-red-400",children:c}):null,m?(0,r.jsx)("p",{className:"mt-3 rounded-lg border border-green-500/30 bg-green-500/5 p-2 text-xs text-green-600 dark:text-green-400",children:m}):null]})}function o(e){let t=Math.round(Number(e||0)/6e4);if(t<60)return`${t} min`;let s=t/60;return Number.isInteger(s)?`${s}h`:`${s.toFixed(1)}h`}let c={granted:"already granted",ldap:"directory","api-key-owner":"API key owner","oauth-grant":"OAuth access",local:"local login"};function x({data:e,onChanged:t}){let[s,n]=(0,a.useState)(null),[i,l]=(0,a.useState)([]),[d,m]=(0,a.useState)(0),[h,u]=(0,a.useState)(!1),[p,b]=(0,a.useState)(!1),[g,y]=(0,a.useState)(""),[j,f]=(0,a.useState)(""),[N,v]=(0,a.useState)([]),[C,k]=(0,a.useState)(!1),[w,S]=(0,a.useState)(!1),[A,T]=(0,a.useState)(""),[P,E]=(0,a.useState)(""),[R,$]=(0,a.useState)(""),[I,O]=(0,a.useState)(""),L=(0,a.useCallback)(e=>{n(Array.isArray(e?.config?.accessGrants)?e.config.accessGrants:[]),l(Array.isArray(e?.status?.activeSessions)?e.status.activeSessions:[]),m(Number(e?.status?.security?.sessionIdleTimeoutMs||0)),u(e?.status?.running===!0),b(e?.status?.standby===!0)},[]);(0,a.useEffect)(()=>{e&&L(e)},[e,L]),(0,a.useEffect)(()=>{if(!C)return;let e=!1,t=setTimeout(async()=>{S(!0);try{let t=await fetch(`/api/audit-proxy/users?q=${encodeURIComponent(g.trim())}`,{cache:"no-store"}),s=await t.json().catch(()=>({}));!e&&t.ok&&v(Array.isArray(s.users)?s.users:[])}catch{e||v([])}finally{e||S(!1)}},250);return()=>{e=!0,clearTimeout(t)}},[g,C]);let _=async(e,s,r)=>{T(e),E(""),$("");try{let a=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...s})}),n=await a.json().catch(()=>({}));if(!a.ok)throw Error(n.error||"Failed to save Audit Proxy access grant");L(n);let i=Number(n.droppedConnections||0);return $(`${r}${i?` ${i} open connection(s) were closed.`:""}`),t?.(),!0}catch(e){return E(e.message||"Failed to save Audit Proxy access grant"),!1}finally{T("")}},K=async()=>{let e=String(g||"").trim().toLowerCase();e?await _("save-access-grant",{userId:e,note:j},`${e} may now use the proxy.`)&&(y(""),f("")):E("Enter the dashboard username or email to grant access to.")},B=async e=>{await _("delete-access-grant",{userId:e},`Access for ${e} revoked.`)&&O("")},H=async e=>{await _("revoke-session",{ip:e},`Session from ${e} ended.`)};return s?(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"group"}),(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Access grants — who may use this proxy"}),(0,r.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${i.length>0?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-surface text-text-muted"}`,children:`${i.length} ACTIVE SESSION${1===i.length?"":"S"}`})]}),(0,r.jsxs)("p",{className:"mt-1 max-w-4xl text-xs leading-5 text-text-muted",children:["A grant only decides ",(0,r.jsx)("strong",{children:"who may use the proxy"}),", not from where. A granted user is let through as soon as they log into this dashboard — the address they logged in from is trusted for the traffic they send until ",o(d)," of inactivity, then they simply log in again. No IP is ever typed by hand. Each granted user also gets a read-only ",(0,r.jsx)("span",{className:"font-mono",children:"/dashboard/audit-proxy"})," page with the root CA download and launcher commands — no configuration and no audited traffic."]})]})}),P?(0,r.jsx)("div",{className:"mt-3 rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-600 dark:text-red-400",children:P}):null,R?(0,r.jsx)("div",{className:"mt-3 rounded-lg border border-green-500/30 bg-green-500/10 px-3 py-2 text-xs text-green-600 dark:text-green-400",children:R}):null,(0,r.jsxs)("div",{className:"mt-4 grid gap-4 lg:grid-cols-[1fr_320px]",children:[(0,r.jsxs)("div",{className:"grid gap-3",children:[(0,r.jsxs)("div",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Dashboard username / email"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{value:g,onChange:e=>{y(e.target.value),k(!0)},onFocus:()=>k(!0),onBlur:()=>setTimeout(()=>k(!1),150),autoComplete:"off",placeholder:"anh-tct or anh-tct@fujinet.net",className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),C&&(w||N.length>0)?(0,r.jsxs)("div",{className:"absolute z-20 mt-1 max-h-64 w-full overflow-y-auto rounded-lg border border-border bg-surface shadow-lg",children:[w&&0===N.length?(0,r.jsx)("div",{className:"px-3 py-2 text-xs text-text-muted",children:"Searching…"}):null,N.map(e=>{let t=s.some(t=>t.userId===e.id);return(0,r.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>{y(e.id),k(!1)},className:"flex w-full items-center justify-between gap-2 px-3 py-2 text-left hover:bg-background",children:[(0,r.jsxs)("span",{className:"min-w-0",children:[(0,r.jsx)("span",{className:"block truncate font-mono text-xs text-text-main",children:e.id}),e.displayName||e.email?(0,r.jsx)("span",{className:"block truncate text-[11px] text-text-muted",children:[e.displayName,e.email].filter(Boolean).join(" \xb7 ")}):null]}),(0,r.jsxs)("span",{className:"flex shrink-0 items-center gap-1",children:[t?(0,r.jsx)("span",{className:"rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-semibold text-green-600 dark:text-green-400",children:"granted"}):null,(0,r.jsx)("span",{className:"rounded-full border border-border px-2 py-0.5 text-[10px] text-text-muted",children:c[e.source]||e.source})]})]},`${e.source}:${e.id}`)})]}):null]}),(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:"The identity the user logs into this dashboard with (LDAP/OIDC/local). Either the username or the email form is matched. Suggestions come from the directory and from accounts this install already knows; a name that is not listed can still be typed."})]}),(0,r.jsxs)("label",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Note (optional)"}),(0,r.jsx)("input",{value:j,onChange:e=>f(e.target.value),placeholder:"Laptop + VDI",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]})]}),(0,r.jsxs)("div",{className:"grid content-start gap-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-primary/20 bg-primary/5 p-3 text-xs leading-5 text-text-muted",children:[(0,r.jsx)("div",{className:"font-semibold text-primary",children:"What a grant changes"}),(0,r.jsx)("div",{className:"mt-1",children:"Granted user logs into this dashboard → their address works with the proxy."}),(0,r.jsxs)("div",{children:["Idle past ",o(d)," → the address is dropped, they log in again."]}),(0,r.jsx)("div",{children:"Revoked grant → any session already running under it ends immediately."}),(0,r.jsx)("div",{className:"mt-1 text-[11px]",children:"Applied without restarting the listener."})]}),(0,r.jsx)("button",{type:"button",onClick:K,disabled:!!A||p,className:"rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"save-access-grant"===A?"Saving…":"Save grant"})]})]}),(0,r.jsxs)("div",{className:"mt-4 border-t border-border pt-4",children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Granted users"}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:[s.length," user",1===s.length?"":"s"]})]}),0===s.length?(0,r.jsx)("div",{className:"rounded-xl border border-dashed border-border p-6 text-center text-xs text-text-muted",children:"No one is granted yet. The proxy denies every connection until someone is."}):(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,r.jsxs)("table",{className:"min-w-full divide-y divide-border text-xs",children:[(0,r.jsx)("thead",{className:"bg-surface/80 text-left uppercase tracking-wide text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"User"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Note"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right font-medium",children:"Actions"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border bg-background",children:s.map(e=>(0,r.jsxs)("tr",{className:"align-top",children:[(0,r.jsx)("td",{className:"px-3 py-3 font-mono text-text-main",children:e.userId}),(0,r.jsx)("td",{className:"px-3 py-3 text-text-muted",children:e.note||"-"}),(0,r.jsx)("td",{className:"px-3 py-3",children:(0,r.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{y(e.userId),f(e.note||"")},disabled:p,className:"rounded-lg border border-border px-2.5 py-1 font-semibold text-text-main hover:bg-surface",children:"Edit"}),I===e.userId?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>B(e.userId),disabled:!!A||p,className:"rounded-lg border border-red-500/30 bg-red-500/10 px-2.5 py-1 font-semibold text-red-600 disabled:opacity-50",children:"Confirm revoke"}),(0,r.jsx)("button",{type:"button",onClick:()=>O(""),className:"rounded-lg border border-border px-2.5 py-1 text-text-muted",children:"Cancel"})]}):(0,r.jsx)("button",{type:"button",onClick:()=>O(e.userId),disabled:p,className:"rounded-lg border border-red-500/30 px-2.5 py-1 font-semibold text-red-600 hover:bg-red-500/10",children:"Revoke"})]})})]},e.userId))})]})})]}),(0,r.jsxs)("div",{className:"mt-4 border-t border-border pt-4",children:[(0,r.jsxs)("div",{className:"mb-3 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Active sessions"}),(0,r.jsxs)("span",{className:"text-[11px] text-text-muted",children:[i.length," address",1===i.length?"":"es"," currently trusted"]})]}),0===i.length?(0,r.jsx)("div",{className:"rounded-xl border border-dashed border-border p-6 text-center text-xs text-text-muted",children:"Nobody is logged in and trusted right now. A granted user opening the dashboard creates one."}):(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,r.jsxs)("table",{className:"min-w-full divide-y divide-border text-xs",children:[(0,r.jsx)("thead",{className:"bg-surface/80 text-left uppercase tracking-wide text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"User"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Address"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires in"}),(0,r.jsx)("th",{className:"px-3 py-2 text-right font-medium",children:"Actions"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border bg-background",children:i.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"px-3 py-3 font-mono text-text-main",children:e.userId}),(0,r.jsx)("td",{className:"px-3 py-3 font-mono text-text-muted",children:e.ip}),(0,r.jsx)("td",{className:"px-3 py-3 text-text-muted",children:function(e){let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t)||t<=0)return"expiring…";let s=Math.ceil(t/6e4);if(s<60)return`${s}m`;let r=Math.floor(s/60),a=s%60;return a?`${r}h ${a}m`:`${r}h`}(e.expiresAt)}),(0,r.jsx)("td",{className:"px-3 py-3",children:(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)("button",{type:"button",onClick:()=>H(e.ip),disabled:!!A||p,className:"rounded-lg border border-red-500/30 px-2.5 py-1 font-semibold text-red-600 hover:bg-red-500/10 disabled:opacity-50",children:"End session"})})})]},e.ip))})]})})]})]}):null}var m=s(83163),h=s(14051),u=s.n(h);let p=[{value:"accept",label:"ACCEPT"},{value:"deny",label:"DENY"}],b=[{value:"allow",label:"Allow any file type"},{value:"allowlist",label:"Only these file types"},{value:"deny",label:"Block all attachments"}],g=["image/*","application/pdf","text/*","application/json"];function y(e){let t=Number(e||0);return t>0?String(Math.round(t/1048576*100)/100):""}function j(e){let t=Number(String(e||"").trim());return Number.isFinite(t)&&t>0?Math.round(1024*t*1024):0}function f(e){return String(e||"").split(/[\n,]/).map(e=>e.trim()).filter(Boolean)}function N(e){return(e||[]).join("\n")}function v(e,t){let s=t.length+1,r=`${e}-${s}`,a=new Set(t.map(e=>e.id));for(;a.has(r);)s+=1,r=`${e}-${s}`;return r}function C({label:e,hint:t,children:s,className:a=""}){return(0,r.jsxs)("label",{className:`grid gap-1 ${a}`,children:[(0,r.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),s,t?(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:t}):null]})}C.propTypes={label:u().string,hint:u().string,children:u().node,className:u().string};let k="w-full rounded-lg border border-border bg-background px-2 py-1.5 text-sm text-text-main";function w({form:e,update:t,disabled:s}){let n=(0,a.useMemo)(()=>e?.dlpProfiles||[],[e?.dlpProfiles]),i=(0,a.useMemo)(()=>e?.dlpRules||[],[e?.dlpRules]),l=e?.dlpEnabled===!0,d=(e,s)=>{t("dlpProfiles",n.map((t,r)=>r===e?{...t,...s}:t))},o=(e,t)=>{let s=n[e]?.attachments||{};d(e,{attachments:{...s,...t}})},c=(e,s)=>{t("dlpRules",i.map((t,r)=>r===e?{...t,...s}:t))},x=(e,s)=>{let r=e+s;if(r<0||r>=i.length)return;let a=[...i];[a[e],a[r]]=[a[r],a[e]],t("dlpRules",a)};return(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Content control"}),(0,r.jsx)("p",{className:"mt-1 max-w-2xl text-xs leading-5 text-text-muted",children:"Rules are matched top to bottom and the first match decides the request, like a firewall policy. A rule that accepts can attach an inspection profile; requests it covers are held until the profile has passed them, so nothing reaches the provider before it is checked."})]}),(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,r.jsx)("input",{type:"checkbox",checked:l,onChange:e=>t("dlpEnabled",e.target.checked),disabled:s,className:"h-4 w-4 accent-[var(--color-primary)]"}),(0,r.jsx)("span",{className:"font-semibold text-text-main",children:"Enabled"})]})]}),l&&!i.length?(0,r.jsx)("p",{className:"mt-3 rounded-xl border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-400",children:"No rules yet — every request falls through to the default action below."}):null,(0,r.jsxs)("div",{className:"mt-4 grid gap-3 sm:grid-cols-3",children:[(0,r.jsx)(C,{label:"Default action",hint:"Applied when no rule matches.",children:(0,r.jsx)("select",{value:e?.dlpDefaultAction||"accept",onChange:e=>t("dlpDefaultAction",e.target.value),disabled:s,className:k,children:p.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,r.jsx)(C,{label:"Inspection limit (MB)",hint:"Largest request body held in memory for inspection.",children:(0,r.jsx)("input",{type:"number",min:"0.06",step:"0.5",value:y(e?.dlpMaxInspectBytes),onChange:e=>t("dlpMaxInspectBytes",j(e.target.value)),disabled:s,className:k})}),(0,r.jsx)(C,{label:"Body too large to inspect",hint:"Allowing these would make an oversized request the way around every rule.",children:(0,r.jsxs)("select",{value:e?.dlpOversizeAction||"block",onChange:e=>t("dlpOversizeAction",e.target.value),disabled:s,className:k,children:[(0,r.jsx)("option",{value:"block",children:"Block it"}),(0,r.jsx)("option",{value:"allow",children:"Let it through uninspected"})]})})]}),(0,r.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Policy table"}),(0,r.jsx)("button",{type:"button",onClick:()=>{t("dlpRules",[...i,{id:v("rule",i),name:"New rule",enabled:!0,sourceGroups:[],destHosts:[],clientTools:[],methods:[],action:"accept",profileId:"",log:!0}])},disabled:s,className:"rounded-lg border border-border px-3 py-1.5 text-xs font-semibold hover:bg-background disabled:opacity-50",children:"Add rule"})]}),(0,r.jsxs)("div",{className:"mt-2 space-y-2",children:[i.map((e,a)=>(0,r.jsxs)("div",{className:`rounded-xl border p-3 ${!1===e.enabled?"border-border bg-background/40 opacity-60":"border-border bg-background/60"}`,children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"w-6 text-center text-xs font-semibold text-text-muted",children:a+1}),(0,r.jsx)("input",{value:e.name||"",onChange:e=>c(a,{name:e.target.value}),disabled:s,placeholder:"Rule name",className:"min-w-[10rem] flex-1 rounded-lg border border-border bg-surface px-2 py-1.5 text-sm font-medium text-text-main"}),(0,r.jsx)("select",{value:e.action||"accept",onChange:t=>c(a,{action:t.target.value,profileId:"deny"===t.target.value?"":e.profileId}),disabled:s,className:`rounded-lg border px-2 py-1.5 text-xs font-bold ${"deny"===e.action?"border-red-500/40 bg-red-500/10 text-red-600 dark:text-red-400":"border-green-500/40 bg-green-500/10 text-green-700 dark:text-green-400"}`,children:p.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[(0,r.jsx)("input",{type:"checkbox",checked:!1!==e.enabled,onChange:e=>c(a,{enabled:e.target.checked}),disabled:s,className:"h-3.5 w-3.5 accent-[var(--color-primary)]"}),"On"]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>x(a,-1),disabled:s||0===a,className:"rounded-md border border-border px-1.5 py-1 text-xs disabled:opacity-30",title:"Move up",children:"↑"}),(0,r.jsx)("button",{type:"button",onClick:()=>x(a,1),disabled:s||a===i.length-1,className:"rounded-md border border-border px-1.5 py-1 text-xs disabled:opacity-30",title:"Move down",children:"↓"}),(0,r.jsx)("button",{type:"button",onClick:()=>t("dlpRules",i.filter((e,t)=>t!==a)),disabled:s,className:"rounded-md border border-border px-2 py-1 text-xs text-red-600 hover:bg-red-500/10 disabled:opacity-30 dark:text-red-400",children:"Delete"})]})]}),(0,r.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-4",children:[(0,r.jsx)(C,{label:"Source groups",hint:"LDAP group DNs, one per line. Empty = any user.",children:(0,r.jsx)("textarea",{rows:2,value:N(e.sourceGroups),onChange:e=>c(a,{sourceGroups:f(e.target.value)}),disabled:s,placeholder:"CN=Developers,OU=Groups,DC=corp,DC=local",className:`${k} font-mono text-[11px]`})}),(0,r.jsx)(C,{label:"Destination hosts",hint:"Wildcards allowed. Empty = any host.",children:(0,r.jsx)("textarea",{rows:2,value:N(e.destHosts),onChange:e=>c(a,{destHosts:f(e.target.value)}),disabled:s,placeholder:"*.anthropic.com",className:`${k} font-mono text-[11px]`})}),(0,r.jsx)(C,{label:"Client tools",hint:"Empty = any tool.",children:(0,r.jsx)("textarea",{rows:2,value:N(e.clientTools),onChange:e=>c(a,{clientTools:f(e.target.value)}),disabled:s,placeholder:"claude-code",className:`${k} font-mono text-[11px]`})}),(0,r.jsx)(C,{label:"Inspection profile",hint:"deny"===e.action?"Not used — the rule denies outright.":"No profile means accepted without inspection.",children:(0,r.jsxs)("select",{value:e.profileId||"",onChange:e=>c(a,{profileId:e.target.value}),disabled:s||"deny"===e.action,className:k,children:[(0,r.jsx)("option",{value:"",children:"None (no inspection)"}),n.map(e=>(0,r.jsx)("option",{value:e.id,children:e.label||e.id},e.id))]})})]})]},e.id||a)),i.length?null:(0,r.jsx)("p",{className:"rounded-xl border border-dashed border-border px-3 py-6 text-center text-xs text-text-muted",children:"No rules. Every request uses the default action."})]}),(0,r.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Inspection profiles"}),(0,r.jsx)("button",{type:"button",onClick:()=>{t("dlpProfiles",[...n,{id:v("profile",n),label:"New profile",attachments:{mode:"allow",allowedMediaTypes:[],maxBytesEach:0,maxBytesTotal:0,maxCount:0},text:{blockLikelySecrets:!1,patterns:[]}}])},disabled:s,className:"rounded-lg border border-border px-3 py-1.5 text-xs font-semibold hover:bg-background disabled:opacity-50",children:"Add profile"})]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"What counts as a violation. One profile can be attached to several rules."}),(0,r.jsxs)("div",{className:"mt-2 space-y-2",children:[n.map((e,a)=>{let l=e.attachments||{},c=e.text||{};return(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background/60 p-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("input",{value:e.label||"",onChange:e=>d(a,{label:e.target.value}),disabled:s,placeholder:"Profile name",className:"min-w-[10rem] flex-1 rounded-lg border border-border bg-surface px-2 py-1.5 text-sm font-medium text-text-main"}),(0,r.jsx)("code",{className:"rounded bg-surface px-2 py-1 font-mono text-[11px] text-text-muted",children:e.id}),(0,r.jsx)("button",{type:"button",onClick:()=>{var e;let s;return s=n[e=a],void(t("dlpProfiles",n.filter((t,s)=>s!==e)),s&&t("dlpRules",i.map(e=>e.profileId===s.id?{...e,profileId:""}:e)))},disabled:s,className:"rounded-md border border-border px-2 py-1 text-xs text-red-600 hover:bg-red-500/10 disabled:opacity-30 dark:text-red-400",children:"Delete"})]}),(0,r.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-4",children:[(0,r.jsx)(C,{label:"Attachments",children:(0,r.jsx)("select",{value:l.mode||"allow",onChange:e=>o(a,{mode:e.target.value}),disabled:s,className:k,children:b.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})}),(0,r.jsx)(C,{label:"Max per file (MB)",hint:"0 = no limit",children:(0,r.jsx)("input",{type:"number",min:"0",step:"0.5",value:y(l.maxBytesEach),onChange:e=>o(a,{maxBytesEach:j(e.target.value)}),disabled:s,className:k})}),(0,r.jsx)(C,{label:"Max total (MB)",hint:"0 = no limit",children:(0,r.jsx)("input",{type:"number",min:"0",step:"0.5",value:y(l.maxBytesTotal),onChange:e=>o(a,{maxBytesTotal:j(e.target.value)}),disabled:s,className:k})}),(0,r.jsx)(C,{label:"Max count",hint:"0 = no limit",children:(0,r.jsx)("input",{type:"number",min:"0",step:"1",value:l.maxCount||"",onChange:e=>o(a,{maxCount:Number(e.target.value)||0}),disabled:s,className:k})})]}),"allowlist"===l.mode?(0,r.jsxs)("div",{className:"mt-3",children:[(0,r.jsx)(C,{label:"Allowed file types",hint:"One per line. image/* matches every image type.",children:(0,r.jsx)("textarea",{rows:2,value:N(l.allowedMediaTypes),onChange:e=>o(a,{allowedMediaTypes:f(e.target.value)}),disabled:s,className:`${k} font-mono text-[11px]`})}),(0,r.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:g.map(e=>(0,r.jsxs)("button",{type:"button",disabled:s,onClick:()=>{let t=l.allowedMediaTypes||[];t.includes(e)||o(a,{allowedMediaTypes:[...t,e]})},className:"rounded-full border border-border px-2 py-0.5 font-mono text-[10px] text-text-muted hover:bg-surface disabled:opacity-40",children:["+ ",e]},e))})]}):null,(0,r.jsxs)("div",{className:"mt-3 grid gap-3 lg:grid-cols-2",children:[(0,r.jsxs)("label",{className:"flex items-start gap-2 rounded-lg border border-border bg-surface/60 p-2.5",children:[(0,r.jsx)("input",{type:"checkbox",checked:!0===c.blockLikelySecrets,onChange:e=>d(a,{text:{...c,blockLikelySecrets:e.target.checked}}),disabled:s,className:"mt-0.5 h-4 w-4 accent-[var(--color-primary)]"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-xs font-semibold text-text-main",children:"Block prompts containing credentials"}),(0,r.jsx)("span",{className:"mt-0.5 block text-[11px] leading-4 text-text-muted",children:"Coding tools send source code, so expect false positives. Worth trialling on one group first."})]})]}),(0,r.jsx)(C,{label:"Blocked patterns",hint:"Regular expressions, one per line. An invalid one is rejected on save.",children:(0,r.jsx)("textarea",{rows:2,value:N((c.patterns||[]).map(e=>"string"==typeof e?e:e.pattern)),onChange:e=>d(a,{text:{...c,patterns:f(e.target.value)}}),disabled:s,placeholder:"intranet\\\\.corp\\\\.local",className:`${k} font-mono text-[11px]`})})]})]},e.id||a)}),n.length?null:(0,r.jsx)("p",{className:"rounded-xl border border-dashed border-border px-3 py-6 text-center text-xs text-text-muted",children:"No profiles yet."})]})]})}w.propTypes={form:u().object,update:u().func.isRequired,disabled:u().bool};let S=["api.anthropic.com","*.anthropic.com","claude.ai","*.claude.ai"],A=["api.openai.com","*.openai.com","chatgpt.com","*.chatgpt.com"],T=["api.githubcopilot.com","*.githubcopilot.com","api.github.com"],P=["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com","oidc.us-east-1.amazonaws.com","*.auth.desktop.kiro.dev","q.eu-central-1.amazonaws.com","runtime.us-east-1.kiro.dev","runtime.eu-central-1.kiro.dev","management.us-east-1.kiro.dev","management.eu-central-1.kiro.dev","prod.download.desktop.kiro.dev","app.kiro.dev"],E=[{id:"claude-code",label:"Claude Code"},{id:"codex",label:"OpenAI Codex"},{id:"gemini-cli",label:"Gemini CLI"},{id:"cursor",label:"Cursor"},{id:"copilot",label:"GitHub Copilot"},{id:"kiro",label:"Kiro"},{id:"vscode",label:"VS Code"},{id:"curl",label:"curl / scripts"}];function R({ok:e,children:t}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${e?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"border-border bg-surface text-text-muted"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e?"check_circle":"radio_button_unchecked"}),t]})}function $(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?"0":t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function I(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?"$0.00":t<.01?`$${t.toFixed(4)}`:`$${t.toFixed(2)}`}function O({label:e,value:t,hint:s}){return(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background/50 p-3",children:[(0,r.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-wide text-text-muted",children:e}),(0,r.jsx)("div",{className:"mt-1 text-lg font-semibold text-text-main",children:t}),s?(0,r.jsx)("div",{className:"mt-0.5 text-[11px] leading-4 text-text-muted",children:s}):null]})}function L({title:e,rows:t}){return t?.length?(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,r.jsx)("div",{className:"mt-2 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[420px] text-left text-xs",children:[(0,r.jsx)("thead",{className:"border-b border-border text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-1.5 font-medium",children:"Name"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Reqs"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"In"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Out"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Cache R/W"}),(0,r.jsx)("th",{className:"px-2 py-1.5 text-right font-medium",children:"Cost"})]})}),(0,r.jsx)("tbody",{children:t.map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/60 text-text-main",children:[(0,r.jsx)("td",{className:"max-w-[220px] truncate px-2 py-1.5 font-mono text-[11px]",title:e.label,children:e.label}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:e.requests}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:$(e.inputTokens)}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:$(e.outputTokens)}),(0,r.jsxs)("td",{className:"px-2 py-1.5 text-right text-text-muted",children:[$(e.cacheReadTokens),"/",$(e.cacheCreationTokens)]}),(0,r.jsx)("td",{className:"px-2 py-1.5 text-right",children:I(e.cost)})]},e.label))})]})})]}):null}function _({label:e,hint:t,children:s}){return(0,r.jsxs)("label",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:e}),s,t?(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:t}):null]})}function K({label:e,description:t,checked:s,onChange:a,disabled:n=!1}){return(0,r.jsxs)("label",{className:"flex items-start justify-between gap-4 rounded-xl border border-border bg-background/50 p-3",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:e}),(0,r.jsx)("span",{className:"mt-0.5 block text-xs leading-5 text-text-muted",children:t})]}),(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:e=>a(e.target.checked),disabled:n,className:"mt-1 h-4 w-4 accent-[var(--color-primary)]"})]})}function B(){let e,t,[s,n]=(0,a.useState)(null),[i,o]=(0,a.useState)(null),[c,h]=(0,a.useState)(""),[u,p]=(0,a.useState)(""),[b,g]=(0,a.useState)(""),[y,j]=(0,a.useState)(null),[f,N]=(0,a.useState)("configuration"),v=(0,a.useCallback)(async(e=!0,t)=>{try{let s=await fetch("/api/audit-proxy?limit=50",{cache:"no-store",signal:t}),r=(s.headers.get("content-type")||"").includes("application/json")?await s.json():null;if(!s.ok)throw Error(r?.error||(504===s.status?"Audit Proxy status request timed out at the reverse proxy (HTTP 504)":`Cannot load Audit Proxy (HTTP ${s.status})`));if(!r)throw Error("Audit Proxy returned a non-JSON response");n(r),p(""),e?o(e=>e||r.config):o(r.config)}catch(e){e?.name!=="AbortError"&&p(e.message||"Cannot load Audit Proxy")}},[]);(0,a.useEffect)(()=>{let e=new AbortController,t=null,s=!1,r=async a=>{await v(a,e.signal),s||(t=window.setTimeout(()=>r(!0),1e4))};return r(!1),()=>{s=!0,t&&window.clearTimeout(t),e.abort()}},[v]);let C=s?.status||{},k=C.security||{},B=C.rootCA||{},H=!0===C.running,D=!0===C.pendingListenerRestart,M=!0===C.standby,q=(i?.allowedHosts||[]).join("\n"),F={lagging:(t=Number((e=C.auditStore||{}).oldestQueuedAgeMs||0))>3e4,lost:Number(e.dropped||0)+Number(e.failed||0)+Number(e.localFailed||0),hint:`Background audit write queue. Oldest waiting event: ${Math.round(t/1e3)}s. Written ${e.written||0}, MySQL ${e.mysqlWritten||0}.`,lostHint:`dropped (queue full): ${e.dropped||0}, failed: ${e.failed||0}, local log write failed: ${e.localFailed||0}, stalled sinks: ${e.sinkTimeouts||0}. Proxied traffic is unaffected - only the audit record is missing.`},V=(e,t)=>o(s=>({...s,[e]:t})),U=async(e,t={})=>{h(e),p(""),g("");try{let s=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...t})}),r=await s.json().catch(()=>({}));if(!s.ok)throw Error(r.error||`${e} failed`);return"test"===e?(j(r.test),g(`Simulation passed ${r.test.passed}/${r.test.total} checks.`)):g("clear-logs"===e?"Audit logs cleared.":`Audit Proxy ${e} completed.`),await v("start"!==e&&"restart"!==e),r}catch(t){return p(t.message||`${e} failed`),null}finally{h("")}},W=async()=>{h("save"),p(""),g("");try{let e=await fetch("/api/audit-proxy",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:i})}),t=await e.json();if(!e.ok)throw Error(t.error||"Save failed");o(t.config);let s=Number(t.droppedConnections||0);g(t.rebindRequired?`Configuration saved and applied. The listener address/port change waits for Save & Restart — the proxy is still on ${C.address?.address||i.bindHost}:${C.address?.port||i.port}.`:`Configuration saved and applied to the running proxy${H?" without a restart":""}.${s?` ${s} connection(s) from addresses that lost access were closed.`:""}`),await v(!0)}catch(e){p(e.message||"Save failed")}finally{h("")}},X=async()=>{h("save-client-host"),p(""),g("");try{let e=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"save-client-host",clientProxyHost:i?.clientProxyHost||""})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to save Client proxy host");o(e=>({...e,clientProxyHost:t.config?.clientProxyHost||""})),g("Client proxy host saved."),await v(!0)}catch(e){p(e.message||"Failed to save Client proxy host")}finally{h("")}},z=async()=>{h("ca"),p("");try{let e=await fetch("/api/audit-proxy/ca",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||"CA validation failed");g("Root CA is ready. Existing enterprise CA material was not rotated."),await v(!0)}catch(e){p(e.message||"CA validation failed")}finally{h("")}},G=e=>o(t=>({...t,allowedHosts:[...new Set([...t?.allowedHosts||[],...e])]}));if(!i)return(0,r.jsx)("div",{className:"rounded-xl border border-border bg-surface p-5 text-sm text-text-muted",children:"Loading Proxy Mode…"});let Y=Math.round(Number(i.captureLimitBytes||0)/1024/1024*10)/10,J=["0.0.0.0","::"].includes(i.bindHost)||!String(i.bindHost).startsWith("127.")&&"localhost"!==i.bindHost&&"::1"!==i.bindHost;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"flex flex-col gap-3 rounded-2xl border border-primary/20 bg-primary/5 p-4 sm:flex-row sm:items-start sm:justify-between",children:(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"policy"}),(0,r.jsx)("h1",{className:"text-lg font-bold text-text-main",children:"Proxy Mode"}),(0,r.jsx)(R,{ok:H,children:H?"Running":"Stopped"}),(0,r.jsx)(R,{ok:!0===B.validated,children:"Root CA"}),(0,r.jsx)(R,{ok:i.verifyUpstreamTls,children:"Verified upstream TLS"}),(0,r.jsx)(R,{ok:!0,children:C.capabilities?.http2===!0?"HTTP/1.1 + HTTP/2":"HTTP/1.1"})]}),(0,r.jsx)("p",{className:"mt-2 max-w-5xl text-sm leading-6 text-text-muted",children:"Explicit HTTPS CONNECT proxy for Claude Code, Codex and Kiro IDE. Request method, path, query, authentication values and body bytes are forwarded without content rewriting. Standard hop-by-hop headers and BlueRouter internal headers remain intentionally removed."})]})}),u?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:u}):null,b?(0,r.jsx)("div",{className:"rounded-xl border border-green-500/30 bg-green-500/10 px-4 py-3 text-sm text-green-600 dark:text-green-400",children:b}):null,(0,r.jsxs)("div",{className:"flex w-fit items-center gap-1 rounded-xl border border-border bg-surface p-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>N("configuration"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"configuration"===f?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Configuration"}),(0,r.jsx)("button",{type:"button",onClick:()=>N("access"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"access"===f?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Access"}),(0,r.jsx)("button",{type:"button",onClick:()=>N("content"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"content"===f?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Content control"}),(0,r.jsx)("button",{type:"button",onClick:()=>N("audit"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"audit"===f?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Audit & Usage"}),(0,r.jsx)("button",{type:"button",onClick:()=>N("guide"),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${"guide"===f?"bg-primary text-white":"text-text-muted hover:bg-background hover:text-text-main"}`,children:"Hướng dẫn"})]}),(0,r.jsxs)("div",{className:"configuration"===f?"space-y-4":"hidden",children:[M?(0,r.jsxs)("div",{className:"rounded-xl border border-blue-500/30 bg-blue-500/10 px-4 py-3 text-sm text-blue-700 dark:text-blue-300",children:[(0,r.jsx)("strong",{children:"Node n\xe0y đang l\xe0 Cluster Standby."})," Access grants, TLS allowlist, client tool filter v\xe0 capture được đồng bộ từ Master qua cluster snapshot, n\xean form ở đ\xe2y chỉ đọc. Sửa tr\xean Master rồi để sync \xe1p xuống. Bind address/port, Proxy authentication v\xe0 Root CA vẫn l\xe0 của ri\xeang node n\xe0y."]}):null,D?(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("strong",{children:"Listener address/port change is pending."})," Saved as ",i.bindHost,":",i.port,", still bound to ",C.address?.address,":",C.address?.port,". A bound socket cannot move — restart the listener to apply it. Everything else you saved is already live."]}),(0,r.jsx)("button",{type:"button",onClick:()=>U("restart",{config:i}),disabled:!!c,className:"shrink-0 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-1.5 text-xs font-semibold disabled:opacity-50",children:"restart"===c?"Restarting…":"Restart listener now"})]}):null,J?(0,r.jsxs)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:[(0,r.jsx)("strong",{children:"LAN listener enabled."})," Keep TCP ",i.port," restricted to the intended LAN/VPN and maintain the Client IP allowlist."]}):null,B.expiringSoon?(0,r.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:"Root CA expires soon. Audit Proxy will not rotate enterprise CA material automatically; prepare and deploy the replacement CA through Advanced CA management."}):null,(0,r.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.25fr_0.75fr]",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Proxy configuration"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"All server-side setup is managed here. No proxy daemon CLI is required."})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>G(S),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ Anthropic preset"}),(0,r.jsx)("button",{type:"button",onClick:()=>G(A),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ OpenAI preset"}),(0,r.jsx)("button",{type:"button",onClick:()=>G(T),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ GitHub Copilot preset"}),(0,r.jsx)("button",{type:"button",onClick:()=>G(P),className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ Kiro preset"})]})]}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsx)(_,{label:"Bind address",hint:"127.0.0.1 = local only. Use 0.0.0.0 or a LAN IP for other workstations. The only setting that needs Save & Restart while the proxy runs — a bound socket cannot move.",children:(0,r.jsx)("input",{value:i.bindHost,onChange:e=>V("bindHost",e.target.value),className:`rounded-lg border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary ${D?"border-amber-500/50":"border-border"}`})}),(0,r.jsx)(_,{label:"Proxy port",hint:"Default 3128; Docker deployments must publish this port explicitly. Also needs Save & Restart to take effect.",children:(0,r.jsx)("input",{type:"number",min:"1",max:"65535",value:i.port,onChange:e=>V("port",Number(e.target.value)),className:`rounded-lg border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary ${D?"border-amber-500/50":"border-border"}`})}),(0,r.jsx)(_,{label:"Client proxy host",hint:"Manual persistent hostname/IP used only in deployment commands; it does not change the listener.",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("input",{value:i.clientProxyHost||"",onChange:e=>V("clientProxyHost",e.target.value),placeholder:"172.16.6.8 or proxy.example.local",className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,r.jsx)("button",{type:"button",onClick:X,disabled:!!c||M,className:"shrink-0 rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary disabled:opacity-50",children:"save-client-host"===c?"Saving…":"Save host"})]})}),(0,r.jsx)(_,{label:"Capture limit / request",hint:"Traffic streams immediately; only this bounded prefix is retained for audit.",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"0",max:"16",step:"0.5",value:Y,onChange:e=>V("captureLimitBytes",Math.round(1024*Number(e.target.value)*1024)),disabled:!i.captureBodies,className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"MB"})]})})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,r.jsx)(K,{label:"Pass through non-audited hosts",description:"Unknown hosts use a blind TLS tunnel only when they resolve to public addresses on TCP 443. Private/reserved destinations are denied.",checked:i.passthroughUnknown,onChange:e=>V("passthroughUnknown",e)}),(0,r.jsx)(K,{label:"Capture request/response bodies",description:"Credentials are redacted before persistence. Disable to retain metadata and wire hashes only.",checked:i.captureBodies,onChange:e=>V("captureBodies",e)})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-3",children:[(0,r.jsx)(K,{label:"Restrict which client tools may connect",description:"Refuses a CONNECT whose User-Agent identifies a tool that is not listed. Catches a browser pointed at the proxy, or a script that inherited HTTPS_PROXY. It cannot catch a client that sends no User-Agent — Claude Code sends none at all and Codex only on its first tunnel, so those are always let through, and anyone can do the same by dropping the header. Hygiene, not access control: the client IP allowlist and who holds the root CA are what bound access.",checked:!0===i.clientToolFilterEnabled,onChange:e=>V("clientToolFilterEnabled",e)}),i.clientToolFilterEnabled?(0,r.jsxs)("div",{className:"grid gap-2",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Add:"}),E.map(e=>(0,r.jsx)("button",{type:"button",disabled:(i.allowedClientTools||[]).includes(e.id),onClick:()=>V("allowedClientTools",[...new Set([...i.allowedClientTools||[],e.id])]),className:"rounded-lg border border-border px-2 py-1 text-[11px] text-text-muted transition hover:border-primary hover:text-primary disabled:opacity-40",children:e.label},e.id))]}),(0,r.jsx)(_,{label:"Allowed client tools",hint:"One entry per line: a preset id above, or any substring matched against the User-Agent. Only clients that send a User-Agent are checked. Refused connections appear in the audit table with the User-Agent that was rejected, so you can add what you actually use.",children:(0,r.jsx)("textarea",{rows:4,value:(i.allowedClientTools||[]).join("\n"),onChange:e=>V("allowedClientTools",e.target.value.split(/\r?\n/).map(e=>e.trim().toLowerCase()).filter(Boolean)),disabled:H,placeholder:"claude-code\ncodex",className:"rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"})})]}):null]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-4 md:grid-cols-[1fr_190px]",children:[(0,r.jsx)(_,{label:"TLS inspection allowlist",hint:"One hostname/wildcard per line. Only these public HTTPS hosts are decrypted and audited.",children:(0,r.jsx)("textarea",{rows:9,value:q,onChange:e=>V("allowedHosts",e.target.value.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)),className:"rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"grid content-start gap-4",children:[(0,r.jsx)(_,{label:"Retention",hint:"Daily local JSONL segments older than this value are deleted hourly.",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"1",max:"365",value:i.retentionDays,onChange:e=>V("retentionDays",Number(e.target.value)),className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"days"})]})}),(0,r.jsxs)("div",{className:"rounded-xl border border-green-500/20 bg-green-500/5 p-3 text-xs leading-5 text-text-muted",children:[(0,r.jsx)("div",{className:"font-semibold text-green-600 dark:text-green-400",children:"Transport controls enforced"}),"TLS verification ON \xb7 HTTP/1.1 \xb7 HTTPS CONNECT only \xb7 public TCP 443 only."]})]})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:W,disabled:!!c||M,className:"rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"save"===c?"Saving…":H?"Save & apply":"Save"}),H?(0,r.jsx)("button",{type:"button",onClick:()=>U("stop"),disabled:!!c,className:"rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-sm font-semibold text-red-500 disabled:opacity-50",children:"stop"===c?"Stopping…":"Stop Proxy"}):(0,r.jsx)("button",{type:"button",onClick:()=>U("start",{config:i}),disabled:!!c,className:"rounded-lg border border-green-500/30 bg-green-500/10 px-4 py-2 text-sm font-semibold text-green-600 disabled:opacity-50",children:"start"===c?"Starting…":"Start Proxy"}),(0,r.jsx)("button",{type:"button",onClick:()=>U("restart",{config:i}),disabled:!!c,className:"rounded-lg border border-border px-4 py-2 text-sm font-semibold text-text-main hover:bg-background disabled:opacity-50",children:"restart"===c?"Restarting…":"Save & Restart"}),(0,r.jsx)("button",{type:"button",onClick:()=>U("test"),disabled:!!c,className:"rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-sm font-semibold text-primary disabled:opacity-50",children:"test"===c?"Testing…":"Run Simulated Test"}),(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:"Save applies to the running proxy immediately — open tunnels keep streaming. Restart is only for the bind address and port."})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Root CA"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"The existing Root CA/key pair is validated and reused. Audit Proxy never auto-rotates enterprise CA material."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Status"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:B.validated?"Validated":B.certExists?"Needs attention":"Not generated"})]}),B.subject?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Subject"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:B.subject})]}):null,B.fingerprint?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Public key fingerprint"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:B.fingerprint})]}):null,B.notAfter?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Expires"}),(0,r.jsx)("span",{className:"text-text-main",children:new Date(B.notAfter).toLocaleString()})]}):null,B.error?(0,r.jsx)("div",{className:"rounded-lg bg-red-500/10 p-2 text-red-600 dark:text-red-300",children:B.error}):null]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:z,disabled:!!c,className:"rounded-lg border border-border px-3 py-2 text-xs font-semibold text-text-main hover:bg-background disabled:opacity-50",children:B.certExists?"Validate / Reuse CA":"Generate CA"}),(0,r.jsx)("a",{href:"/api/audit-proxy/ca?download=cert",className:`rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary ${!B.certExists?"pointer-events-none opacity-50":""}`,children:"Download Root CA"})]})]}),(0,r.jsx)(l,{serverRunning:H,onChanged:()=>v()})]})]}),y?(0,r.jsxs)("section",{className:`rounded-2xl border p-4 ${y.ok?"border-green-500/30 bg-green-500/5":"border-red-500/30 bg-red-500/5"}`,children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Simulated end-to-end test"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Local throwaway TLS endpoints; no cloud credential or external API call is used."})]}),(0,r.jsxs)(R,{ok:y.ok,children:[y.passed,"/",y.total," passed \xb7 ",y.durationMs," ms"]})]}),(0,r.jsx)("div",{className:"mt-3 grid gap-2 md:grid-cols-2 xl:grid-cols-3",children:y.checks?.map(e=>(0,r.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-border/70 bg-background/60 px-3 py-2 text-xs",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.ok?"text-green-500":"text-red-500"}`,children:e.ok?"check_circle":"error"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.name}),e.detail?(0,r.jsx)("span",{className:"mt-0.5 block text-text-muted",children:e.detail}):null]})]},e.name))})]}):null]}),(0,r.jsx)("div",{className:"guide"===f?"space-y-4":"hidden",children:(0,r.jsx)(m.Ay,{clientProxyHost:i.clientProxyHost,port:i.port,onError:p})}),(0,r.jsxs)("div",{className:"access"===f?"space-y-4":"hidden",children:[(0,r.jsx)(x,{data:s,onChanged:()=>v(!0)}),k.proxyAuthFeatureEnabled?(0,r.jsx)(d,{}):null]}),(0,r.jsxs)("div",{className:"content"===f?"space-y-4":"hidden",children:[(0,r.jsx)(w,{form:i,update:V,disabled:!!c||M}),(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)("button",{type:"button",onClick:W,disabled:!!c||M,className:"rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"save"===c?"Saving...":"Save content control"})})]}),(0,r.jsxs)("div",{className:"audit"===f?"space-y-4":"hidden",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Token usage"}),(0,r.jsxs)("p",{className:"mt-1 text-xs text-text-muted",children:["Counts are read out of the audited provider responses themselves — ",(0,r.jsx)("code",{className:"font-mono",children:"message_start"})," carries input and cache tokens, the closing ",(0,r.jsx)("code",{className:"font-mono",children:"message_delta"})," carries output. Scope is the same window as the table below."]})]}),s?.usageSummary?.incompleteUsageCount?(0,r.jsxs)("span",{className:"rounded-lg border border-amber-500/30 bg-amber-500/10 px-2.5 py-1 text-[11px] font-medium text-amber-700 dark:text-amber-300",children:[s.usageSummary.incompleteUsageCount," response(s) truncated before the final usage event — output tokens under-counted"]}):null]}),s?.usageSummary?.totals?.requests?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"mt-3 grid gap-2 sm:grid-cols-2 lg:grid-cols-5",children:[(0,r.jsx)(O,{label:"Requests with usage",value:s.usageSummary.totals.requests}),(0,r.jsx)(O,{label:"Input",value:$(s.usageSummary.totals.inputTokens),hint:"new (uncached) input tokens"}),(0,r.jsx)(O,{label:"Output",value:$(s.usageSummary.totals.outputTokens)}),(0,r.jsx)(O,{label:"Cache read / write",value:`${$(s.usageSummary.totals.cacheReadTokens)} / ${$(s.usageSummary.totals.cacheCreationTokens)}`}),(0,r.jsx)(O,{label:"Est. cost",value:I(s.usageSummary.totals.cost),hint:"from the pricing table"})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-5 lg:grid-cols-2",children:[(0,r.jsx)(L,{title:"By model",rows:s.usageSummary.byModel}),(0,r.jsx)(L,{title:"By client tool",rows:s.usageSummary.bySourceTool})]})]}):(0,r.jsx)("p",{className:"mt-3 rounded-xl border border-border bg-background/50 p-3 text-xs text-text-muted",children:"No token usage recorded yet. Usage appears once an audited request reaches a provider that reports it (Anthropic and OpenAI both do)."})]}),(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Recent audit requests"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Credentials are redacted before persistence. Local writes and MySQL mirroring run through a bounded asynchronous queue."})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,r.jsxs)("span",{title:F.hint,children:["Queue ",C.auditStore?.queueDepth||0,"/",C.auditStore?.queueLimit||1e3,F.lagging?(0,r.jsx)("span",{className:"ml-1 text-amber-600 dark:text-amber-400",children:"backing up"}):null]}),F.lost?(0,r.jsxs)("span",{className:"text-amber-600 dark:text-amber-400",title:F.lostHint,children:[F.lost," event(s) not persisted"]}):null,(0,r.jsx)("button",{type:"button",onClick:()=>U("clear-logs"),disabled:!!c||M,className:"rounded-lg border border-border px-3 py-1.5 hover:bg-background disabled:opacity-50",children:"Clear logs"})]})]}),(0,r.jsx)("div",{className:"mt-3 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[1250px] text-left text-xs",children:[(0,r.jsx)("thead",{className:"border-b border-border text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Time"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Protocol"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Client"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"User"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Provider"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Host"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Model"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Request"}),(0,r.jsx)("th",{className:"px-2 py-2 text-right font-medium",children:"Tokens (in/out)"}),(0,r.jsx)("th",{className:"px-2 py-2 text-right font-medium",children:"Cache (r/w)"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Latency"})]})}),(0,r.jsxs)("tbody",{children:[(s?.events||[]).map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/60 align-top text-text-main",children:[(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-text-muted",children:new Date(e.timestamp).toLocaleTimeString()}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.protocol||"http/1.1"}),(0,r.jsx)("td",{className:"px-2 py-2 font-mono text-[11px]",children:e.client?.ip||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.client?.proxyUser||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.provider||"-"}),(0,r.jsx)("td",{className:"px-2 py-2 font-mono text-[11px]",children:e.host||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.model||"-"}),(0,r.jsx)("td",{className:"max-w-[300px] px-2 py-2",children:(0,r.jsxs)("details",{children:[(0,r.jsxs)("summary",{className:"cursor-pointer truncate",children:[e.method," ",e.path]}),(0,r.jsx)("pre",{className:"mt-2 max-h-72 overflow-auto whitespace-pre-wrap rounded-lg bg-background p-2 text-[10px] leading-4 text-text-muted",children:JSON.stringify({request:e.request,response:e.response,error:e.error},null,2)})]})}),(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-right",children:e.usage?(0,r.jsxs)("span",{title:!1===e.usage.complete?"Response was truncated before the final usage event; output is a lower bound":void 0,children:[$(e.usage.inputTokens),"/",$(e.usage.outputTokens),!1===e.usage.complete?(0,r.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"*"}):null]}):(0,r.jsx)("span",{className:"text-text-muted",children:"-"})}),(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-right text-text-muted",children:e.usage?`${$(e.usage.cacheReadTokens)}/${$(e.usage.cacheCreationTokens)}`:"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.status||"ERR"}),(0,r.jsxs)("td",{className:"whitespace-nowrap px-2 py-2",children:[e.durationMs??"-"," ms"]})]},e.id)),s?.events?.length?null:(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"12",className:"px-2 py-8 text-center text-text-muted",children:"No audited requests yet."})})]})]})})]})]})]})}},83163:(e,t,s)=>{"use strict";s.d(t,{Ay:()=>m});var r=s(95155),a=s(12115);let n="localhost,127.0.0.1,::1",i="C:\\BlueRouter\\bluerouter-audit-root-ca.crt",l="$HOME/.bluerouter/bluerouter-audit-root-ca.crt";function d({title:e,subtitle:t,command:s,copyKey:a,copied:n,onCopy:i,recommended:l=!1}){return(0,r.jsxs)("div",{className:`rounded-xl border bg-background p-3 ${l?"border-green-500/30":"border-border"}`,children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:e}),l?(0,r.jsx)("span",{className:"rounded-full bg-green-500/10 px-2 py-0.5 text-[10px] font-semibold text-green-600 dark:text-green-400",children:"Khuyến nghị"}):null]}),t?(0,r.jsx)("div",{className:"mt-0.5 text-[10px] leading-4 text-text-muted",children:t}):null]}),(0,r.jsx)("button",{type:"button",onClick:()=>i(a,s),className:"shrink-0 text-xs font-medium text-primary",children:n===a?"Đ\xe3 copy":"Copy"})]}),(0,r.jsx)("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap break-all rounded-lg bg-surface px-3 py-2 text-[11px] leading-5 text-text-muted",children:s})]})}let o=({children:e})=>(0,r.jsx)("code",{className:"rounded bg-background px-1 py-0.5",children:e});function c({title:e,children:t}){return(0,r.jsxs)("div",{className:"rounded-xl border border-green-500/30 bg-green-500/5 p-3",children:[(0,r.jsx)("div",{className:"text-xs font-semibold text-text-main",children:e}),(0,r.jsx)("div",{className:"mt-2 grid gap-3",children:t})]})}function x({n:e,title:t,children:s}){return(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary text-[10px] font-semibold text-white",children:e}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("div",{className:"text-xs font-medium text-text-main",children:t}),s]})]})}function m({clientProxyHost:e,port:t,onError:s}){let[h,u]=(0,a.useState)(""),[p,b]=(0,a.useState)("claude"),g=(0,a.useMemo)(()=>{var s,r;let a,d=(s=e,r=t,`http://${(a=String(s||"").trim()||"<bluerouter-host>").includes(":")&&!a.startsWith("[")?`[${a}]`:a}:${r}`),o=`set "HTTP_PROXY=${d}"&&set "HTTPS_PROXY=${d}"&&set "NO_PROXY=${n}"&&set "no_proxy=${n}"`,c=`HTTP_PROXY='${d}' HTTPS_PROXY='${d}' NO_PROXY='${n}' no_proxy='${n}'`;return{proxyUrl:d,claudePowerShell:`cmd.exe /d /c '${o}&&set "NODE_EXTRA_CA_CERTS=${i}"&&claude'`,codexPowerShell:`cmd.exe /d /c '${o}&&set "CODEX_CA_CERTIFICATE=${i}"&&codex'`,claudeBash:`env ${c} NODE_EXTRA_CA_CERTS="${l}" claude`,kiroPowerShell:`cmd.exe /d /c '${o}&&set "NODE_EXTRA_CA_CERTS=${i}"&&kiro'`,kiroBash:`env ${c} NODE_EXTRA_CA_CERTS="${l}" kiro`,kiroCertutil:`certutil -user -addstore Root "${i}"`,vscodePowerShell:`cmd.exe /d /c '${o}&&set "NODE_EXTRA_CA_CERTS=${i}"&&set "CODEX_CA_CERTIFICATE=${i}"&&code'`,kiroLinkCli:`$dir = "$env:USERPROFILE\\.local\\bin"
|
|
2
|
+
New-Item -ItemType Directory -Force $dir | Out-Null
|
|
3
|
+
Remove-Item "$dir\\kiro-cli.exe" -Force -ErrorAction SilentlyContinue
|
|
4
|
+
New-Item -ItemType HardLink -Path "$dir\\kiro-cli.exe" -Target "$env:LOCALAPPDATA\\Kiro-Cli\\kiro-cli.exe" | Out-Null
|
|
5
|
+
& "$dir\\kiro-cli.exe" --version`,vscodeKiroPowerShell:`cmd.exe /d /c 'set "Path="&&set "PATH=%PATH%"&&${o}&&set "NODE_EXTRA_CA_CERTS=${i}"&&code'`,vscodeBash:`env ${c} NODE_EXTRA_CA_CERTS="${l}" CODEX_CA_CERTIFICATE="${l}" code`,vscodeSettings:`"http.proxy": "${d}",
|
|
6
|
+
"http.proxySupport": "override",
|
|
7
|
+
"http.noProxy": ["localhost", "127.0.0.1"]`,claudeExtSettings:`"claudeCode.environmentVariables": [
|
|
8
|
+
{ "name": "HTTP_PROXY", "value": "${d}" },
|
|
9
|
+
{ "name": "HTTPS_PROXY", "value": "${d}" },
|
|
10
|
+
{ "name": "NO_PROXY", "value": "${n}" },
|
|
11
|
+
{ "name": "NODE_EXTRA_CA_CERTS", "value": "${i.replace(/\\/g,"\\\\")}" }
|
|
12
|
+
]`,installKiroCli:"irm https://cli.kiro.dev/install.ps1 | iex",installKiroExt:"code --install-extension asadbinimtiaz.kiro-vscode-extension",installClaudeExt:"code --install-extension anthropic.claude-code",installCodexExt:"code --install-extension openai.chatgpt",codexBash:`env ${c} CODEX_CA_CERTIFICATE="${l}" codex`}},[e,t]),y=`model_provider = "chatgpt_https"
|
|
13
|
+
|
|
14
|
+
[model_providers.chatgpt_https]
|
|
15
|
+
name = "OpenAI ChatGPT (HTTPS)"
|
|
16
|
+
base_url = "https://chatgpt.com/backend-api/codex"
|
|
17
|
+
wire_api = "responses"
|
|
18
|
+
requires_openai_auth = true
|
|
19
|
+
`,j=async(e,t)=>{try{await navigator.clipboard.writeText(t),u(e),setTimeout(()=>u(""),1500)}catch{s?.("Kh\xf4ng truy cập được clipboard của tr\xecnh duyệt.")}},f="mt-2 text-[11px] leading-5 text-text-muted",N="mt-2 text-[11px] leading-5 text-amber-600 dark:text-amber-400",v=e=>(0,r.jsx)(d,{...e,copied:h,onCopy:j}),C=(e,t=g.vscodePowerShell,s="Chỉ \xe1p dụng cho cửa sổ VS Code mở bằng lệnh n\xe0y. Đ\xf3ng VS Code l\xe0 hết.")=>v({title:"Lệnh mở VS Code qua Audit Proxy (Windows PowerShell)",subtitle:s,command:t,copyKey:e,recommended:!0}),k=e=>(0,r.jsxs)("details",{className:"rounded-xl border border-border bg-background p-3",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-xs font-semibold text-text-main",children:"Lệnh cho Linux / macOS"}),(0,r.jsx)("div",{className:"mt-3 grid gap-3",children:e.map(e=>(0,r.jsx)("div",{children:v(e)},e.copyKey))})]});return(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Hướng dẫn cấu h\xecnh m\xe1y trạm"}),(0,r.jsxs)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:["Chọn đ\xfang c\xf4ng cụ ở tab b\xean dưới v\xe0 l\xe0m lần lượt từng bước. C\xe1c lệnh khởi chạy chỉ đặt biến m\xf4i trường cho chương tr\xecnh được mở ra — kh\xf4ng d\xf9ng ",(0,r.jsx)(o,{children:"setx"}),", kh\xf4ng đổi proxy của Windows. Hai thay đổi l\xe2u d\xe0i duy nhất l\xe0 lệnh ",(0,r.jsx)(o,{children:"certutil"})," (Kiro) v\xe0 đoạn ",(0,r.jsx)(o,{children:"settings.json"})," của VS Code (c\xe1ch l\xe0m tuỳ chọn)."]}),(0,r.jsxs)("div",{className:"mt-3 rounded-xl border border-primary/20 bg-primary/5 p-3",children:[(0,r.jsx)("div",{className:"text-xs font-semibold text-primary",children:"Bước 0 \xb7 L\xe0m một lần cho mọi c\xf4ng cụ"}),(0,r.jsxs)("ol",{className:"mt-2 list-decimal space-y-1 pl-4 text-[11px] leading-5 text-text-muted",children:[(0,r.jsxs)("li",{children:["Tải file chứng chỉ Root CA: ",(0,r.jsx)("a",{href:"/api/audit-proxy/ca?download=cert",className:"font-semibold text-primary underline",children:"Tải Root CA"}),". Đ\xe2y l\xe0 certificate c\xf4ng khai, kh\xf4ng chứa private key."]}),(0,r.jsxs)("li",{children:["Lưu file v\xe0o đ\xfang đường dẫn ",(0,r.jsx)(o,{children:i})," (Windows) hoặc ",(0,r.jsx)(o,{children:l})," (Linux/macOS). Tạo thư mục nếu chưa c\xf3."]}),(0,r.jsx)("li",{children:"Địa chỉ proxy d\xf9ng trong mọi lệnh b\xean dưới:"})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-2 rounded-lg bg-background px-3 py-2",children:[(0,r.jsx)("code",{className:"break-all text-xs text-text-muted",children:g.proxyUrl}),(0,r.jsx)("button",{type:"button",onClick:()=>j("url",g.proxyUrl),className:"shrink-0 text-xs font-medium text-primary",children:"url"===h?"Đ\xe3 copy":"Copy"})]}),(0,r.jsxs)("p",{className:f,children:["C\xe1c lệnh đ\xe3 gắn sẵn ",(0,r.jsx)(o,{children:"NO_PROXY"})," để đăng nhập (callback localhost) v\xe0 MCP chạy nội bộ kh\xf4ng đi qua proxy."]})]}),(0,r.jsx)("div",{className:"mt-3 flex flex-wrap gap-1 rounded-xl border border-border bg-background p-1",role:"tablist",children:[{id:"claude",label:"Claude Code"},{id:"codex",label:"Codex"},{id:"kiro",label:"Kiro"}].map(e=>(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":p===e.id,onClick:()=>b(e.id),className:`rounded-lg px-3 py-1.5 text-xs font-semibold transition ${p===e.id?"bg-primary text-white":"text-text-muted hover:bg-surface hover:text-text-main"}`,children:e.label},e.id))}),(0,r.jsxs)("div",{className:"mt-3 grid gap-3",children:["claude"===p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(c,{title:"A. Claude Code trong terminal",children:[(0,r.jsxs)("p",{className:N,children:["Cần c\xe0i sẵn Claude Code CLI (lệnh ",(0,r.jsx)(o,{children:"claude"}),") trước khi chạy lệnh b\xean dưới."]}),(0,r.jsx)(x,{n:1,title:"Chạy lệnh dưới trong Windows PowerShell",children:v({title:"Claude Code \xb7 Windows PowerShell",subtitle:"Biến proxy chỉ tồn tại trong tiến tr\xecnh con, đ\xf3ng cửa sổ l\xe0 hết.",command:g.claudePowerShell,copyKey:"claude-ps",recommended:!0})}),(0,r.jsx)(x,{n:2,title:"Đăng nhập (nếu được hỏi)",children:(0,r.jsx)("p",{className:f,children:"Đăng nhập diễn ra tr\xean tr\xecnh duyệt n\xean kh\xf4ng đi qua proxy. Chỉ c\xe1c request sau khi đăng nhập mới đi qua Audit Proxy."})})]}),(0,r.jsxs)(c,{title:"B. Extension Claude Code trong VS Code",children:[(0,r.jsxs)(x,{n:1,title:"C\xe0i extension",children:[(0,r.jsxs)("p",{className:f,children:["Trong VS Code bấm ",(0,r.jsx)(o,{children:"Ctrl+Shift+X"}),", t\xecm ",(0,r.jsx)("b",{children:"Claude Code"})," (nh\xe0 ph\xe1t h\xe0nh ",(0,r.jsx)("b",{children:"Anthropic"}),") rồi bấm ",(0,r.jsx)("b",{children:"Install"}),". Hoặc chạy lệnh:"]}),(0,r.jsx)("div",{className:"mt-2",children:v({title:"C\xe0i extension bằng lệnh",command:g.installClaudeExt,copyKey:"install-claude-ext"})})]}),(0,r.jsx)(x,{n:2,title:"Tho\xe1t hẳn VS Code",children:(0,r.jsxs)("p",{className:f,children:["Đ\xf3ng mọi cửa sổ VS Code (File → Exit) v\xe0 kiểm tra Task Manager kh\xf4ng c\xf2n tiến tr\xecnh ",(0,r.jsx)(o,{children:"Code.exe"}),". Nếu VS Code c\xf2n chạy, lệnh ở bước sau chỉ mở th\xeam cửa sổ trong tiến tr\xecnh cũ v\xe0 biến proxy bị bỏ qua."]})}),(0,r.jsx)(x,{n:3,title:"Mở lại VS Code bằng lệnh proxy",children:(0,r.jsx)("div",{children:C("vscode-ps-claude")})}),(0,r.jsx)(x,{n:4,title:"Mở panel Claude Code v\xe0 gửi tin thử",children:(0,r.jsxs)("p",{className:f,children:["Bấm biểu tượng tia lửa ở g\xf3c tr\xean b\xean phải của editor, hoặc ",(0,r.jsx)(o,{children:"Ctrl+Shift+P"})," rồi g\xf5 ",(0,r.jsx)(o,{children:"Claude Code: Open in New Tab"}),". Đăng nhập nếu được hỏi, sau đ\xf3 gửi một tin bất kỳ."]})}),(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-surface p-3",children:[(0,r.jsx)("div",{className:"text-xs font-semibold text-text-main",children:"C\xe1ch kh\xe1c: kh\xf4ng muốn mở VS Code bằng lệnh"}),(0,r.jsxs)("p",{className:f,children:["Th\xeam đoạn dưới v\xe0o ",(0,r.jsx)(o,{children:"settings.json"})," của VS Code (",(0,r.jsx)(o,{children:"Ctrl+Shift+P"})," → ",(0,r.jsx)(o,{children:"Preferences: Open User Settings (JSON)"}),"), lưu rồi mở lại panel Claude Code. Chỉ extension Claude Code đọc kho\xe1 n\xe0y."]}),(0,r.jsx)("div",{className:"mt-2",children:v({title:"settings.json \xb7 Claude Code extension (Windows)",command:g.claudeExtSettings,copyKey:"claude-ext-settings"})})]})]}),k([{title:"Claude Code \xb7 Bash/zsh",command:g.claudeBash,copyKey:"claude-bash"},{title:"VS Code \xb7 Bash/zsh",command:g.vscodeBash,copyKey:"vscode-bash-claude"}])]}):null,"codex"===p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(c,{title:"Bước chung \xb7 Ghim Codex v\xe0o transport HTTPS (l\xe0m một lần)",children:[(0,r.jsx)("p",{className:f,children:"Codex ưu ti\xean kết nối WebSocket, nhưng Audit Proxy từ chối WebSocket n\xean mỗi lần khởi động Codex mất th\xeam khoảng 7 gi\xe2y thử lại. File cấu h\xecnh dưới đ\xe2y bắt Codex d\xf9ng HTTPS ngay từ đầu. \xc1p dụng cho cả Codex terminal v\xe0 extension VS Code."}),(0,r.jsx)(x,{n:1,title:"Mở hoặc tạo file cấu h\xecnh",children:(0,r.jsxs)("p",{className:f,children:["Đường dẫn: ",(0,r.jsx)(o,{children:"%USERPROFILE%\\.codex\\config.toml"})]})}),(0,r.jsxs)(x,{n:2,title:"D\xe1n nội dung dưới v\xe0o file v\xe0 lưu",children:[v({title:"Nội dung file config.toml",subtitle:"Copy to\xe0n bộ nội dung b\xean dưới.",command:y,copyKey:"codex-https-config",recommended:!0}),(0,r.jsxs)("p",{className:N,children:["Nếu file đ\xe3 c\xf3 nội dung: đặt ",(0,r.jsx)(o,{children:'model_provider = "chatgpt_https"'})," ở cấp cao nhất v\xe0 chỉ th\xeam một khối ",(0,r.jsx)(o,{children:"[model_providers.chatgpt_https]"}),". Kh\xf4ng tạo hai kho\xe1 ",(0,r.jsx)(o,{children:"model_provider"}),"."]})]})]}),(0,r.jsxs)(c,{title:"A. Codex trong terminal",children:[(0,r.jsxs)("p",{className:N,children:["Cần c\xe0i sẵn Codex CLI (lệnh ",(0,r.jsx)(o,{children:"codex"}),") trước khi chạy lệnh b\xean dưới."]}),(0,r.jsx)(x,{n:1,title:"Chạy lệnh dưới trong Windows PowerShell",children:v({title:"Codex \xb7 Windows PowerShell",subtitle:"Kh\xf4ng ghi g\xec v\xe0o biến m\xf4i trường của user hay hệ thống.",command:g.codexPowerShell,copyKey:"codex-ps",recommended:!0})})]}),(0,r.jsxs)(c,{title:"B. Extension Codex trong VS Code",children:[(0,r.jsxs)(x,{n:1,title:"C\xe0i extension",children:[(0,r.jsxs)("p",{className:f,children:["Trong VS Code bấm ",(0,r.jsx)(o,{children:"Ctrl+Shift+X"}),", t\xecm ",(0,r.jsx)("b",{children:"Codex"})," (nh\xe0 ph\xe1t h\xe0nh ",(0,r.jsx)("b",{children:"OpenAI"}),", id ",(0,r.jsx)(o,{children:"openai.chatgpt"}),") rồi bấm ",(0,r.jsx)("b",{children:"Install"}),". Hoặc chạy lệnh:"]}),(0,r.jsx)("div",{className:"mt-2",children:v({title:"C\xe0i extension bằng lệnh",command:g.installCodexExt,copyKey:"install-codex-ext"})})]}),(0,r.jsx)(x,{n:2,title:"Tho\xe1t hẳn VS Code",children:(0,r.jsxs)("p",{className:f,children:["Đ\xf3ng mọi cửa sổ VS Code (File → Exit) v\xe0 kiểm tra Task Manager kh\xf4ng c\xf2n tiến tr\xecnh ",(0,r.jsx)(o,{children:"Code.exe"}),"."]})}),(0,r.jsxs)(x,{n:3,title:"Mở lại VS Code bằng lệnh proxy",children:[(0,r.jsx)("div",{children:C("vscode-ps-codex")}),(0,r.jsxs)("p",{className:f,children:["Lệnh đ\xe3 gồm ",(0,r.jsx)(o,{children:"CODEX_CA_CERTIFICATE"}),". Extension chạy ",(0,r.jsx)(o,{children:"codex"})," ở nền như tiến tr\xecnh con n\xean d\xf9ng biến m\xf4i trường n\xe0y, kh\xf4ng đọc ",(0,r.jsx)(o,{children:"http.proxy"})," của VS Code."]})]}),(0,r.jsx)(x,{n:4,title:"Mở panel Codex v\xe0 gửi tin thử",children:(0,r.jsx)("p",{className:f,children:"Bấm biểu tượng Codex ở thanh b\xean tr\xe1i (Activity Bar). Đăng nhập ChatGPT nếu được hỏi, sau đ\xf3 gửi một tin bất kỳ."})}),(0,r.jsxs)("p",{className:N,children:["Lưu \xfd WSL: nếu bật ",(0,r.jsx)(o,{children:"chatgpt.runCodexInWindowsSubsystemForLinux"}),", Codex chạy trong WSL n\xean kh\xf4ng nhận biến m\xf4i trường từ VS Code tr\xean Windows, v\xe0 đường dẫn ",(0,r.jsx)(o,{children:"C:\\BlueRouter\\…"})," kh\xf4ng d\xf9ng được. H\xe3y tắt tuỳ chọn n\xe0y, hoặc đặt biến proxy v\xe0 CA (đường dẫn Linux) b\xean trong WSL."]})]}),k([{title:"Codex \xb7 Bash/zsh",command:g.codexBash,copyKey:"codex-bash"},{title:"VS Code \xb7 Bash/zsh",command:g.vscodeBash,copyKey:"vscode-bash-codex"}])]}):null,"kiro"===p?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(c,{title:"Bước chung \xb7 Tin cậy Root CA (l\xe0m một lần)",children:[(0,r.jsx)("p",{className:f,children:"Kiro (Electron) d\xf9ng kho chứng chỉ của hệ điều h\xe0nh n\xean phải c\xe0i Root CA v\xe0o đ\xf3. Tr\xean Windows chạy lệnh dưới, kh\xf4ng cần quyền admin (Windows c\xf3 thể hiện hộp thoại x\xe1c nhận, chọn Yes). Tr\xean macOS/Linux h\xe3y c\xe0i Root CA v\xe0o kho hệ thống."}),v({title:"Tin cậy Root CA (Windows, một lần)",command:g.kiroCertutil,copyKey:"kiro-certutil"})]}),(0,r.jsxs)(c,{title:"A. Kiro IDE",children:[(0,r.jsx)(x,{n:1,title:"Tho\xe1t ho\xe0n to\xe0n Kiro",children:(0,r.jsx)("p",{className:f,children:"File → Exit, rồi kiểm tra Task Manager kh\xf4ng c\xf2n tiến tr\xecnh Kiro. Nếu Kiro c\xf2n chạy, lệnh mở lại chỉ mở th\xeam cửa sổ trong tiến tr\xecnh cũ v\xe0 biến proxy bị bỏ qua."})}),(0,r.jsx)(x,{n:2,title:"Mở Kiro bằng lệnh proxy",children:v({title:"Kiro \xb7 Windows PowerShell",subtitle:"Biến proxy chỉ tồn tại trong tiến tr\xecnh Kiro.",command:g.kiroPowerShell,copyKey:"kiro-ps",recommended:!0})}),(0,r.jsx)(x,{n:3,title:"Đăng nhập",children:(0,r.jsxs)("p",{className:f,children:["Trong Kiro bấm ",(0,r.jsx)("b",{children:"Sign in"})," v\xe0 chọn Google / GitHub / AWS Builder ID. Tr\xecnh duyệt mở trang đăng nhập (kh\xf4ng đi qua proxy), xong sẽ quay lại Kiro qua link ",(0,r.jsx)(o,{children:"kiro://"})," hoặc localhost. Việc đổi/refresh token v\xe0 c\xe1c request chat của Kiro đi qua Audit Proxy."]})}),(0,r.jsxs)("p",{className:N,children:["Nếu Kiro b\xe1o lỗi chứng chỉ (self-signed / unable to verify), kiểm tra lại bước tin cậy Root CA. C\xe1ch dự ph\xf2ng: trong Kiro mở Settings, đặt ",(0,r.jsx)(o,{children:"http.proxy"})," = ",(0,r.jsx)(o,{children:g.proxyUrl})," v\xe0 ",(0,r.jsx)(o,{children:"http.proxySupport"})," = ",(0,r.jsx)(o,{children:"override"}),"."]})]}),(0,r.jsxs)(c,{title:"B. Extension Kiro trong VS Code",children:[(0,r.jsxs)("p",{className:f,children:["Extension (nh\xe0 ph\xe1t h\xe0nh ",(0,r.jsx)("b",{children:"AsadBinImtiaz"}),") chỉ l\xe0 giao diện bao quanh Kiro CLI: n\xf3 chạy ",(0,r.jsx)(o,{children:"kiro-cli"})," ở nền như tiến tr\xecnh con, n\xean ",(0,r.jsx)("b",{children:"bắt buộc c\xe0i Kiro CLI trước"}),". Proxy được truyền qua biến m\xf4i trường của cửa sổ VS Code, kh\xf4ng d\xf9ng ",(0,r.jsx)(o,{children:"http.proxy"}),". L\xe0m lần lượt 6 bước dưới, mỗi bước chạy trong Windows PowerShell."]}),(0,r.jsxs)("p",{className:N,children:["Lệnh của Kiro CLI l\xe0 ",(0,r.jsx)(o,{children:"kiro-cli"}),", kh\xf4ng phải ",(0,r.jsx)(o,{children:"kiro"}),". G\xf5 ",(0,r.jsx)(o,{children:"kiro"})," sẽ mở ứng dụng Kiro IDE, đ\xf3 l\xe0 chương tr\xecnh kh\xe1c."]}),(0,r.jsxs)(x,{n:1,title:"C\xe0i Kiro CLI",children:[(0,r.jsxs)("p",{className:f,children:["Chạy lệnh dưới. Bộ c\xe0i đặt Kiro CLI v\xe0o ",(0,r.jsx)(o,{children:"%LOCALAPPDATA%\\Kiro-Cli\\kiro-cli.exe"})," v\xe0 ",(0,r.jsx)("b",{children:"kh\xf4ng"})," tự th\xeam v\xe0o PATH."]}),(0,r.jsx)("div",{className:"mt-2",children:v({title:"C\xe0i Kiro CLI",command:g.installKiroCli,copyKey:"install-kiro-cli"})})]}),(0,r.jsxs)(x,{n:2,title:"Đặt kiro-cli v\xe0o thư mục extension t\xecm",children:[(0,r.jsxs)("p",{className:f,children:["Extension t\xecm ",(0,r.jsx)(o,{children:"kiro-cli"})," trong ",(0,r.jsx)(o,{children:"%USERPROFILE%\\.local\\bin"}),". Lệnh dưới tạo hard link tới file vừa c\xe0i (kh\xf4ng tốn th\xeam dung lượng, kh\xf4ng cần quyền admin) v\xe0 in ra phi\xean bản để kiểm tra. Nếu sau n\xe0y Kiro CLI được cập nhật, chạy lại lệnh n\xe0y."]}),(0,r.jsx)("div",{className:"mt-2",children:v({title:"Tạo li\xean kết kiro-cli",command:g.kiroLinkCli,copyKey:"kiro-link-cli"})})]}),(0,r.jsxs)(x,{n:3,title:"C\xe0i extension Kiro",children:[(0,r.jsxs)("p",{className:f,children:["Trong VS Code bấm ",(0,r.jsx)(o,{children:"Ctrl+Shift+X"}),", t\xecm ",(0,r.jsx)("b",{children:"Kiro"})," (nh\xe0 ph\xe1t h\xe0nh ",(0,r.jsx)("b",{children:"AsadBinImtiaz"}),") rồi bấm ",(0,r.jsx)("b",{children:"Install"}),". Hoặc chạy lệnh:"]}),(0,r.jsx)("div",{className:"mt-2",children:v({title:"C\xe0i extension bằng lệnh",command:g.installKiroExt,copyKey:"install-kiro-ext"})})]}),(0,r.jsx)(x,{n:4,title:"Tho\xe1t hẳn VS Code",children:(0,r.jsxs)("p",{className:f,children:["Đ\xf3ng mọi cửa sổ VS Code (File → Exit) v\xe0 kiểm tra Task Manager kh\xf4ng c\xf2n tiến tr\xecnh ",(0,r.jsx)(o,{children:"Code.exe"}),". Nếu VS Code c\xf2n chạy, lệnh ở bước sau chỉ mở th\xeam cửa sổ trong tiến tr\xecnh cũ v\xe0 biến proxy bị bỏ qua."]})}),(0,r.jsxs)(x,{n:5,title:"Mở lại VS Code bằng lệnh proxy",children:[(0,r.jsx)("div",{children:C("vscode-ps-kiro",g.vscodeKiroPowerShell,"Lệnh đổi t\xean biến Path th\xe0nh PATH (extension bị lỗi kh\xf4ng t\xecm thấy kiro-cli tr\xean Windows nếu t\xean biến l\xe0 Path) v\xe0 đặt biến proxy. Chỉ \xe1p dụng cho cửa sổ VS Code mở bằng lệnh n\xe0y.")}),(0,r.jsx)("p",{className:N,children:'Lu\xf4n mở VS Code bằng lệnh n\xe0y khi d\xf9ng Kiro. Mở từ icon th\xec extension b\xe1o "Kiro CLI not found" v\xe0 kh\xf4ng đi qua proxy.'})]}),(0,r.jsxs)(x,{n:6,title:"Đăng nhập v\xe0 chat thử",children:[(0,r.jsxs)("p",{className:f,children:["Bấm ",(0,r.jsx)(o,{children:"Ctrl+Shift+P"}),", chạy ",(0,r.jsx)(o,{children:"Kiro: Login"})," v\xe0 đăng nhập tr\xean tr\xecnh duyệt (tr\xecnh duyệt kh\xf4ng đi qua proxy). Sau đ\xf3 chạy ",(0,r.jsx)(o,{children:"Kiro: Open Chat"})," (hoặc bấm biểu tượng Kiro ở thanh b\xean tr\xe1i) v\xe0 gửi một tin bất kỳ."]}),(0,r.jsxs)("p",{className:f,children:["Nếu vừa c\xe0i xong m\xe0 vẫn b\xe1o kh\xf4ng t\xecm thấy CLI, chạy ",(0,r.jsx)(o,{children:"Kiro: Restart CLI"})," hoặc ",(0,r.jsx)(o,{children:"Developer: Reload Window"}),"."]})]})]}),k([{title:"Kiro IDE \xb7 Bash/zsh",command:g.kiroBash,copyKey:"kiro-bash"},{title:"VS Code \xb7 Bash/zsh",command:g.vscodeBash,copyKey:"vscode-bash-kiro"}])]}):null]})]})}}},e=>{e.O(0,[6373,3862,8500,9893,9959,7050,2218,5263,7033,5497,8441,3794,7358],()=>e(e.s=23371)),_N_E=e.O()}]);
|
|
Binary file
|
|
Binary file
|