zevairouter 1.1.52 → 1.1.54
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/CHANGELOG.md +18 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +4 -4
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/prerender-manifest.json +8 -8
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openbot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/cloudflare-ai/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/codebuddy/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/flow/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kiro/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/opencode/discover-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/quota-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/routing-stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/content/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback.html +1 -1
- package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing.html +1 -1
- package/cli/app/.next-cli-build/server/app/landing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/login.html +1 -1
- package/cli/app/.next-cli-build/server/app/login.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page.js +1 -1
- package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/provider-icons/[provider]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/skills/[skill]/SKILL.md/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +4 -4
- package/cli/app/.next-cli-build/server/chunks/1131.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1133.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2299.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2301.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2409.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2557.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2897.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3263.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3792.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3999.js +6 -6
- package/cli/app/.next-cli-build/server/chunks/412.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4315.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4404.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/4621.js +5 -5
- package/cli/app/.next-cli-build/server/chunks/4632.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/492.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/5024.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5232.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/5330.js +22 -90
- package/cli/app/.next-cli-build/server/chunks/5434.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5470.js +43 -0
- package/cli/app/.next-cli-build/server/chunks/5681.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6492.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6846.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/6975.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7170.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7319.js +34 -102
- package/cli/app/.next-cli-build/server/chunks/7574.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8590.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8704.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8895.js +5 -5
- package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9835.js +1 -1
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/middleware.js +1 -1
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/server/preview-props.json +3 -3
- package/cli/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/cli/app/.next-cli-build/static/chunks/{2428-ecbb80abca3fb652.js → 2428-f51bd60da0d68544.js} +9 -9
- package/cli/app/.next-cli-build/static/chunks/5497-d65896d0ab5bf79b.js +7 -0
- package/cli/app/.next-cli-build/static/chunks/620-5640f47d79090714.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/page-52f7042d637a4529.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-1dec996259aec597.js → page-e5ea9dcf77270c43.js} +10 -10
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-15fcbe6c6cdbde8b.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-f185396ea907ce64.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-d274fc7161c16f8d.js → page-892a47c5b9e3faa4.js} +2 -2
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-8acdeec3b3492d59.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d9d614a7882ac4e7.js +1 -0
- package/cli/app/CHANGELOG.md +18 -0
- package/cli/app/package.json +1 -1
- package/cli/app/src/mitm/server.js +36 -35
- package/cli/package.json +1 -1
- package/package.json +1 -1
- package/cli/app/.next-cli-build/server/chunks/1787.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/3477.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/4897.js +0 -43
- package/cli/app/.next-cli-build/static/chunks/5497-74f6311426810796.js +0 -7
- package/cli/app/.next-cli-build/static/chunks/620-f24624f9d928485e.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/context/page-77addc44606df015.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-a4b7b35c87bf288a.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-c1dd161a602793bf.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-638bb31d9879c8b8.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-d46069e1e0f9459b.js +0 -1
- package/cli/app/public/providers/cartesia.png +0 -0
- package/cli/app/public/providers/coqui.png +0 -0
- package/cli/app/public/providers/devin-cli.png +0 -0
- package/cli/app/public/providers/playht.png +0 -0
- package/cli/app/public/providers/tortoise.png +0 -0
- package/cli/app/public/providers/trae.png +0 -0
- package/cli/app/public/providers/windsurf.png +0 -0
- package/cli/app/public/providers/zed.png +0 -0
- /package/cli/app/.next-cli-build/static/{w6rI6Eo9wZpomiTy4cHZb → K4Y6sYkr_FeZxe3WAVk77}/_buildManifest.js +0 -0
- /package/cli/app/.next-cli-build/static/{w6rI6Eo9wZpomiTy4cHZb → K4Y6sYkr_FeZxe3WAVk77}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{52424:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),l=s(73321),i=s(35497),o=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),u=s(38202);function p(){let e=(0,l.useRouter)(),{theme:t,setTheme:s,isDark:p}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,v]=(0,r.useState)(!1),[w,S]=(0,r.useState)({fallbackStrategy:"fill-first"}),[C,k]=(0,r.useState)(!0),[L,P]=(0,r.useState)({current:"",new:"",confirm:""}),[O,I]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)(!1),[T,R]=(0,r.useState)(!1),[E,U]=(0,r.useState)({type:"",message:""}),[D,$]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[F,q]=(0,r.useState)(""),[J,H]=(0,r.useState)({type:"",message:""}),[_,z]=(0,r.useState)(!1),[B,W]=(0,r.useState)(!1),[Z,K]=(0,r.useState)({type:"",message:""}),[Q,V]=(0,r.useState)("/api/auth/oidc/callback"),[X,G]=(0,r.useState)(!1),[Y,ee]=(0,r.useState)({samlEntryPoint:"",samlIssuer:"urn:zevairouter:sp",samlLoginLabel:"Sign in with SAML SSO",samlAttributeEmail:"email",samlAttributeName:"name"}),[et,es]=(0,r.useState)(""),[ea,er]=(0,r.useState)({type:"",message:""}),[el,ei]=(0,r.useState)(!1),[eo,en]=(0,r.useState)(!1),[ed,ec]=(0,r.useState)({type:"",message:""}),[em,ex]=(0,r.useState)("/api/auth/saml/acs"),[eu,ep]=(0,r.useState)("/api/auth/saml/metadata"),[eh,eb]=(0,r.useState)(!1),[eg,ey]=(0,r.useState)("oidc"),ef=(0,r.useRef)(null),[ej,eN]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ev,ew]=(0,r.useState)({type:"",message:""}),[eS,eC]=(0,r.useState)(!1),[ek,eL]=(0,r.useState)(!1);(0,r.useEffect)(()=>{b(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[g]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{S(e),$({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),q(""),ee({samlEntryPoint:e?.samlEntryPoint||"",samlIssuer:e?.samlIssuer||"urn:zevairouter:sp",samlLoginLabel:e?.samlLoginLabel||"Sign in with SAML SSO",samlAttributeEmail:e?.samlAttributeEmail||"email",samlAttributeName:e?.samlAttributeName||"name"}),es(e?.samlCert||""),ey(e?.ssoType||(e?.authMode==="saml"?"saml":"oidc")),(e?.authMode==="oidc"||e?.authMode==="both")&&G(!0),(e?.authMode==="saml"||e?.ssoType==="saml")&&eb(!0),eN({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),k(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),k(!1)})},[]),(0,r.useEffect)(()=>{V(`${window.location.origin}/api/auth/oidc/callback`),ex(`${window.location.origin}/api/auth/saml/acs`),ep(`${window.location.origin}/api/auth/saml/metadata`)},[]);let eP=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){eC(!0),ew({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ej.outboundProxyUrl,outboundNoProxy:ej.outboundNoProxy})}),t=await e.json();e.ok?(S(e=>({...e,...t})),ew({type:"success",message:"Proxy settings applied"})):ew({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ew({type:"error",message:"An error occurred"})}finally{eC(!1)}}},eO=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(ej.outboundProxyUrl||"").trim();if(!e)return void ew({type:"error",message:"Please enter a Proxy URL to test"});eL(!0),ew({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?ew({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ew({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ew({type:"error",message:"An error occurred"})}finally{eL(!1)}},eI=async e=>{eC(!0),ew({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(S(e=>({...e,...s})),eN(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ew({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ew({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ew({type:"error",message:"An error occurred"})}finally{eC(!1)}},eA=async e=>{if(e.preventDefault(),L.new!==L.confirm)return void I({type:"error",message:"Passwords do not match"});M(!0),I({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:L.current,newPassword:L.new})}),t=await e.json();e.ok?(I({type:"success",message:"Password updated successfully"}),P({current:"",new:"",confirm:""})):I({type:"error",message:t.error||"Failed to update password"})}catch(e){I({type:"error",message:"An error occurred"})}finally{M(!1)}},eM=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&S(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eT=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({responseCacheEnabled:e})})).ok&&S(t=>({...t,responseCacheEnabled:e}))}catch(e){console.error("Failed to update settings:",e)}},eR=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&S(t=>({...t,...e}))}catch(e){console.error("Failed to update alert settings:",e)}},eE=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&S(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eU=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&S(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eD=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&S(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},e$=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&S(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},eF=(e,t)=>{$(s=>({...s,[e]:t}))},eq=async(e=D.authMode||"password")=>{let t=D.oidcIssuerUrl.trim(),s=D.oidcClientId.trim(),a=D.oidcScopes.trim(),r=D.oidcLoginLabel.trim(),l=F.trim();if("password"!==e&&(!t||!s||!l)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});z(!0),H({type:"",message:""}),K({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};l&&(i.oidcClientSecret=l);let o=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await o.json();o.ok?(S(e=>({...e,...n})),$({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),q(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{z(!1)}},eJ=async()=>{let e=D.oidcIssuerUrl.trim(),t=D.oidcClientId.trim(),s=D.oidcScopes.trim(),a=F.trim();if(!e||!t)return void K({type:"error",message:"Issuer URL and client ID are required to test the connection."});W(!0),H({type:"",message:""}),K({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:D.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:D.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),l=await r.json().catch(()=>({}));if(!r.ok)return void K({type:"error",message:l.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:l.oidcIssuerUrl||e,clientId:l.oidcClientId||t,scopes:l.oidcScopes||s||"openid profile email"})}),o=await i.json().catch(()=>({}));if(i.ok&&o?.ok){let e=o.clientSecretTested?!0===o.clientSecretValid?`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${o.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${o.issuerUrl}.`;K({type:"success",message:e})}else K({type:"error",message:o.error||"OIDC connection test failed"})}catch(e){K({type:"error",message:"An error occurred"})}finally{W(!1)}},eH=(e,t)=>{ee(s=>({...s,[e]:t}))},e_=async e=>{if(e)try{let t=await e.text(),s=t.match(/<[^>]*SingleSignOnService[^>]*Binding="[^"]*HTTP-Redirect"[^>]*Location="([^"]+)"/i)||t.match(/<[^>]*SingleSignOnService[^>]*Location="([^"]+)"[^>]*Binding="[^"]*HTTP-Redirect"/i)||t.match(/<[^>]*SingleSignOnService[^>]*Location="([^"]+)"/i),a=t.match(/<[^>]*X509Certificate[^>]*>([\s\S]*?)<\/[^>]*X509Certificate>/i);s&&eH("samlEntryPoint",s[1].trim()),a&&es(a[1].replace(/\s+/g,"").trim()),er({type:s||a?"success":"error",message:s||a?"Metadata parsed. Review the entry point and certificate, then save.":"Could not find SSO URL or certificate in the uploaded metadata."})}catch{er({type:"error",message:"Failed to read the metadata file."})}},ez=async e=>{if(e)try{es((await e.text()).trim()),er({type:"success",message:"Certificate loaded. Save to apply."})}catch{er({type:"error",message:"Failed to read the certificate file."})}},eB=async e=>{let t=Y.samlEntryPoint.trim(),s=et.trim(),a=e||w.authMode||"password";if("password"!==a&&(!t||!s)&&!w.samlConfigured)return void er({type:"error",message:"IdP SSO URL and certificate are required to enable SAML."});ei(!0),er({type:"",message:""}),ec({type:"",message:""});try{let e={authMode:a,ssoType:"saml",samlEntryPoint:t,samlIssuer:Y.samlIssuer.trim()||"urn:zevairouter:sp",samlLoginLabel:Y.samlLoginLabel.trim()||"Sign in with SAML SSO",samlAttributeEmail:Y.samlAttributeEmail.trim()||"email",samlAttributeName:Y.samlAttributeName.trim()||"name",samlCert:s},r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),l=await r.json();r.ok?(S(e=>({...e,...l})),ey("saml"),er({type:"success",message:"saml"===a?"SAML login enabled":"both"===a?"Password and SAML login enabled":"SAML settings saved"})):er({type:"error",message:l.error||"Failed to save SAML settings"})}catch{er({type:"error",message:"An error occurred"})}finally{ei(!1)}},eW=async()=>{en(!0),er({type:"",message:""}),ec({type:"",message:""});try{let e=await fetch("/api/auth/saml/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({samlEntryPoint:Y.samlEntryPoint.trim(),samlIssuer:Y.samlIssuer.trim()||"urn:zevairouter:sp",samlCert:et.trim()})}),t=await e.json().catch(()=>({}));e.ok&&t?.ok?ec({type:"success",message:t.message||"SAML configuration looks valid."}):ec({type:"error",message:t.error||"SAML config test failed"})}catch{ec({type:"error",message:"An error occurred"})}finally{en(!1)}},eZ=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&S(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eK=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();S(t)}catch(e){console.error("Failed to reload settings:",e)}},eQ=async()=>{R(!0),U({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),l=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");l.href=r,l.download=`zevairouter-backup-${i}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r);let o=(a.size/1048576).toFixed(2),n=Array.isArray(t?.excludedTables)&&t.excludedTables.length?` (config only — skipped ${t.excludedTables.join(", ")})`:"";U({type:"success",message:`Database backup downloaded (${o} MB)${n}`})}catch(e){U({type:"error",message:e.message||"Failed to export database"})}finally{R(!1)}},eV=async e=>{let t=e.target.files?.[0];if(t){R(!0),U({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await eK(),U({type:"success",message:"Database imported successfully"})}catch(e){U({type:"error",message:e.message||"Invalid backup file"})}finally{ef.current&&(ef.current.value=""),R(!1)}}},eX=!0===w.enableObservability,eG=async()=>{v(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}v(!1),j(!1)},eY=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.zevai/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"secondary",icon:"download",onClick:eQ,loading:T,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>ef.current?.click(),disabled:T,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ef,type:"file",accept:"application/json,.json",className:"hidden",onChange:eV})]}),E.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===E.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:E.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:u.h[h]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===w.requireLogin,onChange:()=>e$(!w.requireLogin),disabled:C})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:eA,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:L.current,onChange:e=>P({...L,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:L.new,onChange:e=>P({...L,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:L.confirm,onChange:e=>P({...L,confirm:e.target.value}),required:!0})]})]}),O.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===O.type?"text-red-500":"text-green-500"}`,children:O.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:A,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>G(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:X?"expand_less":"expand_more"})]}),X&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=D.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>eF("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:C||_,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(i.pd,{placeholder:"https://auth.example.com/application/o/zevairouter/",value:D.oidcIssuerUrl,onChange:e=>eF("oidcIssuerUrl",e.target.value),disabled:C||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(i.pd,{placeholder:"zevairouter-dashboard",value:D.oidcClientId,onChange:e=>eF("oidcClientId",e.target.value),disabled:C||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:F,onChange:e=>q(e.target.value),disabled:C||_}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(i.pd,{placeholder:"openid profile email",value:D.oidcScopes,onChange:e=>eF("oidcScopes",e.target.value),disabled:C||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with OIDC",value:D.oidcLoginLabel,onChange:e=>eF("oidcLoginLabel",e.target.value),disabled:C||_})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Q})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:_,onClick:()=>eq(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:B,onClick:eJ,className:"w-full sm:w-auto",children:"Test connection"})]}),Z.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===Z.type?"text-red-500":"text-green-500"}`,children:Z.message}),J.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===J.type?"text-red-500":"text-green-500"}`,children:J.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>eb(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"badge"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"SAML 2.0 SSO"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"saml"===eg&&w.samlConfigured?"saml"===w.authMode?"SAML active":"both"===w.authMode?"Password + SAML active":"SAML configured":"Optional SSO via Okta / Entra ID / OneLogin / ADFS"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:eh?"expand_less":"expand_more"})]}),eh&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use any SAML 2.0 identity provider to sign in to the dashboard. OIDC and SAML are mutually exclusive SSO types; saving here sets the SSO type to SAML. Model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"saml",title:"SAML only",desc:"Require SAML for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or SAML."}].map(e=>{let t=(w.authMode||"password")===e.value&&("password"===e.value||"saml"===eg);return(0,a.jsxs)("button",{type:"button",onClick:()=>eB(e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:C||el,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"IdP SSO URL (Entry Point)"}),(0,a.jsx)(i.pd,{placeholder:"https://idp.example.com/app/xxxx/sso/saml",value:Y.samlEntryPoint,onChange:e=>eH("samlEntryPoint",e.target.value),disabled:C||el})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"IdP X.509 Certificate"}),(0,a.jsx)("textarea",{className:"w-full rounded-lg border border-border bg-bg p-2 font-mono text-xs min-h-[96px]",placeholder:"Paste the IdP signing certificate (PEM or base64), or upload below",value:et,onChange:e=>es(e.target.value),disabled:C||el}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsxs)("label",{className:"text-xs sm:text-sm text-primary cursor-pointer",children:["Upload IdP metadata XML",(0,a.jsx)("input",{type:"file",accept:".xml,text/xml,application/xml",className:"hidden",onChange:e=>e_(e.target.files?.[0])})]}),(0,a.jsxs)("label",{className:"text-xs sm:text-sm text-primary cursor-pointer",children:["Upload certificate (.pem/.crt)",(0,a.jsx)("input",{type:"file",accept:".pem,.crt,.cer,.txt",className:"hidden",onChange:e=>ez(e.target.files?.[0])})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"SP Entity ID (Issuer)"}),(0,a.jsx)(i.pd,{placeholder:"urn:zevairouter:sp",value:Y.samlIssuer,onChange:e=>eH("samlIssuer",e.target.value),disabled:C||el})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Email Attribute"}),(0,a.jsx)(i.pd,{placeholder:"email",value:Y.samlAttributeEmail,onChange:e=>eH("samlAttributeEmail",e.target.value),disabled:C||el})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Name Attribute"}),(0,a.jsx)(i.pd,{placeholder:"name",value:Y.samlAttributeName,onChange:e=>eH("samlAttributeName",e.target.value),disabled:C||el})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with SAML SSO",value:Y.samlLoginLabel,onChange:e=>eH("samlLoginLabel",e.target.value),disabled:C||el})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Register these with your IdP"}),(0,a.jsx)("p",{className:"mt-1",children:"ACS (Reply) URL"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:em}),(0,a.jsx)("p",{className:"mt-2",children:"SP Metadata URL"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:eu})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:el,onClick:()=>eB("password"!==w.authMode&&w.authMode?w.authMode:"saml"),className:"w-full sm:w-auto",children:"Save SAML settings"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:eo,onClick:eW,className:"w-full sm:w-auto",children:"Test configuration"})]}),ed.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ed.type?"text-red-500":"text-green-500"}`,children:ed.message}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"}`,children:ea.message}),"saml"===w.authMode&&"saml"===eg&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"SAML login is currently active. Password login is disabled until you switch back."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>eM("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:C})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eU(e.target.value),disabled:C,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Most Quota"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Pick the account with the most remaining quota (uses cached usage)"})]}),(0,a.jsx)(i.lM,{checked:"most-quota"===w.fallbackStrategy,onChange:()=>eM("most-quota"===w.fallbackStrategy?"fill-first":"most-quota"),disabled:C})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Lowest Latency"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Route to the fastest account by recent avg response time"})]}),(0,a.jsx)(i.lM,{checked:"lowest-latency"===w.fallbackStrategy,onChange:()=>eM("lowest-latency"===w.fallbackStrategy?"fill-first":"lowest-latency"),disabled:C})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Response Cache"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cache repeated temperature-0 requests per API key"})]}),(0,a.jsx)(i.lM,{checked:!0===w.responseCacheEnabled,onChange:()=>eT(!0!==w.responseCacheEnabled),disabled:C})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Webhook Alerts"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Notify on provider down / quota exhausted (Discord, Telegram, or generic webhook)"})]}),(0,a.jsx)(i.lM,{checked:!0===w.alertEnabled,onChange:()=>eR({alertEnabled:!0!==w.alertEnabled}),disabled:C})]}),!0===w.alertEnabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Webhook URL"}),(0,a.jsx)(i.pd,{type:"url",placeholder:"https://discord.com/api/webhooks/… or https://api.telegram.org/bot<token>/sendMessage",defaultValue:w.alertWebhookUrl||"",onBlur:e=>eR({alertWebhookUrl:e.target.value.trim()}),disabled:C})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Type"}),(0,a.jsxs)("select",{defaultValue:w.alertWebhookType||"discord",onChange:e=>eR({alertWebhookType:e.target.value}),disabled:C,className:"w-full px-2 py-1.5 text-sm bg-transparent border border-border rounded",children:[(0,a.jsx)("option",{value:"discord",children:"Discord"}),(0,a.jsx)("option",{value:"telegram",children:"Telegram"}),(0,a.jsx)("option",{value:"generic",children:"Generic JSON"})]})]}),"telegram"===w.alertWebhookType&&(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Telegram Chat ID"}),(0,a.jsx)(i.pd,{type:"text",placeholder:"-1001234567890",defaultValue:w.alertTelegramChatId||"",onBlur:e=>eR({alertTelegramChatId:e.target.value.trim()}),disabled:C})]})]})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eE("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:C})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eD(e.target.value),disabled:C,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"most-quota"===w.fallbackStrategy?"Currently routing to the account with the most remaining quota.":"lowest-latency"===w.fallbackStrategy?"Currently routing to the fastest account by recent avg latency.":"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(i.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>eI(!0!==w.outboundProxyEnabled),disabled:C||eS})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:eP,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(i.pd,{placeholder:"http://127.0.0.1:7897",value:ej.outboundProxyUrl,onChange:e=>eN(t=>({...t,outboundProxyUrl:e.target.value})),disabled:C||eS}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(i.pd,{placeholder:"localhost,127.0.0.1",value:ej.outboundNoProxy,onChange:e=>eN(t=>({...t,outboundNoProxy:e.target.value})),disabled:C||eS}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(i.$n,{type:"button",variant:"secondary",loading:ek,disabled:C||eS,onClick:eO,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:eS,className:"w-full sm:w-auto",children:"Apply"})]})]}),ev.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ev.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ev.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(i.lM,{checked:eX,onChange:eZ,disabled:C})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eY,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:g,onClose:e=>{y(!1),b(e)}}),(0,a.jsx)(o.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eG,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:N})]})}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=52424)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{5498:(e,t,r)=>{Promise.resolve().then(r.bind(r,23686)),Promise.resolve().then(r.bind(r,25086))},23686:(e,t,r)=>{"use strict";r.d(t,{default:()=>M});var a=r(95155),s=r(12115),n=r(57250),i=r(8129);function l(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 n=Math.floor(s/60),i=s%60;if(n<24)return`${n}h ${i}m`;let l=Math.floor(n/24);return`${l}d ${n%24}h ${i}m`}catch(e){return"-"}}function o(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function c(e){if(e?.unlimited===!0)return e?.remainingPercentage!==void 0&&Number.isFinite(Number(e.remainingPercentage))?Math.max(0,Math.min(100,Math.round(Number(e.remainingPercentage)))):100;if(e?.remainingPercentage!==void 0&&Number.isFinite(Number(e.remainingPercentage)))return Math.max(0,Math.min(100,Math.round(Number(e.remainingPercentage))));if(e?.remaining!==void 0&&Number.isFinite(Number(e.remaining))){let t=Number(e.remaining);if(t>=0&&t<=100&&!(e.total>100&&t<=100&&null!=e.used))return e.total>0?o(e.used,e.total):Math.round(t)}return o(e?.used,e?.total)}function d(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":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])=>{let a=e.endsWith("_freetrial"),s=(a?e.slice(0,-10):e).split(/[_\s]+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");r.push({name:a?`${s} (Free Trial)`:s,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"autoclaw":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:"points"===e?"Points":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message&&!t.quotas?r.push({name:"error",isError:!0,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})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=!0===t.unlimited||!(t.total>0)&&t.remainingPercentage>0;r.push({name:e,used:t.used||0,total:a?0:t.total||0,resetAt:t.resetAt||null,remainingPercentage:null!=t.remainingPercentage?t.remainingPercentage:a?100:void 0,unlimited:a})});break;case"cloudflare-ai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{let a=!0===t.unlimited||!(t.total>0);r.push({name:e,used:t.used||0,total:a?0:t.total||0,resetAt:t.resetAt||null,remainingPercentage:null!=t.remainingPercentage?t.remainingPercentage:100*!!a,unlimited:a})});break;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,...null!=t.remainingPercentage?{remainingPercentage:t.remainingPercentage}:{},...!0===t.unlimited?{unlimited:!0}:{}})})}}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}var u=r(58041);function m(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 n="";n=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`${n}, ${i}`}catch{return null}}function x(e){return e>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:e>=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"}}let h=["name","used","total","resetAt","remaining","remainingPercentage","unlimited","message","isError","unit","modelKey"];function p({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:n=!1,paginate:i=!0,totalCount:o}){let[d,b]=(0,s.useState)(1),[g,f]=(0,s.useState)(e);g===e||Array.isArray(g)&&Array.isArray(e)&&g.length===e.length&&g.every((t,r)=>{let a=e[r];return t&&a?h.every(e=>String(t[e]??null)===String(a[e]??null)):t===a})||f(e);let v=(0,s.useMemo)(()=>g.map((e,t)=>({...e,index:t,remaining:c(e)})),[g]),y=(0,s.useMemo)(()=>"remaining-asc"===r?[...v].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...v].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):v,[v,r]),j=i?Math.max(1,Math.ceil(y.length/10)):1;if((0,s.useEffect)(()=>{b(1)},[r,g]),(0,s.useEffect)(()=>{b(e=>Math.min(e,j))},[j]),!e||0===e.length)return null;let k=i?y.slice((d-1)*10,10*d):y,w=0===y.length?0:(d-1)*10+1,N=i?Math.min(10*d,y.length):y.length,$=Number.isFinite(o)?o:y.length,C=t?"py-1 px-1.5":"py-2 px-3",S=t?"text-[11px]":"text-sm",A=t?"text-[11px]":"text-sm",E=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:[$," quota",$>1?"s":""]}),n&&(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)(u.DataList,{"aria-label":"Quota details",className:"sm:hidden",children:k.map(e=>{if(e.isError)return(0,a.jsx)(u.DataRow,{label:"Quota error",value:(0,a.jsx)("span",{className:"text-red-600 dark:text-red-400",children:e.message||"Failed to load quota"})},`mobile-error-${e.index}`);let t=x(e.remaining),r=l(e.resetAt),s=m(e.resetAt),n=!0!==e.unlimited&&e.total>0?`${e.used.toLocaleString()} / ${e.total.toLocaleString()}`:!0===e.unlimited?"Included / unlimited":`${e.used.toLocaleString()} / unlimited`;return(0,a.jsx)(u.DataRow,{label:e.name,value:(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("div",{className:`h-1.5 overflow-hidden rounded-full ${t.bgLight}`,children:(0,a.jsx)("div",{className:`h-full ${t.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 text-xs",children:[(0,a.jsx)("span",{className:"text-text-muted",children:n}),(0,a.jsx)("span",{className:`font-semibold ${t.text}`,children:Number.isFinite(e.remaining)?`${e.remaining}% remaining`:"Unknown"})]})]}),detail:"-"!==r?`Resets in ${r}${s?` \xb7 ${s}`:""}`:s?`Resets ${s}`:"No reset window"},`mobile-${e.name}-${e.index}`)})}),(0,a.jsx)("div",{className:"hidden overflow-x-auto sm:block",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:k.map(e=>{if(e.isError)return(0,a.jsx)("tr",{className:"border-b border-black/5 dark:border-white/5",children:(0,a.jsx)("td",{colSpan:3,className:`${C}`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px] text-red-500",children:"error"}),(0,a.jsx)("span",{className:`${S} text-red-600 dark:text-red-400 truncate`,children:e.message||"Failed to load quota"})]})})},`error-${e.index}`);let r=x(e.remaining),s=l(e.resetAt),n=m(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:`${C} 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:r.emoji}),(0,a.jsx)("span",{className:`${S} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${C} 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 ${r.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 ${r.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.jsx)("span",{className:"text-text-muted",children:!0!==e.unlimited&&e.total>0?`${e.used.toLocaleString()} / ${e.total.toLocaleString()}`:!0===e.unlimited?"Included / ∞":`${e.used.toLocaleString()} / ∞`}),(0,a.jsx)("span",{className:`font-medium ${r.text}`,children:Number.isFinite(e.remaining)?`${e.remaining}%`:"—"})]})]})}),(0,a.jsx)("td",{className:`${C} w-[25%]`,children:"-"!==s||n?t?(0,a.jsx)("div",{className:`${A} text-text-primary font-medium truncate`,title:n||"",children:"-"!==s?`in ${s}`:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==s&&(0,a.jsxs)("div",{className:`${A} text-text-primary font-medium`,children:["in ",s]}),n&&(0,a.jsx)("div",{className:`${E} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${A} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),j>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 ",w,"-",N," of ",y.length]}),(0,a.jsxs)("span",{children:["Page ",d," / ",j]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>b(e=>Math.max(1,e-1)),disabled:1===d,className:"flex h-11 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 sm:h-7 sm:rounded-md sm:px-2 sm:text-[10px]",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>b(e=>Math.min(j,e+1)),disabled:d===j,className:"flex h-11 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 sm:h-7 sm:rounded-md sm:px-2 sm:text-[10px]",children:"Next"})]})]})]})}var b=r(98542),g=r(84588),f=r(35497),v=r(52679);function y(e,t){return{quotas:e,plan:t.plan||null,message:t.message||null,cached:!0===t.cached,stale:!0===t.stale,fetchedAt:t.fetchedAt||null,refreshError:t.refreshError||null,raw:t}}function j(e,t){if(!t)return e;let r=new Date(t);return!Number.isFinite(r.getTime())||e&&r.getTime()<=e.getTime()?e:r}function k(e){let t=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);return t(e.email)?e.email:(t(e.name),e.name)}function w(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function N(e){return v.Q2[e]?.name||e}function $(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function C(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function S(e,t){return await e(t)}let A="quotaAutoRefresh",E=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],q=[{value:"single",label:"Satuan",icon:"account_circle"},{value:"bulk",label:"Bulk",icon:"stacks"}],P=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}],T=[10,20,50,100];function M(){let[e,t]=(0,s.useState)([]),[r,i]=(0,s.useState)({}),[l,u]=(0,s.useState)({}),[m,x]=(0,s.useState)({}),[h,M]=(0,s.useState)(!0),[F,O]=(0,s.useState)(null),[z,_]=(0,s.useState)(!1),[D,L]=(0,s.useState)(!1),[I,R]=(0,s.useState)(60),[U,Q]=(0,s.useState)(!0),[H,K]=(0,s.useState)(null),[B,G]=(0,s.useState)(null),[J,W]=(0,s.useState)(null),[Y,V]=(0,s.useState)(null),[X,Z]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(null),[er,ea]=(0,s.useState)(null),[es,en]=(0,s.useState)(null),[ei,el]=(0,s.useState)([]),[eo,ec]=(0,s.useState)("all"),[ed,eu]=(0,s.useState)([]),[em,ex]=(0,s.useState)("single"),[eh,ep]=(0,s.useState)("all"),[eb,eg]=(0,s.useState)("default"),[ef,ev]=(0,s.useState)(!1),[ey,ej]=(0,s.useState)(!1),[ek,ew]=(0,s.useState)(!1),[eN,e$]=(0,s.useState)({}),[eC,eS]=(0,s.useState)(!1),[eA,eE]=(0,s.useState)({}),[eq,eP]=(0,s.useState)({}),[eT,eM]=(0,s.useState)({}),[eF,eO]=(0,s.useState)(1),[ez,e_]=(0,s.useState)(20),[eD,eL]=(0,s.useState)(String(20)),[eI,eR]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[eU,eQ]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),eH=(0,s.useRef)(null),eK=(0,s.useRef)(null),eB=(0,s.useRef)(null),eG=(0,s.useRef)(0),eJ=(0,s.useRef)(null),eW=(0,s.useRef)(!1),eY=(0,s.useCallback)(e=>{if(e&&"object"==typeof e){if("snapshot"===e.type){let t=Object.values(e.accounts||{}).flatMap(e=>{if(!e?.connectionId||!e?.provider)return[];let t=e.usage||{};return[[e.connectionId,y(d(e.provider,t),{...t,...e.provenance})]]});t.length>0&&(i(Object.fromEntries(t)),u(e=>({...e,...Object.fromEntries(t.map(([e])=>[e,!1]))})));return}if("update"===e.type){let t=e.usage||{};i(r=>({...r,[e.connectionId]:y(d(e.provider,t),{...t,...e.provenance})})),u(t=>({...t,[e.connectionId]:!1})),x(t=>({...t,[e.connectionId]:null})),O(t=>j(t,e.provenance?.fetchedAt));return}if("error"===e.type){let t=e.previous;t?.usage&&e.connectionId&&e.provider&&i(r=>({...r,[e.connectionId]:y(d(e.provider,t.usage),{...t.usage,...t.provenance,stale:!0})})),u(t=>({...t,[e.connectionId]:!1})),x(t=>({...t,[e.connectionId]:e.error?.message||"Quota refresh failed"}));return}"complete"===e.type&&(eW.current=!1,L(!1),u(e=>Object.fromEntries(Object.keys(e).map(e=>[e,!1]))))}},[]),eV=(0,s.useCallback)(async()=>{eW.current=!0,L(!0);try{let e=await fetch("/api/usage/quota-stream?refresh=1",{method:"POST"});if(!e.ok)throw Error(`HTTP ${e.status}`)}catch(e){eW.current=!1,L(!1),u(e=>Object.fromEntries(Object.keys(e).map(e=>[e,!1]))),G({type:"error",message:`Could not start quota refresh: ${e.message}`})}},[]),eX=(0,s.useCallback)(()=>{if(eJ.current)return eJ.current;let e=new EventSource("/api/usage/quota-stream");return eJ.current=e,e.onmessage=({data:e})=>{try{eY(JSON.parse(e))}catch{}},e.onerror=()=>{G(e=>e||{type:"warning",message:"Quota stream interrupted; reconnecting automatically."})},e},[eY]),eZ=async()=>{let e=er?.connection;if(e){en(e.id);try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{method:"POST"}),r=await t.json();if(!t.ok)throw Error(r.error||r.message||"Failed to use reset credit");ea(null),await e5(e.id,e.provider)}catch(e){G({message:e.message||"Failed to use Codex reset credit"})}finally{en(null)}}},e0=(0,s.useCallback)(async(e=eF)=>{let r=++eG.current;try{var a,s;let n=new URLSearchParams({page:String(e),pageSize:String(ez),accountStatus:eh,sort:"priority"});"all"!==eo&&n.set("provider",eo);let i=await fetch(`/api/providers/client?${n.toString()}`);if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e.error||`Failed to fetch connections (HTTP ${i.status})`)}let l=await i.json();if(r!==eG.current)return[];let o=l.connections||[],c=(a=l.pagination,a||{page:1,pageSize:ez,total:0,totalPages:1}),d=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(l.totals,o.length);return t(o),eu(l.providerOptions||[]),eR(c),eQ(d),eO((s=l.pagination,s?.page||e)),K(null),o}catch(e){if(console.error("Error fetching connections:",e),r!==eG.current)return[];return K(e.message||"Failed to fetch connections"),[]}},[eh,eF,ez,eo]),e1=(0,s.useCallback)(async(e,t,r=!1)=>{u(t=>({...t,[e]:!0})),x(t=>({...t,[e]:null}));try{let a=await fetch(`/api/usage/${e}${r?"?refresh=1":""}`);if(!a.ok){let r=(await a.json().catch(()=>({}))).error||a.statusText;if(404===a.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===a.status)return console.warn(`[ProviderLimits] Auth error for ${t}:`,r),x(t=>({...t,[e]:r})),null;throw Error(`HTTP ${a.status}: ${r}`)}let s=await a.json(),n=d(t,s),l=y(n,s);return i(t=>({...t,[e]:l})),{fetchedAt:s.fetchedAt||null}}catch(r){return console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),x(t=>({...t,[e]:r.message||"Failed to fetch quota"})),null}finally{u(t=>({...t,[e]:!1}))}},[]),e5=(0,s.useCallback)(async(e,t)=>{let r=await e1(e,t,!0);O(e=>j(e,r?.fetchedAt))},[e1]),e2=(0,s.useCallback)(async(e,t=!1)=>{if(e&&"all"!==e){eP(t=>({...t,[e]:!0})),eM(t=>({...t,[e]:!1}));try{let r=`/api/usage/aggregate?provider=${encodeURIComponent(e)}${t?"&refresh=1":""}`,a=await fetch(r);if(!a.ok)throw Error("Failed to fetch aggregate");let s=await a.json(),n=d(e,s);return eE(t=>({...t,[e]:{quotas:n,plan:s.plan||null,accountCount:s.accountCount||0,accountsWithQuota:s.accountsWithQuota||0,deadCount:s.deadCount||0,cached:!0===s.cached,fetchedAt:s.fetchedAt||null}})),{fetchedAt:s.fetchedAt||null}}catch(t){return console.error(`[ProviderLimits] Aggregate fetch error for ${e}:`,t),eM(t=>({...t,[e]:!0})),null}finally{eP(t=>({...t,[e]:!1}))}}},[]),e3=(0,s.useCallback)(async(e,t)=>{if("bulk"===em&&t){let e=await e2(t,!0);O(t=>j(t,e?.fetchedAt));return}e?.length&&(u(t=>({...t,...Object.fromEntries(e.map(e=>[e,!0]))})),await eV())},[em,e2,eV]),e8=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){W(e),G(null);try{let t=await fetch(`/api/providers/${e}`,{method:"DELETE"});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status}`)}i(t=>{let r={...t};return delete r[e],r}),u(t=>{let r={...t};return delete r[e],r}),x(t=>{let r={...t};return delete r[e],r}),await S(e0,eF)}catch(e){console.error("Error deleting connection:",e),G({type:"error",message:e.message||"Failed to delete connection"})}finally{W(null)}}},[e0,eF]),e4=(0,s.useCallback)(async(e,t)=>{V(e),G(null);try{let r=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error||`HTTP ${r.status}`)}await S(e0,eF)}catch(e){console.error("Error updating connection status:",e),await S(e0,eF),G({type:"error",message:e.message||"Failed to update connection status"})}finally{V(null)}},[e0,eF]),e6=(0,s.useCallback)(async e=>{if(!ee?.id)return;let t=ee.id,r=ee.provider;G(null);try{let a=await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.error||`HTTP ${a.status}`)}await e0(),Z(!1),et(null),v.wb.includes(r)&&await e1(t,r)}catch(e){console.error("Error saving connection:",e),G({type:"error",message:e.message||"Failed to save connection"})}},[ee,e0,e1]);(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&&el(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let e9=(0,s.useCallback)(async()=>{if(!D){L(!0),R(60);try{let e=await e0(eF);u($(e)),x(t=>C(t,e)),i(t=>C(t,e)),await eV()}catch(e){console.error("Error refreshing all providers:",e),L(!1)}}},[D,e0,eF,eV]);(0,s.useEffect)(()=>{(async()=>{Q(!0);let e=await e0(eF);Q(!1),u(Object.fromEntries(e.map(({id:e,isActive:t})=>[e,(t??!0)&&eW.current]))),x(t=>C(t,e)),i(t=>C(t,e))})()},[e0,eF]),(0,s.useEffect)(()=>(eX(),eV(),()=>{eJ.current?.close(),eJ.current=null,eW.current=!1}),[eX,eV]),(0,s.useEffect)(()=>{"bulk"!==em||("all"!==eo?[eo]:ed.map(e=>e.value||e).filter(e=>"all"!==e)).forEach(e=>e2(e))},[em,eo,ed,e2]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(A);M(null===e||"true"===e),_(!0)},[]),(0,s.useEffect)(()=>{z&&window.localStorage.setItem(A,String(h))},[h,z]),(0,s.useEffect)(()=>{eB.current=e9},[e9]);let e7=(0,s.useCallback)(()=>{eH.current&&(clearInterval(eH.current),eH.current=null),eK.current&&(clearInterval(eK.current),eK.current=null)},[]),te=(0,s.useCallback)(()=>{eH.current||eK.current||(eH.current=setInterval(()=>{eB.current?.()},6e4),eK.current=setInterval(()=>{R(e=>e<=1?60:e-1)},1e3))},[]);(0,s.useEffect)(()=>z&&h?(document.hidden||te(),e7):void e7(),[h,z,te,e7]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?e7():h&&z&&te()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[h,z,te,e7]);let tt=(0,s.useMemo)(()=>(function(e,t,r,a,s){if("codex"===a&&"default"!==s)return[...e].sort((e,r)=>{let a=w(e,t),n=w(r,t),i="remaining-asc"===s?a-n:n-a;return 0!==i?i:(k(e)||"").localeCompare(k(r)||"")});if(!r)return e;let n=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=n(e)-n(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(k(e)||"").localeCompare(k(t)||"")})})(e,r,ef,eo,eb),[e,r,ef,eo,eb]),tr=(0,s.useMemo)(()=>{let e;return e=new Map,tt.forEach(t=>{t.provider&&(e.has(t.provider)||e.set(t.provider,[]),e.get(t.provider).push(t))}),[...e.entries()].map(([e,t])=>(function(e,t,r,a,s){if(!t.length)return null;let n=[],i=[],l=null,o=!1;return t.forEach(e=>{let t=r[e.id];Array.isArray(t?.quotas)&&n.push(...t.quotas),t?.message&&!l&&(l=t.message),s[e.id]&&i.push(s[e.id]),a[e.id]&&(o=!0)}),{id:`${e}-aggregate`,provider:e,name:N(e),email:`${t.length} accounts`,isActive:t.some(e=>e.isActive??!0),isAggregate:!0,quota:{quotas:function(e=[]){let t=new Map;return e.forEach(e=>{if(!e?.name)return;let r=t.get(e.name)||{name:e.name,used:0,total:0,resetAt:e.resetAt||null,remainingPercentage:null,unlimited:!1,_pctSum:0,_pctCount:0};r.used+=Number(e.used)||0,r.total+=Number(e.total)||0,!0===e.unlimited&&(r.unlimited=!0),null!=e.remainingPercentage&&Number.isFinite(Number(e.remainingPercentage))&&(r._pctSum+=Number(e.remainingPercentage),r._pctCount+=1),e.resetAt&&(!r.resetAt||new Date(e.resetAt).getTime()<new Date(r.resetAt).getTime())&&(r.resetAt=e.resetAt),t.set(e.name,r)}),[...t.values()].map(e=>{let{_pctSum:t,_pctCount:r,...a}=e;return a.unlimited?(a.remainingPercentage=100,a.total=0):a.total>0?a.remainingPercentage=(a.total-a.used)/a.total*100:r>0?a.remainingPercentage=t/r:a.remainingPercentage=0,a})}(n),message:0===n.length&&l||null},isLoading:o,error:!n.length&&i.length>0?i[0]:null,connectionIds:t.map(e=>e.id)}})(e,t,r,l,m)).filter(Boolean)},[tt,r,l,m]),ta=(0,s.useMemo)(()=>Object.keys(eA).length?tr.map(e=>{let t=eA[e.provider];return t&&t.quotas?.length?{...e,email:`${t.accountCount||e.connectionIds?.length||0} accounts`,quota:{...e.quota,quotas:t.quotas,message:null},isLoading:eq[e.provider]||!1}:e}):tr,[tr,eA,eq]),ts=(0,s.useMemo)(()=>"bulk"===em?ta:tt,[em,ta,tt]),tn=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=o(e.used,e.total))},ti=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eC){eS(!0),G(null);try{let r=(await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})))).filter(e=>!e.ok).length;await S(e0,eF),r>0&&G({type:"error",message:`Failed to update ${r} of ${e.length} connections`})}catch(e){console.error("Error bulk toggling connections:",e),await S(e0,eF),G({type:"error",message:e.message||"Failed to update connections"})}finally{eS(!1)}}},[eC,e0,eF]),tl="all"===eo?"All providers":eo,to=eU.eligibleConnections>0,tc=(0,s.useCallback)(async()=>{Q(!0);let e=await e0(eF);Q(!1),e.length&&(u($(e)),i(t=>C(t,e)),await eV())},[e0,eF,eV]),td=ts.length>0,tu=eU.eligibleConnections?eU.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"===eo?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eh?"turned off":"active"===eh?"active":"matching"} accounts found for ${eo}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tm=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}`}(eI),tx=!T.includes(ez);return U&&!e.length?(0,a.jsx)("div",{role:"status","aria-label":"Loading quota accounts",className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Array.from({length:4},(e,t)=>(0,a.jsx)(f.Qv,{},t))}):U||to?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(f.i5,{label:"Quota filters and actions",className:ey?"relative z-50":"relative",children:(0,a.jsxs)("div",{className:"grid w-full grid-cols-[minmax(0,1fr)_minmax(0,1fr)_2.75rem] gap-2 sm:flex sm:w-auto sm:flex-wrap sm:items-center sm:gap-1.5",children:[(0,a.jsxs)("div",{className:"relative min-w-0",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ej(e=>!e),className:"flex h-11 w-full min-w-0 items-center justify-between gap-1 rounded-xl border border-black/10 bg-black/[0.02] px-3 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 sm:h-8 sm:w-auto sm:rounded-lg sm:px-2","aria-haspopup":"menu","aria-expanded":ey,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===eo?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)(n.A,{src:`/providers/${eo}.png`,alt:eo,size:18,className:"size-[18px] rounded object-contain",fallbackText:eo.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize",children:tl})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),ey&&(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:()=>ej(!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"!==eo&&eO(1),ec("all"),ej(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===eo?"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"===eo&&(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:ed.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{eo!==e&&eO(1),ec(e),ej(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${eo===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,a.jsx)(n.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}),eo===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,a.jsx)("select",{value:eh,onChange:e=>{let t=e.target.value;eh!==t&&eO(1),ep(t)},className:"h-11 min-w-0 rounded-xl border border-black/10 bg-black/[0.02] px-3 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 sm:h-8 sm:rounded-lg sm:px-2","aria-label":"Filter accounts by status",children:E.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("button",{type:"button",onClick:e9,disabled:D,className:"flex size-11 shrink-0 items-center justify-center rounded-xl border border-black/10 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Refresh all","aria-label":"Refresh all quotas",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] sm:text-[14px] ${D?"animate-spin":""}`,children:"refresh"})}),(0,a.jsx)("div",{className:"col-span-2 inline-flex min-h-11 min-w-0 overflow-hidden rounded-xl border border-black/10 bg-black/[0.02] dark:border-white/10 dark:bg-white/[0.03] sm:h-8 sm:min-h-0 sm:rounded-lg",children:q.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>ex(e.value),"aria-pressed":em===e.value,className:`flex min-h-11 flex-1 items-center justify-center gap-1.5 px-3 text-xs font-medium transition-colors sm:min-h-0 sm:flex-none sm:justify-start sm:px-2 sm:font-normal ${em===e.value?"bg-primary text-white":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,title:`Show quota in ${e.label} mode`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px] sm:text-[14px]",children:e.icon}),(0,a.jsx)("span",{children:e.label})]},e.value))}),(0,a.jsx)("button",{type:"button",onClick:()=>ew(e=>!e),"aria-expanded":ek,className:`flex size-11 items-center justify-center rounded-xl border text-text-primary transition-colors sm:hidden ${ek?"border-primary/30 bg-primary/10 text-primary":"border-black/10 hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,"aria-label":ek?"Hide more actions":"Show more actions",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"tune"})}),(0,a.jsxs)("div",{className:`${ek?"flex":"hidden"} col-span-3 flex-col gap-2 rounded-2xl border border-black/10 bg-black/[0.02] p-3 dark:border-white/10 dark:bg-white/[0.03] sm:contents`,children:["codex"===eo&&(0,a.jsx)("select",{value:eb,onChange:e=>eg(e.target.value),className:"h-11 w-full rounded-xl border border-black/10 bg-surface px-3 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/10 sm:h-8 sm:w-auto sm:rounded-lg sm:bg-black/[0.02] sm:px-2 dark:sm:bg-white/[0.03]","aria-label":"Sort Codex quotas by remaining",children:P.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:()=>ev(e=>!e),"aria-pressed":ef,className:`flex h-11 w-full shrink-0 items-center justify-between gap-2 rounded-xl border px-3 text-xs transition-colors sm:h-8 sm:w-auto sm:justify-start sm:rounded-lg sm:px-2 ${ef?"border-amber-500/40 bg-amber-500/10 text-amber-600 dark:text-amber-400":"border-black/10 bg-surface text-text-primary hover:bg-black/5 dark:border-white/10 dark:bg-transparent dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{children:"Expiring first"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:hidden",children:ef?"check_circle":"circle"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{ti(tt.filter(e=>(e.isActive??!0)&&tn(e)).map(e=>e.id),!1)},disabled:eC,className:"flex h-11 w-full shrink-0 items-center gap-2 rounded-xl border border-red-500/30 bg-surface px-3 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50 dark:bg-transparent sm:h-8 sm:w-auto sm:rounded-lg sm:px-2",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"block"}),(0,a.jsx)("span",{children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>{ti(tt.filter(e=>!(e.isActive??!0)&&!tn(e)).map(e=>e.id),!0)},disabled:eC,className:"flex h-11 w-full shrink-0 items-center gap-2 rounded-xl border border-emerald-500/30 bg-surface px-3 text-xs text-emerald-600 transition-colors hover:bg-emerald-500/10 disabled:opacity-50 dark:bg-transparent dark:text-emerald-400 sm:h-8 sm:w-auto sm:rounded-lg sm:px-2",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] sm:text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{children:"Turn on Available"})]}),(0,a.jsxs)("button",{type:"button",onClick:()=>M(e=>!e),className:"flex h-11 w-full shrink-0 items-center justify-between gap-2 rounded-xl border border-black/10 bg-surface px-3 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-transparent dark:hover:bg-white/5 sm:h-8 sm:w-auto sm:justify-start sm:rounded-lg sm:px-2",title:h?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-text-primary",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] sm:text-[14px] ${h?"text-primary":"text-text-muted"}`,children:h?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{children:"Auto-refresh"})]}),h&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",I,"s)"]})]})]})]})}),B&&(0,a.jsx)(f.Gi,{tone:B.type||"error",action:(0,a.jsx)("button",{type:"button",onClick:()=>G(null),"aria-label":"Dismiss",className:"grid size-9 place-items-center rounded-lg hover:bg-current/10",children:(0,a.jsx)("span",{"aria-hidden":"true",className:"material-symbols-outlined text-[16px]",children:"close"})}),children:B.message}),!U&&H&&(0,a.jsxs)(f.Gi,{tone:"warning",title:"Provider refresh interrupted",action:(0,a.jsx)(f.$n,{variant:"secondary",size:"sm",onClick:tc,children:"Retry"}),children:["Existing account and quota data remain visible. ",H]}),"bulk"===em&&Object.values(eT).some(Boolean)&&(0,a.jsx)(f.Gi,{tone:"warning",children:"Couldn't load server-side totals for some providers — bulk cards show data for the current page only."}),td?(0,a.jsxs)(a.Fragment,{children:[ef&&(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:ts.map(e=>{let t,s,i,o,d=!0===e.isAggregate,u=d?e.quota:r[e.id],x=d?e.isLoading:l[e.id],h=d?e.error:m[e.id],v=u?.quotas||[],y=!0===eN[e.id],j=y?v:function(e,t=3){return e.map((e,t)=>({quota:e,index:t})).sort((e,t)=>{let r=c(e.quota)-c(t.quota);if(0!==r)return r;let a=e.quota.resetAt?new Date(e.quota.resetAt).getTime():1/0,s=t.quota.resetAt?new Date(t.quota.resetAt).getTime():1/0;return a!==s?a-s:e.index-t.index}).slice(0,t).map(({quota:e})=>e)}(v),w=!1===e.isActive,$=!d&&(J===e.id||Y===e.id),C=d?0:Number.isFinite(t=Number(u?.raw?.resetCredits?.availableCount))?Math.max(0,t):0;return(0,a.jsxs)(g.default,{padding:"none",className:`min-w-0 ${w?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"border-b border-black/10 px-3 py-2 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)(n.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.name||N(e.provider)}),k(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:k(e)}):null,!d&&(s=String(e.authType||"").toLowerCase(),i=e.providerSpecificData?.region||e.providerSpecificData?.aiRegion||null,o=[],"apikey"===s||"api_key"===s?o.push({t:"API Key",c:"bg-blue-500/10 text-blue-500"}):("oauth"===s||"access_token"===s)&&o.push({t:"OAuth",c:"bg-violet-500/10 text-violet-500"}),i&&o.push({t:i,c:"bg-slate-500/10 text-text-muted"}),o.push(!1===e.isActive?{t:"paused",c:"bg-amber-500/10 text-amber-500"}:{t:"active",c:"bg-emerald-500/10 text-emerald-500"}),(0,a.jsx)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:o.map((e,t)=>(0,a.jsx)("span",{className:`rounded px-1.5 py-0.5 text-[10px] font-medium ${e.c}`,children:e.t},t))}))]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[!d&&"codex"===e.provider&&(0,a.jsxs)("button",{type:"button",onClick:()=>ea({connection:e,count:C}),disabled:C<=0||$||es===e.id,"aria-label":"Use one Codex reset credit",className:"flex h-11 items-center gap-1 rounded-xl px-2 text-amber-600 transition-colors hover:bg-amber-500/10 disabled:cursor-not-allowed disabled:opacity-40 dark:text-amber-400 sm:h-8 sm:rounded-lg",title:C>0?"Use one reset credit":"No reset credits available",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"restart_alt"}),(0,a.jsx)("span",{className:"text-[10px] tabular-nums",children:C})]}),(0,a.jsx)("button",{type:"button",onClick:()=>d?e3(e.connectionIds,e.provider):e5(e.id,e.provider),disabled:x||$,"aria-label":"Refresh quota",className:"flex size-11 items-center justify-center rounded-xl transition-colors hover:bg-black/5 disabled:opacity-50 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Refresh quota",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${x?"animate-spin":""}`,children:"refresh"})}),!d&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",onClick:()=>{et(e),Z(!0)},disabled:$,"aria-label":"Edit connection",className:"flex size-11 items-center justify-center rounded-xl text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:opacity-50 dark:hover:bg-white/5 sm:size-8 sm:rounded-lg",title:"Edit connection",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,a.jsx)("button",{type:"button",onClick:()=>e8(e.id),disabled:$,"aria-label":"Delete connection",className:"flex size-11 items-center justify-center rounded-xl text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50 sm:size-8 sm:rounded-lg",title:"Delete connection",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${J===e.id?"animate-pulse":""}`,children:"delete"})}),(0,a.jsx)("div",{className:"inline-flex size-11 items-center justify-center sm:h-8 sm:w-auto sm:pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(b.default,{size:"sm",touchTarget:!0,checked:e.isActive??!0,disabled:$,onChange:t=>e4(e.id,t)})})]})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:x?(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"})}):h?(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:h})]}):v.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"sm:hidden",children:[(0,a.jsx)(p,{quotas:j,totalCount:v.length,paginate:!1,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==eb}),v.length>3&&(0,a.jsxs)("button",{type:"button",onClick:()=>e$(t=>({...t,[e.id]:!y})),className:"mt-2 flex h-11 w-full items-center justify-center gap-1.5 rounded-xl border border-black/10 bg-black/[0.02] text-xs font-medium text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/5","aria-expanded":y,children:[(0,a.jsx)("span",{children:y?"Show less":`Show ${v.length-j.length} more`}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"expand_less":"expand_more"})]})]}),(0,a.jsx)("div",{className:"hidden sm:block",children:(0,a.jsx)(p,{quotas:v,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==eb})}),u?.message?(0,a.jsx)("p",{className:"px-1 text-[10px] text-text-muted",children:u.message}):null,u?.refreshError?(0,a.jsxs)(f.Gi,{tone:"warning",className:"px-2 py-1.5 text-[10px]",children:["Showing last successful quota; refresh failed: ",u.refreshError]}):null]}):u?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:u.message})}):(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("p",{className:"text-xs",children:"No quota data available"})})})]},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:tm}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:tx?"custom":String(ez),onChange:e=>{let t=e.target.value;if("custom"===t)return;let r=Number.parseInt(t,10);Number.isFinite(r)&&(eO(1),e_(r),eL(String(r)))},className:"h-11 rounded-xl border border-black/10 bg-black/[0.02] px-3 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 sm:h-8 sm:rounded-lg sm:px-2","aria-label":"Accounts per page",children:[T.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:eD,onChange:e=>eL(e.target.value),onBlur:()=>{let e=Number.parseInt(eD,10);if(!Number.isFinite(e))return void eL(String(ez));let t=Math.min(500,Math.max(1,e));eO(1),e_(t),eL(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eD,10);if(!Number.isFinite(t))return void eL(String(ez));let r=Math.min(500,Math.max(1,t));eO(1),e_(r),eL(String(r))},className:"h-11 w-24 rounded-xl border border-black/10 bg-black/[0.02] px-3 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 sm:h-8 sm:w-20 sm:rounded-lg sm:px-2","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",eI.page," / ",eI.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eO(1),disabled:eI.page<=1||U||D,className:"flex h-11 items-center rounded-xl 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 sm:h-8 sm:rounded-lg",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>eO(e=>Math.max(1,e-1)),disabled:eI.page<=1||U||D,className:"flex size-11 items-center justify-center rounded-xl 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 sm:size-8 sm:rounded-lg","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:()=>eO(e=>Math.min(eI.totalPages,e+1)),disabled:eI.page>=eI.totalPages||U||D,className:"flex size-11 items-center justify-center rounded-xl 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 sm:size-8 sm:rounded-lg","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:()=>eO(eI.totalPages),disabled:eI.page>=eI.totalPages||U||D,className:"flex h-11 items-center rounded-xl 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 sm:h-8 sm:rounded-lg",children:"Last Page"})]})]})})]}):(0,a.jsx)(f.pp,{icon:tu.icon,title:tu.title,description:tu.description}),(0,a.jsx)(f.wI,{isOpen:X,connection:ee,proxyPools:ei,onSave:e6,onClose:()=>{Z(!1),et(null)}}),(0,a.jsx)(f.uo,{isOpen:!!er,onClose:()=>ea(null),onConfirm:eZ,title:"Use Codex Reset Credit",message:`Use 1 reset credit for ${k(er?.connection||{})||"this Codex account"}? This permanently spends one credit and cannot be undone. Available: ${er?.count??0}.`,confirmText:"Use 1 Credit",variant:"danger",loading:!!(er?.connection?.id&&es===er.connection.id)})]}):H?(0,a.jsx)(f.Gi,{tone:"error",title:"Failed to load providers",action:(0,a.jsx)(f.$n,{variant:"secondary",size:"sm",icon:"refresh",onClick:tc,children:"Retry"}),children:H}):(0,a.jsx)(f.pp,{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."})}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=5498)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{525:(e,t,a)=>{Promise.resolve().then(a.bind(a,70323))},70323:(e,t,a)=>{"use strict";a.d(t,{default:()=>m});var s=a(95155),l=a(12115),r=a(35497),n=a(11059),i=a(73006);let o=["zh-CN","zh-TW"],c=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],d=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}];function m(){let[e,t]=(0,l.useState)(!0),[a,m]=(0,l.useState)(!1),[x,h]=(0,l.useState)("http://localhost:8787"),[p,u]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[f,g]=(0,l.useState)(!1),[b,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(""),[N,w]=(0,l.useState)(!1),[k,C]=(0,l.useState)(""),[S,E]=(0,l.useState)({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),[P,I]=(0,l.useState)([]),[T,$]=(0,l.useState)(!1),[O,R]=(0,l.useState)(""),[H,L]=(0,l.useState)(null),[U,M]=(0,l.useState)(""),[D,F]=(0,l.useState)(null),[_,A]=(0,l.useState)(!1),[J,B]=(0,l.useState)(!0),[W,z]=(0,l.useState)(!1),G=(0,l.useRef)(null),[K,X]=(0,l.useState)(!1),[q,Y]=(0,l.useState)("full"),[Z,Q]=(0,l.useState)(!1),[V,ee]=(0,l.useState)("full"),[et,ea]=(0,l.useState)(!1),[es,el]=(0,l.useState)(25e3),[er,en]=(0,l.useState)({installed:!1,installing:!1,running:!1,version:null,loading:!0}),[ei,eo]=(0,l.useState)(null),[ec,ed]=(0,l.useState)(!1),[em,ex]=(0,l.useState)(!1),[eh,ep]=(0,l.useState)(""),[eu,ef]=(0,l.useState)("en"),{copied:eg,copy:eb}=(0,n.C)();(0,l.useEffect)(()=>(ef((0,i.kk)()),(0,i.oQ)(()=>ef((0,i.kk)()))),[]);let ey=o.includes(eu),ej=ey?c:c.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.find(e=>e.id===q);e?.wenyan&&!ey&&(Y("ultra"),ev({cavemanLevel:"ultra"}))},[ey,q]);let ev=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)}},eN=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},ew=async(e,t)=>{let a=t.trim()||"http://localhost:8787";w(!0),C("");try{let t=await fetch("/api/headroom/enable",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:e,headroomUrl:a})}),s=await t.json();if(!t.ok)throw Error(s.error||`Failed to update Headroom (${t.status})`);return h(s.headroomUrl||a),m(!0===s.headroomEnabled),await eS(),!0}catch(e){return C(e.message||"Failed to update Headroom"),!1}finally{w(!1)}},ek=async e=>{await ew(e,x)},eC=async()=>{let e=x.trim()||"http://localhost:8787";h(e),a?await ew(!0,e):(await ev({headroomUrl:e}),eS())},eS=(0,l.useCallback)(async()=>{u(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();if(u({...t,loading:!1}),!t?.installed){E({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),I([]);return}try{let e=await fetch("/api/headroom/extras",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error("extras status failed");let t=await e.json();E(e=>({...e,version:t.version??null,extras:t.extras||{code:!1,ml:!1},available:t.available||["code","ml"],loading:!1})),I([])}catch{E({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),I([])}}catch{u({installed:!1,running:!1,python:null,loading:!1}),E({version:null,extras:{code:!1,ml:!1},available:["code","ml"],loading:!1}),I([])}},[]),eE=(0,l.useCallback)(async()=>{v(""),y(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await eS()}catch(e){v(e.message)}finally{y(!1)}},[eS]),eP=(0,l.useCallback)(async()=>{y(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await eS()}finally{y(!1)}},[eS]),eI=(0,l.useCallback)(()=>{M(""),G.current&&clearInterval(G.current);let e=async()=>{try{let e=await fetch("/api/headroom/extras?log=1",{headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));"string"==typeof t.log&&M(t.log)}catch{}};e(),G.current=setInterval(e,1500)},[]),eT=(0,l.useCallback)(()=>{G.current&&(clearInterval(G.current),G.current=null)},[]);(0,l.useEffect)(()=>()=>eT(),[eT]);let e$=(0,l.useCallback)(async()=>{if(0!==P.length){$(!0),R(""),eI();try{let e=await fetch("/api/headroom/extras",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:P})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Install failed");E(e=>({...e,version:t.version??e.version,extras:t.extras||e.extras})),I([])}catch(e){R(e.message)}finally{eT(),$(!1)}}},[P,eI,eT]),eO=(0,l.useCallback)(async e=>{L(e),R(""),eI();try{let t=await fetch("/api/headroom/extras",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({extras:[e]})}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||"Remove failed");E(e=>({...e,version:a.version??e.version,extras:a.extras||e.extras}))}catch(e){R(e.message)}finally{eT(),L(null)}},[eI,eT]),eR=(0,l.useCallback)(()=>{if(0!==P.length){if(P.includes("ml"))return void F({title:"Install [ml]",message:"[ml] downloads ~1 GB (torch + huggingface-hub). Continue?",confirmText:"Install",variant:"primary",onConfirm:e$});e$()}},[P,e$]),eH=(0,l.useCallback)(e=>{F({title:`Remove [${e}]`,message:`Remove [${e}] and its packages?`,confirmText:"Remove",variant:"danger",onConfirm:()=>eO(e)})},[eO]),eL=(0,l.useCallback)(async(e,t)=>{if(R(""),"code"===e&&A(t),"ml"===e&&B(t),await ev({["code"===e?"headroomCodeAware":"headroomKompress"]:t}),p.running){z(!0);try{let e=await fetch("/api/headroom/restart",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Restart failed");await eS()}catch(e){R(e.message)}finally{z(!1)}}},[p.running,eS]),eU=(0,l.useCallback)(async()=>{en(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();en({...t,loading:!1}),"number"==typeof t.minChars&&el(t.minChars)}catch{en({installed:!1,installing:!1,running:!1,version:null,loading:!1})}},[]),eM=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/pxpipe/health",{method:"POST"});eo(await e.json())}catch(e){eo({healthy:!1,checks:[],error:e.message})}},[]),eD=(0,l.useCallback)(async e=>{ep(""),ex(!0);try{let t=await fetch(`/api/pxpipe/${e}`,{method:"POST"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||`PXPIPE ${e} failed`);await eU(),await eM()}catch(e){ep(e.message)}finally{ex(!1)}},[eU,eM]);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let a=await e.json();t(!1!==a.rtkEnabled),m(!!a.headroomEnabled),h(a.headroomUrl||"http://localhost:8787"),A(!0===a.headroomCodeAware),B(!1!==a.headroomKompress),X(!!a.cavemanEnabled),Y(a.cavemanLevel||"full"),Q(!!a.ponytailEnabled),ee(a.ponytailLevel||"full"),ea(!!a.pxpipeEnabled),"number"==typeof a.pxpipeMinChars&&el(a.pxpipeMinChars),eS(),eU().then(eM)}}catch{}})()},[eS,eU,eM]);let eF=!!p.running,e_=a&&eF,eA=N?a?"Disabling…":p.managedInstalled?"Starting…":"Installing…":p.loading?"Checking…":a?eF?"Enabled":"Unavailable":eF?"Disabled \xb7 Proxy ready":"Disabled",eJ=N||p.loading?"bg-warning/15 text-warning":e_?"bg-success/15 text-success":a?"bg-warning/15 text-warning":"bg-surface-2 text-text-muted",eB=!1!==p.localUrl,eW=!!p.canStart,ez=eB&&!!p.managedPid,eG=ei?.healthy===!0,eK=er.loading?"Checking…":er.installing?"Installing…":er.installed?eG?"Healthy":er.running?"Running":"Stopped":"Not installed";return eG||er.running,(0,s.jsxs)("div",{className:"space-y-6 p-6",children:[(0,s.jsxs)(r.Zp,{id:"rtk",children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,s.jsx)(r.lM,{checked:e,onChange:()=>eN(!e)})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between py-4 gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,s.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,s.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${eJ}`,title:`Headroom proxy: ${eF?"running":"stopped"}`,children:eA}),(0,s.jsx)("button",{type:"button",onClick:()=>g(!0),className:"text-xs text-primary underline hover:opacity-80",children:eF?"Manage":"Setup"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,s.jsx)(r.lM,{checked:a,disabled:!a&&!eB&&!eF,busy:N,onChange:ek})]}),k&&(0,s.jsx)("p",{className:"pb-4 text-xs text-error",children:k}),p.installed&&(0,s.jsxs)("div",{className:"mb-3 ml-1 pl-3 pb-4 border-l-2 border-border",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Compression extras",S.version?` \xb7 v${S.version}`:"",":"]}),S.available.map(e=>{let t=!!S.extras[e],a=P.includes(e),l="code"===e?"tree-sitter AST compression for code responses":"Kompress-v2 HF model for prose/agentic traces (~+1GB)";if(t){let t="code"===e?_:J;return(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs px-2 py-1 rounded border border-success/40 bg-success/5 text-text",title:l,children:[(0,s.jsx)(r.lM,{size:"sm",checked:t,disabled:W,onChange:()=>eL(e,!t)}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("button",{type:"button",onClick:()=>eH(e),disabled:H===e,className:"ml-1 text-error underline hover:opacity-80 disabled:opacity-50",title:`Uninstall [${e}]`,children:H===e?"Uninstalling…":"Uninstall"})]},e)}return(0,s.jsxs)("label",{className:`flex items-center gap-1.5 text-xs px-2 py-1 rounded border cursor-pointer transition-colors ${a?"border-primary bg-primary/10 text-primary":"border-border text-text-muted hover:bg-surface-2"}`,title:l,children:[(0,s.jsx)("input",{type:"checkbox",className:"w-3 h-3",checked:a,onChange:()=>{I(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}}),(0,s.jsxs)("span",{className:"font-medium",children:["[",e,"]"]}),(0,s.jsx)("span",{className:"opacity-70",children:"not installed"})]},e)}),P.length>0&&(0,s.jsx)("button",{onClick:eR,disabled:T,className:"text-xs px-2.5 py-1 rounded bg-primary text-white hover:opacity-90 disabled:opacity-50",children:T?"Installing…":`Install [proxy,${P.join(",")}]`})]}),O&&(0,s.jsx)("p",{className:"text-xs text-error mt-1",children:O}),W&&(0,s.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Restarting proxy…"}),(T||H)&&U&&(0,s.jsx)("pre",{className:"mt-2 max-h-32 overflow-auto rounded bg-surface-2 p-2 text-[10px] leading-tight text-text-muted whitespace-pre-wrap",children:U}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Installing adds the package; use ",(0,s.jsx)("code",{children:"on"}),"/",(0,s.jsx)("code",{children:"off"})," ","to activate it (restarts the proxy). Default install is"," ",(0,s.jsx)("code",{children:"[proxy]"})," only (SmartCrusher for JSON). Adding"," ",(0,s.jsx)("code",{children:"[code]"})," enables AST compression (Python/JS/TS/Go/Rust/Java/C/C++/Perl). Adding ",(0,s.jsx)("code",{children:"[ml]"})," ","enables the Kompress-v2 HF model for prose/agentic traces but adds ~1 GB (torch + huggingface-hub)."]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,s.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,s.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[K&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:ej.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;Y(t=e.id),ev({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${q===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,s.jsx)("p",{className:"text-xs text-primary",children:c.find(e=>e.id===q)?.desc})]}),(0,s.jsx)(r.lM,{checked:K,onChange:()=>{var e;X(e=!K),ev({cavemanEnabled:e})}})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,s.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[Z&&(0,s.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,s.jsx)("div",{className:"flex items-center gap-1.5",children:d.map(e=>(0,s.jsx)("button",{onClick:()=>{var t;ee(t=e.id),ev({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${V===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,s.jsx)("p",{className:"text-xs text-primary",children:d.find(e=>e.id===V)?.desc})]}),(0,s.jsx)(r.lM,{checked:Z,onChange:()=>{var e;Q(e=!Z),ev({ponytailEnabled:e})}})]})]}),!1]}),(0,s.jsx)(r.aF,{isOpen:f,title:eF?"Headroom":"Setup Headroom",onClose:()=>g(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsx)("span",{className:eF?"text-success":"text-warning",children:eA})]}),eF&&(0,s.jsx)("a",{href:"/api/headroom/proxy/dashboard",target:"_blank",rel:"noreferrer",className:"w-full rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Headroom Dashboard"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,s.jsx)(r.pd,{value:x,onChange:e=>h(e.target.value),onBlur:eC,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),ez?(0,s.jsx)(r.$n,{onClick:eP,variant:"ghost",fullWidth:!0,disabled:b,children:b?"Stopping…":"Stop Headroom"}):eF?(0,s.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):eW?(0,s.jsx)(r.$n,{onClick:eE,fullWidth:!0,disabled:b,children:b?p.managedInstalled?"Starting…":"Installing…":p.managedInstalled?"Start Headroom":"Install & Start Headroom"}):eB?p.python?(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,s.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>eb('pip install "headroom-ai[proxy]"'),children:eg?"Copied":"Copy"})]})]}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,s.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),j&&(0,s.jsx)("p",{className:"text-sm text-warning",children:j}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>eS(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>g(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.aF,{isOpen:!1,title:er.installed?"PXPIPE":"Setup PXPIPE",onClose:()=>ed(!1),children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Compress prompts using multimodal encoding. Runs in-process — no extra server or environment variables required."}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,s.jsx)("span",{children:"Status"}),(0,s.jsxs)("span",{className:eG||er.running?"text-success":"text-warning",children:[eK,er.version?` \xb7 v${er.version}`:""]})]}),ei?.checks?.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 rounded border border-border p-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-1",children:"Health check"}),ei.checks.map(e=>(0,s.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,s.jsxs)("span",{className:e.ok?"text-success":"text-warning",children:[e.ok?"●":"○"," ",e.label]}),e.detail&&(0,s.jsx)("span",{className:"text-text-muted font-mono truncate max-w-[50%]",children:e.detail})]},e.id)),ei.error&&(0,s.jsx)("p",{className:"text-xs text-warning mt-1",children:ei.error})]}),er.installed?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[er.running?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.$n,{onClick:()=>eD("restart"),variant:"ghost",disabled:em,children:"Restart"}),(0,s.jsx)(r.$n,{onClick:()=>eD("stop"),variant:"ghost",disabled:em,children:"Stop"})]}):(0,s.jsx)(r.$n,{onClick:()=>eD("start"),disabled:em,children:em?"Starting…":"Start"}),(0,s.jsx)(r.$n,{onClick:()=>eD("install"),variant:"ghost",disabled:em,children:"Repair"}),(0,s.jsx)("a",{href:"/dashboard/pxpipe#logs",className:"col-span-2 rounded border border-border px-4 py-2 text-center text-sm hover:bg-surface-2",children:"Open Logs"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("p",{className:"text-sm text-warning",children:"PXPIPE is not installed."}),(0,s.jsx)(r.$n,{onClick:()=>eD("install"),fullWidth:!0,disabled:em||er.installing,children:em||er.installing?"Installing…":"Install"}),(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Installs the npm package ",(0,s.jsx)("code",{className:"font-mono",children:"pxpipe-proxy"})," into the ZevaiRouter data directory. May take a few minutes."]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Minimum prompt size (chars)"}),(0,s.jsx)(r.pd,{value:String(es),onChange:e=>el(e.target.value),onBlur:()=>{let e=Math.max(0,Number(es)||25e3);el(e),ev({pxpipeMinChars:e})},placeholder:"25000",className:"font-mono text-sm"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Requests smaller than this bypass PXPIPE and are sent as-is."})]}),eh&&(0,s.jsx)("p",{className:"text-sm text-warning",children:eh}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(r.$n,{onClick:()=>eU().then(eM),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,s.jsx)(r.$n,{onClick:()=>ed(!1),fullWidth:!0,children:"Done"})]})]})}),(0,s.jsx)(r.uo,{isOpen:!!D,onClose:()=>F(null),onConfirm:()=>{let e=D?.onConfirm;F(null),e?.()},title:D?.title,message:D?.message,confirmText:D?.confirmText,variant:D?.variant})]})}}},e=>{e.O(0,[2574,3862,3745,3339,620,5497,8441,3794,7358],()=>e(e.s=525)),_N_E=e.O()}]);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|