@ltgiang/9router 0.4.56 → 0.4.59
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 +11 -10
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +6 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +9 -9
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -6
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +11 -10
- package/app/.next-cli-build/server/chunks/1051.js +1 -0
- package/app/.next-cli-build/server/chunks/1998.js +1 -0
- package/app/.next-cli-build/server/chunks/2409.js +1 -1
- package/app/.next-cli-build/server/chunks/2506.js +1 -1
- package/app/.next-cli-build/server/chunks/2971.js +1 -1
- package/app/.next-cli-build/server/chunks/3104.js +43 -0
- package/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +11 -9
- package/app/.next-cli-build/server/chunks/3381.js +2 -2
- package/app/.next-cli-build/server/chunks/3813.js +1 -0
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4177.js +1 -0
- package/app/.next-cli-build/server/chunks/4404.js +1 -1
- package/app/.next-cli-build/server/chunks/4632.js +1 -1
- package/app/.next-cli-build/server/chunks/4657.js +1 -0
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/4884.js +1 -1
- package/app/.next-cli-build/server/chunks/5010.js +1 -1
- package/app/.next-cli-build/server/chunks/{1655.js → 5433.js} +1 -1
- package/app/.next-cli-build/server/chunks/5681.js +1 -1
- package/app/.next-cli-build/server/chunks/5852.js +8 -0
- package/app/.next-cli-build/server/chunks/6064.js +1 -0
- package/app/.next-cli-build/server/chunks/6182.js +3 -3
- package/app/.next-cli-build/server/chunks/6936.js +1 -1
- package/app/.next-cli-build/server/chunks/7153.js +1 -1
- package/app/.next-cli-build/server/chunks/7250.js +1 -1
- package/app/.next-cli-build/server/chunks/8255.js +1 -1
- package/app/.next-cli-build/server/chunks/8590.js +1 -0
- package/app/.next-cli-build/server/chunks/8895.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- 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/N77ShAohsrY8sicPyFJFr/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-d29fe8a35a88cdf2.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-a745e8d5e628b264.js +7 -0
- package/app/.next-cli-build/static/chunks/914-573e927dd0d28804.js +3 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-a357671c9472c787.js → page-0518b1d85c00fe3e.js} +6 -6
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-224c5499bf501092.js +3 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7d8ba7acdca3b1c6.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/{page-6b02c15143bc1cca.js → page-2ca111238bffd5a2.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/{route-6b02c15143bc1cca.js → route-2ca111238bffd5a2.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/{route-6b02c15143bc1cca.js → route-2ca111238bffd5a2.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/{route-6b02c15143bc1cca.js → route-2ca111238bffd5a2.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/login/page-756b163b5203414c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-2ca111238bffd5a2.js +1 -0
- package/app/.next-cli-build/static/css/{1db2ff3a7369d178.css → 8f5036fca165eebd.css} +1 -1
- package/app/cli/.build-home/.9router/db/backups/{upgrade-0.4.46-to-0.4.47-0.4.47-20260516-124227 → upgrade-0.4.55-to-0.4.56-0.4.56-20260521-162223}/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
- package/app/package.json +1 -1
- package/app/src/lib/oauth/services/xai.js +238 -0
- package/app/src/mitm/server.js +23 -23
- package/cli.js +12 -12
- package/package.json +1 -1
- package/src/cli/api/client.js +20 -1
- package/app/.next-cli-build/server/chunks/2549.js +0 -1
- package/app/.next-cli-build/server/chunks/7501.js +0 -1
- package/app/.next-cli-build/server/chunks/7828.js +0 -1
- package/app/.next-cli-build/server/chunks/8491.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-d037a8598e0ed4cf.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-ebaac20f2fcfd25c.js +0 -7
- package/app/.next-cli-build/static/chunks/914-5d7d110eb3b938ed.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6dab1b1de42ced97.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-44a8b419b6016726.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/login/page-ecf983fcd7ff9995.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-6b02c15143bc1cca.js +0 -1
- package/app/.next-cli-build/static/ufC8FPl2yBPeh7OMV4m8N/_buildManifest.js +0 -1
- /package/app/.next-cli-build/static/{ufC8FPl2yBPeh7OMV4m8N → N77ShAohsrY8sicPyFJFr}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[914],{90914:(e,t,s)=>{Promise.resolve().then(s.bind(s,95907))},95907:(e,t,s)=>{"use strict";s.d(t,{default:()=>x});var a=s(95155),l=s(12115),n=s(14051),r=s.n(n),i=s(35497),o=s(11059);let c=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}];async function d(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(d);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}let u=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"}];function x({machineId:e}){let[t,s]=(0,l.useState)([]),[n,r]=(0,l.useState)(!0),[y,f]=(0,l.useState)(!1),[j,k]=(0,l.useState)(""),[v,w]=(0,l.useState)(null),[N,C]=(0,l.useState)(null),[S,T]=(0,l.useState)(!1),[_,P]=(0,l.useState)(!0),[E,$]=(0,l.useState)(!0),[A,O]=(0,l.useState)(!1),[U,D]=(0,l.useState)(!0),[I,F]=(0,l.useState)(!1),[R,L]=(0,l.useState)("full"),[q,W]=(0,l.useState)(!0),[K,J]=(0,l.useState)(!1),[z,H]=(0,l.useState)(!1),[M,B]=(0,l.useState)(""),[Z,Q]=(0,l.useState)(""),[V,G]=(0,l.useState)(!1),[X,Y]=(0,l.useState)(""),[ee,et]=(0,l.useState)(null),[es,ea]=(0,l.useState)(!1),[el,en]=(0,l.useState)(!1),[er,ei]=(0,l.useState)(!1),[eo,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(""),[eu,ex]=(0,l.useState)(!1),[eh,ep]=(0,l.useState)(""),[eb,eg]=(0,l.useState)(null),[ey,ef]=(0,l.useState)(""),[ej,ek]=(0,l.useState)(""),[ev,ew]=(0,l.useState)(null),[eN,eC]=(0,l.useState)(!1),[eS,eT]=(0,l.useState)([]),[e_,eP]=(0,l.useState)(""),[eE,e$]=(0,l.useState)(!1),[eA,eO]=(0,l.useState)(!1),[eU,eD]=(0,l.useState)(!1),eI=(0,l.useRef)(null),eF=(0,l.useRef)(0),eR=(0,l.useRef)(0),eL=(0,l.useRef)(!1),eq=(0,l.useRef)(!1),eW=(0,l.useRef)(!1),eK=(0,l.useRef)(!1),[eJ,ez]=(0,l.useState)(!1),[eH,eM]=(0,l.useState)(!1),[eB,eZ]=(0,l.useState)(new Set),{copied:eQ,copy:eV}=(0,o.C)(),eG=!_||!E,eX=_?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eI.current&&(eI.current.scrollTop=eI.current.scrollHeight)},[eS]),(0,l.useEffect)(()=>{e8(),e1()},[]),(0,l.useEffect)(()=>{if(!(K||er))return;let e=!K||z,t=!er||eo,s=()=>{document.hidden||e0()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||e0()},5e3);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[K,er,z,eo]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(K&&(M||Z)){let e=await m(Z,M);eL.current=e,e?(eF.current=0,H(!0),eW.current||(eW.current=!0,ez(!0))):(eF.current+=1,eF.current>=5&&H(!1))}else eL.current=!1;if(er&&ed){let e=await d(ed);eq.current=e,e?(eR.current=0,ec(!0),eK.current||(eK.current=!0,eM(!0))):(eR.current+=1,eR.current>=5&&ec(!1))}else eq.current=!1}};if(!(K&&(M||Z)||er&&ed))return;e();let t=!er||eo;if((!K||z)&&t)return;let s=setInterval(e,1e4);return()=>clearInterval(s)},[K,M,Z,er,ed,z,eo]);let eY=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=5&&a(!1))},[]),e0=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";B(a),Q(t.tunnel?.publicUrl||""),J(s),eY(null,eL,eF,H,eW,ez);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";em(n),ei(l),eY(null,eq,eR,ec,eK,eM)}catch{}},e1=async()=>{W(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();T(t.requireApiKey||!1),P(!1!==t.requireLogin),$(t.hasPassword||!1),O(t.tunnelDashboardAccess||!1),D(!1!==t.rtkEnabled),F(!!t.cavemanEnabled),L(t.cavemanLevel||"full")}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";B(a),Q(e.tunnel?.publicUrl||""),J(s),eY(null,eL,eF,H,eW,ez);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";em(n),ei(l),eY(null,eq,eR,ec,eK,eM)}}catch(e){console.log("Error loading settings:",e)}finally{W(!1)}},e5=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&O(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},e2=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&T(e)}catch(e){console.log("Error updating requireApiKey:",e)}},e4=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&D(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},e3=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},e8=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},e6=async(...e)=>{G(!0),Y("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<3e5;){if(await new Promise(e=>setTimeout(e,2e3)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return J(!0),G(!1),Y(""),!0;if((Date.now()-s)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return et({type:"error",message:"Tunnel process stopped unexpectedly."}),G(!1),Y(""),!1}}catch{}}return et({type:"error",message:"Tunnel created but not reachable. Please try again."}),G(!1),Y(""),!1},e9=async()=>{ea(!1),G(!0),et(null),Y("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?Y(`Downloading cloudflared... ${s.download.progress}%`):e&&Y("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void et({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void et({type:"error",message:"No tunnel URL returned"});B(a),Q(s.publicUrl||""),await e6(s.publicUrl,a)}catch(e){et({type:"error",message:e.message})}finally{e=!1,G(!1),Y("")}},e7=async()=>{G(!0),et(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(J(!1),B(""),en(!1),et({type:"success",message:"Tunnel disabled"})):et({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){et({type:"error",message:e.message})}finally{G(!1)}},te=async()=>{ew(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return ew(t.installed),t}}catch{}return ew(!1),{installed:!1}},tt=async()=>{eC(!0),eg(null),eT([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:e_})});eP("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)eT(e=>[...e.slice(-50),a.message]);else if("done"===s){ew(!0),eC(!1),eO(!1),tn();return}else"error"===s&&eg({type:"error",message:a.error||"Install failed"})}}}catch(e){eg({type:"error",message:e.message})}finally{eC(!1)}},ts=async e=>{ep("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<3e5;){await new Promise(e=>setTimeout(e,2e3));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},ta=(e,t)=>{ef(e),ek(t)},tl=()=>{ef(""),ek("")},tn=async()=>{eO(!1),e$(!0),ex(!0),eg(null),ep("Connecting..."),tl();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){em(t.tunnelUrl||"");let e=await ts(t.tunnelUrl);ei(!0),eg(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){ta(t.authUrl,"Open Login Page"),ep('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tl(),ep("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){em(t.tunnelUrl||"");let e=await ts(t.tunnelUrl);ei(!0),eg(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tr(t.enableUrl):eg({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tl(),eg({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tr(t.enableUrl);eg({type:"error",message:t.error||"Failed to connect"})}catch(e){eg({type:"error",message:e.message})}finally{ex(!1),e$(!1),ep(""),tl()}},tr=async e=>{ta(e,"Open Funnel Settings"),ep('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tl(),em(t.tunnelUrl||"");let e=await ts(t.tunnelUrl);ei(!0),eg(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tl(),eg({type:"error",message:t.error});return}}catch{}}tl(),eg({type:"error",message:"Timed out waiting for Funnel to be enabled."})},ti=async()=>{ex(!0),eg(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ei(!1),em(""),eD(!1),eg({type:"success",message:"Tailscale disabled"})):eg({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eg({type:"error",message:e.message})}finally{ex(!1)}},to=async()=>{eg(null),eT([]);let e=await te();e?.installed&&e?.hasCachedPassword?tn():eO(!0)},tc=async()=>{if(j.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:j})}),t=await e.json();e.ok&&(w(t.key),await e8(),k(""),f(!1))}catch(e){console.log("Error creating key:",e)}},td=async e=>{C({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{C(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),eZ(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tm=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[tu,tx]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{tx(`${window.location.origin}/v1`)},[]),n)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(i.Qv,{}),(0,a.jsx)(i.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(h,{label:"Local",url:tu,copyId:"local_url",copied:eQ,onCopy:eV}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${K?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),K&&!V&&z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${Z||M}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eV(`${Z||M}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===eQ?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>en(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!K||V||z?V?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),X||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{G(!1),Y("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ee?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ee.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ea(!0),children:"Enable"})]}):q?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>W(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{eG?et({type:"error",message:`Security required: ${eX}`}):S?ea(!0):et({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eJ?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>en(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${er?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),er&&!eu&&eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.pd,{value:`${ed}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eV(`${ed}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===eQ?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eD(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!er||eu||eo?eu||eE?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eh||"Connecting..."]}),ey&&(0,a.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(ey,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:ej||"Open"}),(0,a.jsx)("button",{onClick:()=>{ex(!1),e$(!1),ep(""),tl()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eb?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eb.message]}),(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:to,children:"Enable"})]}):(0,a.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{eG?eg({type:"error",message:`Security required: ${eX}`}):to()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eH?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>eD(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),eG&&!K&&!er&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(g,{message:eX,action:{label:"Open settings",href:"/dashboard/profile"}})}),(K||er)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!S&&(0,a.jsx)(g,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!_||!E)&&(0,a.jsx)(g,{message:_?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:_?"Change password":"Enable",href:"/dashboard/profile"}})]}),(K||er)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(i.lM,{checked:A,onChange:()=>e5(!A)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(b,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(i.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(i.lM,{checked:U,onChange:()=>e4(!U)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[I&&(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:u.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;L(t=e.id),e3({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${R===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)(i.lM,{checked:I,onChange:()=>{var e;F(e=!I),e3({cavemanEnabled:e})}})]})]})]}),(0,a.jsxs)(i.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>f(!0),children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(i.lM,{checked:S,onChange:()=>e2(!S)})]}),0===t.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,a.jsx)(i.$n,{icon:"add",onClick:()=>f(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,a.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono",children:eB.has(e.id)?e.key:(t=e.key)?t.length>8?t.slice(0,8)+"...":t:""}),(0,a.jsx)("button",{onClick:()=>{var t;return t=e.id,void eZ(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:eB.has(e.id)?"Hide key":"Show key",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eB.has(e.id)?"visibility_off":"visibility"})}),(0,a.jsx)("button",{onClick:()=>eV(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eQ===e.id?"check":"content_copy"})})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?C({title:"Pause API Key",message:`Pause API key "${e.name}"?
|
|
2
|
+
|
|
3
|
+
This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{C(null),tm(e.id,t)}}):tm(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>td(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,a.jsx)(i.aF,{isOpen:y,title:"Create API Key",onClose:()=>{f(!1),k("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(i.pd,{label:"Key Name",value:j,onChange:e=>k(e.target.value),placeholder:"Production Key"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tc,fullWidth:!0,disabled:!j.trim(),children:"Create"}),(0,a.jsx)(i.$n,{onClick:()=>{f(!1),k("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:!!v,title:"API Key Created",onClose:()=>w(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.pd,{value:v||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(i.$n,{variant:"secondary",icon:"created_key"===eQ?"check":"content_copy",onClick:()=>eV(v,"created_key"),children:"created_key"===eQ?"Copied!":"Copy"})]}),(0,a.jsx)(i.$n,{onClick:()=>w(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(i.aF,{isOpen:es,title:"Enable Tunnel",onClose:()=>ea(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:c.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e9,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(i.$n,{onClick:()=>ea(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:el,title:"Disable Tunnel",onClose:()=>!V&&en(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:e7,fullWidth:!0,disabled:V,variant:"danger",children:V?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>en(!1),variant:"ghost",fullWidth:!0,disabled:V,children:"Cancel"})]})]})}),(0,a.jsx)(i.aF,{isOpen:eA,title:"Tailscale Funnel",onClose:()=>{eN||(eO(!1),eP(""),eg(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ev&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ev&&!eN&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:tt,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(i.$n,{onClick:()=>eO(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eN&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eS.length>0&&(0,a.jsx)("div",{ref:eI,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eS.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===ev&&!eN&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:()=>tn(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(i.$n,{onClick:()=>eO(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eb&&(0,a.jsx)(p,{status:eb})]})}),(0,a.jsx)(i.aF,{isOpen:eU,title:"Disable Tailscale",onClose:()=>!eu&&eD(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:ti,fullWidth:!0,disabled:eu,variant:"danger",children:eu?"Disabling...":"Disable"}),(0,a.jsx)(i.$n,{onClick:()=>eD(!1),variant:"ghost",fullWidth:!0,disabled:eu,children:"Cancel"})]})]})}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>C(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}function h({label:e,url:t,copyId:s,copied:l,onCopy:n,badge:r,actions:o}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===r||"TS"===r?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,a.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})}),o]})}function p({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function b({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function g({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}x.propTypes={machineId:r().string.isRequired}}}]);
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
-H "Content-Type: application/json" \\
|
|
43
43
|
-H "Authorization: Bearer ${P||"YOUR_KEY"}" \\
|
|
44
44
|
-d '${JSON.stringify(ef)}' \\
|
|
45
|
-
${"json"===L?"":"--output speech.mp3"}`,ey=async()=>{if(!$.trim()||!eb)return;z(!0),H(""),D(""),q(null);let e=Date.now();try{let t={"Content-Type":"application/json"};P&&(t.Authorization=`Bearer ${P}`);let s=`/api/v1/audio/speech${"json"===L?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...ef,input:$.trim()})});if(G(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));H(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===L){let e=await a.json();q(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());D(URL.createObjectURL(t))}else{let e=await a.blob();D(URL.createObjectURL(e))}}catch(e){H(e.message||"Network error")}finally{z(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ex,"/v1/audio/speech"]}),M&&(0,a.jsxs)("button",{onClick:()=>E(e=>!e),title:T?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${T?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:P?`${P.slice(0,8)}${"•".repeat(Math.min(20,P.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),r.hasModelSelector&&(r.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,m.KC)(r.modelKey))||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),r.hasLanguageHint&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsxs)("select",{value:ec,onChange:e=>em(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto-detect"}),k.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),r.hasBrowseButton&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:ep,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:ee.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ep,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),b.length>0&&(0,a.jsx)(S,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,a.jsxs)("button",{onClick:()=>{l(e.id),u(e.name),r.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${o===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),r.hasVoiceIdInput&&(0,a.jsx)(S,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:x,onChange:e=>{h(e.target.value),l(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,a.jsx)("button",{type:"button",onClick:()=>{h(""),l("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),r.hasLanguageDropdown&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsx)("select",{value:o,onChange:t=>{let s=(0,m.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);l(t.target.value),u(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,m.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(S,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>_(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(S,{label:"Output Format",children:(0,a.jsxs)("select",{value:L,onChange:e=>B(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>Q(eg),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:Y?"check":"content_copy"}),Y?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ey,disabled:J||!$.trim()||!eb,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:J?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),J?"Generating...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eg})]}),V&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:V}),U?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",W&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",W,"ms"]})]}),(0,a.jsxs)("a",{href:U,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:U,className:"w-full"}),F&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:F.format,audio:F.audio?`${F.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:C})]})]})]}),Z&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>X(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>X(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:er,onChange:e=>eo(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[el&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:el}),es?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[eu.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return X(!1),y(e.code),void(f(t=ei[e.code]?.voices||[]),t.length&&(l(t[0].id),u(t[0].name),r.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===eu.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function E({providerId:e,kind:t}){let s=(0,c.wG)(e),r=c.rj.find(e=>e.id===t),o=A[t],l=o||{},d=(0,m.KC)(e).filter(e=>e.type===t),u=new Set(["image","video","music","imageToText"]).has(t),x=u&&0===d.length,[h,b]=(0,n.useState)(d[0]?.id??""),f=d.find(e=>e.id===h),g=!!f?.capabilities?.includes("edit"),y=!!f?.capabilities?.includes("mask"),[v,j]=(0,n.useState)(l.defaultInput||""),[w,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(""),[$,T]=(0,n.useState)(()=>(l.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[I,R]=(0,n.useState)(""),[O,M]=(0,n.useState)(!1),[K,L]=(0,n.useState)(""),[B,U]=(0,n.useState)(""),[D,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(null),[z,V]=(0,n.useState)(null),[H,W]=(0,n.useState)("json"),[G,Y]=(0,n.useState)(""),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)(""),[et,es]=(0,n.useState)([]),[ea,er]=(0,n.useState)(""),{copied:eo,copy:el}=(0,p.C)(),{copied:en,copy:ei}=(0,p.C)();if((0,n.useEffect)(()=>{L(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{R((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&U(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!r||!o)return null;let ed=O?B:K,ec=r.endpoint.path,em=u?h?`${s}/${h}`:x?"":s:s,ep="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===h?{image:_}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===h?{image:_,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},eu=w.trim()||ep.image||"",ex=k.trim()||ep.mask_image||"",eh=P(eu),eb=P(ex),ef=Object.entries($).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),eg={model:em,[o.bodyKey]:v,...o.extraBody,...ef,...g&&eu?{image:eu}:{},...y&&ex?{mask_image:ex}:{}},ey="image"===t&&"binary"===H,ev="image"===t&&"codex"===e&&!ey,ej=`${ec}${ey?"?response_format=binary":""}`,ew=`-H "Content-Type: application/json" \\
|
|
46
|
-
-H "Authorization: Bearer ${
|
|
47
|
-
-H "x-connection-id: ${
|
|
48
|
-
-H "Accept: text/event-stream"`:""}`,
|
|
49
|
-
${
|
|
50
|
-
-d '${JSON.stringify(eg)}'${ey?" \\\n --output image.png":""}`,ek=async()=>{if(!v.trim()||!em)return;if(Z(!0),ee(""),F(null),J(null),V(null),G){try{URL.revokeObjectURL(G)}catch{}Y("")}let e=Date.now();try{let t={"Content-Type":"application/json"};I&&(t.Authorization=`Bearer ${I}`),ea&&(t["x-connection-id"]=ea),ev&&(t.Accept="text/event-stream");let s={...eg,model:em},a=await fetch(`/api${ej}`,{method:r.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));ee(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let o=a.headers.get("content-type")||"";if(o.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);Y(s),F({data:{binary:!0,mime:o,size:t.size},latencyMs:Date.now()-e});return}if(o.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?J(e):"partial_image"===s?V(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void ee(l);o&&F({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;F({data:t,latencyMs:s})}}catch(e){ee(e.message||"Network error")}finally{Z(!1)}},eS=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eS);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:eS(a);return t},eC=D?JSON.stringify(eS(D.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[d.length>0?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:h,onChange:e=>b(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:d.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):x?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("input",{value:h,onChange:e=>b(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ed,ec]}),B&&(0,a.jsxs)("button",{onClick:()=>M(e=>!e),title:O?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${O?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:I?`${I.slice(0,8)}${"•".repeat(Math.min(20,I.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),et.length>0&&(0,a.jsx)(S,{label:"Connection",children:(0,a.jsxs)("select",{value:ea,onChange:e=>er(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto (by priority)"}),et.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(S,{label:o.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:o.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),v&&(0,a.jsx)("button",{type:"button",onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),g&&(0,a.jsx)(S,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:w,onChange:e=>N(e.target.value),placeholder:ep.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),w&&(0,a.jsx)("button",{type:"button",onClick:()=>N(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eh&&(0,a.jsx)("img",{src:eh,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),y&&(0,a.jsx)(S,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:k,onChange:e=>C(e.target.value),placeholder:ep.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),k&&(0,a.jsx)("button",{type:"button",onClick:()=>C(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,a.jsx)("img",{src:eb,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(o.extraFields||[]).filter(e=>0===d.length||Array.isArray(f?.params)&&f.params.includes(e.key)).map(e=>(0,a.jsx)(S,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:$[e.key]??"",onChange:t=>T(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:$[e.key]??"",placeholder:e.placeholder,onChange:t=>T(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:$[e.key]??"",min:e.min,max:e.max,onChange:t=>T(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)(S,{label:"Output Format",children:(0,a.jsxs)("select",{value:H,onChange:e=>W(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>el(eN),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:eo?"check":"content_copy"}),eo?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ek,disabled:Q||!v.trim()||!em,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),Q?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eN})]}),(Q||q)&&ev&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:Q?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[q?.stage||"starting",!Q&&q?.bytesReceived?` \xb7 ${(q.bytesReceived/1024).toFixed(1)} KB`:""]})]}),z?.b64_json&&!D&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${z.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),X&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:X}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",D&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",D.latencyMs,"ms"]})]}),D&&(0,a.jsxs)("button",{onClick:()=>ei(eC),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:en?"check":"content_copy"}),en?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:D?eC:o.defaultResponse}),"image"===t&&(G||D?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:G||(D?.data?.data?.[0]?.b64_json?`data:image/png;base64,${D.data.data[0].b64_json}`:D?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:G||(D?.data?.data?.[0]?.b64_json?`data:image/png;base64,${D.data.data[0].b64_json}`:D?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function R({providerId:e}){let t=(0,c.wG)(e),s=(0,m.KC)(e).filter(e=>"stt"===e.type),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,u]=(0,n.useState)(s[0]?.id??""),x=l.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,C]=(0,n.useState)(""),[$,_]=(0,n.useState)(""),[P,A]=(0,n.useState)(!1),[T,I]=(0,n.useState)(""),[E,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(null),[L,B]=(0,n.useState)(null),[U,D]=(0,n.useState)(!1),[F,q]=(0,n.useState)(""),{copied:J,copy:z}=(0,p.C)(),{copied:V,copy:H}=(0,p.C)();(0,n.useEffect)(()=>{I(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{_((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&O(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let W=P?E:T,G=d?`${t}/${d}`:"",Y=`curl -X POST ${W}/v1/audio/transcriptions \\
|
|
45
|
+
${"json"===L?"":"--output speech.mp3"}`,ey=async()=>{if(!$.trim()||!eb)return;z(!0),H(""),D(""),q(null);let e=Date.now();try{let t={"Content-Type":"application/json"};P&&(t.Authorization=`Bearer ${P}`);let s=`/api/v1/audio/speech${"json"===L?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...ef,input:$.trim()})});if(G(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));H(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===L){let e=await a.json();q(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());D(URL.createObjectURL(t))}else{let e=await a.blob();D(URL.createObjectURL(e))}}catch(e){H(e.message||"Network error")}finally{z(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ex,"/v1/audio/speech"]}),M&&(0,a.jsxs)("button",{onClick:()=>E(e=>!e),title:T?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${T?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:P?`${P.slice(0,8)}${"•".repeat(Math.min(20,P.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),r.hasModelSelector&&(r.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,m.KC)(r.modelKey))||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),r.hasLanguageHint&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsxs)("select",{value:ec,onChange:e=>em(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto-detect"}),k.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),r.hasBrowseButton&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:ep,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:ee.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ep,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),b.length>0&&(0,a.jsx)(S,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,a.jsxs)("button",{onClick:()=>{l(e.id),u(e.name),r.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${o===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),r.hasVoiceIdInput&&(0,a.jsx)(S,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:x,onChange:e=>{h(e.target.value),l(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,a.jsx)("button",{type:"button",onClick:()=>{h(""),l("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),r.hasLanguageDropdown&&(0,a.jsx)(S,{label:"Language",children:(0,a.jsx)("select",{value:o,onChange:t=>{let s=(0,m.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);l(t.target.value),u(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,m.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(S,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>_(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(S,{label:"Output Format",children:(0,a.jsxs)("select",{value:L,onChange:e=>B(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>Q(eg),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:Y?"check":"content_copy"}),Y?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ey,disabled:J||!$.trim()||!eb,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:J?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),J?"Generating...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:eg})]}),V&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:V}),U?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",W&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",W,"ms"]})]}),(0,a.jsxs)("a",{href:U,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:U,className:"w-full"}),F&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:F.format,audio:F.audio?`${F.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:C})]})]})]}),Z&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>X(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>X(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:er,onChange:e=>eo(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[el&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:el}),es?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[eu.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return X(!1),y(e.code),void(f(t=ei[e.code]?.voices||[]),t.length&&(l(t[0].id),u(t[0].name),r.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===eu.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function E({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=A[t],d=l||{},u=(0,m.KC)(e).filter(e=>e.type===t),x=new Set(["image","video","music","imageToText"]).has(t),h=x&&0===u.length,[b,f]=(0,n.useState)(u[0]?.id??""),g=u.find(e=>e.id===b),y=!!g?.capabilities?.includes("edit"),v=!!g?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[C,$]=(0,n.useState)(""),[T,I]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[R,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(!1),[L,B]=(0,n.useState)(""),[U,D]=(0,n.useState)(""),[F,q]=(0,n.useState)(null),[J,z]=(0,n.useState)(null),[V,H]=(0,n.useState)(null),[W,G]=(0,n.useState)("json"),[Y,Q]=(0,n.useState)(""),[Z,X]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(""),[es,ea]=(0,n.useState)([]),[er,eo]=(0,n.useState)(""),{copied:el,copy:en}=(0,p.C)(),{copied:ei,copy:ed}=(0,p.C)();if((0,n.useEffect)(()=>{B(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{O((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&D(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{ea((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let ec=M?U:L,em=o.endpoint.path,ep=x?b?`${r}/${b}`:h?"":r:r,eu="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===b?{image:_}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===b?{image:_,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ex=N.trim()||eu.image||"",eh=C.trim()||eu.mask_image||"",eb=P(ex),ef=P(eh),eg=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ey={model:ep,[l.bodyKey]:j,...l.extraBody,...eg,...y&&ex?{image:ex}:{},...v&&eh?{mask_image:eh}:{}},ev="image"===t&&"binary"===W,ej="image"===t&&"codex"===e&&!ev,ew=`${em}${ev?"?response_format=binary":""}`,eN=`-H "Content-Type: application/json" \\
|
|
46
|
+
-H "Authorization: Bearer ${R||"YOUR_KEY"}"${er?` \\
|
|
47
|
+
-H "x-connection-id: ${er}"`:""}${ej?` \\
|
|
48
|
+
-H "Accept: text/event-stream"`:""}`,ek=`curl -X ${o.endpoint.method} ${ec}${ew} \\
|
|
49
|
+
${eN.replace(/\\\n /g,"\\\n ")} \\
|
|
50
|
+
-d '${JSON.stringify(ey)}'${ev?" \\\n --output image.png":""}`,eS=async()=>{if(!j.trim()||!ep)return;if(X(!0),et(""),q(null),z(null),H(null),Y){try{URL.revokeObjectURL(Y)}catch{}Q("")}let e=Date.now();try{let t={"Content-Type":"application/json"};R&&(t.Authorization=`Bearer ${R}`),er&&(t["x-connection-id"]=er),ej&&(t.Accept="text/event-stream");let s={...ey,model:ep},a=await fetch(`/api${ew}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));et(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);Q(s),q({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?z(e):"partial_image"===s?H(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void et(l);o&&q({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;q({data:t,latencyMs:s})}}catch(e){et(e.message||"Network error")}finally{X(!1)}},eC=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eC);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:eC(a);return t},e$=F?JSON.stringify(eC(F.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[u.length>0?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:u.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):h?(0,a.jsx)(S,{label:"Model",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)(S,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ec,em]}),U&&(0,a.jsxs)("button",{onClick:()=>K(e=>!e),title:M?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${M?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)(S,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:R?`${R.slice(0,8)}${"•".repeat(Math.min(20,R.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),es.length>0&&(0,a.jsx)(S,{label:"Connection",children:(0,a.jsxs)("select",{value:er,onChange:e=>eo(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto (by priority)"}),es.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(S,{label:l.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:l.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,a.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),y&&(0,a.jsx)(S,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:eu.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),N&&(0,a.jsx)("button",{type:"button",onClick:()=>k(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,a.jsx)("img",{src:eb,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,a.jsx)(S,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:C,onChange:e=>$(e.target.value),placeholder:eu.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>$(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),ef&&(0,a.jsx)("img",{src:ef,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(l.extraFields||[]).filter(e=>0===u.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,a.jsx)(S,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:T[e.key]??"",onChange:t=>I(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:T[e.key]??"",placeholder:e.placeholder,onChange:t=>I(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:T[e.key]??"",min:e.min,max:e.max,onChange:t=>I(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)(S,{label:"Output Format",children:(0,a.jsxs)("select",{value:W,onChange:e=>G(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>en(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:el?"check":"content_copy"}),el?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eS,disabled:Z||!j.trim()||!ep,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Z?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),Z?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:ek})]}),(Z||J)&&ej&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:Z?{animation:"spin 1s linear infinite"}:void 0,children:Z?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[J?.stage||"starting",!Z&&J?.bytesReceived?` \xb7 ${(J.bytesReceived/1024).toFixed(1)} KB`:""]})]}),V?.b64_json&&!F&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${V.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),ee&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:ee}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",F&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",F.latencyMs,"ms"]})]}),F&&(0,a.jsxs)("button",{onClick:()=>ed(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ei?"check":"content_copy"}),ei?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:F?e$:l.defaultResponse}),"image"===t&&(Y||F?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:Y||(F?.data?.data?.[0]?.b64_json?`data:image/png;base64,${F.data.data[0].b64_json}`:F?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function R({providerId:e}){let t=(0,c.wG)(e),s=(0,m.KC)(e).filter(e=>"stt"===e.type),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,u]=(0,n.useState)(s[0]?.id??""),x=l.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,C]=(0,n.useState)(""),[$,_]=(0,n.useState)(""),[P,A]=(0,n.useState)(!1),[T,I]=(0,n.useState)(""),[E,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(null),[L,B]=(0,n.useState)(null),[U,D]=(0,n.useState)(!1),[F,q]=(0,n.useState)(""),{copied:J,copy:z}=(0,p.C)(),{copied:V,copy:H}=(0,p.C)();(0,n.useEffect)(()=>{I(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{_((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&O(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let W=P?E:T,G=d?`${t}/${d}`:"",Y=`curl -X POST ${W}/v1/audio/transcriptions \\
|
|
51
51
|
-H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
|
|
52
52
|
-F "file=@${b?.name||"audio.mp3"}" \\
|
|
53
53
|
-F "model=${G}"${h.includes("language")&&g?` \\
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{17721:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>S});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059);let x=new Map;async function u(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return x.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var h=s(14051),f=s.n(h);function g({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:p,onDisable:m}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:c,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):m?(0,a.jsx)("button",{onClick:m,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function y({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function b({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:p}){let[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[v,j]=(0,i.useState)(null),[N,w]=(0,i.useState)({}),k=async t=>{if(!v){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();w(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},A=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},$=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:p?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:A,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:$,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(y,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>k(e):void 0,testStatus:N[e],isTesting:v===e},s))})]})}function v({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x,oneByOneStatus:u=null}){let[h,f]=(0,i.useState)(!1),[g,y]=(0,i.useState)(!1),b=(0,i.useRef)(null),N=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,k=w?N.get(w):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!w||C,A=k?`Pool: ${k.name}`:w?`Pool: ${w} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",$="";if(k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);$=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{$=t}}let T=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O="default";k?.isActive===!0?O="success":(w||C)&&(O="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{b.current&&!b.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let P=async e=>{y(!0);try{await p("__none__"===e?null:e)}finally{y(!1),f(!1)}},I=e.authType||(s?"oauth":"apikey"),E="oauth"===I,R="cookie"===I,D=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),U=E?D(e.email)?e.email:D(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[_,z]=(0,i.useState)(!1),q=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{z(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=q?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[q]);let M="unavailable"!==e.testStatus||_?e.testStatus:"active",K=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:R?"cookie":E?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:U}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===M||"success"===M?"success":"error"===M||"expired"===M||"unavailable"===M?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":M||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:E?"OAuth":R?"Cookie":"API Key"}),S&&(0,a.jsx)(d.Ex,{variant:O,size:"sm",children:"Proxy"}),_&&!1!==e.isActive&&(0,a.jsx)(v,{until:q}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),K()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:K()})]}),S&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:A,children:A}),$&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:$}),T&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:b,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}g.propTypes={model:f().shape({id:f().string.isRequired}).isRequired,fullModel:f().string.isRequired,alias:f().string,copied:f().string,onCopy:f().func.isRequired,testStatus:f().oneOf(["ok","error"]),isCustom:f().bool,isFree:f().bool,onDeleteAlias:f().func,onTest:f().func,isTesting:f().bool,onDisable:f().func},f().string.isRequired,f().string.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func,f().oneOf(["ok","error"]),f().bool,f().string.isRequired,f().object.isRequired,f().string,f().func.isRequired,f().func.isRequired,f().func.isRequired,b.propTypes={providerStorageAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,modelAliases:f().object.isRequired,copied:f().string,onCopy:f().func.isRequired,onSetAlias:f().func.isRequired,onDeleteAlias:f().func.isRequired,connections:f().arrayOf(f().shape({id:f().string,isActive:f().bool})).isRequired,isAnthropic:f().bool},v.propTypes={until:f().string.isRequired},j.propTypes={connection:f().shape({id:f().string,name:f().string,email:f().string,displayName:f().string,modelLockUntil:f().string,testStatus:f().string,isActive:f().bool,lastError:f().string,priority:f().number,globalPriority:f().number}).isRequired,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string,proxyUrl:f().string,noProxy:f().string,isActive:f().bool})),isOAuth:f().bool.isRequired,isFirst:f().bool.isRequired,isLast:f().bool.isRequired,onMoveUp:f().func.isRequired,onMoveDown:f().func.isRequired,onToggleActive:f().func.isRequired,onUpdateProxy:f().func,onEdit:f().func.isRequired,onDelete:f().func.isRequired,oneByOneStatus:f().shape({state:f().string,error:f().string})};let N=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function w({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:p,proxyPools:m,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",k="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,A=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[$,T]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[O,P]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,E]=(0,i.useState)({accountId:""}),[R,D]=(0,i.useState)(A),[U,_]=(0,i.useState)(!1),[z,q]=(0,i.useState)(null),[M,K]=(0,i.useState)(!1),[F,L]=(0,i.useState)("single"),[J,W]=(0,i.useState)(""),[B,H]=(0,i.useState)(null),V=()=>y&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:k?{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization}:C?{accountId:I.accountId}:S&&R?{region:R}:void 0,G=async()=>{_(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{_(!1)}},Q=async()=>{if(t&&(y||$.apiKey)&&(y||$.name)&&(!l||$.defaultModel.trim())){K(!0);try{let e=!1;try{_(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{_(!1)}await u({name:$.name||(y?"Ollama Local":""),apiKey:$.apiKey,defaultModel:l?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},Z=async()=>{let e=J.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),H(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),H({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{L("single"),H(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{L("bulk"),H(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:N,value:J,onChange:e=>W(e.target.value)}),B&&(0,a.jsxs)("div",{className:`text-sm font-medium ${B.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",B.success," added",B.failed>0?`, ✗ ${B.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!J.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:$.name,onChange:e=>T({...$,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>T({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:j,type:b?"text":"password",value:$.apiKey,onChange:e=>T({...$,apiKey:e.target.value}),placeholder:b?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:G,disabled:!$.apiKey||U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),v&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:R,onChange:e=>D(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>T({...$,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),z&&(0,a.jsx)(d.Ex,{variant:"success"===z?"success":"error",children:"success"===z?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>E({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>P({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>P({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:O.apiVersion,onChange:e=>P({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:O.organization,onChange:e=>P({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>T({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>T({...$,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:M||!y&&(!$.name||!$.apiKey)||l&&!$.defaultModel.trim()||k&&(!O.azureEndpoint||!O.deployment||!O.organization)||C&&!I.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function k({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function C({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,p]=(0,i.useState)(null),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),p(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){p("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();p(a.ok?"ok":"error"),x(a.error||"")}catch(e){p("error"),x(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),p(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:m||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}function S(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[f,y]=(0,i.useState)(!0),[v,N]=(0,i.useState)(null),[S,A]=(0,i.useState)([]),[$,T]=(0,i.useState)(!1),[O,P]=(0,i.useState)(!1),[I,E]=(0,i.useState)(!1),[R,D]=(0,i.useState)(""),[U,_]=(0,i.useState)(!1),[z,q]=(0,i.useState)(!1),[M,K]=(0,i.useState)(!1),[F,L]=(0,i.useState)(null),[J,W]=(0,i.useState)({}),[B,H]=(0,i.useState)(!1),[V,G]=(0,i.useState)({}),[Q,Z]=(0,i.useState)(""),[X,Y]=(0,i.useState)(null),[ee,et]=(0,i.useState)(!1),[es,ea]=(0,i.useState)([]),[ei,el]=(0,i.useState)("__none__"),[er,en]=(0,i.useState)(!1),[eo,ed]=(0,i.useState)(null),[ec,ep]=(0,i.useState)(""),[em,ex]=(0,i.useState)("auto"),[eu,eh]=(0,i.useState)([]),[ef,eg]=(0,i.useState)([]),[ey,eb]=(0,i.useState)([]),[ev,ej]=(0,i.useState)(null),[eN,ew]=(0,i.useState)(!1),[ek,eC]=(0,i.useState)(!1),[eS,eA]=(0,i.useState)(!1),[e$,eT]=(0,i.useState)(null),[eO,eP]=(0,i.useState)({}),[eI,eE]=(0,i.useState)(null),eR=(0,i.useRef)(!1),{copied:eD,copy:eU}=(0,m.C)(),e_="ag_risk_confirmed",ez=()=>{T(!0)},eq=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(e_)?ew(!0):eJ?ez():(D(""),E(!0))},eM=()=>{D(""),E(!0)},eK=()=>{eJ?eq():eM()},eF=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],eL=eF?.authModes||[],eJ=!!c.zN[r]||!!c.IS[r]||eL.includes("oauth"),eW=!!c.fg[r]||eL.includes("apikey"),eB=!!c.IS[r]?.noAuth,eH=(0,p.KC)(r),eV=(0,c.wG)(r),eG=(0,c.mq)(r),eQ=(0,c.gb)(r),eZ=eG||eQ,eX=!eZ&&eJ&&eW,eY="xai"===r?"Grok Build OAuth":"OAuth",e0="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let e1=eZ?r:eV,e2=eZ?v?.prefix||r:eV,e5=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e1)}`,{cache:"no-store"}),t=await e.json();e.ok&&eb(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[e1]),e3=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e1,ids:[e]})})).ok&&await e5()}catch(e){console.log("Error disabling model:",e)}},e4=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e1)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await e5()}catch(e){console.log("Error enabling model:",e)}},e6=async e=>{e.length&&ej({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{ej(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:e1,ids:e})})).ok&&await e5()}catch(e){console.log("Error disabling all models:",e)}}})},e7=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(e1)}`,{method:"DELETE"})).ok&&await e5()}catch(e){console.log("Error enabling all models:",e)}},e8=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&W(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eg(e.models)}).catch(()=>{})},[r]);let e9=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),n=await s.json(),o=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}s.ok&&A(n.proxyPools||[]);let d=(o.providerStrategies||{})[r]||{};ed(d.fallbackStrategy||null),ep(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1");let c=(o.providerThinking||{})[r]||{};if(ex(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&eZ)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}N(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[r,eZ]),te=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(N(s.node),await e9(),q(!1))}catch(e){console.log("Error updating provider node:",e)}},tt=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{e9(),e8(),e5()},[e9,e8,e5]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(eh)},[r]);let ts=async(e,t,s=eV)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await e8();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},ta=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await e8()}catch(e){console.log("Error deleting alias:",e)}},ti=async()=>{if(ek||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eR.current=!1,eC(!0),eA(!1),eT(null),eP(e),eE({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<x.length;e+=1){if(eR.current){eE({total:x.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=x[e];eT(a.id),eP(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eP(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eP(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eE({total:x.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eT(null),eC(!1),eA(!1),eR.current=!1}},tl=async e=>{ej({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{ej(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tr=()=>{e9(),T(!1)},tn=async e=>{D("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await e9(),E(!1);return}D(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),D("Failed to save connection")}},to=async e=>{try{(await fetch(`/api/providers/${F.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await e9(),_(!1))}catch(e){console.log("Error updating connection:",e)}},td=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tc=async(e,t)=>{let s=[...x];[s[e],s[t]]=[s[t],s[e]],h(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await e9()}},tp=x.filter(e=>es.includes(e.id));x.length>0&&(es.length,x.length),(0,i.useEffect)(()=>{ea(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tp.length)return;let e=new Set(tp.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=S.find(e=>e.id===t);return s?.name}})();let tm=()=>{er||K(!1)},tx=async e=>{en(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await e9(),K(!1)}finally{en(!1)}},tu=e=>tx(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),th=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(j,{connection:e,proxyPools:S,isOAuth:eJ,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tc(t,t-1),onMoveDown:()=>tc(t,t+1),onToggleActive:t=>td(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{L(e),_(!0)},onDelete:()=>tl(e.id),oneByOneStatus:eO[e.id]||null})})},e.id))}),tf=S.filter(e=>!0===e.isActive),tg=(0,a.jsx)(d.aF,{isOpen:M,onClose:tm,title:`Apply Proxy (${x.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=S.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tx(x.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:er||0===tf.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tu(null),disabled:er,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),S.map(e=>(0,a.jsxs)("button",{onClick:()=>tu(e.id),disabled:er||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),er&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tm,variant:"ghost",fullWidth:!0,disabled:er,children:"Cancel"})]})}),ty=async e=>{if(!X){Y(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e1}/${e}`})}),s=await t.json();G(t=>({...t,[e]:s.ok?"ok":"error"})),Z(s.ok?"":s.error||"Model not reachable")}catch{G(t=>({...t,[e]:"error"})),Z("Network error")}finally{Y(null)}}};return f?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):eF?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${eF.color}15`},children:B?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:eF.color},children:eF.textIcon||eF.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:eG&&eF.apiType?"responses"===eF.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":eQ?"/providers/anthropic-m.png":`/providers/${eF.id}.png`,alt:eF.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>H(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:eF.name}),(eF.notice?.apiKeyUrl||eF.notice?.signupUrl||eF.website)&&(0,a.jsxs)("a",{href:eF.notice?.apiKeyUrl||eF.notice?.signupUrl||eF.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),eF.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),eF.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:eF.deprecationNotice})]}),eF.notice?.text&&!eF.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:eF.notice.text}),eF.notice.apiKeyUrl&&(0,a.jsx)("a",{href:eF.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),eZ&&v&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:eQ?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[eQ?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",eQ?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{D(""),E(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>q(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{ej({title:"Delete Compatible Node",message:`Delete this ${eQ?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{ej(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),eB?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[x.length>0&&S.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>K(!0),children:"Apply Proxy"}),x.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:ti,disabled:ek,children:ek?"Testing Connection One-by-One...":"Test Connection One-by-One"}),ek&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{ek&&(eR.current=!0,eA(!0))},disabled:eS,children:eS?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eo,onChange:e=>{let t=e?"round-robin":null,s=e?ec||"1":ec;e&&!ec&&ep("1"),ed(t),tt(t,s)}}),"round-robin"===eo&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:ec,onChange:e=>{var t;ep(t=e.target.value),tt("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===x.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:eJ?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),eX&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",eY," or ",e0,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:eX?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eq,children:eY}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eM,children:e0})]}):(0,a.jsxs)(a.Fragment,{children:[!eZ&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),children:"Cookie"}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:eK,children:eZ?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eI&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eI.total]}),(0,a.jsxs)("span",{children:["Completed: ",eI.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eI.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eI.failed]}),eI.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),ek&&e$&&(0,a.jsxs)("span",{children:["Running: ",x.find(e=>e.id===e$)?.name||e$]})]})}),th,!eZ&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>P(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),eX?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:eq,className:"w-full sm:w-auto",children:eY}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:eM,className:"w-full sm:w-auto",children:e0})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:eK,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!eZ&&(e=[...eH,...ef.filter(e=>!eH.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!ey.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[ey.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:e7,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>e6(e),children:"Disable All"})]}))]}),!!Q&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Q}),(()=>{let e,t,s;if(eZ)return(0,a.jsx)(b,{providerStorageAlias:e1,providerDisplayAlias:e2,modelAliases:J,copied:eD,onCopy:eU,onSetAlias:ts,onDeleteAlias:ta,connections:x,isAnthropic:eQ});let i=[...eH,...ef.filter(e=>!eH.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(ey),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(J).filter(([e,t])=>{let s=`${e1}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return eF.passthroughModels?!eH.some(e=>e.id===a):!eH.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${e1}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(g,{model:{id:e.id},fullModel:`${e2}/${e.id}`,alias:e.alias,copied:eD,onCopy:eU,onSetAlias:()=>{},onDeleteAlias:()=>ta(e.alias),testStatus:V[e.id],onTest:x.length>0||eB?()=>ty(e.id):void 0,isTesting:X===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${e1}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(J).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(g,{model:e,fullModel:`${e2}/${e.id}`,alias:i,copied:eD,onCopy:eU,onSetAlias:t=>ts(e.id,t,e1),onDeleteAlias:()=>ta(i),testStatus:V[e.id],onTest:x.length>0||eB?()=>ty(e.id):void 0,isTesting:X===e.id,isFree:e.isFree,onDisable:()=>e3(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>et(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),eu.length>0&&(e=new Set(Object.values(J)),t=new Set(eH.map(e=>e.id)),0===(s=eu.filter(s=>!e.has(`${e1}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await ts(e.id,t,e1)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>e4(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tg,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:$,providerInfo:eF,onSuccess:tr,onClose:()=>T(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:$,onSuccess:tr,onClose:()=>T(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:$,providerInfo:eF,onSuccess:tr,onClose:()=>T(!1)}):(0,a.jsx)(d.LF,{isOpen:$,provider:r,providerInfo:eF,onSuccess:tr,onClose:()=>T(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:O,onSuccess:()=>{e9(),P(!1)},onClose:()=>P(!1)}),(0,a.jsx)(w,{isOpen:I,provider:r,providerName:eF.name,isCompatible:eZ,isAnthropic:eQ,authType:eF?.authType,authHint:eF?.authHint,website:eF?.website,proxyPools:S,error:R,onSave:tn,onBulkDone:e9,onClose:()=>{D(""),E(!1)}}),(0,a.jsx)(d.wI,{isOpen:U,connection:F,proxyPools:S,onSave:to,onClose:()=>_(!1)}),eZ&&(0,a.jsx)(k,{isOpen:z,node:v,onSave:te,onClose:()=>q(!1),isAnthropic:eQ}),!eZ&&(0,a.jsx)(C,{isOpen:ee,providerAlias:e1,providerDisplayAlias:e2,onSave:async e=>{let t=eF?.passthroughModels?e.split("/").pop():e;await ts(e,t,e1),et(!1)},onClose:()=>et(!1)}),(0,a.jsx)(d.uo,{isOpen:eN,onClose:()=>ew(!1),onConfirm:()=>{(window.localStorage.setItem(e_,"true"),ew(!1),eJ)?ez():eM()},title:"Risk Notice",message:eF?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!ev,onClose:()=>ej(null),onConfirm:ev?.onConfirm,title:ev?.title||"Confirm",message:ev?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}w.propTypes={isOpen:f().bool.isRequired,provider:f().string,providerName:f().string,isCompatible:f().bool,isAnthropic:f().bool,authType:f().string,authHint:f().string,website:f().string,proxyPools:f().arrayOf(f().shape({id:f().string,name:f().string})),error:f().string,onSave:f().func.isRequired,onBulkDone:f().func,onClose:f().func.isRequired},k.propTypes={isOpen:f().bool.isRequired,node:f().shape({id:f().string,name:f().string,prefix:f().string,apiType:f().string,baseUrl:f().string}),onSave:f().func.isRequired,onClose:f().func.isRequired,isAnthropic:f().bool},C.propTypes={isOpen:f().bool.isRequired,providerAlias:f().string.isRequired,providerDisplayAlias:f().string.isRequired,onSave:f().func.isRequired,onClose:f().func.isRequired}},54700:(e,t,s)=>{Promise.resolve().then(s.bind(s,17721))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=54700)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-7d8ba7acdca3b1c6.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{48780:(e,t,r)=>{Promise.resolve().then(r.bind(r,75095)),Promise.resolve().then(r.bind(r,25086))},75095:(e,t,r)=>{"use strict";r.d(t,{default:()=>N});var a=r(95155),s=r(12115),l=r(57250),i=r(45564);function n(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function o({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:l=!1}){let[i,c]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):n(e?.used,e?.total)})),[e]),u=(0,s.useMemo)(()=>"remaining-asc"===r?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,r]),m=Math.max(1,Math.ceil(u.length/10));if((0,s.useEffect)(()=>{c(1)},[r,e]),(0,s.useEffect)(()=>{c(e=>Math.min(e,m))},[m]),!e||0===e.length)return null;let x=u.slice((i-1)*10,10*i),h=0===u.length?0:(i-1)*10+1,b=Math.min(10*i,u.length),p=t?"py-1 px-1.5":"py-2 px-3",g=t?"text-[11px]":"text-sm",f=t?"text-[11px]":"text-sm",v=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[u.length," quota",u.length>1?"s":""]}),l&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:x.map(e=>{var r;let s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},l=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let s=Math.ceil(a/6e4);if(s<60)return`${s}m`;let l=Math.floor(s/60),i=s%60;if(l<24)return`${l}h ${i}m`;let n=Math.floor(l/24);return`${n}d ${l%24}h ${i}m`}catch(e){return"-"}}(e.resetAt),i=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),s=new Date(a);s.setDate(s.getDate()+1);let l="";l=t>=a&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let i=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${l}, ${i}`}catch{return null}}(e.resetAt);return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${p} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${g} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${p} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${p} w-[25%]`,children:"-"!==l||i?t?(0,a.jsx)("div",{className:`${f} text-text-primary font-medium truncate`,title:i||"",children:"-"!==l?`in ${l}`:i}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==l&&(0,a.jsxs)("div",{className:`${f} text-text-primary font-medium`,children:["in ",l]}),i&&(0,a.jsx)("div",{className:`${v} text-text-muted`,children:i})]}):(0,a.jsx)("div",{className:`${f} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),m>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",h,"-",b," of ",u.length]}),(0,a.jsxs)("span",{children:["Page ",i," / ",m]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.max(1,e-1)),disabled:1===i,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>c(e=>Math.min(m,e+1)),disabled:i===m,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var c=r(98542),d=r(84588),u=r(35497),m=r(52679);function x(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function b(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function p(e,t){return await e(t)}let g="quotaCacheData";function f(){try{let e=window.localStorage.getItem(g);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function v(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(g,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}let y="quotaAutoRefresh",k=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],w=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],j=[10,20,50,100];function N(){let[e,t]=(0,s.useState)([]),[r,N]=(0,s.useState)({}),[S,C]=(0,s.useState)({}),[$,E]=(0,s.useState)({}),[A,q]=(0,s.useState)(!0),[P,M]=(0,s.useState)(null),[D,T]=(0,s.useState)(!1),[I,O]=(0,s.useState)(!1),[L,_]=(0,s.useState)(60),[F,z]=(0,s.useState)(!0),[U,R]=(0,s.useState)(null),[J,K]=(0,s.useState)(null),[B,G]=(0,s.useState)(!1),[H,Y]=(0,s.useState)(null),[Q,V]=(0,s.useState)([]),[W,X]=(0,s.useState)("all"),[Z,ee]=(0,s.useState)([]),[et,er]=(0,s.useState)("all"),[ea,es]=(0,s.useState)("default"),[el,ei]=(0,s.useState)(!1),[en,eo]=(0,s.useState)(!1),[ec,ed]=(0,s.useState)(!1),[eu,em]=(0,s.useState)(1),[ex,eh]=(0,s.useState)(20),[eb,ep]=(0,s.useState)(String(20)),[eg,ef]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ev,ey]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),ek=(0,s.useRef)(null),ew=(0,s.useRef)(null),ej=(0,s.useCallback)(async(e=eu)=>{try{var r,a;let s=new URLSearchParams({page:String(e),pageSize:String(ex),accountStatus:et,sort:"priority"});"all"!==W&&s.set("provider",W);let l=await fetch(`/api/providers/client?${s.toString()}`);if(!l.ok)throw Error("Failed to fetch connections");let i=await l.json(),n=i.connections||[],o=(r=i.pagination,r||{page:1,pageSize:ex,total:0,totalPages:1}),c=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return t(n),ee(i.providerOptions||[]),ef(o),ey(c),em((a=i.pagination,a?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),t([]),ee([]),ef({page:1,pageSize:ex,total:0,totalPages:1}),ey({eligibleConnections:0,providerFilteredConnections:0}),[]}},[et,el,eu,ex,W]),eN=(0,s.useCallback)(async(e,t)=>{C(t=>({...t,[e]:!0})),E(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let a=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};N(t=>({...t,[e]:r})),v(e,r);return}throw Error(`HTTP ${r.status}: ${a}`)}let a=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,a);let s={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,i.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,s=r.modelKey||r.name;return(e.get(a)??999)-(e.get(s)??999)})}return r}(t,a),plan:a.plan||null,message:a.message||null,raw:a};N(t=>({...t,[e]:s})),v(e,s)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),E(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{C(t=>({...t,[e]:!1}))}},[]),eS=(0,s.useCallback)(async(e,t)=>{await eN(e,t),M(new Date)},[eN]),eC=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){R(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){N(t=>{let r={...t};return delete r[e],r}),C(t=>{let r={...t};return delete r[e],r}),E(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(g,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await p(ej,eu)}}catch(e){console.error("Error deleting connection:",e)}finally{R(null)}}},[ej,eu]),e$=(0,s.useCallback)(async(e,t)=>{K(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(N(e=>({...e})),await p(ej,eu))}catch(e){console.error("Error updating connection status:",e)}finally{K(null)}},[ej,eu]),eE=(0,s.useCallback)(async e=>{if(!H?.id)return;let t=H.id,r=H.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await ej(),G(!1),Y(null),m.wb.includes(r)&&await eN(t,r))}catch(e){console.error("Error saving connection:",e)}},[H,ej,eN]);(0,s.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&V(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eA=(0,s.useCallback)(async()=>{if(!I){O(!0),_(60);try{let e,t=await ej(eu);C((e={},t.forEach(t=>{e[t.id]=!0}),e)),E(e=>b(e,t)),N(e=>b(e,t)),await Promise.all(t.map(e=>eN(e.id,e.provider))),M(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{O(!1)}}},[I,ej,eN,eu]);(0,s.useEffect)(()=>{(async()=>{z(!0);let e=await ej(eu);z(!1);let t=f(),r={},a={},s=[],l=null;e.forEach(e=>{let i=t[e.id];if(i){if(r[e.id]=!1,a[e.id]={quotas:i.quotas,plan:i.plan,message:i.message,raw:i.raw},i.cachedAt){let e=new Date(i.cachedAt);(!l||e>l)&&(l=e)}}else r[e.id]=!0,s.push(e)}),C(r),E(r=>{let a=b(r,e);return e.forEach(e=>{t[e.id]&&(a[e.id]=null)}),a}),N(t=>({...b(t,e),...a})),l&&M(l),s.length>0&&(await Promise.all(s.map(e=>eN(e.id,e.provider))),M(new Date))})()},[ej,eN,eu]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(y);q(null===e||"true"===e),T(!0)},[]),(0,s.useEffect)(()=>{D&&window.localStorage.setItem(y,String(A))},[A,D]),(0,s.useEffect)(()=>{if(!D||!A){ek.current&&(clearInterval(ek.current),ek.current=null),ew.current&&(clearInterval(ew.current),ew.current=null);return}return ek.current=setInterval(()=>{eA()},6e4),ew.current=setInterval(()=>{_(e=>e<=1?60:e-1)},1e3),()=>{ek.current&&clearInterval(ek.current),ew.current&&clearInterval(ew.current)}},[A,eA,D]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?(ek.current&&(clearInterval(ek.current),ek.current=null),ew.current&&(clearInterval(ew.current),ew.current=null)):A&&D&&(ek.current=setInterval(eA,6e4),ew.current=setInterval(()=>{_(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[A,eA,D]);let eq=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=h(e,t),l=h(r,t),i="remaining-asc"===s?a-l:l-a;return 0!==i?i:(x(e)||"").localeCompare(x(r)||"")});if(!r)return e;let l=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=l(e)-l(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(x(e)||"").localeCompare(x(t)||"")})})(e,r,el,W,ea),[e,r,el,W,ea]),eP=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=n(e.used,e.total))},eM=(0,s.useCallback)(async(e,t)=>{if(e.length&&!ec){ed(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await p(ej,eu)}catch(e){console.error("Error bulk toggling connections:",e)}finally{ed(!1)}}},[ec,ej,eu]),eD="all"===W?"All providers":W,eT=ev.eligibleConnections>0,eI=eq.length>0,eO=ev.eligibleConnections?ev.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===W?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===et?"turned off":"active"===et?"active":"matching"} accounts found for ${W}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eL=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(eg),e_=!j.includes(ex);return F||eT?F||eI?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eo(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":en,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===W?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(l.A,{src:`/providers/${W}.png`,alt:W,size:18,className:"size-[18px] rounded object-contain",fallbackText:W.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:eD})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),en&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eo(!1)}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-black/10 bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{"all"!==W&&em(1),X("all"),eo(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===W?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===W&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:Z.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{W!==e&&em(1),X(e),eo(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${W===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(l.A,{src:`/providers/${e}.png`,alt:e,size:24,className:"size-6 rounded-md object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:e}),W===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:et,onChange:e=>{let t=e.target.value;et!==t&&em(1),er(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:k.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===W&&(0,a.jsx)("select",{value:ea,onChange:e=>es(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:w.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>ei(e=>!e),"aria-pressed":el,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${el?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eM(eq.filter(e=>(e.isActive??!0)&&eP(e)).map(e=>e.id),!1)},disabled:ec,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{eM(eq.filter(e=>!(e.isActive??!0)&&!eP(e)).map(e=>e.id),!0)},disabled:ec,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:()=>q(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:A?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${A?"text-primary":"text-text-muted"}`,children:A?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),A&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",L,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:eA,disabled:I,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${I?"animate-spin":""}`,children:"refresh"})})]})}),el&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:eq.map(e=>{let t=r[e.id],s=S[e.id],i=$[e.id],n=!1===e.isActive,u=U===e.id||J===e.id;return(0,a.jsxs)(d.default,{padding:"none",className:`min-w-0 ${n?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)(l.A,{src:`/providers/${e.provider}.png`,alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.provider}),x(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:x(e)}):null]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eS(e.id,e.provider),disabled:s||u,"aria-label":"Refresh quota",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${s?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("button",{type:"button",onClick:()=>{Y(e),G(!0)},disabled:u,"aria-label":"Edit connection",className:"p-1.5 rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>eC(e.id),disabled:u,"aria-label":"Delete connection",className:"p-1.5 rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${U===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(c.default,{size:"sm",checked:e.isActive??!0,disabled:u,onChange:t=>e$(e.id,t)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:s?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):t?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:t.message})}):(0,a.jsx)(o,{quotas:t?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==ea})})]},e.id)})}),(0,a.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:eL}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:e_?"custom":String(ex),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(em(1),eh(r),ep(String(r)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[j.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eb,onChange:e=>ep(e.target.value),onBlur:()=>{let e=Number.parseInt(eb,10);if(!Number.isFinite(e))return void ep(String(ex));let t=Math.min(500,Math.max(1,e));em(1),eh(t),ep(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eb,10);if(!Number.isFinite(t))return void ep(String(ex));let r=Math.min(500,Math.max(1,t));em(1),eh(r),ep(String(r))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eg.page," / ",eg.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>em(1),disabled:eg.page<=1||F||I,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>em(e=>Math.max(1,e-1)),disabled:eg.page<=1||F||I,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>em(e=>Math.min(eg.totalPages,e+1)),disabled:eg.page>=eg.totalPages||F||I,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>em(eg.totalPages),disabled:eg.page>=eg.totalPages||F||I,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,a.jsx)(u.wI,{isOpen:B,connection:H,proxyPools:Q,onSave:eE,onClose:()=>{G(!1),Y(null)}})]}):(0,a.jsx)(d.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:eO.icon}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:eO.title}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:eO.description})]})}):(0,a.jsx)(d.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=48780)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-2ca111238bffd5a2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,747,748,907,931,948,992,997,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1697,1860,1907,1910,1946,1949,2121,2198,2284,2296,2525,2536,2772,2785,2797,2919,2922,3025,3038,3079,3397,3472,3507,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4656,4674,4761,4896,4993,5018,5107,5177,5211,5226,5466,5637,5685,5745,5922,6091,6107,6121,6268,6319,6479,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7758,7824,7851,8026,8167,8207,8246,8453,8489,8573,8648,8736,8791,8814,8870,8948,8974,8975,9027,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|