@rabbi696/ezrouter 0.6.20 → 0.6.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +1 -1
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/react-loadable-manifest.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/wakeup/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +8 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +8 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +22 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/enabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/enabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/wakeup/route.js +1 -1
- package/app/.next-cli-build/server/app/api/wakeup/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +8 -6
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +8 -6
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +11 -9
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +11 -9
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard/wakeup.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.rsc +9 -7
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard/wakeup.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_full.segment.rsc +9 -7
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/wakeup.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +10 -8
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +8 -6
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +8 -6
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +8 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +8 -6
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +9 -7
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +9 -7
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +5 -3
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +1 -1
- package/app/.next-cli-build/server/chunks/1133.js +1 -1
- package/app/.next-cli-build/server/chunks/1482.js +3 -3
- package/app/.next-cli-build/server/chunks/1522.js +1 -1
- package/app/.next-cli-build/server/chunks/1641.js +1 -1
- package/app/.next-cli-build/server/chunks/1733.js +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +22 -2
- package/app/.next-cli-build/server/chunks/1837.js +3 -0
- package/app/.next-cli-build/server/chunks/1847.js +1 -1
- package/app/.next-cli-build/server/chunks/2180.js +1 -1
- package/app/.next-cli-build/server/chunks/2348.js +1 -1
- package/app/.next-cli-build/server/chunks/2898.js +1 -1
- package/app/.next-cli-build/server/chunks/290.js +1 -1
- package/app/.next-cli-build/server/chunks/321.js +7 -2
- package/app/.next-cli-build/server/chunks/3275.js +1 -1
- package/app/.next-cli-build/server/chunks/369.js +21 -21
- package/app/.next-cli-build/server/chunks/3977.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +3 -3
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/5251.js +1 -1
- package/app/.next-cli-build/server/chunks/5292.js +1 -0
- package/app/.next-cli-build/server/chunks/5434.js +9 -2
- package/app/.next-cli-build/server/chunks/5460.js +8 -3
- package/app/.next-cli-build/server/chunks/5743.js +41 -14
- package/app/.next-cli-build/server/chunks/5749.js +1 -1
- package/app/.next-cli-build/server/chunks/5872.js +1 -1
- package/app/.next-cli-build/server/chunks/6038.js +1 -0
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6765.js +1 -0
- package/app/.next-cli-build/server/chunks/7358.js +1 -1
- package/app/.next-cli-build/server/chunks/7362.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7775.js +1 -1
- package/app/.next-cli-build/server/chunks/7811.js +1 -1
- package/app/.next-cli-build/server/chunks/8129.js +1 -1
- package/app/.next-cli-build/server/chunks/823.js +1 -1
- package/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/app/.next-cli-build/server/chunks/8327.js +21 -21
- package/app/.next-cli-build/server/chunks/8540.js +1 -0
- package/app/.next-cli-build/server/chunks/8889.js +11 -0
- package/app/.next-cli-build/server/chunks/8976.js +1 -1
- package/app/.next-cli-build/server/chunks/9021.js +1 -1
- package/app/.next-cli-build/server/chunks/9303.js +1 -1
- package/app/.next-cli-build/server/chunks/9485.js +1 -1
- package/app/.next-cli-build/server/chunks/9616.js +1 -1
- package/app/.next-cli-build/server/chunks/9761.js +1 -1
- package/app/.next-cli-build/server/chunks/9865.js +1 -1
- package/app/.next-cli-build/server/chunks/9898.js +2 -2
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +8 -3
- package/app/.next-cli-build/server/next-font-manifest.js +1 -1
- package/app/.next-cli-build/server/next-font-manifest.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/{1321-4dc9ca385825ff93.js → 1321-8a4ed98cd27f3c72.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-b45e1c7b332ddf12.js +17 -0
- package/app/.next-cli-build/static/chunks/{6252-d239501a3a8eee2c.js → 6252-0f14a5b69160c9da.js} +19 -12
- package/app/.next-cli-build/static/chunks/{6509-e4e72b0db83cac55.js → 6509-3113291463d9844c.js} +1 -1
- package/app/.next-cli-build/static/chunks/8105-09b5824ceb7fd21b.js +1 -0
- package/app/.next-cli-build/static/chunks/{8982-8a01c5331ac1683d.js → 8528-a98a240ecd3ff495.js} +3 -3
- package/app/.next-cli-build/static/chunks/9227-96f7384b30545e0d.js +5 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b29a8b9ee4742767.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bb32b01b204c30e6.js +1 -0
- package/app/.next-cli-build/static/chunks/app/layout-734517e5db69aafd.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-2e234f646b31f149.js → webpack-63e69ceb57f8fc86.js} +1 -1
- package/app/.next-cli-build/static/css/0288d77679ae04b4.css +1 -0
- package/app/.next-cli-build/static/css/{c974b0ba277faca7.css → 99e24003a7301d8b.css} +1 -1
- package/app/.next-cli-build/static/media/17cf9497af825577-s.woff2 +0 -0
- package/app/.next-cli-build/static/media/1abbc144918f74fd-s.p.woff2 +0 -0
- package/app/.next-cli-build/static/media/8c96cc4bd2a39381-s.p.woff2 +0 -0
- package/app/CHANGELOG.md +45 -0
- package/app/package.json +1 -1
- package/app/public/CHANGELOG.md +45 -0
- package/app/public/i18n/literals/fa.json +22 -9
- package/app/public/providers/subq.png +0 -0
- package/cli.js +35 -29
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/155.js +0 -11
- package/app/.next-cli-build/server/chunks/3583.js +0 -3
- package/app/.next-cli-build/server/chunks/3886.js +0 -1
- package/app/.next-cli-build/server/chunks/5516.js +0 -1
- package/app/.next-cli-build/server/chunks/73.js +0 -1
- package/app/.next-cli-build/server/chunks/7594.js +0 -28
- package/app/.next-cli-build/server/chunks/7677.js +0 -1
- package/app/.next-cli-build/server/chunks/8644.js +0 -1
- package/app/.next-cli-build/server/chunks/9386.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-4ef228b7ec9091c3.js +0 -17
- package/app/.next-cli-build/static/chunks/8105-1c0f06999d816cc5.js +0 -1
- package/app/.next-cli-build/static/chunks/9227-b3c96c0cd78c7abc.js +0 -5
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-6720afc00e5d9d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bb20d60bff37ceb9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/layout-9e8ae435612b99fc.js +0 -1
- package/app/.next-cli-build/static/css/2e1a9a933f2e668f.css +0 -1
- /package/app/.next-cli-build/static/{OFz0mgH4Q9vd3XaqYDHtW → Y99WYOLLyt5Zmp6hx75Z1}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{OFz0mgH4Q9vd3XaqYDHtW → Y99WYOLLyt5Zmp6hx75Z1}/_ssgManifest.js +0 -0
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9227],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>u,N9:()=>m,Nv:()=>p,RL:()=>c,YR:()=>o,ev:()=>x,fl:()=>i,hT:()=>l,oX:()=>a,t6:()=>d});let l=["zh-CN","zh-TW"],a=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=3e4,d=5,c=1e4,m=6e4,u=5e3,x=[{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}],p=[{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"}]},59227:(e,t,s)=>{Promise.resolve().then(s.bind(s,86371))},86371:(e,t,s)=>{"use strict";s.d(t,{default:()=>C});var l=s(95155),a=s(12115),r=s(14051),n=s.n(r),i=s(35497),o=s(11059),d=s(15536);async function c(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(d.Iv)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(c);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}var u=s(72767);function x({label:e,url:t,copyId:s,copied:a,onCopy:r,badge:n,actions:o}){return(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${"CF"===n||"TS"===n?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:e}),(0,l.jsx)(i.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)("button",{onClick:()=>r(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a===s?"check":"content_copy"})}),o]})}function p({status:e,className:t=""}){return(0,l.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,l.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function h({text:e}){return(0,l.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,l.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function b({message:e,action:t}){return(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,l.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,l.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}var y=s(57250),g=s(88105);function f({value:e,onChange:t}){let[s,r]=(0,a.useState)([]),[n,i]=(0,a.useState)(!0),[o,d]=(0,a.useState)(()=>new Set);(0,a.useEffect)(()=>{let e=!1;return fetch("/v1/models",{cache:"no-store"}).then(e=>e.ok?e.json():{data:[]}).then(t=>{e||r(Array.isArray(t.data)?t.data:[])}).catch(()=>{e||r([])}).finally(()=>{e||i(!1)}),()=>{e=!0}},[]);let c=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let s of e){if(!s?.id||"string"!=typeof s.id||!s.id.includes("/"))continue;let e=s.owned_by||s.id.slice(0,s.id.indexOf("/")),l=s.id.slice(s.id.indexOf("/")+1);t.has(e)||t.set(e,[]),t.get(e).push(l)}return t})(s),[s]),m=(0,a.useMemo)(()=>Array.from(c.keys()).sort((e,t)=>e.localeCompare(t)),[c]),u=null==e,x=(0,a.useMemo)(()=>new Set(e?.providers||[]),[e]);(0,a.useMemo)(()=>new Set(e?.models||[]),[e]);let p=t=>{let s=`${t}/`;return(e?.models||[]).filter(e=>e.startsWith(s))},h=(e,s)=>{0===e.length?t(null):t({providers:e,models:s})},b=e=>{d(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})};return n?(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Loading available providers…"}):(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,l.jsx)("input",{type:"checkbox",checked:u,onChange:e=>t(e.target.checked?null:{providers:[],models:[]})}),(0,l.jsx)("span",{children:"Unrestricted (key can reach every provider and model)"})]}),!u&&(0,l.jsxs)("div",{className:"flex flex-col gap-1 max-h-80 overflow-y-auto border border-black/[0.06] dark:border-white/[0.06] rounded-lg p-2",children:[0===m.length&&(0,l.jsx)("p",{className:"text-sm text-text-muted px-2 py-1",children:"No providers configured yet."}),m.map(t=>{let s,a=(0,g.rs)(t),r=g.Q2[a],n=c.get(t)||[],i=(s=(0,g.rs)(t),x.has(t)||x.has(s)),d=p(t),m=o.has(t);return(0,l.jsxs)("div",{className:"border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 py-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("input",{type:"checkbox",checked:i,onChange:()=>{let s,l;return s=new Set(e?.providers||[]),l=(e?.models||[]).slice(),void(s.has(t)?(s.delete(t),l=l.filter(e=>!e.startsWith(`${t}/`))):s.add(t),h(Array.from(s),l))}}),(0,l.jsx)(y.A,{providerId:a,size:16}),(0,l.jsx)("button",{type:"button",className:"flex-1 text-left text-sm font-medium",onClick:()=>b(t),children:r?.name||t}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:i?0===d.length?`all ${n.length} models`:`${d.length}/${n.length} models`:""}),(0,l.jsx)("button",{type:"button",className:"material-symbols-outlined text-[16px] text-text-muted",onClick:()=>b(t),children:m?"expand_less":"expand_more"})]}),m&&(0,l.jsx)("div",{className:"pl-8 mt-1 flex flex-col gap-1",children:n.map(s=>{let a=`${t}/${s}`,r=i&&(0===d.length||d.includes(a));return(0,l.jsxs)("label",{className:"flex items-center gap-2 text-xs",children:[(0,l.jsx)("input",{type:"checkbox",checked:r,onChange:()=>{let l,a,r,n,i,o;return(a=new Set(e?.providers||[])).add(t),r=`${t}/${s}`,n=p(t),i=c.get(t)||[],o=(e?.models||[]).filter(e=>!e.startsWith(`${t}/`)),void(0===n.length?l=i.filter(e=>e!==s).map(e=>`${t}/${e}`):n.includes(r)?l=n.filter(e=>e!==r):(l=[...n,r]).length===i.length&&(l=[]),h(Array.from(a),[...o,...l]))}}),(0,l.jsx)("span",{className:"font-mono",children:s})]},a)})})]},t)})]})]})}function j({apiKey:e,onChange:t,onRequestRestrict:s}){let r=e.access||{restricted:!1,allow:[]},[n,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)([]),[m,u]=(0,a.useState)({}),x=async()=>{o(!0);try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias")]);e.ok&&c((await e.json()).connections||[]),t.ok&&u((await t.json()).aliases||{})}catch(e){console.log("Error loading picker data:",e)}},p=e=>t({restricted:!0,allow:e}),h=e=>p(r.allow.filter(t=>t!==e));return(0,l.jsxs)("div",{className:"mt-2","data-testid":"key-access",children:[(0,l.jsx)(i.lM,{size:"sm",checked:r.restricted,label:"Restrict access",onChange:e=>e?s():t({restricted:!1,allow:r.allow})}),r.restricted&&(0,l.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[0===r.allow.length&&(0,l.jsx)("span",{className:"text-xs text-orange-500",children:"No combos or models allowed — this key can call nothing."}),r.allow.map(e=>(0,l.jsxs)("span",{className:"flex items-center gap-1 rounded-xl border border-primary/30 bg-primary/10 px-2 py-0.5 font-mono text-xs text-text-main",children:[e,(0,l.jsx)("button",{onClick:()=>h(e),className:"rounded text-text-muted hover:text-red-500",title:`Remove ${e}`,"aria-label":`Remove ${e}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"12px"},children:"close"})})]},e)),(0,l.jsxs)("button",{onClick:x,className:"flex items-center gap-0.5 rounded-xl border border-dashed border-black/10 px-2 py-0.5 text-xs font-medium text-primary hover:border-primary/50 dark:border-white/10",children:[(0,l.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"14px"},children:"add"}),"Add combo or model"]})]}),n&&(0,l.jsx)(i.rq,{isOpen:n,onClose:()=>o(!1),onSelect:e=>{let t=e?.value;t&&!r.allow.some(e=>e.toLowerCase()===t.toLowerCase())&&p([...r.allow,t])},onDeselect:e=>h(r.allow.find(t=>t.toLowerCase()===String(e?.value).toLowerCase())),activeProviders:d,modelAliases:m,title:`Allowed for "${e.name}"`,addedModelValues:r.allow,closeOnSelect:!1})]})}f.propTypes={value:n().shape({providers:n().arrayOf(n().string),models:n().arrayOf(n().string)}),onChange:n().func.isRequired},j.propTypes={apiKey:n().shape({id:n().string.isRequired,name:n().string,access:n().shape({restricted:n().bool,allow:n().arrayOf(n().string)})}).isRequired,onChange:n().func.isRequired,onRequestRestrict:n().func.isRequired};let v=[{label:"100K",value:"100000"},{label:"500K",value:"500000"},{label:"1M",value:"1000000"},{label:"5M",value:"5000000"},{label:"10M",value:"10000000"}];function k(e){let t=Math.max(0,Number(e)||0);return t>=1e6?`${(t/1e6).toFixed(+(t%1e6!=0))}M`:t>=1e3?`${(t/1e3).toFixed(+(t%1e3!=0))}K`:String(t)}function w({used:e,limit:t}){let s=Math.max(1,Number(t)||1),a=Math.max(0,Number(e)||0),r=Math.min(100,Math.round(a/s*100)),n=Math.max(0,s-a),i=r>=90?{bar:"bg-red-500",text:"text-red-600 dark:text-red-400"}:r>=75?{bar:"bg-amber-500",text:"text-amber-600 dark:text-amber-400"}:{bar:"bg-emerald-500",text:"text-text-muted"};return(0,l.jsxs)("div",{className:"mt-2 max-w-sm",title:`${k(a)} of ${k(s)} tokens used`,children:[(0,l.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-3 text-[11px]",children:[(0,l.jsxs)("span",{className:i.text,children:[r,"% used"]}),(0,l.jsxs)("span",{className:"text-text-muted",children:[k(n)," remaining"]})]}),(0,l.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-black/10 dark:bg-white/10",role:"progressbar","aria-label":`Token usage: ${r}% used, ${k(n)} remaining`,"aria-valuemin":0,"aria-valuemax":s,"aria-valuenow":Math.min(a,s),children:(0,l.jsx)("div",{className:`h-full rounded-full transition-[width] duration-300 ${i.bar}`,style:{width:`${r}%`}})})]})}function N({apiKey:e,activeProviders:t,modelAliases:s,onClose:r,onSave:n}){let[o,d]=(0,a.useState)(e.expiresAt?e.expiresAt.slice(0,16):""),[c,m]=(0,a.useState)(e.allowedModels||[]),[u,x]=(0,a.useState)(""),[p,h]=(0,a.useState)(null==e.tokenLimit?"unlimited":"unchanged"),[b,y]=(0,a.useState)(!1),[g,f]=(0,a.useState)(!1),j=null!=e.tokenLimit,w=async()=>{f(!0),await n({expiresAt:o||null,allowedModels:c,..."unlimited"===p?{tokenLimit:null}:u?{[j?"tokenLimitIncrement":"tokenLimit"]:u}:{}}),f(!1)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.aF,{isOpen:!0,onClose:r,title:`Edit ${e.name}`,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(i.pd,{label:"Expires at (optional)",type:"datetime-local",value:o,onChange:e=>d(e.target.value),hint:"Leave blank for no expiry."}),(0,l.jsx)(i.pd,{label:j?"Add tokens":"Set token limit",type:"number",min:"1",step:"1",value:u,onChange:e=>{let t=e.target.value;x(t),h(t?"amount":j?"unchanged":"unlimited")},placeholder:j?"e.g. 500000":"e.g. 1000000",hint:j?`Added to the current ${k(e.tokenLimit)} limit; usage is preserved.`:"Choose Unlimited to remove the limit."}),(0,l.jsxs)("div",{className:"-mt-2 flex flex-wrap gap-1.5","aria-label":"Token limit presets",children:[v.map(e=>{let t="amount"===p&&u===e.value;return(0,l.jsx)("button",{type:"button",onClick:()=>{x(e.value),h("amount")},"aria-pressed":t,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:e.label},e.value)}),(0,l.jsx)("button",{type:"button",onClick:()=>{x(""),h("unlimited")},"aria-pressed":"unlimited"===p,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${"unlimited"===p?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:"Unlimited"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"mb-1.5 block text-sm font-medium text-text-main",children:"Allowed models"}),(0,l.jsx)("div",{className:"flex min-h-12 flex-wrap gap-1 rounded-lg border border-border bg-surface-2 p-2",children:c.length?c.map(e=>(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs text-primary",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)("button",{type:"button",onClick:()=>m(t=>t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"material-symbols-outlined text-[14px]",children:"close"})]},e)):(0,l.jsx)("span",{className:"p-1 text-xs text-text-muted",children:"All models allowed"})}),(0,l.jsxs)("button",{type:"button",onClick:()=>y(!0),className:"mt-2 flex w-full items-center justify-center gap-1 rounded-lg border border-dashed border-black/10 py-2 text-xs font-medium text-primary dark:border-white/10",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"}),"Edit model access"]})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:w,fullWidth:!0,disabled:g,children:g?"Saving...":"Save changes"}),(0,l.jsx)(i.$n,{onClick:r,variant:"ghost",fullWidth:!0,disabled:g,children:"Cancel"})]})]})}),b&&(0,l.jsx)(i.rq,{isOpen:!0,onClose:()=>y(!1),onSelect:e=>m(t=>t.includes(e.value)?t:[...t,e.value]),onDeselect:e=>m(t=>t.filter(t=>t!==e.value)),activeProviders:t,modelAliases:s,addedModelValues:c,closeOnSelect:!1,title:"Edit allowed models"})]})}function C({machineId:e}){let[t,s]=(0,a.useState)([]),[r,n]=(0,a.useState)(!0),[y,g]=(0,a.useState)(!1),[k,S]=(0,a.useState)(""),[$,T]=(0,a.useState)(""),[A,E]=(0,a.useState)(""),[P,_]=(0,a.useState)([]),[R,O]=(0,a.useState)(!1),[U,L]=(0,a.useState)([]),[I,F]=(0,a.useState)({}),[q,D]=(0,a.useState)(null),[M,W]=(0,a.useState)(null),[K,z]=(0,a.useState)(null),[J,H]=(0,a.useState)(null),[B,V]=(0,a.useState)(null),[Q,Y]=(0,a.useState)(null),[X,Z]=(0,a.useState)(!1),[G,ee]=(0,a.useState)(!0),[et,es]=(0,a.useState)(!0),[el,ea]=(0,a.useState)(!1),[er,en]=(0,a.useState)(!1),[ei,eo]=(0,a.useState)(!1),[ed,ec]=(0,a.useState)(!1),[em,eu]=(0,a.useState)(""),[ex,ep]=(0,a.useState)(""),[eh,eb]=(0,a.useState)(!1),[ey,eg]=(0,a.useState)(""),[ef,ej]=(0,a.useState)(null),[ev,ek]=(0,a.useState)(!1),[ew,eN]=(0,a.useState)(!1),[eC,eS]=(0,a.useState)(!1),[e$,eT]=(0,a.useState)(!1),[eA,eE]=(0,a.useState)(""),[eP,e_]=(0,a.useState)(!1),[eR,eO]=(0,a.useState)(""),[eU,eL]=(0,a.useState)(null),[eI,eF]=(0,a.useState)(""),[eq,eD]=(0,a.useState)(""),[eM,eW]=(0,a.useState)(null),[eK,ez]=(0,a.useState)(!1),[eJ,eH]=(0,a.useState)([]),[eB,eV]=(0,a.useState)(""),[eQ,eY]=(0,a.useState)(!1),[eX,eZ]=(0,a.useState)(!1),[eG,e0]=(0,a.useState)(!1),e1=(0,a.useRef)(null),e5=(0,a.useRef)(0),e2=(0,a.useRef)(0),e4=(0,a.useRef)(!1),e3=(0,a.useRef)(!1),e6=(0,a.useRef)(!1),e8=(0,a.useRef)(!1),[e7,e9]=(0,a.useState)(!1),[te,tt]=(0,a.useState)(!1),[ts,tl]=(0,a.useState)(new Set),[ta,tr]=(0,a.useState)(!1);(0,a.useEffect)(()=>{tr(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:tn,copy:ti}=(0,o.C)(),to=!G||!et,td=G?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,a.useEffect)(()=>{e1.current&&(e1.current.scrollTop=e1.current.scrollHeight)},[eJ]),(0,a.useEffect)(()=>{th(),tu()},[]),(0,a.useEffect)(()=>{if(!y&&!K)return;let e=!1;return Promise.all([fetch("/api/providers"),fetch("/api/models/alias")]).then(async([t,s])=>{let[l,a]=await Promise.all([t.ok?t.json():{},s.ok?s.json():{}]);e||(L(l.connections||[]),F(a.aliases||{}))}).catch(e=>console.log("Error loading model picker:",e)),()=>{e=!0}},[y,K]),(0,a.useEffect)(()=>{if(!(ei||eC))return;let e=!ei||ed,t=!eC||e$,s=()=>{document.hidden||tm()};document.addEventListener("visibilitychange",s);let l=setInterval(()=>{document.hidden||tm()},e&&t?d.YR:d.fl);return()=>{clearInterval(l),document.removeEventListener("visibilitychange",s)}},[ei,eC,ed,e$]),(0,a.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(ei&&(em||ex)){let e=await m(ex,em);e4.current=e,e?(e5.current=0,ec(!0),e6.current||(e6.current=!0,e9(!0))):(e5.current+=1,e5.current>=d.t6&&ec(!1))}else e4.current=!1;if(eC&&eA){let e=await c(eA);e3.current=e,e?(e2.current=0,eT(!0),e8.current||(e8.current=!0,tt(!0))):(e2.current+=1,e2.current>=d.t6&&eT(!1))}else e3.current=!1}};if(!(ei&&(em||ex)||eC&&eA))return;e();let t=!eC||e$,s=setInterval(e,(!ei||ed)&&t?d.N9:d.RL);return()=>clearInterval(s)},[ei,em,ex,eC,eA,ed,e$]);let tc=(0,a.useCallback)((e,t,s,l,a,r)=>{t.current?(s.current=0,l(!0),a.current||(a.current=!0,r(!0))):(s.current+=1,s.current>=d.t6&&l(!1))},[]),tm=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,l=t.tunnel?.tunnelUrl||"";eu(l),ep(t.tunnel?.publicUrl||""),eo(s),tc(null,e4,e5,ec,e6,e9);let a=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,r=t.tailscale?.tunnelUrl||"";eE(r),eS(a),tc(null,e3,e2,eT,e8,tt)}catch{}},tu=async()=>{try{let[e,t]=await Promise.all([u.A.getState().fetchSettings(),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e&&(Z(e.requireApiKey||!1),ee(!1!==e.requireLogin),es(e.hasPassword||!1),ea(e.tunnelDashboardAccess||!1)),t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,l=e.tunnel?.tunnelUrl||"";eu(l),ep(e.tunnel?.publicUrl||""),eo(s),tc(null,e4,e5,ec,e6,e9);let a=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,r=e.tailscale?.tunnelUrl||"";eE(r),eS(a),tc(null,e3,e2,eT,e8,tt)}}catch(e){console.log("Error loading settings:",e)}finally{en(!1)}},tx=async e=>{try{await u.A.getState().patchSettings({tunnelDashboardAccess:e})&&ea(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},tp=async e=>{try{await u.A.getState().patchSettings({requireApiKey:e})&&Z(e)}catch(e){console.log("Error updating requireApiKey:",e)}},th=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},tb=async(...e)=>{eb(!0),eg("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<d.Cp;){if(await new Promise(e=>setTimeout(e,d.Hx)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return eo(!0),eb(!1),eg(""),!0;if((Date.now()-s)%1e4<d.Hx)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return ej({type:"error",message:"Tunnel process stopped unexpectedly."}),eb(!1),eg(""),!1}}catch{}}return ej({type:"error",message:"Tunnel created but not reachable. Please try again."}),eb(!1),eg(""),!1},ty=async()=>{ek(!1),eb(!0),ej(null),eg("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?eg(`Downloading cloudflared... ${s.download.progress}%`):e&&eg("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void ej({type:"error",message:s.error||"Failed to enable tunnel"});let l=s.tunnelUrl;if(!l)return void ej({type:"error",message:"No tunnel URL returned"});eu(l),ep(s.publicUrl||""),await tb(s.publicUrl,l)}catch(e){ej({type:"error",message:e.message})}finally{e=!1,eb(!1),eg("")}},tg=async()=>{eb(!0),ej(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(eo(!1),eu(""),eN(!1),ej({type:"success",message:"Tunnel disabled"})):ej({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){ej({type:"error",message:e.message})}finally{eb(!1)}},tf=async()=>{eW(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eW(t.installed),t}}catch{}return eW(!1),{installed:!1}},tj=async()=>{ez(!0),eL(null),eH([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eB})});eV("");let t=e.body.getReader(),s=new TextDecoder,l="";for(;;){let{done:e,value:a}=await t.read();if(e)break;let r=(l+=s.decode(a,{stream:!0})).split("\n\n");for(let e of(l=r.pop()||"",r)){let t=e.split("\n"),s="progress",l=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{l=JSON.parse(e.slice(6))}catch{}if(l)if("progress"===s)eH(e=>[...e.slice(-50),l.message]);else if("done"===s){eW(!0),ez(!1),eZ(!1),tN();return}else"error"===s&&eL({type:"error",message:l.error||"Install failed"})}}}catch(e){eL({type:"error",message:e.message})}finally{ez(!1)}},tv=async e=>{eO("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<d.Cp;){await new Promise(e=>setTimeout(e,d.Hx));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},tk=(e,t)=>{eF(e),eD(t)},tw=()=>{eF(""),eD("")},tN=async()=>{eZ(!1),eY(!0),e_(!0),eL(null),eO("Connecting..."),tw();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eE(t.tunnelUrl||"");let e=await tv(t.tunnelUrl);eS(!0),eL(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){tk(t.authUrl,"Open Login Page"),eO('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tw(),eO("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eE(t.tunnelUrl||"");let e=await tv(t.tunnelUrl);eS(!0),eL(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tC(t.enableUrl):eL({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tw(),eL({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tC(t.enableUrl);eL({type:"error",message:t.error||"Failed to connect"})}catch(e){eL({type:"error",message:e.message})}finally{e_(!1),eY(!1),eO(""),tw()}},tC=async e=>{tk(e,"Open Funnel Settings"),eO('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tw(),eE(t.tunnelUrl||"");let e=await tv(t.tunnelUrl);eS(!0),eL(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tw(),eL({type:"error",message:t.error});return}}catch{}}tw(),eL({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tS=async()=>{e_(!0),eL(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(eS(!1),eE(""),e0(!1),eL({type:"success",message:"Tailscale disabled"})):eL({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eL({type:"error",message:e.message})}finally{e_(!1)}},t$=async()=>{eL(null),eH([]);let e=await tf();e?.installed&&e?.hasCachedPassword?tN():eZ(!0)},tT=async()=>{if(k.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:k,expiresAt:$||null,tokenLimit:A||null,allowedModels:P,scope:q})}),t=await e.json();e.ok&&(W(t.key),await th(),S(""),T(""),E(""),_([]),O(!1),D(null),g(!1))}catch(e){console.log("Error creating key:",e)}},tA=async()=>{if(B)try{(await fetch(`/api/keys/${B.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({scope:Q})})).ok&&(s(e=>e.map(e=>e.id===B.id?{...e,scope:Q}:e)),V(null),Y(null))}catch(e){console.log("Error updating key scope:",e)}},tE=async e=>{H({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{H(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),tl(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},tP=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},t_=async(e,t)=>{let s=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw Error((await s.json()).error||"Failed to update key");await th(),z(null)},tR=async(e,t)=>{try{let l=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({access:t})}),a=await l.json().catch(()=>({}));l.ok&&a.key?s(t=>t.map(t=>t.id===e?{...t,access:a.key.access}:t)):console.log("Error updating key access:",a.error||l.status)}catch(e){console.log("Error updating key access:",e)}},[tO,tU]=(0,a.useState)("/v1");return((0,a.useEffect)(()=>{tU(`${window.location.origin}/v1`)},[]),r)?(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(i.Qv,{}),(0,l.jsx)(i.Qv,{})]}):(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsx)(x,{label:"Local",url:tO,copyId:"local_url",copied:tn,onCopy:ti}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${ei?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),ei&&!eh&&ed?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.pd,{value:`${ex||em}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)("button",{onClick:()=>ti(`${ex||em}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===tn?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>eN(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!ei||eh||ed?eh?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),ey||"Creating tunnel..."]}),(0,l.jsx)("button",{onClick:()=>{eb(!1),eg("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ef?.type==="error"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ef.message]}),(0,l.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ek(!0),children:"Enable"})]}):er?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,l.jsx)("button",{onClick:()=>en(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,l.jsx)(i.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{to?ej({type:"error",message:`Security required: ${td}`}):X?ek(!0):ej({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),e7?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,l.jsx)("button",{onClick:()=>eN(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${eC?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),eC&&!eP&&e$?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.pd,{value:`${eA}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)("button",{onClick:()=>ti(`${eA}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===tn?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>e0(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!eC||eP||e$?eP||eQ?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eR||"Connecting..."]}),eI&&(0,l.jsx)(i.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eI,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eq||"Open"}),(0,l.jsx)("button",{onClick:()=>{e_(!1),eY(!1),eO(""),tw()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):eU?.type==="error"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),eU.message]}),(0,l.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:t$,children:"Enable"})]}):(0,l.jsx)(i.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{to?eL({type:"error",message:`Security required: ${td}`}):t$()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),te?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,l.jsx)("button",{onClick:()=>e0(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),to&&!ei&&!eC&&(0,l.jsx)("div",{className:"mt-4",children:(0,l.jsx)(b,{message:td,action:{label:"Open settings",href:"/dashboard/profile"}})}),(ei||eC)&&(0,l.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!X&&(0,l.jsx)(b,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!G||!et)&&(0,l.jsx)(b,{message:G?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:G?"Change password":"Enable",href:"/dashboard/profile"}})]}),(ei||eC)&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,l.jsx)(i.lM,{checked:el,onChange:()=>tx(!el)}),(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,l.jsx)(h,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,l.jsxs)(i.Zp,{id:"require-api-key",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,l.jsx)(i.$n,{icon:"add",onClick:()=>g(!0),children:"Create Key"})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,l.jsx)(i.lM,{checked:X,onChange:()=>tp(!X)})]}),ta&&!X&&(0,l.jsx)("div",{className:"mb-4 -mt-2",children:(0,l.jsx)(b,{message:"Endpoint is exposed without an API key."})}),0===t.length?(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,l.jsx)(i.$n,{icon:"add",onClick:()=>g(!0),children:"Create Key"})]}):(0,l.jsx)("div",{className:"flex flex-col",children:t.map(e=>{var t;return(0,l.jsxs)("div",{className:`group flex items-start justify-between gap-3 py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-1 min-w-0 flex-wrap",children:[(0,l.jsx)("code",{className:"text-xs text-text-muted font-mono break-all min-w-0",children:ts.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,l.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(0,l.jsx)("button",{onClick:()=>{var t;return t=e.id,void tl(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:ts.has(e.id)?"Hide key":"Show key",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:ts.has(e.id)?"visibility_off":"visibility"})}),(0,l.jsx)("button",{onClick:()=>ti(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:tn===e.id?"check":"content_copy"})})]})]}),(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString(),e.expiresAt?` \xb7 Expires ${new Date(e.expiresAt).toLocaleString()}`:" \xb7 No expiry",null!=e.tokenLimit?` \xb7 ${e.tokensUsed}/${e.tokenLimit} tokens`:" \xb7 Unlimited tokens"]}),null!=e.tokenLimit&&(0,l.jsx)(w,{used:e.tokensUsed,limit:e.tokenLimit}),Array.isArray(e.allowedModels)&&e.allowedModels.length>0&&(0,l.jsxs)("p",{className:"text-xs text-text-muted mt-1 truncate",title:e.allowedModels.join(", "),children:["Models: ",e.allowedModels.join(", ")]}),!1===e.isActive&&(0,l.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"}),e.scope&&(0,l.jsxs)("p",{className:"text-xs text-primary mt-1",children:["Scoped (",(e.scope.providers||[]).length," provider",1===(e.scope.providers||[]).length?"":"s",")"]}),(0,l.jsx)(j,{apiKey:e,onChange:t=>tR(e.id,t),onRequestRestrict:()=>H({title:"Restrict API Key",message:`Restrict API key "${e.name}"?
|
|
2
|
-
|
|
3
|
-
It will only be able to call the combos and models you add. Until you add one, it can call nothing.`,onConfirm:async()=>{H(null),tR(e.id,{restricted:!0,allow:e.access?.allow||[]})}})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 shrink-0 pt-0.5",children:[(0,l.jsx)("button",{onClick:()=>{V(e),Y(e.scope??null)},className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-all",title:"Edit scope",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tune"})}),(0,l.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?H({title:"Pause API Key",message:`Pause API key "${e.name}"?
|
|
4
|
-
|
|
5
|
-
This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{H(null),tP(e.id,t)}}):tP(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,l.jsx)("button",{onClick:()=>z(e),className:"p-2 hover:bg-primary/10 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:"Edit key",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>tE(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),K&&(0,l.jsx)(N,{apiKey:K,activeProviders:U,modelAliases:I,onClose:()=>z(null),onSave:e=>t_(K.id,e)},K.id),(0,l.jsx)(i.aF,{isOpen:y,title:"Create API Key",onClose:()=>{g(!1),S(""),T(""),E(""),_([]),O(!1),D(null)},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(i.pd,{label:"Key Name",value:k,onChange:e=>S(e.target.value),placeholder:"Production Key"}),(0,l.jsx)(i.pd,{label:"Expires at (optional)",type:"datetime-local",value:$,onChange:e=>T(e.target.value),hint:"Leave blank for no expiry."}),(0,l.jsx)(i.pd,{label:"Token limit (optional)",type:"number",min:"1",step:"1",value:A,onChange:e=>E(e.target.value),placeholder:"Unlimited",hint:"Total input and output tokens. Strictly enforced."}),(0,l.jsxs)("div",{className:"-mt-2 flex flex-wrap gap-1.5","aria-label":"Token limit presets",children:[v.map(e=>{let t=A===e.value;return(0,l.jsx)("button",{type:"button",onClick:()=>E(e.value),"aria-pressed":t,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${t?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:e.label},e.value)}),(0,l.jsx)("button",{type:"button",onClick:()=>E(""),"aria-pressed":!A,className:`rounded-full border px-2.5 py-1 text-xs font-medium transition-colors ${!A?"border-primary bg-primary text-white":"border-border bg-surface-2 text-text-muted hover:border-primary/50 hover:text-primary"}`,children:"Unlimited"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Allowed models (optional)"}),0===P.length?(0,l.jsxs)("div",{className:"rounded-lg border border-dashed border-black/10 bg-black/[0.01] px-3 py-4 text-center dark:border-white/10 dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined mb-1 text-xl text-text-muted",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"All models are allowed"})]}):(0,l.jsx)("div",{className:"flex max-h-28 flex-wrap gap-1 overflow-y-auto rounded-lg border border-border bg-surface-2 p-2",children:P.map(e=>(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-1 text-xs text-primary",children:[(0,l.jsx)("span",{className:"max-w-48 truncate",children:e}),(0,l.jsx)("button",{type:"button",onClick:()=>_(t=>t.filter(t=>t!==e)),"aria-label":`Remove ${e}`,className:"material-symbols-outlined text-[14px] hover:text-red-500",children:"close"})]},e))}),(0,l.jsxs)("button",{type:"button",onClick:()=>O(!0),className:"flex w-full items-center justify-center gap-1 rounded-lg border border-dashed border-black/10 py-2 text-xs font-medium text-primary transition-colors hover:border-primary/50 dark:border-white/10",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),P.length?"Add another model":"Choose models"]}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Leave empty to allow every model."})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-medium mb-2",children:"Access Scope"}),(0,l.jsx)(f,{value:q,onChange:D})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tT,fullWidth:!0,disabled:!k.trim(),children:"Create"}),(0,l.jsx)(i.$n,{onClick:()=>{g(!1),S(""),T(""),E(""),_([]),O(!1),D(null)},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,l.jsx)(i.aF,{isOpen:!!B,title:`Edit Scope — ${B?.name||""}`,onClose:()=>{V(null),Y(null)},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(f,{value:Q,onChange:Y}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tA,fullWidth:!0,children:"Save"}),(0,l.jsx)(i.$n,{onClick:()=>{V(null),Y(null)},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),R&&(0,l.jsx)(i.rq,{isOpen:R,onClose:()=>O(!1),onSelect:e=>_(t=>t.includes(e.value)?t:[...t,e.value]),onDeselect:e=>_(t=>t.filter(t=>t!==e.value)),activeProviders:U,modelAliases:I,addedModelValues:P,closeOnSelect:!1,title:"Choose models for this API key"}),(0,l.jsx)(i.aF,{isOpen:!!M,title:"API Key Created",onClose:()=>W(null),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,l.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,l.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.pd,{value:M||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,l.jsx)(i.$n,{variant:"secondary",icon:"created_key"===tn?"check":"content_copy",onClick:()=>ti(M,"created_key"),children:"created_key"===tn?"Copied!":"Copy"})]}),(0,l.jsx)(i.$n,{onClick:()=>W(null),fullWidth:!0,children:"Done"})]})}),(0,l.jsx)(i.aF,{isOpen:ev,title:"Enable Tunnel",onClose:()=>ek(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,l.jsx)("div",{className:"grid grid-cols-2 gap-3",children:d.oX.map(e=>(0,l.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,l.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:ty,fullWidth:!0,children:"Start Tunnel"}),(0,l.jsx)(i.$n,{onClick:()=>ek(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,l.jsx)(i.aF,{isOpen:ew,title:"Disable Tunnel",onClose:()=>!eh&&eN(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tg,fullWidth:!0,disabled:eh,variant:"danger",children:eh?"Disabling...":"Disable"}),(0,l.jsx)(i.$n,{onClick:()=>eN(!1),variant:"ghost",fullWidth:!0,disabled:eh,children:"Cancel"})]})]})}),(0,l.jsx)(i.aF,{isOpen:eX,title:"Tailscale Funnel",onClose:()=>{eK||(eZ(!1),eV(""),eL(null))},children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eM&&(0,l.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===eM&&!eK&&(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tj,fullWidth:!0,children:"Install Tailscale"}),(0,l.jsx)(i.$n,{onClick:()=>eZ(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eK&&(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eJ.length>0&&(0,l.jsx)("div",{ref:e1,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eJ.map((e,t)=>(0,l.jsx)("div",{children:e},t))})]}),!0===eM&&!eK&&(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:()=>tN(),fullWidth:!0,children:"Connect"}),(0,l.jsx)(i.$n,{onClick:()=>eZ(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eU&&(0,l.jsx)(p,{status:eU})]})}),(0,l.jsx)(i.aF,{isOpen:eG,title:"Disable Tailscale",onClose:()=>!eP&&e0(!1),children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)(i.$n,{onClick:tS,fullWidth:!0,disabled:eP,variant:"danger",children:eP?"Disabling...":"Disable"}),(0,l.jsx)(i.$n,{onClick:()=>e0(!1),variant:"ghost",fullWidth:!0,disabled:eP,children:"Cancel"})]})]})}),(0,l.jsx)(i.uo,{isOpen:!!J,onClose:()=>H(null),onConfirm:J?.onConfirm,title:J?.title||"Confirm",message:J?.message,variant:"danger"})]})}w.propTypes={used:n().number,limit:n().number.isRequired},N.propTypes={apiKey:n().object.isRequired,activeProviders:n().array.isRequired,modelAliases:n().object.isRequired,onClose:n().func.isRequired,onSave:n().func.isRequired},C.propTypes={machineId:n().string.isRequired}}}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-6720afc00e5d9d9a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{25100:(e,t,s)=>{Promise.resolve().then(s.bind(s,63784))},63784:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>w});var a=s(95155),l=s(12115),r=s(44923),n=s(87256),i=s(39768),o=s(5020),d=s(35497),c=s(11059),m=s(929),x=s(88105),u=s(57151);function p(e,t,s){let a={...e};return"inherit"===s.fallbackStrategy?delete a[t]:a[t]={...a[t]||{},...s},a}let h=/^[a-zA-Z0-9_.\-]+$/,b=[{key:"vision",label:"Vision",icon:"visibility",desc:"images (png, jpg, webp, …)"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"audio input"}],g="oc/mimo-v2.6-flash-free",f={enabled:!0,roundRobin:!1,models:[]},y={vision:{...f},pdf:{...f},audioInput:{...f},videoInput:{...f}},j=e=>"oc/mimo-v2.5-free"===e?g:e,v=[{value:"inherit",label:"Inherit global strategy"},{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"weighted",label:"Weighted — random by weight"},{value:"fusion",label:"Fusion — panel + judge"}];function w(){let e,[t,s]=(0,l.useState)([]),[r,n]=(0,l.useState)(!0),[i,o]=(0,l.useState)(!1),[u,h]=(0,l.useState)(null),[g,w]=(0,l.useState)(null),[N,S]=(0,l.useState)([]),[$,E]=(0,l.useState)({}),[O,D]=(0,l.useState)("fallback"),[T,A]=(0,l.useState)(y),{getCaps:F}=(0,m.y)(),[P,_]=(0,l.useState)(null),[R,I]=(0,l.useState)(null),[z,H]=(0,l.useState)([]),[W,q]=(0,l.useState)(!1),{copied:G,copy:B}=(0,c.C)();(0,l.useEffect)(()=>{U()},[]),(0,l.useEffect)(()=>{let e=new Set(t.map(e=>e.id));H(t=>t.filter(t=>e.has(t)))},[t]);let J=t.filter(e=>z.includes(e.id)),V=t.length>0&&z.length===t.length,L=z.length>0,Q=()=>H([]),Z=async e=>{let t="cursor"===e?"Cursor Default":"Claude Default";I(e);try{let s=await fetch(`/api/combos/presets?source=${e}`),a=await s.json();if(!s.ok)return void alert(a.error||`Failed to preview ${t}`);let l=a.toCreate??(a.items||[]).filter(e=>!e.exists).length,r=a.toSkip??(a.items||[]).filter(e=>e.exists).length,n=(a.items||[]).length;if(0===n)return void alert(`No ${t} models available to generate.`);if(0===l)return void alert(`All ${n} ${t} combos already exist. Nothing to create.`);_({title:`Generate ${t}`,message:`Create ${l} combo${1===l?"":"s"} named like ${"cursor"===e?"Cursor":"Claude"} model IDs (seeded with cu/… or cc/…). ${r} already exist and will be skipped. You can edit any combo afterward to add fallbacks.`,confirmText:"Generate",variant:"primary",onConfirm:async()=>{_(e=>e?{...e,loading:!0}:null);try{let s=await fetch("/api/combos/presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:e})}),a=await s.json();if(!s.ok)return void alert(a.error||`Failed to generate ${t}`);await U(),_(null)}catch(e){console.log(`Error generating ${t}:`,e),alert(`Failed to generate ${t}`),_(e=>e?{...e,loading:!1}:null)}}})}catch(e){console.log(`Error previewing ${t}:`,e),alert(`Failed to preview ${t}`)}finally{I(null)}},U=async()=>{try{let[t,a,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),r=await t.json(),n=await a.json(),i=l.ok?await l.json():{};t.ok&&s((r.combos||[]).filter(e=>!x.rj.some(({id:t})=>t===e.kind))),a.ok&&S(n.connections||[]),E(i.comboStrategies||{}),D(i.comboStrategy||"fallback");let o=i.capacityAdapter||{},d={};for(let t of b){var e;d[t.key]=(e=o[t.key],Array.isArray(e)?{enabled:!0,roundRobin:!1,models:e.map(e=>j(e?.model||e)).filter(Boolean)}:e&&"object"==typeof e?{enabled:!1!==e.enabled,roundRobin:!!e.roundRobin,models:Array.isArray(e.models)?e.models.map(j).filter(Boolean):[]}:{...f})}A(d)}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},K=async e=>{A(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})}catch(e){console.log("Error updating capacity adapter:",e)}},Y=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await U(),o(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},X=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await U(),h(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},ee=(e,t=$)=>{let s={...t};for(let t of e)delete s[t];return s},et=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),E(e)},es=async e=>{let a=t.find(t=>t.id===e);_({title:"Delete Combo",message:a?`Delete combo "${a.name}"?`:"Delete this combo?",onConfirm:async()=>{_(e=>e?{...e,loading:!0}:null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&(a?.name&&await et(ee([a.name])),s(t=>t.filter(t=>t.id!==e)),H(t=>t.filter(t=>t!==e))),_(null)}catch(e){console.log("Error deleting combo:",e),_(e=>e?{...e,loading:!1}:null)}}})},ea=async(e,t)=>{try{await et(p($,e,t))}catch(e){console.log("Error updating combo strategy:",e)}},el=async e=>{if(0!==J.length&&e){q(!0);try{let t={...$};for(let s of J)t=p(t,s.name,{fallbackStrategy:e});await et(t)}catch(e){console.log("Error bulk updating combo strategy:",e),alert("Failed to update strategy for selected combos")}finally{q(!1)}}};return r?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,a.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," — queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]})]}),(0,a.jsxs)("p",{className:"hidden text-xs text-text-muted mt-3 max-w-2xl",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Cursor / Claude Default"})," create combos named exactly like those clients' model IDs (e.g. ",(0,a.jsx)("code",{className:"font-mono",children:"composer-2.5"}),", ",(0,a.jsx)("code",{className:"font-mono",children:"opus"}),"), seeded with the matching ",(0,a.jsx)("code",{className:"font-mono",children:"cu/…"})," or ",(0,a.jsx)("code",{className:"font-mono",children:"cc/…"})," route so traffic can hit EzRouter without the prefix."," ",'Note: Cursor IDE itself often blocks built-in Composer / Grok from Override OpenAI Base URL ("model does not support custom API"); add them via Cursor\'s ',(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Add Custom Model"})," using the combo name, or pick a model Cursor allows through the custom endpoint."]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:items-stretch",children:[(0,a.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"}),(0,a.jsxs)("div",{className:"hidden",children:[(0,a.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"edit_note",loading:"cursor"===R,disabled:!!R,onClick:()=>Z("cursor"),className:"w-full whitespace-nowrap",children:"Cursor Default"}),(0,a.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"smart_toy",loading:"claude"===R,disabled:!!R,onClick:()=>Z("claude"),className:"w-full whitespace-nowrap",children:"Claude Default"})]})]})]}),0===t.length?(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 rounded-lg border border-black/5 bg-black/[0.015] px-3 py-2 dark:border-white/5 dark:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-text-muted hover:text-primary select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:V,ref:e=>{e&&(e.indeterminate=L&&!V)},onChange:()=>{H(V?[]:t.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),(0,a.jsx)("span",{children:L?`${z.length} selected`:`Select all (${t.length})`})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:L&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-full min-w-[160px] sm:w-[200px]",children:(0,a.jsx)(d.l6,{options:v,value:"",placeholder:"Set strategy…",disabled:W,onChange:e=>{let t=e.target.value;t&&el(t)},selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",disabled:W,loading:W,onClick:()=>{if(0===J.length)return;let e=J.length;_({title:"Delete Selected Combos",message:`Delete ${e} selected combo${1===e?"":"s"}? This cannot be undone.`,confirmText:"Delete",variant:"danger",onConfirm:async()=>{_(e=>e?{...e,loading:!0}:null),q(!0);try{let e=J.map(e=>e.id),t=J.map(e=>e.name),a=(await Promise.all(e.map(e=>fetch(`/api/combos/${e}`,{method:"DELETE"})))).filter(e=>!e.ok).length;await et(ee(t)),s(t=>t.filter(t=>!e.includes(t.id))),Q(),_(null),a>0&&alert(`Deleted with ${a} failure${1===a?"":"s"}.`)}catch(e){console.log("Error bulk deleting combos:",e),alert("Failed to delete selected combos"),_(e=>e?{...e,loading:!1}:null)}finally{q(!1)}}})},className:"whitespace-nowrap",children:["Delete (",z.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:Q,disabled:W,children:"Clear"})]})})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:(e=Object.fromEntries(t.map(e=>[e.name,e.models])),t.map(t=>(0,a.jsx)(k,{combo:t,getCaps:F,comboByName:e,activeProviders:N,copied:G,onCopy:B,onEdit:()=>h(t),onDelete:()=>es(t.id),onTest:()=>w(t),strategy:$[t.name]||{},globalComboStrategy:O,onSetStrategy:e=>ea(t.name,e),selected:z.includes(t.id),onToggleSelect:()=>{var e;return e=t.id,void H(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}},t.id)))})]}),(0,a.jsx)(C,{capacityAdapter:T,onChange:K,activeProviders:N,getCaps:F}),g&&(0,a.jsx)(d.St,{isOpen:!!g,combo:g,onClose:()=>w(null),strategy:$[g.name]||{}}),i&&(0,a.jsx)(M,{isOpen:i,onClose:()=>o(!1),onSave:Y,onTestDraft:e=>w(e),activeProviders:N},"create"),u&&(0,a.jsx)(M,{isOpen:!!u,combo:u,onClose:()=>h(null),onSave:e=>X(u.id,e),onTestDraft:e=>w(e),activeProviders:N},u.id),(0,a.jsx)(d.uo,{isOpen:!!P,onClose:()=>!P?.loading&&_(null),onConfirm:P?.onConfirm,title:P?.title||"Confirm",message:P?.message,confirmText:P?.confirmText||"Confirm",variant:P?.variant||"danger",loading:!!P?.loading})]})}let N=e=>{if(!e)return"?";if(e>=1e6){let t=e/1e6;return`${Number.isInteger(t)?t:t.toFixed(1)}M`}return`${Math.round(e/1e3)}k`};function k({combo:e,getCaps:t,comboByName:s={},activeProviders:r=[],copied:n,onCopy:i,onEdit:o,onDelete:c,onTest:m,strategy:x={},globalComboStrategy:p="fallback",onSetStrategy:h,selected:b=!1,onToggleSelect:g}){let[f,y]=(0,l.useState)(!1),j=x.fallbackStrategy||"inherit",w=x.judgeModel||"",C=("inherit"===j?p:j)==="fusion",S=(0,u.Q5)(e.models,s,t);return(0,a.jsxs)(d.Zp,{padding:"sm",className:`group ${b?"ring-1 ring-primary/40 bg-primary/[0.03]":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsx)("label",{className:"flex shrink-0 items-center pt-1 sm:pt-0 cursor-pointer",title:"Select combo",children:(0,a.jsx)("input",{type:"checkbox",checked:b,onChange:g,onClick:e=>e.stopPropagation(),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary","aria-label":`Select ${e.name}`})}),(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,l)=>(0,a.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,a.jsx)("span",{children:e}),(0,a.jsx)(d.nh,{caps:s[e]?(0,u.Q5)(s[e],s,t):t?.(e)})]},l)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),S&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["ctx ",N(S.contextWindow)]}),(0,a.jsx)("span",{className:"opacity-40",children:"\xb7"}),(0,a.jsxs)("span",{children:["max ",N(S.maxOutput)]})]}),C&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,a.jsx)("span",{className:"truncate",children:w||`Auto — ${e.models[0]||"first model"}`})]}),w&&(0,a.jsx)("button",{onClick:()=>h({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,a.jsx)(d.l6,{options:v.map(e=>"inherit"===e.value?{...e,label:`Inherit global — ${p}`}:e),value:j,onChange:e=>h({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-1 sm:flex",children:[(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-primary transition-colors hover:bg-primary/10",title:"Test Run Combo",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight font-medium",children:"Test"})]}),(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),i(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:n===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:o,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:c,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),f&&(0,a.jsx)(d.rq,{isOpen:f,onClose:()=>y(!1),onSelect:e=>{h({judgeModel:e?.value||""}),y(!1)},activeProviders:r,title:"Select Judge Model",addedModelValues:w?[w]:[],closeOnSelect:!0})]})}function C({capacityAdapter:e,onChange:t,activeProviders:s,getCaps:l}){return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Vision Adapter"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Your model can't read image/audio? Auto-switches to a model in the pool below."})]})}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:b.map(r=>(0,a.jsx)(S,{cap:r,entry:e[r.key]||f,onChange:s=>t({...e,[r.key]:s}),activeProviders:s,getCaps:l},r.key))})]})}function S({cap:e,entry:t,onChange:s,activeProviders:r,getCaps:n}){let[i,o]=(0,l.useState)(!1),{enabled:c,roundRobin:m,models:x}=t,u=e=>s({...t,...e}),p=(e,t)=>{let s=e+t;if(s<0||s>=x.length)return;let a=[...x];[a[e],a[s]]=[a[s],a[e]],u({models:a})};return(0,a.jsxs)(d.Zp,{padding:"sm",className:`group ${!c?"opacity-50":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[(0,a.jsx)(d.lM,{checked:c,onChange:e=>u({enabled:e}),"aria-label":`Enable ${e.label} adapter`}),(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("code",{className:"font-mono text-sm font-medium",children:e.label}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["— ",e.desc]})]})})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer select-none",children:[(0,a.jsx)(d.lM,{checked:m,onChange:e=>u({roundRobin:e}),disabled:!c,"aria-label":`Round-robin ${e.label} adapter`}),(0,a.jsx)("span",{children:"Round"})]}),(0,a.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",onClick:()=>o(!0),disabled:!c,title:`Add ${e.label} model`,children:"Add Model"})]})]}),0===x.length?(0,a.jsxs)("div",{className:"mt-3 py-2 text-center text-xs text-text-muted italic",children:["No models in pool (will fallback to ",g,")"]}):(0,a.jsx)("div",{className:"mt-3 overflow-hidden rounded-lg border border-border/50",children:(0,a.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border/40 bg-black/[0.02] text-text-muted dark:bg-white/[0.02]",children:[(0,a.jsx)("th",{className:"w-12 px-3 py-1.5 font-medium text-center",children:"#"}),(0,a.jsx)("th",{className:"px-3 py-1.5 font-medium",children:"Model"}),(0,a.jsx)("th",{className:"w-24 px-3 py-1.5 font-medium text-center",children:"Order"}),(0,a.jsx)("th",{className:"w-12 px-3 py-1.5 font-medium text-right"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/30 font-mono",children:x.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsxs)("td",{className:"px-3 py-2 text-center text-text-muted text-[11px] font-sans",children:["#",t+1]}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-main",children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,a.jsx)("span",{className:"truncate",children:e}),(0,a.jsx)(d.nh,{caps:n?.(e)}),e===g&&(0,a.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 font-sans text-[10px] font-medium text-emerald-600 dark:text-emerald-400",children:"free default"})]})}),(0,a.jsx)("td",{className:"px-3 py-2 text-center",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>p(t,-1),disabled:!c||0===t,className:`p-1 rounded transition-colors ${!c||0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_upward"})}),(0,a.jsx)("button",{type:"button",onClick:()=>p(t,1),disabled:!c||t===x.length-1,className:`p-1 rounded transition-colors ${!c||t===x.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_downward"})})]})}),(0,a.jsx)("td",{className:"px-3 py-2 text-right",children:(0,a.jsx)("button",{type:"button",onClick:()=>{let e;u({models:0===(e=x.filter((e,s)=>s!==t)).length?[g]:e})},disabled:!c,className:`p-1 rounded transition-colors ${!c?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-red-500 hover:bg-red-500/10"}`,title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"close"})})})]},`${e}-${t}`))})]})}),i&&(0,a.jsx)(d.rq,{isOpen:i,onClose:()=>o(!1),onSelect:e=>{let t=e?.value||e?.name||e;!t||x.includes(t)||u({models:[...x,t]})},onDeselect:e=>{let t=e?.value||e?.name||e,s=x.filter(e=>e!==t);u({models:0===s.length?[g]:s})},activeProviders:r,title:`Add ${e.label} Model`,addedModelValues:x,capFilter:e.key,closeOnSelect:!1})]})}function $({id:e,index:t,model:s,weight:r=1,isFirst:o,isLast:d,onEdit:c,onWeightChange:m,onMoveUp:x,onMoveDown:u,onRemove:p}){let{attributes:h,listeners:b,setNodeRef:g,transform:f,isDragging:y}=(0,n.gl)({id:e}),j={transform:i.Ks.Transform.toString(f),opacity:y?.4:1,zIndex:y?999:void 0},[v,w]=(0,l.useState)(!1),[N,k]=(0,l.useState)(s),C=()=>{let e=N.trim();e&&e!==s?c(e):k(s),w(!1)};return(0,a.jsxs)("div",{ref:g,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${y?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,a.jsx)("button",{...h,...b,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,a.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),v?(0,a.jsx)("input",{autoFocus:!0,value:N,onChange:e=>k(e.target.value),onBlur:C,onKeyDown:e=>{"Enter"===e.key&&C(),"Escape"===e.key&&(k(s),w(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,a.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>w(!0),title:"Click to edit",children:s}),(0,a.jsxs)("label",{className:"flex shrink-0 items-center gap-0.5 text-[10px] text-text-muted",title:"Weight for Weighted strategy",children:["w",(0,a.jsx)("input",{type:"number",min:1,max:10,value:r,onChange:e=>m?.(e.target.value),className:"w-9 rounded border border-black/10 px-1 py-0.5 text-xs text-text-main dark:border-white/10 bg-transparent text-center"})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:x,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:u,disabled:d,className:`p-0.5 rounded ${d?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:p,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function M({isOpen:e,combo:t,onClose:s,onSave:i,onTestDraft:c,activeProviders:m,kindFilter:x=null}){let[u,p]=(0,l.useState)(t?.name||""),b=t?.members?.length?t.members:(t?.models||[]).map(e=>({id:e,weight:1})),[g,f]=(0,l.useState)(b),[y,j]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),[N,k]=(0,l.useState)(""),[C,S]=(0,l.useState)({}),[E,O]=(0,l.useState)(!1),[D,T]=(0,l.useState)(()=>t?.policy||t?.config?.policy||{}),[A,F]=(0,l.useState)(()=>t?.fusion||t?.config?.fusion||{}),P=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:n.JR})),_=g.map((e,t)=>({uid:`item-${t}`,id:e.id,weight:e.weight})),R=g.map(e=>e.id),I=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&I()},[e]);let z=e=>e.trim()?h.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and . allowed"),!1):(k("Name is required"),!1),H=async()=>{if(!z(u))return;w(!0);let e=g.map(e=>e.id),t=g.some(e=>1!==(e.weight||1)),s={name:u.trim(),models:e};if(t||Object.keys(D).length||Object.keys(A).length){s.members=g;let e={};t&&(e.members=g),Object.keys(D).length&&(e.policy=D),Object.keys(A).length&&(e.fusion=A),Object.keys(e).length&&(s.config=e)}await i(s),w(!1)},W=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.aF,{isOpen:e,onClose:s,title:W?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.pd,{label:"Combo Name",value:u,onChange:e=>{let t=e.target.value;p(t),t?z(t):k("")},placeholder:"my-combo",error:N}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"text-sm font-medium mb-1.5 block",children:["Models ",(0,a.jsx)("span",{className:"text-[11px] text-text-muted font-normal",children:"— weights matter for Weighted strategy"})]}),0===g.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)(r.Mp,{sensors:P,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=_.findIndex(e=>e.uid===t.id),a=_.findIndex(e=>e.uid===s.id);-1!==e&&-1!==a&&f(t=>(0,n.be)(t,e,a))}},modifiers:[o.FN,o.gj],children:(0,a.jsx)(n.gB,{items:_.map(e=>e.uid),strategy:n._G,children:(0,a.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:_.map(({uid:e,id:t,weight:s},l)=>(0,a.jsx)($,{id:e,index:l,model:t,weight:s,isFirst:0===l,isLast:l===_.length-1,onEdit:e=>{let t=[...g];t[l]={...t[l],id:e},f(t)},onWeightChange:e=>{let t,s;return t=Math.max(1,Math.min(10,parseInt(e,10)||1)),void((s=[...g])[l]={...s[l],weight:t},f(s))},onMoveUp:()=>(e=>{if(0===e)return;let t=[...g];[t[e-1],t[e]]=[t[e],t[e-1]],f(t)})(l),onMoveDown:()=>(e=>{if(e===g.length-1)return;let t=[...g];[t[e],t[e+1]]=[t[e+1],t[e]],f(t)})(l),onRemove:()=>{f(g.filter((e,t)=>t!==l))}},e))})})}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]}),(0,a.jsxs)("div",{className:"rounded-lg border border-black/10 dark:border-white/10 p-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>O(e=>!e),className:"flex w-full items-center justify-between text-xs font-medium text-text-main",children:[(0,a.jsx)("span",{children:"Advanced — weights, retry, fusion tuning"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:E?"expand_less":"expand_more"})]}),E&&(0,a.jsxs)("div",{className:"mt-2 flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)("label",{className:"text-xs",children:["Sticky (requests per model)",(0,a.jsx)("input",{type:"number",min:1,max:50,value:D.sticky||1,onChange:e=>T({...D,sticky:Math.max(1,parseInt(e.target.value,10)||1)}),className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]}),(0,a.jsxs)("label",{className:"text-xs",children:["Max Hops (attempts)",(0,a.jsx)("input",{type:"number",min:1,max:20,placeholder:"all",value:D.maxHops||"",onChange:e=>{let t=parseInt(e.target.value,10);T(t?{...D,maxHops:t}:{...D,maxHops:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,a.jsxs)("label",{className:"text-xs",children:["Min Panel",(0,a.jsx)("input",{type:"number",min:2,max:10,value:A.minPanel||"",placeholder:"2",onChange:e=>{let t=parseInt(e.target.value,10);F(t?{...A,minPanel:t}:{...A,minPanel:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]}),(0,a.jsxs)("label",{className:"text-xs",children:["Grace ms",(0,a.jsx)("input",{type:"number",min:0,max:3e4,value:A.stragglerGraceMs||"",placeholder:"8000",onChange:e=>{let t=parseInt(e.target.value,10);F(Number.isFinite(t)?{...A,stragglerGraceMs:t}:{...A,stragglerGraceMs:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]}),(0,a.jsxs)("label",{className:"text-xs",children:["Hard timeout ms",(0,a.jsx)("input",{type:"number",min:1e3,max:3e5,value:A.panelHardTimeoutMs||"",placeholder:"90000",onChange:e=>{let t=parseInt(e.target.value,10);F(Number.isFinite(t)?{...A,panelHardTimeoutMs:t}:{...A,panelHardTimeoutMs:void 0})},className:"mt-1 w-full rounded border border-black/10 px-2 py-1 text-xs dark:border-white/10 bg-transparent"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"Weights 1–10 affect Weighted strategy only. Sticky & Max Hops affect fallback/round-robin. Fusion tuning affects panel collection."})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,a.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),c&&R.length>0&&(0,a.jsx)(d.$n,{type:"button",onClick:()=>c({id:t?.id,name:u||"Draft Combo",models:R,kind:x||"llm"}),variant:"outline",fullWidth:!0,size:"sm",icon:"play_circle",children:"Test Run"}),(0,a.jsx)(d.$n,{onClick:H,fullWidth:!0,size:"sm",disabled:!u.trim()||!!N||v,children:v?"Saving...":W?"Save":"Create"})]})]})}),y&&(0,a.jsx)(d.rq,{isOpen:y,onClose:()=>j(!1),onSelect:e=>{g.find(t=>t.id===e.value)||f([...g,{id:e.value,weight:1}])},onDeselect:e=>{f(g.filter(t=>t.id!==e.value))},activeProviders:m,modelAliases:C,title:"Add Model to Combo",kindFilter:x,addedModelValues:g.map(e=>e.id),closeOnSelect:!1})]})}},84680:(e,t,s)=>{"use strict";s.d(t,{PM:()=>a.PM,Sj:()=>a.Sj,Vy:()=>a.Vy,fF:()=>a.fF,sl:()=>a.sl,vL:()=>a.vL,y$:()=>a.y$,zM:()=>a.zM});var a=s(44923)}},e=>{e.O(0,[763,5353,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=25100)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-bb20d60bff37ceb9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{14558:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var r=a(95155),s=a(12115),i=a(97677);function n({connectionId:e,disabled:t=!1,onComplete:a}){let[l,o]=(0,s.useState)(!1),[d,c]=(0,s.useState)(null);async function u(){if(!l){if(d)return void c(null);o(!0);try{let t=await fetch("/api/wakeup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ping",connectionId:e})}),r=await t.json();if(!t.ok)throw Error(r.error||"Ping failed.");c(r),a&&Promise.resolve(a()).catch(()=>{})}catch(e){c({status:"failed",message:e.message})}finally{o(!1)}}}let m=l?"Pinging…":d?`${d.message} Click to reset.`:"Ping now — sends a small request. Consumes quota; does not change Auto-Ping.",x=d?"succeeded"===d.status?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400":"text-text-muted hover:text-primary";return(0,r.jsx)(i.default,{text:m,children:(0,r.jsx)("button",{type:"button",onClick:u,disabled:l||t&&!d,"aria-label":m,"aria-busy":l,className:`flex h-8 w-8 items-center justify-center rounded-lg ${x} hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50`,children:(0,r.jsx)("span",{"aria-hidden":"true",style:{fontSize:l?20:32},className:`material-symbols-outlined ${l?"animate-spin":""}`,children:l?"progress_activity":"play_arrow"})})})}},62022:(e,t,a)=>{Promise.resolve().then(a.bind(a,76436)),Promise.resolve().then(a.bind(a,25086))},76436:(e,t,a)=>{"use strict";a.d(t,{default:()=>J});var r=a(95155),s=a(12115),i=a(73321),n=a(57250),l=a(14558),o=a(89523);let d="quotaCacheData",c="quotaAutoRefresh",u="quotaTrackerPreferences",m=[10,20,50,100],x=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],p=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function h(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function b(e,t){let a=t[e.id]?.quotas?.[0];return a&&"number"==typeof a.remaining?a.remaining:1/0}function g(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function f(e,t){let a=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>a.has(e)))}async function y(e,t){return await e(t)}function w(){try{let e=window.localStorage.getItem(d);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function v(e,t){try{let a=w();a[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(d,JSON.stringify(a))}catch(e){console.error("Error writing quota cache:",e)}}function k(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}function j(e){return e&&"object"==typeof e?String(e.modelKey||e.name||"").trim():""}function N(e,t){let a=t?.[e]?.hidden;return new Set(Array.isArray(a)?a.map(String):[])}let C={green:{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"},yellow:{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"},red:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"}};function S({quotas:e=[],compact:t=!1,sortMode:a="default",showSortLabel:i=!1,onHideQuota:n=null}){let[l,o]=(0,s.useState)(1),d=(0,s.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):k(e?.used,e?.total)})),[e]),c=(0,s.useMemo)(()=>"remaining-asc"===a?[...d].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===a?[...d].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):d,[d,a]),u=Math.max(1,Math.ceil(c.length/10));if((0,s.useEffect)(()=>{o(1)},[a,e]),(0,s.useEffect)(()=>{o(e=>Math.min(e,u))},[u]),!e||0===e.length)return null;let m=c.slice((l-1)*10,10*l),x=0===c.length?0:(l-1)*10+1,p=Math.min(10*l,c.length),h=t?"py-1 px-1.5":"py-2 px-3",b=t?"text-[11px]":"text-sm",g=t?"text-[11px]":"text-sm",f=t?"text-[10px] leading-tight":"text-xs",y="function"==typeof n;return(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"text-[10px] text-text-muted",children:[c.length," quota",c.length>1?"s":""]}),i&&(0,r.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,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsx)("table",{className:"w-full table-fixed text-left",children:(0,r.jsx)("tbody",{children:m.map(e=>{var a;let s=!0===e.unlimited,i=!0===e.isCreditBalance,l=i?{text:"text-blue-600 dark:text-blue-400",bg:"bg-blue-500",bgLight:"bg-blue-500/10",emoji:"\uD83D\uDCB0"}:C[(a=e.remaining)>70?"green":a>=30?"yellow":"red"],o=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,a=new Date,r=t-a;if(r<=0)return"-";let s=Math.ceil(r/6e4);if(s<60)return`${s}m`;let i=Math.floor(s/60),n=s%60;if(i<24)return`${i}h ${n}m`;let l=Math.floor(i/24);return`${l}d ${i%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),d=function(e){if(!e)return null;try{let t=new Date(e),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),a.getDate()),s=new Date(r);s.setDate(s.getDate()+1);let i="";i=t>=r&&t<s?"Today":t>=s&&t<new Date(s.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${i}, ${n}`}catch{return null}}(e.resetAt),c=!1!==e.recurring?`in ${o}`:`expires in ${o}`;return(0,r.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,r.jsx)("td",{className:`${h} w-[30%]`,children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,r.jsx)("span",{className:"text-[10px] shrink-0",children:l.emoji}),(0,r.jsx)("span",{className:`${b} font-medium text-text-primary truncate`,children:e.name}),e.runtimeLimited&&(e.runtimeActionUrl?(0,r.jsx)("a",{href:e.runtimeActionUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-600 underline decoration-dotted underline-offset-2 dark:text-amber-400",title:e.runtimeLimitReason||"Verify this Google account, then retry the model.",children:e.runtimeLimitLabel||"account blocked"}):(0,r.jsx)("span",{className:"shrink-0 rounded bg-amber-500/15 px-1 py-0.5 text-[9px] font-medium text-amber-600 dark:text-amber-400",title:e.runtimeLimitReason||"The provider runtime rejected this model even though the quota endpoint still reports capacity.",children:e.runtimeLimitLabel||"runtime limit"}))]})}),(0,r.jsx)("td",{className:`${h} w-[45%]`,children:(0,r.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[!s&&!i&&(0,r.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${l.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,r.jsx)("div",{className:`h-full transition-all duration-300 ${l.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,r.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,r.jsx)("span",{className:"text-text-muted",children:s?`${e.used.toLocaleString()} used \xb7 Unlimited`:i?`Credit: ${e.total.toFixed(2)} ${e.name.split(" ")[2]||""}`:e.percentageOnly?(0,r.jsx)("span",{title:e.quotaNote||"The provider does not expose an absolute request count.",children:"count unavailable"}):(0,r.jsxs)(r.Fragment,{children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]})}),(0,r.jsx)("span",{className:`font-medium ${s?"text-green-600 dark:text-green-400":i?"text-blue-600 dark:text-blue-400":l.text}`,children:s?"Unlimited":i?"":`${e.remaining}%`})]})]})}),(0,r.jsx)("td",{className:`${h} ${y?"w-[20%]":"w-[25%]"}`,children:"-"!==o||d?t?(0,r.jsx)("div",{className:`${g} text-text-primary font-medium truncate`,title:d||"",children:"-"!==o?c:d}):(0,r.jsxs)("div",{className:"space-y-0.5",children:["-"!==o&&(0,r.jsx)("div",{className:`${g} text-text-primary font-medium`,children:c}),d&&(0,r.jsx)("div",{className:`${f} text-text-muted`,children:d})]}):(0,r.jsx)("div",{className:`${g} text-text-muted italic`,children:"N/A"})}),y&&(0,r.jsx)("td",{className:`${h} w-[5%] text-right`,children:(0,r.jsx)("button",{type:"button",onClick:()=>n(e),className:"inline-flex h-6 w-6 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5",title:"Hide this quota row","aria-label":`Hide quota ${e.name}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"visibility_off"})})})]},`${e.name}-${e.index}`)})})})}),u>1&&(0,r.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,r.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,r.jsxs)("span",{children:["Showing ",x,"-",p," of ",c.length]}),(0,r.jsxs)("span",{children:["Page ",l," / ",u]})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,r.jsx)("button",{type:"button",onClick:()=>o(e=>Math.max(1,e-1)),disabled:1===l,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,r.jsx)("button",{type:"button",onClick:()=>o(e=>Math.min(u,e+1)),disabled:l===u,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}var A=a(98542),P=a(97677),$=a(84588),q=a(35497),E=a(88105),_=a(11059),T=a(78177);let M={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},D={claude:"claudeAutoPing",codex:"codexAutoPing"},O={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny request to an available model. Consumes a small amount of quota."};function F(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function L(e){let t=e.providerSpecificData?.region;if(t)return t;let a=e.providerSpecificData?.profileArn;return("string"==typeof a?a.split(":")[3]:"")||""}let I={five_hour:"session",seven_day:"weekly",seven_day_overage_included:"weekly",seven_day_opus:"Opus weekly",seven_day_sonnet:"Sonnet weekly"};function R(e){let t=[...new Set((e||[]).map(e=>I[e]).filter(Boolean))];return t.length?`${t.join(" + ")} limits`:"limits"}function z(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}function U(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let a=Math.ceil(t/36e5),r=Math.floor(a/24),s=a%24;return r>0?`${r}d ${s}h`:`${s}h`}function J(){let{copied:e,copy:t}=(0,_.C)(),a=(0,i.useSearchParams)(),C=(0,i.useRouter)(),I=(0,i.usePathname)(),[J,W]=(0,s.useState)([]),[B,K]=(0,s.useState)({}),[H,G]=(0,s.useState)({}),[V,Q]=(0,s.useState)({}),[X,Y]=(0,s.useState)(!0),[Z,ee]=(0,s.useState)({claude:{},codex:{}}),[et,ea]=(0,s.useState)(null),[er,es]=(0,s.useState)(!1),[ei,en]=(0,s.useState)(!1),[el,eo]=(0,s.useState)(!1),[ed,ec]=(0,s.useState)(60),[eu,em]=(0,s.useState)(!0),[ex,ep]=(0,s.useState)(null),[eh,eb]=(0,s.useState)(null),[eg,ef]=(0,s.useState)(null),[ey,ew]=(0,s.useState)(null),[ev,ek]=(0,s.useState)(null),[ej,eN]=(0,s.useState)(null),[eC,eS]=(0,s.useState)(!1),[eA,eP]=(0,s.useState)(null),[e$,eq]=(0,s.useState)([]),[eE,e_]=(0,s.useState)(()=>a?.get("provider")||"all"),eT=(0,s.useCallback)(e=>{e_(e);try{let t=new URLSearchParams(a?.toString()||"");"all"===e?t.delete("provider"):t.set("provider",e);let r=t.toString()?`${I}?${t.toString()}`:I;C.replace(r,{scroll:!1})}catch{}},[I,C,a]),[eM,eD]=(0,s.useState)([]),[eO,eF]=(0,s.useState)("all"),[eL,eI]=(0,s.useState)("default"),[eR,ez]=(0,s.useState)({}),[eU,eJ]=(0,s.useState)(!1),[eW,eB]=(0,s.useState)(!1),[eK,eH]=(0,s.useState)(!1),[eG,eV]=(0,s.useState)(1),[eQ,eX]=(0,s.useState)(20),[eY,eZ]=(0,s.useState)(String(20)),[e0,e1]=(0,s.useState)({page:1,pageSize:20,total:0,totalPages:1}),[e5,e2]=(0,s.useState)({eligibleConnections:0,providerFilteredConnections:0}),e3=(0,s.useRef)(0),e4=(0,s.useCallback)(async(e=eG)=>{try{var t,a;let r=new URLSearchParams({page:String(e),pageSize:String(eQ),accountStatus:eO,sort:"priority"});"all"!==eE&&r.set("provider",eE);let s=await fetch(`/api/providers/client?${r.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let i=await s.json(),n=i.connections||[],l=(t=i.pagination,t||{page:1,pageSize:eQ,total:0,totalPages:1}),o=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(i.totals,n.length);return W(n),eD(i.providerOptions||[]),e1(l),e2(o),eV((a=i.pagination,a?.page||e)),n}catch(e){return console.error("Error fetching connections:",e),W([]),eD([]),e1({page:1,pageSize:eQ,total:0,totalPages:1}),e2({eligibleConnections:0,providerFilteredConnections:0}),[]}},[eO,eU,eG,eQ,eE]),e8=(0,s.useCallback)(async(e,t,{force:a=!1}={})=>{G(t=>({...t,[e]:!0})),Q(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=`/api/usage/${e}${a?"?force=1":""}`,s=await fetch(r);if(!s.ok){let a=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===s.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,a);let r={quotas:[],message:a};K(t=>({...t,[e]:r})),v(e,r);return}throw Error(`HTTP ${s.status}: ${a}`)}let i=await s.json();console.log(`[ProviderLimits] Got quota for ${t}:`,i);let n={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let a=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=Object.entries(t.quotas),r=new Set(["gemini_weekly","claude_gpt_weekly"]),s=new Set(["gemini_session","claude_gpt_session"]),i=new Set([...r,...s]),n=e.filter(([e])=>e.startsWith("gemini-")&&!e.includes("image")),l=e.filter(([e])=>e.startsWith("claude-")),o=e.filter(([e])=>e.includes("image")),d=e.filter(([e])=>i.has(e)),c=e.filter(([e])=>!e.startsWith("gemini-")&&!e.startsWith("claude-")&&!e.includes("image")&&!i.has(e)),u=!!t.quotas.gemini_weekly,m=!!t.quotas.gemini_session,x=!!t.quotas.claude_gpt_weekly,p=!!t.quotas.claude_gpt_session;if(m)d.filter(([e])=>"gemini_session"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(n.length>0){let e=n.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],r=t.quotas.gemini_weekly?.resetAt;u&&e.resetAt===r&&(e.remainingPercentage??0)===0||a.push({name:"Gemini (Flash / Pro)",modelKey:"gemini",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}if(u&&d.filter(([e])=>"gemini_weekly"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),p)d.filter(([e])=>"claude_gpt_session"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});else if(l.length>0){let e=l.reduce((e,t)=>(t[1].remainingPercentage??100)<(e[1].remainingPercentage??100)?t:e)[1],r=t.quotas.claude_gpt_weekly?.resetAt;x&&e.resetAt===r&&(e.remainingPercentage??0)===0||a.push({name:"Claude (Sonnet / Opus)",modelKey:"claude",used:e.used||0,total:e.total||0,resetAt:e.resetAt||null,remainingPercentage:e.remainingPercentage})}x&&d.filter(([e])=>"claude_gpt_weekly"===e).forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),o.forEach(([e,t])=>{a.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),x||p||c.forEach(([e,t])=>{a.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])=>{let r=e;"spark_session"===e?r="Spark (5h)":"spark_weekly"===e?r="Spark (Weekly)":"session"===e?r="5h":"weekly"===e?r="Weekly":"review_session"===e?r="Review (5h)":"review_weekly"===e&&(r="Review (Weekly)"),a.push({name:r,quotaType: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])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":case"qoder-cn":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{"organization"===e&&(!t||[t.total,t.used,t.remaining].every(e=>0===(Number(e)||0)))||a.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:Math.max(0,Number(t.total)||0)||(Number(t.used)||0)+(Number(t.remaining)||0),unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?a.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,remaining:void 0!==t.remaining?t.remaining:Math.max(0,(t.total||100)-(t.used||0)),remainingPercentage:void 0!==t.remainingPercentage?t.remainingPercentage:k(t.used,t.total),resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"grok-cli":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"kimi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"cursor":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"deepseek":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"groq":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"clinepass":case"ollama":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,isCreditBalance:t.isCreditBalance,currency:t.currency})});break;case"zed":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,unlimited:t.unlimited})});break;case"minimax-code":case"minimax-code-global":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{a.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,message:t.message,isCreditBalance:t.isCreditBalance,currency:t.currency})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if(e?.toLowerCase()==="claude"){let e={"session (5h)":0,"weekly (7d)":1,"weekly fable (7d)":2,"weekly opus (7d)":3,"weekly sonnet (7d)":4};return a.sort((t,a)=>(e[t.name]??99)-(e[a.name]??99)),a}let r=(0,o.KC)(e);if(r.length>0){let e=new Map(r.map((e,t)=>[e.id,t]));a.sort((t,a)=>{let r=t.modelKey||t.name,s=a.modelKey||a.name;return("gemini"===r||"gemini_session"===r)&&(r="gemini-3.8-flash-high"),("claude"===r||"claude_gpt_session"===r)&&(r="claude-sonnet-4-6"),("gemini"===s||"gemini_session"===s)&&(s="gemini-3.8-flash-high"),("claude"===s||"claude_gpt_session"===s)&&(s="claude-sonnet-4-6"),(e.get(r)??999)-(e.get(s)??999)})}return a}(t,i),plan:i.plan||null,message:i.message||null,raw:i};K(t=>({...t,[e]:n})),v(e,n)}catch(a){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,a),Q(t=>({...t,[e]:a.message||"Failed to fetch quota"}))}finally{G(t=>({...t,[e]:!1}))}},[]),e6=(0,s.useCallback)(async(e,t)=>{await e8(e,t,{force:!0}),ea(new Date)},[e8]),e7=(0,s.useCallback)(async(e,t)=>{if(("codex"===t||"claude"===t)&&!ey){ew(e),Q(t=>({...t,[e]:null}));try{let a="claude"===t?await fetch(`/api/usage/${e}/claude-reset`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grantId:B[e]?.raw?.resetCredits?.nextGrantId})}):await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.message||r.error||r.code||"Failed to reset limit");await e8(e,t,{force:!0}),ea(new Date)}catch(t){Q(a=>({...a,[e]:t.message||"Failed to reset limit"}))}finally{ew(null)}}},[e8,ey,B]),e9=(0,s.useCallback)((e,t)=>{eN({connection:e,loading:!1,error:null,data:{kind:"claude",...t}})},[]),te=(0,s.useCallback)(async e=>{eN({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),a=await t.json().catch(()=>({}));if(!t.ok)throw Error(a.error||a.message||"Failed to load Codex reset credits");let r=Array.isArray(a.credits)?[...a.credits]:[];r.sort((e,t)=>{let a=e.expiresAt?new Date(e.expiresAt).getTime():1/0,r=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return a-r}),eN({connection:e,loading:!1,error:null,data:{...a,credits:r}})}catch(t){eN({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),tt=(0,s.useCallback)(async e=>{if(confirm("Delete this connection?")){ep(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){K(t=>{let a={...t};return delete a[e],a}),G(t=>{let a={...t};return delete a[e],a}),Q(t=>{let a={...t};return delete a[e],a});try{let t=w();t[e]&&(delete t[e],window.localStorage.setItem(d,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await y(e4,eG)}}catch(e){console.error("Error deleting connection:",e)}finally{ep(null)}}},[e4,eG]),ta=(0,s.useCallback)(async(e,t)=>{eb(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(K(e=>({...e})),await y(e4,eG))}catch(e){console.error("Error updating connection status:",e)}finally{eb(null)}},[e4,eG]),tr=(0,s.useCallback)(async(e,t)=>{if(!eg){ef(e.id);try{let a=await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{fastMode:t}})}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to save fast mode");W(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,fastMode:t}}:a))}catch(e){alert(e.message||"Failed to save fast mode")}finally{ef(null)}}},[eg]),ts=(0,s.useCallback)(async e=>{if(!eA?.id)return;let t=eA.id,a=eA.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await e4(),eS(!1),eP(null),E.wb.includes(a)&&await e8(t,a))}catch(e){console.error("Error saving connection:",e)}},[eA,e4,e8]),ti=(0,s.useCallback)(async(e,t,a)=>{let r=J.find(t=>t.id===e);if(!r)return;let s={...r.quotaPauseThresholds&&"object"==typeof r.quotaPauseThresholds?r.quotaPauseThresholds:{}},i=Number(a);Number.isFinite(i)&&i>0&&i<=100?s[t]=i:delete s[t];try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaPauseThresholds:s})})).ok&&W(t=>t.map(t=>t.id===e?{...t,quotaPauseThresholds:s}:t))}catch(e){console.error("Error updating quota threshold:",e)}},[J]);(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&&eq(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let tn=(0,s.useCallback)(async(e=!1)=>{if(el)return;eo(!0),ec(60);let t=e3.current+=1,a=Math.round(10);try{let r=await e4(eG);G(g(r)),Q(e=>f(e,r)),K(e=>f(e,r)),await Promise.all(r.filter(r=>e||"claude"!==r.provider||t%a==0).map(e=>e8(e.id,e.provider))),ea(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{eo(!1)}},[el,e4,e8,eG]);(0,s.useEffect)(()=>{(async()=>{em(!0);let e=await e4(eG);em(!1),G(g(e)),Q(t=>f(t,e)),K(t=>f(t,e)),await Promise.all(e.map(e=>e8(e.id,e.provider))),ea(new Date)})()},[e4,e8,eG]),(0,s.useEffect)(()=>{let e=window.localStorage.getItem(c);Y(null===e||"true"===e),es(!0)},[]),(0,s.useEffect)(()=>{er&&window.localStorage.setItem(c,String(X))},[X,er]),(0,s.useEffect)(()=>{try{let e=window.localStorage.getItem(u);if(e){let t=JSON.parse(e);if(t?.accountFilter&&["all","active","inactive"].includes(t.accountFilter)&&eF(t.accountFilter),t?.pageSize){let e=Number(t.pageSize);Number.isFinite(e)&&e>0&&(eX(e),eZ(String(e)))}}}catch{}en(!0)},[]),(0,s.useEffect)(()=>{if(ei)try{window.localStorage.setItem(u,JSON.stringify({accountFilter:eO,pageSize:eQ}))}catch{}},[eO,eQ,ei]),(0,s.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>{ee({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}}),ez(e?.quotaVisibility||{})}).catch(()=>{})},[]);let tl=(0,s.useCallback)(async(e,t,a)=>{let r=D[t];if(!r)return;let s={...Z[t]||{},[e]:a};ee({...Z,[t]:s});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[r]||{},connections:s};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[r]:t})})}catch{ee(Z)}},[Z]),to=(0,s.useCallback)(async(e,t)=>{ez(e);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({quotaVisibility:e})})).ok)throw Error("Failed to update quota visibility")}catch(e){console.error("Error updating quota visibility:",e),ez(t)}},[]),td=(0,s.useCallback)((e,t)=>{let a=j(t);if(!e||!a)return;let r=eR[e]||{},s=new Set(r.hidden||[]);if(s.add(a),"antigravity"===e){if("gemini"===a)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===a)for(let e of s)e.startsWith("claude-")&&s.delete(e)}to({...eR,[e]:{...r,hidden:[...s]}},eR)},[eR,to]),tc=(0,s.useCallback)((e,t)=>{let a=j(t);if(!e||!a)return;let r=eR[e]||{},s=new Set(r.hidden||[]);if(s.delete(a),"antigravity"===e){if("gemini"===a)for(let e of s)e.startsWith("gemini-")&&!e.includes("image")&&s.delete(e);else if("claude"===a)for(let e of s)e.startsWith("claude-")&&s.delete(e)}to({...eR,[e]:{...r,hidden:[...s]}},eR)},[eR,to]),tu=(0,s.useRef)(tn);(0,s.useEffect)(()=>{tu.current=tn},[tn]);let tm=(0,s.useMemo)(()=>(function({onRefresh:e,onTick:t,refreshIntervalMs:a,tickMs:r=1e3}){let s=null,i=null,n=()=>{null!==s&&(clearInterval(s),s=null),null!==i&&(clearInterval(i),i=null)};return{start:()=>{n(),s=setInterval(()=>e(),a),i=setInterval(()=>t(),r)},stop:n,isRunning:()=>null!==s||null!==i}})({onRefresh:()=>tu.current(),onTick:()=>ec(e=>e<=1?60:e-1),refreshIntervalMs:6e4}),[]);(0,s.useEffect)(()=>!er||!X||"u">typeof document&&document.hidden?void tm.stop():(tm.start(),()=>tm.stop()),[X,er,tm]),(0,s.useEffect)(()=>{let e=()=>{document.hidden?tm.stop():X&&er&&tm.start()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e),tm.stop()}},[X,er,tm]);let tx=(0,s.useMemo)(()=>(function(e,t,a,r,s){if("codex"===r&&"default"!==s)return[...e].sort((e,a)=>{let r=b(e,t),i=b(a,t),n="remaining-asc"===s?r-i:i-r;return 0!==n?n:(h(e)||"").localeCompare(h(a)||"")});if(!a){let t=new Map;for(let a of e){let e=a.provider||"";t.has(e)||t.set(e,[]),t.get(e).push(a)}return Array.from(t.values()).flat()}let i=e=>{let a=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return a.length>0?Math.min(...a):1/0};return[...e].sort((e,t)=>{let a=i(e)-i(t);return 0!==a?a:(e.provider||"").localeCompare(t.provider||"")||(h(e)||"").localeCompare(h(t)||"")})})(J,B,eU,eE,eL),[J,B,eU,eE,eL]),tp=e=>{let t=B[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=k(e.used,e.total))},th=(0,s.useCallback)(async(e,t)=>{if(e.length&&!eK){eH(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await y(e4,eG)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eH(!1)}}},[eK,e4,eG]),tb="all"===eE?"All providers":eE,tg=e5.eligibleConnections>0,tf=tx.length>0,ty=e5.eligibleConnections?e5.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"===eE?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===eO?"turned off":"active"===eO?"active":"matching"} accounts found for ${eE}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},tw=function(e){var t;let{start:a,end:r}=(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 ${a}-${r} of ${e.total}`}(e0),tv=!m.includes(eQ);return eu||tg?eu||tf?(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>eB(e=>!e),className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":eW,title:"Filter quota providers",children:[(0,r.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===eE?(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,r.jsx)(n.A,{src:`/providers/${eE}.png`,alt:eE,size:18,className:"size-[18px] rounded object-contain",fallbackText:eE.slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:tb})]}),(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),eW&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:()=>eB(!1)}),(0,r.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,r.jsxs)("button",{type:"button",onClick:()=>{"all"!==eE&&eV(1),eT("all"),eB(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===eE?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,r.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===eE&&(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,r.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,r.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:eM.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{eE!==e&&eV(1),eT(e),eB(!1)},className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${eE===e?"bg-primary/10 text-primary":"text-text-primary hover:bg-black/5 dark:hover:bg-white/10"}`,children:[(0,r.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,r.jsx)("span",{className:"font-medium capitalize",children:e}),eE===e&&(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},e))})]})]})]}),(0,r.jsx)("select",{value:eO,onChange:e=>{let t=e.target.value;eO!==t&&eV(1),eF(t)},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:x.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===eE&&(0,r.jsx)("select",{value:eL,onChange:e=>eI(e.target.value),className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:p.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,r.jsxs)("button",{type:"button",onClick:()=>eJ(e=>!e),"aria-pressed":eU,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${eU?"border-amber-500/40 bg-amber-500/10 text-amber-500":"border-black/10 text-text-primary hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{th(tx.filter(e=>(e.isActive??!0)&&tp(e)).map(e=>e.id),!1)},disabled:eK,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-red-500 transition-colors hover:bg-red-500/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>{th(tx.filter(e=>!(e.isActive??!0)&&!tp(e)).map(e=>e.id),!0)},disabled:eK,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,r.jsxs)("button",{onClick:()=>Y(e=>!e),className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5",title:X?"Disable auto-refresh":"Enable auto-refresh",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] ${X?"text-primary":"text-text-muted"}`,children:X?"toggle_on":"toggle_off"}),(0,r.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),X&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",ed,"s)"]})]}),(0,r.jsx)("button",{type:"button",onClick:()=>tn(!0),disabled:el,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-black/10 px-2 text-xs text-text-primary transition-colors hover:bg-black/5 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[14px] ${el?"animate-spin":""}`,children:"refresh"})})]})}),eU&&(0,r.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,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:tx.map(a=>{let s,i,o,d,c=B[a.id],u=H[a.id],m=V[a.id],x=!1===a.isActive,p="codex"===a.provider,b=p?(s=c?.plan?.trim())&&"unknown"!==s.toLowerCase()?s:a?.providerSpecificData?.chatgptPlanType?.trim()||null:null,g="claude"===a.provider?c?.raw?.resetCredits:null,f=p?"Codex reset credit":"Claude limit reset",y=Number.isFinite(o="number"==typeof(i=c?.raw?.resetCredits?.availableCount)?i:Number(i))?Math.max(0,o):0,w=ey===a.id,v=eg===a.id,k=ex===a.id||eh===a.id||w||v,C=c?.quotas||[],_=function(e,t=[],a={}){if(!Array.isArray(t)||0===t.length)return[];let r=N(e,a);return 0===r.size?t:t.filter(e=>!r.has(j(e)))}(a.provider,C,eR),I=function(e,t=[],a={}){if(!Array.isArray(t)||0===t.length)return[];let r=N(e,a);return 0===r.size?[]:t.filter(e=>r.has(j(e)))}(a.provider,C,eR),U=(0,T.XD)(a);return(0,r.jsxs)($.default,{padding:"none",className:`min-w-0 ${x?"opacity-60":""}`,children:[(0,r.jsx)("div",{className:"px-3 py-2 border-b border-black/10 dark:border-white/10",children:(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,r.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,r.jsx)(n.A,{src:`/providers/${a.provider}.png`,alt:a.provider,size:32,className:"object-contain",fallbackText:a.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:a.provider}),h(a)?(0,r.jsx)("p",{className:"text-xs text-text-muted truncate",children:h(a)}):null,F(a)?(0,r.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:F(a)}):null,b?(0,r.jsx)("span",{className:"mt-1 inline-flex rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:b}):null,U.enabled&&(0,r.jsx)("p",{className:"mt-0.5",children:(0,r.jsx)(q.Ex,{variant:U.paused?"warning":"default",size:"sm",children:U.paused?`Paused (quota${U.triggered?`: ${U.triggered.key}`:""})`:"Buffers set"})}),"kiro"===a.provider&&(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,r.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(d=a.providerSpecificData?.authMethod)&&M[d]?M[d]:"api_key"===a.authType?"API Key":"OAuth"}),L(a)&&(0,r.jsx)("span",{className:"rounded-full bg-blue-500/10 px-2 py-0.5 text-[10px] font-semibold text-blue-600 dark:text-blue-400",children:L(a)}),(0,r.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${x?"bg-surface-2 text-text-muted":"active"===a.testStatus||"success"===a.testStatus?"bg-green-500/10 text-green-600 dark:text-green-400":"error"===a.testStatus||"expired"===a.testStatus||"unavailable"===a.testStatus?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-surface-2 text-text-muted"}`,children:x?"disabled":a.testStatus||"unknown"}),a.providerSpecificData?.profileArn&&(0,r.jsxs)("button",{type:"button",onClick:()=>t(a.providerSpecificData.profileArn,a.id),title:a.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:e===a.id?"check":"content_copy"}),(0,r.jsx)("code",{className:"truncate font-mono",children:a.providerSpecificData.profileArn})]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[(p||g)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(P.default,{text:y>0?g?`Use your reset now (${y} left, use by ${z(g.expiresAt)}) \xb7 refills ${R(g.clears)}`:`Use one ${f}. Available: ${y}`:`No ${f}s available`,children:(0,r.jsxs)("button",{type:"button",onClick:()=>ek({connection:a,resetCreditCount:y}),disabled:y<=0||u||k,"aria-label":y>0?`Use one ${f}. ${y} available.`:`No ${f}s available`,className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${y>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-black/10 bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[15px] ${w?"animate-spin":""}`,children:w?"progress_activity":"restart_alt"}),(0,r.jsx)("span",{children:y})]})}),(0,r.jsx)(P.default,{text:p?"View Codex reset credit expiry":"View Claude Code reset expiry",children:(0,r.jsx)("button",{type:"button",onClick:()=>p?te(a):e9(a,g),disabled:u||k,"aria-label":p?"View Codex reset credit expiry":"View Claude Code reset expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-muted transition-colors hover:bg-black/5 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})}),E.Q2[a.provider]?.fastMode&&(0,r.jsx)(P.default,{text:`Fast mode is ${a.providerSpecificData?.fastMode===!0?"on":"off"}. Uses the provider's faster processing mode at a higher token cost.`,children:(0,r.jsxs)("button",{type:"button",onClick:()=>tr(a,a.providerSpecificData?.fastMode!==!0),disabled:u||k,role:"switch","aria-label":"Toggle fast mode","aria-checked":a.providerSpecificData?.fastMode===!0,className:`flex h-8 min-w-14 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${a.providerSpecificData?.fastMode===!0?"border-primary/30 bg-primary/10 text-primary":"border-black/10 text-text-muted hover:bg-black/5 hover:text-primary dark:border-white/10 dark:hover:bg-white/5"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${v?"animate-spin":""}`,children:v?"progress_activity":"speed"}),(0,r.jsx)("span",{children:"Fast"})]})})]}),D[a.provider]&&"oauth"===a.authType&&(0,r.jsx)(P.default,{text:O[a.provider],children:(0,r.jsx)("button",{type:"button",onClick:()=>tl(a.id,a.provider,Z[a.provider]?.[a.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${Z[a.provider]?.[a.id]===!0?"text-primary":"text-text-muted"}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),p&&(0,r.jsx)(P.default,{text:a.providerSpecificData?.codexFastMode===!0?"Fast mode ON — Codex requests on this account use the priority tier. Click to disable.":"Force fast mode — Codex requests on this account use the priority tier.",children:(0,r.jsx)("button",{type:"button",onClick:()=>tr(a),disabled:k,"aria-label":"Toggle fast mode",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${a.providerSpecificData?.codexFastMode===!0?"text-primary":"text-text-muted"}`,children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${fastModeId===a.id?"animate-spin":""}`,children:fastModeId===a.id?"progress_activity":"speed"})})}),D[a.provider]&&"oauth"===a.authType&&(0,r.jsx)(l.A,{connectionId:a.id,disabled:!1===a.isActive,onComplete:()=>e6(a.id,a.provider)}),(0,r.jsx)(P.default,{text:"Refresh quota",children:(0,r.jsx)("button",{type:"button",onClick:()=>e6(a.id,a.provider),disabled:u||k,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${u?"animate-spin":""}`,children:"refresh"})})}),(0,r.jsx)(P.default,{text:"Edit connection",children:(0,r.jsx)("button",{type:"button",onClick:()=>{eP(a),eS(!0)},disabled:k,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,r.jsx)(P.default,{text:"Delete connection",children:(0,r.jsx)("button",{type:"button",onClick:()=>tt(a.id),disabled:k,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-red-500/10 text-red-500 transition-colors disabled:opacity-50",children:(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${ex===a.id?"animate-pulse":""}`,children:"delete"})})}),(0,r.jsx)("div",{className:"inline-flex items-center pl-0.5",title:a.isActive??!0?"Disable connection":"Enable connection",children:(0,r.jsx)(A.default,{size:"sm",checked:a.isActive??!0,disabled:k,onChange:e=>ta(a.id,e)})})]})]})}),(0,r.jsxs)("div",{className:"px-2 py-1.5",children:[u?(0,r.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):m?(0,r.jsxs)("div",{className:"text-center py-5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[28px] text-red-500",children:"error"}),(0,r.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:m})]}):c?.message?(0,r.jsx)("div",{className:"text-center py-5",children:(0,r.jsx)("p",{className:"text-xs text-text-muted",children:c.message})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(S,{quotas:_,compact:!0,sortMode:"default",showSortLabel:"codex"===a.provider&&"default"!==eL,onHideQuota:e=>td(a.provider,e)}),a.lastQuotaSnapshot?.windows?.length>0&&(0,r.jsxs)("div",{className:"mt-2 border-t border-black/5 pt-2 dark:border-white/5",children:[(0,r.jsx)("p",{className:"mb-1 text-[10px] text-text-muted",children:"Pause buffer — pause this account when a window's remaining % ≤"}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:a.lastQuotaSnapshot.windows.map(e=>{let t=Number(a.quotaPauseThresholds?.[e.key])||0;return(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] text-text-muted",title:e.key,children:e.key}),(0,r.jsx)("span",{className:"w-10 text-right text-[10px] tabular-nums text-text-muted",children:"number"==typeof e.remainingPercentage?`${e.remainingPercentage}%`:"—"}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"≤"}),(0,r.jsx)("input",{type:"number",min:0,max:100,value:t,onChange:t=>ti(a.id,e.key,Number.parseInt(t.target.value,10)||0),className:"w-14 rounded border border-border bg-background px-1 py-0.5 text-[11px] focus:border-primary focus:outline-none","aria-label":`Pause buffer for ${e.key}`}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]},e.key)})})]})]}),c?.message&&!m&&!u&&(0,r.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:c.message}),c?.raw?.speed&&(0,r.jsx)("div",{className:"mt-1 px-1 text-[10px] leading-relaxed text-text-muted tabular-nums",children:(c.raw.speed.byModel?.length?c.raw.speed.byModel:[{model:"Speed",...c.raw.speed}]).slice(0,3).map(e=>(0,r.jsxs)("p",{children:[e.model,": ",Math.round(e.avgTps).toLocaleString()," tok/s avg \xb7 last ",Math.round(e.lastTps).toLocaleString()," \xb7 TTFT ",(e.avgTtftMs/1e3).toFixed(1),"s (n=",e.samples,")"]},e.model))}),I.length>0&&(0,r.jsxs)("div",{className:"mt-2 flex min-w-0 items-center gap-1 border-t border-black/5 pt-2 text-[10px] text-text-muted dark:border-white/5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined shrink-0 text-[14px]",children:"visibility_off"}),(0,r.jsx)("span",{className:"shrink-0",children:"Hidden:"}),(0,r.jsx)("div",{className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap pb-2",children:I.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>tc(a.provider,e),className:"shrink-0 rounded-md border border-black/10 px-1.5 py-0.5 transition-colors hover:bg-black/5 hover:text-text-primary dark:border-white/10 dark:hover:bg-white/5",title:"Show this quota row",children:e.name},j(e)))})]})]})]},a.id)})}),(0,r.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,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-text-muted",children:tw}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsxs)("select",{value:tv?"custom":String(eQ),onChange:e=>{let t=e.target.value;if("custom"===t)return;let a=Number.parseInt(t,10);Number.isFinite(a)&&(eV(1),eX(a),eZ(String(a)))},className:"h-8 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[m.map(e=>(0,r.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,r.jsx)("option",{value:"custom",children:"Custom"})]}),(0,r.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:eY,onChange:e=>eZ(e.target.value),onBlur:()=>{let e=Number.parseInt(eY,10);if(!Number.isFinite(e))return void eZ(String(eQ));let t=Math.min(500,Math.max(1,e));eV(1),eX(t),eZ(String(t))},onKeyDown:e=>{if("Enter"!==e.key)return;let t=Number.parseInt(eY,10);if(!Number.isFinite(t))return void eZ(String(eQ));let a=Math.min(500,Math.max(1,t));eV(1),eX(a),eZ(String(a))},className:"h-8 w-20 rounded-lg border border-black/10 bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-black/5 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",e0.page," / ",e0.totalPages]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("button",{type:"button",onClick:()=>eV(1),disabled:e0.page<=1||eu||el,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,r.jsx)("button",{type:"button",onClick:()=>eV(e=>Math.max(1,e-1)),disabled:e0.page<=1||eu||el,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,r.jsx)("button",{type:"button",onClick:()=>eV(e=>Math.min(e0.totalPages,e+1)),disabled:e0.page>=e0.totalPages||eu||el,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-black/10 text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,r.jsx)("button",{type:"button",onClick:()=>eV(e0.totalPages),disabled:e0.page>=e0.totalPages||eu||el,className:"flex h-8 items-center rounded-lg border border-black/10 px-3 text-xs text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})}),(0,r.jsx)(q.uo,{isOpen:!!ev,onClose:()=>{ey||ek(null)},onConfirm:async()=>{let e=ev?.connection;e&&(await e7(e.id,e.provider),ek(null))},title:ev?.connection?.provider==="claude"?"Reset Claude limits?":"Reset Codex limit?",message:ev?.connection?.provider==="claude"?`Refills your ${R(B[ev.connection.id]?.raw?.resetCredits?.clears)} now for ${h(ev.connection)||"this account"} \xb7 your weekly reset day stays ${z(B[ev.connection.id]?.raw?.resetCredits?.weeklyResetsAt)}. This cannot be undone. Resets left: ${ev.resetCreditCount??0}.`:`Use 1 Codex reset credit for ${h(ev?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${ev?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!ey}),ej&&(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-neutral-950 dark:ring-white/10",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-black/10 bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:ej.data?.kind==="claude"?"Claude Code Limit Resets":"Codex Reset Credit Expiry"}),(0,r.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:h(ej.connection)||(ej.data?.kind==="claude"?"Claude account":"Codex account")})]}),(0,r.jsx)("button",{type:"button",onClick:()=>eN(null),className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-black/5 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,r.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-neutral-950",children:ej.loading?(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):ej.error?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:ej.error}):ej.data?.kind==="claude"&&ej.data.grants?.length?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,r.jsxs)("span",{children:[ej.data.availableCount??0," reset",1===ej.data.availableCount?"":"s"," left"]}),(0,r.jsxs)("span",{children:["Weekly reset day: ",z(ej.data.weeklyResetsAt)]})]}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,r.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,r.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Reset"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Left"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Refills"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Use By"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,r.jsx)("tbody",{children:(ej.data.grants||[]).map(e=>(0,r.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,r.jsxs)("td",{className:"px-3 py-2",children:[(0,r.jsx)("div",{className:"text-text-primary",children:e.label||e.id}),(0,r.jsx)("span",{className:"mt-1 inline-block rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.resetsLeft<=0?"used":e.paused?"paused":e.endsAt&&new Date(e.endsAt).getTime()<=Date.now()?"expired":e.usableNow?"usable now":e.startsAt&&new Date(e.startsAt).getTime()>Date.now()?"not started":e.useRequiresLimit?"at limit only":"unavailable"})]}),(0,r.jsxs)("td",{className:"whitespace-nowrap px-3 py-2 font-medium tabular-nums text-text-primary",children:[e.resetsLeft," / ",e.resetsTotal]}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-muted",children:R(e.clears)}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-primary",children:z(e.endsAt)}),(0,r.jsx)("td",{className:"whitespace-nowrap px-3 py-2 font-medium text-text-primary",children:U(e.endsAt)})]},e.id))})]})})]}):ej.data?.credits?.length?(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,r.jsxs)("span",{children:[ej.data.credits.length," reset credit",1===ej.data.credits.length?"":"s"]}),(0,r.jsxs)("span",{children:[ej.data.availableCount??0," available"]})]}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-xl border border-black/10 dark:border-white/10",children:(0,r.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,r.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,r.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,r.jsx)("tbody",{children:ej.data.credits.map((e,t)=>(0,r.jsxs)("tr",{className:"border-t border-black/5 dark:border-white/5",children:[(0,r.jsx)("td",{className:"px-3 py-2",children:(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-muted",children:z(e.grantedAt)}),(0,r.jsx)("td",{className:"px-3 py-2 text-text-primary",children:z(e.expiresAt)}),(0,r.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:U(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,r.jsx)("div",{className:"rounded-xl border border-black/10 bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:ej.data?.kind==="claude"?"No limit resets available for this account.":"No reset credit details returned for this account."})})]})}),(0,r.jsx)(q.wI,{isOpen:eC,connection:eA,proxyPools:e$,onSave:ts,onClose:()=>{eS(!1),eP(null)}})]}):(0,r.jsx)($.default,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:ty.icon}),(0,r.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:ty.title}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:ty.description})]})}):(0,r.jsx)($.default,{padding:"lg",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:"cloud_off"}),(0,r.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:"No Providers Connected"}),(0,r.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})})}}},e=>{e.O(0,[763,8105,801,1321,5497,8441,3794,7358],()=>e(e.s=62022)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{51743:()=>{},83771:(e,n,r)=>{Promise.resolve().then(r.bind(r,30565)),Promise.resolve().then(r.bind(r,90285)),Promise.resolve().then(r.bind(r,26300)),Promise.resolve().then(r.t.bind(r,5887,23)),Promise.resolve().then(r.t.bind(r,42593,23)),Promise.resolve().then(r.t.bind(r,35154,23)),Promise.resolve().then(r.t.bind(r,51743,23)),Promise.resolve().then(r.bind(r,94635)),Promise.resolve().then(r.bind(r,21110))},94635:(e,n,r)=>{"use strict";r.d(n,{RuntimeI18nProvider:()=>m});var s=r(95155),i=r(12115),t=r(73321),o=r(73006);function m({children:e}){let n=(0,t.usePathname)();return(0,i.useEffect)(()=>{(0,o.FE)()},[]),(0,i.useEffect)(()=>{n&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{(0,o.wn)()})})},[n]),(0,s.jsx)(s.Fragment,{children:e})}}},e=>{e.O(0,[3970,3334,8982,8105,1321,8441,3794,7358],()=>e(e.s=83771)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@font-face{font-family:Material Symbols Outlined;font-style:normal;font-weight:100 700;font-display:block;src:url(/_next/static/media/material-symbols-outlined.ec1fa111.woff2) format("woff2")}.material-symbols-outlined{font-family:Material Symbols Outlined;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-feature-settings:"liga"}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/ba9851c3c22cd980-s.woff2) format("woff2");unicode-range:u+0460-052f,u+1c80-1c8a,u+20b4,u+2de0-2dff,u+a640-a69f,u+fe2e-fe2f}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/21350d82a1f187e9-s.woff2) format("woff2");unicode-range:u+0301,u+0400-045f,u+0490-0491,u+04b0-04b1,u+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format("woff2");unicode-range:u+1f??}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format("woff2");unicode-range:u+0370-0377,u+037a-037f,u+0384-038a,u+038c,u+038e-03a1,u+03a3-03ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/df0a9ae256c0569c-s.woff2) format("woff2");unicode-range:u+0102-0103,u+0110-0111,u+0128-0129,u+0168-0169,u+01a0-01a1,u+01af-01b0,u+0300-0301,u+0303-0304,u+0308-0309,u+0323,u+0329,u+1ea0-1ef9,u+20ab}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/8e9860b6e62d6359-s.woff2) format("woff2");unicode-range:u+0100-02ba,u+02bd-02c5,u+02c7-02cc,u+02ce-02d7,u+02dd-02ff,u+0304,u+0308,u+0329,u+1d00-1dbf,u+1e00-1e9f,u+1ef2-1eff,u+2020,u+20a0-20ab,u+20ad-20c4,u+2113,u+2c60-2c7f,u+a720-a7ff}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format("woff2");unicode-range:u+00??,u+0131,u+0152-0153,u+02bb-02bc,u+02c6,u+02da,u+02dc,u+0304,u+0308,u+0329,u+2000-206f,u+20ac,u+2122,u+2191,u+2193,u+2212,u+2215,u+feff,u+fffd}@font-face{font-family:Inter Fallback;src:local("Arial");ascent-override:90.44%;descent-override:22.52%;line-gap-override:0.00%;size-adjust:107.12%}.__className_d8ebd1{font-family:Inter,Inter Fallback;font-style:normal}.__variable_d8ebd1{--font-inter:"Inter","Inter Fallback"}
|
|
File without changes
|
/package/app/.next-cli-build/static/{OFz0mgH4Q9vd3XaqYDHtW → Y99WYOLLyt5Zmp6hx75Z1}/_ssgManifest.js
RENAMED
|
File without changes
|