omniroute 1.0.6 → 1.0.8
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/README.md +94 -0
- package/README.pt-BR.md +1 -0
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +24 -24
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +2 -2
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +2 -2
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.html +2 -2
- package/app/.next/server/app/dashboard/analytics.rsc +6 -6
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/analytics.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/audit-log.html +1 -1
- package/app/.next/server/app/dashboard/audit-log.rsc +5 -5
- package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk/dashboard/audit-log/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk/dashboard/audit-log.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/audit-log.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/audit-log.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/audit-log.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/audit-log.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/costs.html +1 -1
- package/app/.next/server/app/dashboard/costs.rsc +6 -6
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/costs.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/costs.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/costs.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/costs.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/health.html +1 -1
- package/app/.next/server/app/dashboard/health.rsc +6 -6
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/health.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/health.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/health.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/health.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/limits.html +2 -2
- package/app/.next/server/app/dashboard/limits.rsc +6 -6
- package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk/dashboard/limits/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk/dashboard/limits.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/limits.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/limits.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/limits.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/limits.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/logs.html +1 -1
- package/app/.next/server/app/dashboard/logs.rsc +6 -6
- package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/logs.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/logs.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/logs.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/logs.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/onboarding.html +1 -1
- package/app/.next/server/app/dashboard/onboarding.rsc +5 -5
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/onboarding.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/onboarding.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/onboarding.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.html +2 -2
- package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.html +2 -2
- package/app/.next/server/app/dashboard/providers.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.html +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.html +1 -2
- package/app/.next/server/app/dashboard/settings.rsc +6 -6
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/settings.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.html +2 -2
- package/app/.next/server/app/dashboard/translator.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/docs/page.js +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs.html +1 -1
- package/app/.next/server/app/docs.rsc +4 -4
- package/app/.next/server/app/docs.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/docs.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden.html +1 -1
- package/app/.next/server/app/forbidden.rsc +4 -4
- package/app/.next/server/app/forbidden.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/forbidden.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/forbidden.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/forbidden.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/forbidden.segments/forbidden/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/forbidden.segments/forbidden.segment.rsc +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password.html +1 -1
- package/app/.next/server/app/forgot-password.rsc +5 -5
- package/app/.next/server/app/forgot-password.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/forgot-password.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/forgot-password.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/forgot-password.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/forgot-password.segments/forgot-password/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/forgot-password.segments/forgot-password.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +4 -4
- package/app/.next/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy.html +1 -1
- package/app/.next/server/app/privacy.rsc +4 -4
- package/app/.next/server/app/privacy.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/privacy.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/privacy.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/privacy.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/privacy.segments/privacy.segment.rsc +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms.html +1 -1
- package/app/.next/server/app/terms.rsc +4 -4
- package/app/.next/server/app/terms.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/terms.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/terms.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/terms.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/terms.segments/terms/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/terms.segments/terms.segment.rsc +1 -1
- package/app/.next/server/app-paths-manifest.json +24 -24
- package/app/.next/server/chunks/1998.js +1 -0
- package/app/.next/server/chunks/2180.js +4 -4
- package/app/.next/server/chunks/2767.js +1 -1
- package/app/.next/server/chunks/2910.js +4 -4
- package/app/.next/server/chunks/4488.js +4 -4
- package/app/.next/server/chunks/9824.js +1 -1
- package/app/.next/server/chunks/9979.js +1 -1
- package/app/.next/server/instrumentation.js +1 -1
- package/app/.next/server/middleware.js +5 -5
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{5846-aeaf4d8166e66a9c.js → 5846-2239171d59388fe8.js} +1 -1
- package/app/.next/static/chunks/{993-7a4050ed1453c0f4.js → 993-549657c6dd78bae8.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-24700772c6569500.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-98664026bfb4b4a9.js +1 -0
- package/app/.next/static/chunks/app/login/page-ca4dde4376ccd169.js +1 -0
- package/app/.next/static/chunks/app/not-found-1dbd8c3e506fe00f.js +1 -0
- package/app/.next/static/css/67c4b9dbfb14fddd.css +1 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-572de2c66460c226.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-1067b7b1be3728d7.js +0 -1
- package/app/.next/static/chunks/app/login/page-40a8824400706b5e.js +0 -1
- package/app/.next/static/chunks/app/not-found-38123f3e1e5abc33.js +0 -1
- package/app/.next/static/css/c5b80d2d58d2e417.css +0 -1
- /package/app/.next/static/{ab6RZSDVvUP4wjD8cY5sa → rS_1Zfl9zlKFJcFPfMyip}/_buildManifest.js +0 -0
- /package/app/.next/static/{ab6RZSDVvUP4wjD8cY5sa → rS_1Zfl9zlKFJcFPfMyip}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{2729:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(95155),r=s(12115),l=s(40993),o=s(30949),i=s(67671);let n=/^[a-zA-Z0-9_/.-]+$/;function d(e){return"string"==typeof e?{model:e,weight:0}:{model:e.model,weight:e.weight||0}}function c(){let[e,t]=(0,r.useState)([]),[s,n]=(0,r.useState)(!0),[d,c]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[b,g]=(0,r.useState)([]),[f,y]=(0,r.useState)({}),[v,j]=(0,r.useState)(null),[N,k]=(0,r.useState)(null),{copied:w,copy:C}=(0,o.C)(),S=(0,i.i)(),[$,M]=(0,r.useState)(null),[T,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{P(),fetch("/api/settings/proxy").then(e=>e.ok?e.json():null).then(e=>_(e)).catch(()=>{})},[]);let P=async()=>{try{let[e,s,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/combos/metrics")]),r=await e.json(),l=await s.json(),o=await a.json();if(e.ok&&t(r.combos||[]),s.ok){let e=(l.connections||[]).filter(e=>"active"===e.testStatus||"success"===e.testStatus);g(e)}a.ok&&y(o.metrics||{})}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},E=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await P(),c(!1),S.success("Combo created successfully");else{let e=await t.json();S.error(e.error?.message||e.error||"Failed to create combo")}}catch(e){S.error("Error creating combo")}},O=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 P(),h(null),S.success("Combo updated successfully");else{let e=await s.json();S.error(e.error?.message||e.error||"Failed to update combo")}}catch(e){S.error("Error updating combo")}},D=async s=>{if(confirm("Delete this combo?"))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&(t(e.filter(e=>e.id!==s)),S.success("Combo deleted"))}catch(e){S.error("Error deleting combo")}},R=async t=>{let s=t.name.replace(/-copy(-\d+)?$/,""),a=e.map(e=>e.name),r=`${s}-copy`,l=1;for(;a.includes(r);)l++,r=`${s}-copy-${l}`;let o={name:r,models:t.models,strategy:t.strategy||"priority",config:t.config||{}};await E(o)},q=async e=>{k(e.name),j(null);try{let t=await fetch("/api/combos/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:e.name})}),s=await t.json();j(s)}catch(e){j({error:"Test request failed"}),S.error("Test request failed")}},A=async e=>{let s=!1===e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:s}:t));try{await fetch(`/api/combos/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})}catch(a){t(t=>t.map(t=>t.id===e.id?{...t,isActive:!s}:t)),S.error("Failed to toggle combo")}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with weighted routing and fallback support"})]}),(0,a.jsx)(l.$n,{icon:"add",onClick:()=>c(!0),children:"Create Combo"})]}),0===e.length?(0,a.jsx)(l.pp,{icon:"\uD83E\uDDE9",title:"No combos yet",description:"Create model combos with weighted routing and fallback support",actionLabel:"Create Combo",onAction:()=>c(!0)}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,a.jsx)(m,{combo:e,metrics:f[e.name],copied:w,onCopy:C,onEdit:()=>h(e),onDelete:()=>D(e.id),onDuplicate:()=>R(e),onTest:()=>q(e),testing:N===e.name,onProxy:()=>M(e),hasProxy:!!T?.combos?.[e.id],onToggle:()=>A(e)},e.id))}),v&&(0,a.jsx)(l.aF,{isOpen:!!v,onClose:()=>{j(null),k(null)},title:`Test Results — ${N}`,children:(0,a.jsx)(x,{results:v})}),(0,a.jsx)(u,{isOpen:d,onClose:()=>c(!1),onSave:E,activeProviders:b,combo:null},"create"),(0,a.jsx)(u,{isOpen:!!p,combo:p,onClose:()=>h(null),onSave:e=>O(p.id,e),activeProviders:b},p?.id||"new"),$&&(0,a.jsx)(l.KN,{isOpen:!!$,onClose:()=>M(null),level:"combo",levelId:$.id,levelLabel:$.name})]})}function m({combo:e,metrics:t,copied:s,onCopy:r,onEdit:o,onDelete:i,onDuplicate:n,onTest:c,testing:m,onProxy:x,hasProxy:u,onToggle:p}){let h=e.strategy||"priority",b=e.models||[],g=!1===e.isActive;return(0,a.jsx)(l.Zp,{padding:"sm",className:`group ${g?"opacity-50":""}`,children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(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.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,a.jsx)("span",{className:`text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full ${"weighted"===h?"bg-amber-500/15 text-amber-600 dark:text-amber-400":"round-robin"===h?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"random"===h?"bg-purple-500/15 text-purple-600 dark:text-purple-400":"least-used"===h?"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400":"cost-optimized"===h?"bg-teal-500/15 text-teal-600 dark:text-teal-400":"bg-blue-500/15 text-blue-600 dark:text-blue-400"}`,children:h}),u&&(0,a.jsxs)("span",{className:"text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full bg-primary/15 text-primary flex items-center gap-0.5",title:"Proxy configured",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"vpn_lock"}),"proxy"]}),(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),r(e.name,`combo-${e.id}`)},className:"p-0.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors opacity-0 group-hover:opacity-100",title:"Copy combo name",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s===`combo-${e.id}`?"check":"content_copy"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===b.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):b.slice(0,3).map((e,t)=>{let{model:s,weight:r}=d(e);return(0,a.jsxs)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:[s,"weighted"===h&&r>0?` (${r}%)`:""]},t)}),b.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",b.length-3," more"]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,a.jsx)("span",{className:"text-emerald-500",children:t.totalSuccesses}),"/",t.totalRequests," reqs"]}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[t.successRate,"% success"]}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",t.avgLatencyMs,"ms"]}),t.fallbackRate>0&&(0,a.jsxs)("span",{className:"text-[10px] text-amber-500",children:[t.fallbackRate,"% fallback"]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:[(0,a.jsx)(l.lM,{size:"sm",checked:!g,onChange:p,title:g?"Enable combo":"Disable combo"}),(0,a.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,a.jsx)("button",{onClick:c,disabled:m,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-emerald-500 transition-colors",title:"Test combo",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${m?"animate-spin":""}`,children:m?"progress_activity":"play_arrow"})}),(0,a.jsx)("button",{onClick:n,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Duplicate",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,a.jsx)("button",{onClick:x,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Proxy configuration",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"vpn_lock"})}),(0,a.jsx)("button",{onClick:o,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Edit",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})}),(0,a.jsx)("button",{onClick:i,className:"p-1.5 hover:bg-red-500/10 rounded text-red-500 transition-colors",title:"Delete",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]})]})})}function x({results:e}){return e.error?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-red-500 text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),"string"==typeof e.error?e.error:JSON.stringify(e.error)]}):(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.resolvedBy&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-emerald-500 text-[18px]",children:"check_circle"}),(0,a.jsxs)("span",{children:["Resolved by:"," ",(0,a.jsx)("code",{className:"text-xs bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 px-1.5 py-0.5 rounded",children:e.resolvedBy})]})]}),e.results?.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs px-2 py-1.5 rounded bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:"ok"===e.status?"check_circle":"skipped"===e.status?"skip_next":"error"}),(0,a.jsx)("code",{className:"font-mono flex-1",children:e.model}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`text-[10px] uppercase font-medium ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:e.status})]},t))]})}function u({isOpen:e,combo:t,onClose:s,onSave:o,activeProviders:i}){let[c,m]=(0,r.useState)(t?.name||""),[x,u]=(0,r.useState)(()=>(t?.models||[]).map(e=>d(e))),[h,b]=(0,r.useState)(t?.strategy||"priority"),[g,f]=(0,r.useState)(!1),[y,v]=(0,r.useState)(!1),[j,N]=(0,r.useState)(""),[k,w]=(0,r.useState)({}),[C,S]=(0,r.useState)([]),[$,M]=(0,r.useState)(!1),[T,_]=(0,r.useState)(t?.config||{}),[P,E]=(0,r.useState)(null),[O,D]=(0,r.useState)(null),R=async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/provider-nodes")]);if(!e.ok||!t.ok)throw Error(`Failed to fetch data: aliases=${e.status}, nodes=${t.status}`);let[s,a]=await Promise.all([e.json(),t.json()]);w(s.aliases||{}),S(a.nodes||[])}catch(e){console.error("Error fetching modal data:",e)}};(0,r.useEffect)(()=>{e&&R()},[e]);let q=e=>e.trim()?n.test(e)?(N(""),!0):(N("Only letters, numbers, -, _, / and . allowed"),!1):(N("Name is required"),!1),A=(0,r.useCallback)(e=>{let t=e.split("/");if(2!==t.length)return e;let[s,a]=t,r=C.find(e=>e.id===s);return r?`${r.name}/${a}`:e},[C]),z=e=>{e.target&&(e.currentTarget.style.opacity="1"),E(null),D(null)},F=async()=>{if(!q(c))return;v(!0);let e={name:c.trim(),models:"weighted"===h?x:x.map(e=>e.model),strategy:h},t={...T};"round-robin"===h&&(void 0!==T.concurrencyPerModel&&(t.concurrencyPerModel=T.concurrencyPerModel),void 0!==T.queueTimeoutMs&&(t.queueTimeoutMs=T.queueTimeoutMs)),Object.keys(t).length>0&&(e.config=t),await o(e),v(!1)},L=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.aF,{isOpen:e,onClose:s,title:L?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(l.pd,{label:"Combo Name",value:c,onChange:e=>{let t=e.target.value;m(t),t?q(t):N("")},placeholder:"my-combo",error:j}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Letters, numbers, -, _, / and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Routing Strategy"}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-1 p-0.5 bg-black/5 dark:bg-white/5 rounded-lg",children:[{value:"priority",label:"Priority",icon:"sort"},{value:"weighted",label:"Weighted",icon:"percent"},{value:"round-robin",label:"Round-Robin",icon:"autorenew"},{value:"random",label:"Random",icon:"shuffle"},{value:"least-used",label:"Least-Used",icon:"low_priority"},{value:"cost-optimized",label:"Cost-Opt",icon:"savings"}].map(e=>(0,a.jsxs)("button",{onClick:()=>b(e.value),className:`py-1.5 px-2 rounded-md text-xs font-medium transition-all ${h===e.value?"bg-white dark:bg-bg-main shadow-sm text-primary":"text-text-muted hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-0.5",children:e.icon}),e.label]},e.value))}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:{priority:"Sequential fallback: tries model 1 first, then 2, etc.",weighted:"Distributes traffic by weight percentage with fallback","round-robin":"Circular distribution: each request goes to the next model in rotation",random:"Uniform random selection, then fallback to remaining models","least-used":"Picks the model with fewest requests, balancing load over time","cost-optimized":"Routes to the cheapest model first based on pricing"}[h]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Models"}),"weighted"===h&&x.length>1&&(0,a.jsx)("button",{onClick:()=>{let e=x.length;if(0===e)return;let t=Math.floor(100/e),s=100-t*e;u(x.map((e,a)=>({...e,weight:t+(0===a?s:0)})))},className:"text-[10px] text-primary hover:text-primary/80 transition-colors",children:"Auto-balance"})]}),0===x.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)("div",{className:"flex flex-col gap-1 max-h-[240px] overflow-y-auto",children:x.map((e,t)=>(0,a.jsxs)("div",{draggable:!0,onDragStart:e=>{E(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.toString()),e.target&&setTimeout(()=>e.currentTarget.style.opacity="0.5",0)},onDragEnd:z,onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move",D(t)},onDrop:e=>((e,t)=>{if(e.preventDefault(),null===P||P===t)return;let s=[...x],[a]=s.splice(P,1);s.splice(t,0,a),u(s),E(null),D(null)})(e,t),className:`group/item flex items-center gap-1.5 px-2 py-1.5 rounded-md transition-all cursor-grab active:cursor-grabbing ${O===t&&P!==t?"bg-primary/10 border border-primary/30":"bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] border border-transparent"} ${P===t?"opacity-50":""}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted/40 cursor-grab shrink-0",children:"drag_indicator"}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),(0,a.jsx)("div",{className:"flex-1 min-w-0 px-1 text-xs text-text-main truncate",children:A(e.model)}),"weighted"===h&&(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,a.jsx)("input",{type:"number",min:"0",max:"100",value:e.weight,onChange:e=>{var s;let a;return s=e.target.value,void((a=[...x])[t]={...a[t],weight:Math.max(0,Math.min(100,Number(s)||0))},u(a))},className:"w-10 text-[11px] text-center py-0.5 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]}),"priority"===h&&(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>(e=>{if(0===e)return;let t=[...x];[t[e-1],t[e]]=[t[e],t[e-1]],u(t)})(t),disabled:0===t,className:`p-0.5 rounded ${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-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>(e=>{if(e===x.length-1)return;let t=[...x];[t[e],t[e+1]]=[t[e+1],t[e]],u(t)})(t),disabled:t===x.length-1,className:`p-0.5 rounded ${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-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:()=>{u(x.filter((e,s)=>s!==t))},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"})})]},`${e.model}-${t}`))}),"weighted"===h&&x.length>0&&(0,a.jsx)(p,{models:x}),(0,a.jsxs)("button",{onClick:()=>f(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 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)("button",{onClick:()=>M(!$),className:"flex items-center gap-1 text-xs text-text-muted hover:text-text-main transition-colors self-start",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:$?"expand_less":"expand_more"}),"Advanced Settings"]}),$&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 p-3 bg-black/[0.02] dark:bg-white/[0.02] rounded-lg border border-black/5 dark:border-white/5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Max Retries"}),(0,a.jsx)("input",{type:"number",min:"0",max:"10",value:T.maxRetries??"",placeholder:"1",onChange:e=>_({...T,maxRetries:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Retry Delay (ms)"}),(0,a.jsx)("input",{type:"number",min:"0",max:"60000",step:"500",value:T.retryDelayMs??"",placeholder:"2000",onChange:e=>_({...T,retryDelayMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Timeout (ms)"}),(0,a.jsx)("input",{type:"number",min:"1000",max:"600000",step:"1000",value:T.timeoutMs??"",placeholder:"120000",onChange:e=>_({...T,timeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted",children:"Healthcheck"}),(0,a.jsx)("input",{type:"checkbox",checked:!1!==T.healthCheckEnabled,onChange:e=>_({...T,healthCheckEnabled:e.target.checked}),className:"accent-primary"})]})]}),"round-robin"===h&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-2 border-t border-black/5 dark:border-white/5",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Concurrency / Model"}),(0,a.jsx)("input",{type:"number",min:"1",max:"20",value:T.concurrencyPerModel??"",placeholder:"3",onChange:e=>_({...T,concurrencyPerModel:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Queue Timeout (ms)"}),(0,a.jsx)("input",{type:"number",min:"1000",max:"120000",step:"1000",value:T.queueTimeoutMs??"",placeholder:"30000",onChange:e=>_({...T,queueTimeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"Leave empty to use global defaults. These override per-provider settings."})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(l.$n,{onClick:F,fullWidth:!0,size:"sm",disabled:!c.trim()||!!j||y,children:y?"Saving...":L?"Save":"Create"})]})]})}),(0,a.jsx)(l.rq,{isOpen:g,onClose:()=>f(!1),onSelect:e=>{x.find(t=>t.model===e.value)||u([...x,{model:e.value,weight:0}])},activeProviders:i,modelAliases:k,title:"Add Model to Combo",selectedModel:null})]})}function p({models:e}){let t=e.reduce((e,t)=>e+(t.weight||0),0),s=100===t,r=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-rose-500","bg-cyan-500","bg-orange-500","bg-indigo-500"];return(0,a.jsxs)("div",{className:"mt-1.5",children:[(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-black/5 dark:bg-white/5 overflow-hidden flex",children:e.map((e,t)=>e.weight?(0,a.jsx)("div",{className:`${r[t%r.length]} transition-all duration-300`,style:{width:`${Math.min(e.weight,100)}%`}},t):null)}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,a.jsx)("div",{className:"flex gap-1",children:e.map((e,t)=>e.weight>0&&(0,a.jsxs)("span",{className:"flex items-center gap-0.5 text-[9px] text-text-muted",children:[(0,a.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${r[t%r.length]}`}),e.weight,"%"]},t))}),(0,a.jsxs)("span",{className:`text-[10px] font-medium ${s?"text-emerald-500":t>100?"text-red-500":"text-amber-500"}`,children:[t,"%",!s&&t>0&&" ≠ 100%"]})]})]})}},7762:(e,t,s)=>{Promise.resolve().then(s.bind(s,2729))}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=7762)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2791],{49162:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>z});var a=s(95155),l=s(12115),r=s(73321),i=s(67040),n=s(52529),d=s(40993);function c(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)(!1),[i,n]=(0,l.useState)(!1),[c,o]=(0,l.useState)({type:"",message:""}),[m,x]=(0,l.useState)(null),[u,h]=(0,l.useState)(null),[p,b]=(0,l.useState)(!1),[g,f]=(0,l.useState)({type:"",message:""}),[j,v]=(0,l.useState)(!1),[y,N]=(0,l.useState)(!1),[k,w]=(0,l.useState)({type:"",message:""}),[C,S]=(0,l.useState)(!1),[$,P]=(0,l.useState)(null),A=(0,l.useRef)(null),[E,T]=(0,l.useState)({driver:"sqlite",dbPath:"~/.omniroute/storage.sqlite",sizeBytes:0,retentionDays:90,lastBackupAt:null}),R=async()=>{r(!0);try{let e=await fetch("/api/db-backups"),s=await e.json();t(s.backups||[])}catch(e){console.error("Failed to fetch backups:",e)}finally{r(!1)}},L=async()=>{try{let e=await fetch("/api/storage/health");if(!e.ok)return;let t=await e.json();T(e=>({...e,...t}))}catch(e){console.error("Failed to fetch storage health:",e)}},O=async()=>{b(!0),f({type:"",message:""});try{let e=await fetch("/api/db-backups",{method:"PUT"}),t=await e.json();e.ok?(t.filename?f({type:"success",message:`Backup created: ${t.filename}`}):f({type:"info",message:t.message||"No changes since last backup"}),await L(),i&&await R()):f({type:"error",message:t.error||"Backup failed"})}catch{f({type:"error",message:"An error occurred"})}finally{b(!1)}},B=async e=>{x(e),o({type:"",message:""});try{let t=await fetch("/api/db-backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({backupId:e})}),s=await t.json();t.ok?(o({type:"success",message:`Restored! ${s.connectionCount} connections, ${s.nodeCount} nodes, ${s.comboCount} combos, ${s.apiKeyCount} API keys.`}),await R(),await L()):o({type:"error",message:s.error||"Restore failed"})}catch{o({type:"error",message:"An error occurred during restore"})}finally{x(null),h(null)}};(0,l.useEffect)(()=>{L()},[]);let D=async()=>{v(!0);try{let e=await fetch("/api/db-backups/export");if(!e.ok){let t=await e.json();throw Error(t.error||"Export failed")}let t=await e.blob(),s=URL.createObjectURL(t),a=(e.headers.get("Content-Disposition")||"").match(/filename="(.+)"/),l=a?a[1]:`omniroute-backup-${new Date().toISOString().replace(/[:.]/g,"-")}.sqlite`,r=document.createElement("a");r.href=s,r.download=l,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(s)}catch(e){console.error("Export failed:",e),w({type:"error",message:`Export failed: ${e.message}`})}finally{v(!1)}},M=async()=>{if($){N(!0),w({type:"",message:""}),S(!1);try{let e=new FormData;e.append("file",$);let t=await fetch("/api/db-backups/import",{method:"POST",body:e}),s=await t.json();t.ok?(w({type:"success",message:`Database imported! ${s.connectionCount} connections, ${s.nodeCount} nodes, ${s.comboCount} combos, ${s.apiKeyCount} API keys.`}),await L(),i&&await R()):w({type:"error",message:s.error||"Import failed"})}catch{w({type:"error",message:"An error occurred during import"})}finally{N(!1),P(null)}}},z=e=>e&&0!==e?e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`:"0 B";return(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-green-500/10 text-green-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"database"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"System & Storage"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"All data stored locally on your machine"})]}),(0,a.jsx)(d.Ex,{variant:"success",size:"sm",children:E.driver||"json"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 mb-4",children:[(0,a.jsxs)("div",{className:"p-3 rounded-lg bg-bg border border-border",children:[(0,a.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wide mb-1",children:"Database Path"}),(0,a.jsx)("p",{className:"text-sm font-mono text-text-main break-all",children:E.dbPath||"~/.omniroute/storage.sqlite"})]}),(0,a.jsxs)("div",{className:"p-3 rounded-lg bg-bg border border-border",children:[(0,a.jsx)("p",{className:"text-[11px] text-text-muted uppercase tracking-wide mb-1",children:"Database Size"}),(0,a.jsx)("p",{className:"text-sm font-mono text-text-main",children:z(E.sizeBytes)})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsxs)(d.$n,{variant:"outline",size:"sm",onClick:D,loading:j,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"download"}),"Export Database"]}),(0,a.jsxs)(d.$n,{variant:"outline",size:"sm",onClick:async()=>{v(!0);try{let e=await fetch("/api/db-backups/exportAll");if(!e.ok)throw Error("Export failed");let t=await e.blob(),s=(e.headers.get("Content-Disposition")||"").match(/filename="?([^"]+)"?/),a=s?.[1]||"omniroute-full-backup.tar.gz",l=URL.createObjectURL(t),r=document.createElement("a");r.href=l,r.download=a,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l)}catch(e){w({type:"error",message:`Full export failed: ${e.message}`})}finally{v(!1)}},loading:j,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"folder_zip"}),"Export All (.tar.gz)"]}),(0,a.jsxs)(d.$n,{variant:"outline",size:"sm",onClick:()=>{A.current?.click()},loading:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"upload"}),"Import Database"]}),(0,a.jsx)("input",{ref:A,type:"file",accept:".sqlite",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(t){if(!t.name.endsWith(".sqlite"))return void w({type:"error",message:"Invalid file type. Only .sqlite files are accepted."});P(t),S(!0),A.current&&(A.current.value="")}}})]}),C&&$&&(0,a.jsx)("div",{className:"p-4 rounded-lg mb-4 bg-amber-500/10 border border-amber-500/30",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-amber-500 mt-0.5","aria-hidden":"true",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-amber-500 mb-1",children:"Confirm Database Import"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["This will replace ",(0,a.jsx)("strong",{children:"all current data"})," with the content from"," ",(0,a.jsx)("span",{className:"font-mono",children:$.name}),". A backup will be created automatically before the import."]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(d.$n,{variant:"primary",size:"sm",onClick:M,className:"!bg-amber-500 hover:!bg-amber-600",children:"Yes, Import"}),(0,a.jsx)(d.$n,{variant:"outline",size:"sm",onClick:()=>{S(!1),P(null)},children:"Cancel"})]})]})]})}),k.message&&(0,a.jsx)("div",{className:`p-3 rounded-lg mb-4 text-sm ${"success"===k.type?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,role:"alert",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"success"===k.type?"check_circle":"error"}),k.message]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-bg border border-border mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-amber-500","aria-hidden":"true",children:"schedule"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Last Backup"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:E.lastBackupAt?`${new Date(E.lastBackupAt).toLocaleString("pt-BR")} (${(e=>{if(!e)return null;let t=Math.floor((new Date-new Date(e))/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);if(s<24)return`${s}h ago`;let a=Math.floor(s/24);return`${a}d ago`})(E.lastBackupAt)})`:"No backup yet"})]})]}),(0,a.jsxs)(d.$n,{variant:"outline",size:"sm",onClick:O,loading:p,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"backup"}),"Backup Now"]})]}),g.message&&(0,a.jsx)("div",{className:`p-3 rounded-lg mb-4 text-sm ${"success"===g.type?"bg-green-500/10 text-green-500 border border-green-500/20":"info"===g.type?"bg-blue-500/10 text-blue-500 border border-blue-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,role:"alert",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"success"===g.type?"check_circle":"info"===g.type?"info":"error"}),g.message]})}),(0,a.jsxs)("div",{className:"pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-amber-500","aria-hidden":"true",children:"restore"}),(0,a.jsx)("p",{className:"font-medium",children:"Backup & Restore"})]}),(0,a.jsx)(d.$n,{variant:"outline",size:"sm",onClick:()=>{n(!i),i||0!==e.length||R()},children:i?"Hide":"View Backups"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Database snapshots are created automatically before restore and every 15 minutes when data changes. Retention: 24 hourly + 30 daily backups with smart rotation."}),c.message&&(0,a.jsx)("div",{className:`p-3 rounded-lg mb-3 text-sm ${"success"===c.type?"bg-green-500/10 text-green-500 border border-green-500/20":"bg-red-500/10 text-red-500 border border-red-500/20"}`,role:"alert",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"success"===c.type?"check_circle":"error"}),c.message]})}),i&&(0,a.jsx)("div",{className:"flex flex-col gap-2",children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center py-6 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px] mr-2","aria-hidden":"true",children:"progress_activity"}),"Loading backups..."]}):0===e.length?(0,a.jsxs)("div",{className:"text-center py-6 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] mb-2 block opacity-40","aria-hidden":"true",children:"folder_off"}),"No backups available yet. Backups will be created automatically when data changes."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.length," backup(s) available"]}),(0,a.jsxs)("button",{onClick:R,className:"text-xs text-primary hover:underline flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"refresh"}),"Refresh"]})]}),e.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg bg-black/[0.02] dark:bg-white/[0.02] border border-border/50 hover:border-border transition-colors",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-amber-500","aria-hidden":"true",children:"description"}),(0,a.jsx)("span",{className:"text-sm font-medium truncate",children:new Date(e.createdAt).toLocaleString("pt-BR")}),(0,a.jsx)(d.Ex,{variant:"pre-restore"===e.reason?"warning":"manual"===e.reason?"success":"default",size:"sm",children:e.reason})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted ml-6",children:[(0,a.jsxs)("span",{children:[e.connectionCount," connection(s)"]}),(0,a.jsx)("span",{children:"•"}),(0,a.jsx)("span",{children:z(e.size)})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 ml-3",children:u===e.id?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-amber-500 font-medium",children:"Confirm?"}),(0,a.jsx)(d.$n,{variant:"primary",size:"sm",onClick:()=>B(e.id),loading:m===e.id,className:"!bg-amber-500 hover:!bg-amber-600",children:"Yes"}),(0,a.jsx)(d.$n,{variant:"outline",size:"sm",onClick:()=>h(null),children:"No"})]}):(0,a.jsxs)(d.$n,{variant:"outline",size:"sm",onClick:()=>h(e.id),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1","aria-hidden":"true",children:"restore"}),"Restore"]})})]},e.id))]})})]})]})}var o=s(20909);let m=[{value:"disabled",label:"Disabled",icon:"block"},{value:"blacklist",label:"Blacklist",icon:"do_not_disturb"},{value:"whitelist",label:"Whitelist",icon:"verified_user"},{value:"whitelist-priority",label:"WL Priority",icon:"priority_high"}];function x(){let[e,t]=(0,l.useState)({enabled:!1,mode:"blacklist",blacklist:[],whitelist:[],tempBans:[]}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(""),[c,o]=(0,l.useState)("blacklist");(0,l.useEffect)(()=>{x()},[]);let x=async()=>{try{let e=await fetch("/api/settings/ip-filter");e.ok&&t(await e.json())}catch{}finally{r(!1)}},u=async e=>{try{let s=await fetch("/api/settings/ip-filter",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});s.ok&&t(await s.json())}catch{}},h=()=>{i.trim()&&(u({["blacklist"===c?"addBlacklist":"addWhitelist"]:i.trim()}),n(""))},p=(e,t)=>{u({["blacklist"===t?"removeBlacklist":"removeWhitelist"]:e})},b=e.enabled?e.mode:"disabled";return(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-red-500/10 text-red-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"security"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"IP Access Control"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Block or allow specific IP addresses"})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-4 gap-2 mb-5",children:m.map(e=>(0,a.jsxs)("button",{onClick:()=>{var t;"disabled"===(t=e.value)?u({enabled:!1}):u({enabled:!0,mode:t})},disabled:s,className:`flex flex-col items-center gap-1.5 p-3 rounded-lg border text-center transition-all ${b===e.value?"border-red-500/50 bg-red-500/5 ring-1 ring-red-500/20":"border-border/50 hover:border-border hover:bg-surface/30"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] ${b===e.value?"text-red-400":"text-text-muted"}`,children:e.icon}),(0,a.jsx)("span",{className:`text-xs font-medium ${b===e.value?"text-red-400":"text-text-muted"}`,children:e.label})]},e.value))}),e.enabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(d.pd,{label:"Add IP Address",placeholder:"192.168.1.0/24 or 10.0.*.*",value:i,onChange:e=>n(e.target.value),onKeyDown:e=>"Enter"===e.key&&h()})}),(0,a.jsxs)("div",{className:"flex gap-1 pb-[2px]",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"blacklist"===c?"danger":"secondary",onClick:()=>{o("blacklist"),i.trim()&&h()},children:"+ Block"}),(0,a.jsx)(d.$n,{size:"sm",variant:"whitelist"===c?"primary":"secondary",onClick:()=>{o("whitelist"),i.trim()&&h()},children:"+ Allow"})]})]}),e.blacklist.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:["Blocked (",e.blacklist.length,")"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.blacklist.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-mono bg-red-500/10 text-red-400 border border-red-500/20",children:[e,(0,a.jsx)("button",{onClick:()=>p(e,"blacklist"),className:"hover:text-red-300",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))})]}),e.whitelist.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:["Allowed (",e.whitelist.length,")"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.whitelist.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-mono bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[e,(0,a.jsx)("button",{onClick:()=>p(e,"whitelist"),className:"hover:text-emerald-300",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e))})]}),e.tempBans.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2",children:["Temporary Bans (",e.tempBans.length,")"]}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:e.tempBans.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg bg-orange-500/5 border border-orange-500/20 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-orange-400",children:e.ip}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["— ",e.reason]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted tabular-nums",children:[Math.ceil(e.remainingMs/6e4),"m left"]}),(0,a.jsx)("button",{onClick:()=>u({removeBan:e.ip}),className:"text-text-muted hover:text-orange-400",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]},e.ip))})]})]})]})}function u(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!0);(0,l.useEffect)(()=>{let e=!1;return async function(){let s=sessionStorage.getItem("omniroute_login_time"),a=Date.now(),l="Unknown";if(s){let e=a-parseInt(s,10),t=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4);l=t>0?`${t}h ${r}m`:`${r}m`}let i=!1;try{let e=await fetch("/api/auth/status",{method:"GET",cache:"no-store"});if(e.ok){let t=await e.json();i=!0===t.authenticated}}catch{}e||(t({authenticated:i,loginTime:s?new Date(parseInt(s,10)).toLocaleString():null,sessionAge:l,ipAddress:"—",userAgent:navigator.userAgent.split(" ").slice(-2).join(" ")||"Unknown"}),r(!1))}(),()=>{e=!0}},[]);let i=async()=>{try{await fetch("/api/auth/logout",{method:"POST"}),sessionStorage.removeItem("omniroute_login_time"),window.location.href="/"}catch{window.location.href="/"}};return s?(0,a.jsx)(d.Zp,{children:(0,a.jsx)("div",{className:"animate-pulse h-32 bg-black/5 dark:bg-white/5 rounded-lg"})}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"person"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Session"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",role:"list","aria-label":"Session details",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:`w-2 h-2 rounded-full ${e?.authenticated?"bg-green-500":"bg-yellow-500"}`,"aria-hidden":"true"}),e?.authenticated?"Authenticated":"Guest"]})]}),e?.loginTime&&(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Login Time"}),(0,a.jsx)("span",{className:"font-mono text-xs",children:e.loginTime})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Session Age"}),(0,a.jsx)("span",{className:"font-mono text-xs",children:e?.sessionAge})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center text-sm",role:"listitem",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Browser"}),(0,a.jsx)("span",{className:"font-mono text-xs truncate max-w-[200px]",children:e?.userAgent})]})]}),(0,a.jsxs)("div",{className:"flex gap-3 mt-4 pt-4 border-t border-border/50",children:[(0,a.jsx)(d.$n,{variant:"secondary",onClick:()=>{confirm("Clear all local data? This will reset your preferences.")&&(localStorage.clear(),sessionStorage.clear(),window.location.reload())},children:"Clear Local Data"}),e?.authenticated&&(0,a.jsx)(d.$n,{variant:"danger",onClick:i,children:"Logout"})]})]})}function h(){let[e,t]=(0,l.useState)({requireLogin:!1,hasPassword:!1}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)({current:"",new:"",confirm:""}),[c,m]=(0,l.useState)({type:"",message:""}),[h,p]=(0,l.useState)(!1);(0,l.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let b=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&t(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},g=async(e,s)=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:s})})).ok&&t(t=>({...t,[e]:s}))}catch(t){console.error(`Failed to update ${e}:`,t)}},f=async e=>{if(e.preventDefault(),i.new!==i.confirm)return void m({type:"error",message:"Passwords do not match"});p(!0),m({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:i.current,newPassword:i.new})}),t=await e.json();e.ok?(m({type:"success",message:"Password updated successfully"}),n({current:"",new:"",confirm:""})):m({type:"error",message:t.error||"Failed to update password"})}catch{m({type:"error",message:"An error occurred"})}finally{p(!1)}},j=e.blockedProviders||[];return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"shield"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require login"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(d.lM,{checked:!0===e.requireLogin,onChange:()=>b(!e.requireLogin),disabled:s})]}),!0===e.requireLogin&&(0,a.jsxs)("form",{onSubmit:f,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[e.hasPassword&&(0,a.jsx)(d.pd,{label:"Current Password",type:"password",placeholder:"Enter current password",value:i.current,onChange:e=>n({...i,current:e.target.value}),required:!0}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsx)(d.pd,{label:"New Password",type:"password",placeholder:"Enter new password",value:i.new,onChange:e=>n({...i,new:e.target.value}),required:!0}),(0,a.jsx)(d.pd,{label:"Confirm New Password",type:"password",placeholder:"Confirm new password",value:i.confirm,onChange:e=>n({...i,confirm:e.target.value}),required:!0})]}),c.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===c.type?"text-red-500":"text-green-500"}`,children:c.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(d.$n,{type:"submit",variant:"primary",loading:h,children:e.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-amber-500/10 text-amber-600 dark:text-amber-400",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"api"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"API Endpoint Protection"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key for /models"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["When ON, the"," ",(0,a.jsx)("code",{className:"text-xs bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded",children:"/v1/models"})," ","endpoint returns 404 for unauthenticated requests. Prevents model discovery by unauthorized users."]})]}),(0,a.jsx)(d.lM,{checked:!0===e.requireAuthForModels,onChange:()=>g("requireAuthForModels",!e.requireAuthForModels),disabled:s})]}),(0,a.jsxs)("div",{className:"pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"mb-3",children:[(0,a.jsx)("p",{className:"font-medium",children:"Blocked Providers"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Hide specific providers from the"," ",(0,a.jsx)("code",{className:"text-xs bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded",children:"/v1/models"})," ","response. Blocked providers will not appear in model listings."]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:Object.values(o.Q2).map(t=>{let l=j.includes(t.id);return(0,a.jsxs)("button",{onClick:()=>{var s;let a;return s=t.id,void g("blockedProviders",(a=e.blockedProviders||[]).includes(s)?a.filter(e=>e!==s):[...a,s])},disabled:s,className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-all border ${l?"bg-red-500/10 border-red-500/30 text-red-600 dark:text-red-400":"bg-black/[0.02] dark:bg-white/[0.02] border-transparent text-text-muted hover:bg-black/[0.05] dark:hover:bg-white/[0.05]"}`,title:l?`Unblock ${t.name}`:`Block ${t.name}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:l?void 0:t.color},children:l?"block":t.icon}),t.name,l&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-red-500",children:"close"})]},t.id)})}),j.length>0&&(0,a.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400 mt-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),j.length," provider",1!==j.length?"s":""," blocked from /models"]})]})]})]}),(0,a.jsx)(u,{}),(0,a.jsx)(x,{})]})}var p=s(67671);let b=["#6366f1","#22c55e","#f59e0b","#ef4444","#8b5cf6","#06b6d4","#ec4899","#14b8a6"];function g(){let[e,t]=(0,l.useState)({}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[c,o]=(0,l.useState)(""),[m,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(!1),g=(0,p.i)(),f=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/fallback/chains");if(e.ok){let s=await e.json();t(s.chains||s||{})}}catch{}finally{r(!1)}},[]);(0,l.useEffect)(()=>{f()},[f]);let j=async()=>{if(!c.trim()||!m.trim())return void g.warning("Please fill model name and providers");let e=m.split(",").map(e=>e.trim()).filter(Boolean).map((e,t)=>({provider:e,priority:t+1,enabled:!0}));if(0===e.length)return void g.warning("Add at least one provider");h(!0);try{(await fetch("/api/fallback/chains",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:c.trim(),chain:e})})).ok?(g.success(`Chain created for ${c.trim()}`),o(""),x(""),n(!1),await f()):g.error("Failed to create chain")}catch{g.error("Failed to create chain")}finally{h(!1)}},v=async e=>{if(confirm(`Delete fallback chain for "${e}"?`))try{(await fetch("/api/fallback/chains",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:e})})).ok?(g.success(`Chain deleted for ${e}`),await f()):g.error("Failed to delete chain")}catch{g.error("Failed to delete chain")}};if(s)return(0,a.jsx)(d.Zp,{className:"p-6 mt-6",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted animate-pulse",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"timeline"}),"Loading fallback chains..."]})});let y=Object.entries(e);return(0,a.jsxs)(d.Zp,{className:"mt-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4 p-6 pb-0",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-cyan-500/10 text-cyan-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"timeline"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Fallback Chains"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Define provider fallback order per model"})]}),(0,a.jsx)(d.$n,{size:"sm",variant:"primary",onClick:()=>n(!i),children:i?"Cancel":"+ Add Chain"})]}),i&&(0,a.jsxs)("div",{className:"mx-6 p-4 rounded-lg border border-border/30 bg-surface/20 mb-4",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 mb-3",children:[(0,a.jsx)(d.pd,{label:"Model Name",placeholder:"claude-sonnet-4-20250514",value:c,onChange:e=>o(e.target.value)}),(0,a.jsx)(d.pd,{label:"Providers (comma-separated, in priority order)",placeholder:"anthropic, openai, gemini",value:m,onChange:e=>x(e.target.value)})]}),(0,a.jsx)(d.$n,{variant:"primary",size:"sm",onClick:j,loading:u,children:"Create Chain"})]}),(0,a.jsx)("div",{className:"px-6 pb-6",children:0===y.length?(0,a.jsx)(d.pp,{icon:"timeline",title:"No Fallback Chains",description:"Create a chain to define provider fallback order for a model."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:y.map(([e,t])=>(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 rounded-lg border border-border/20 bg-surface/20 hover:bg-surface/40 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsx)("span",{className:"font-mono text-sm text-text-main truncate max-w-[200px]",children:e}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("div",{className:"flex gap-1.5 flex-wrap",children:(Array.isArray(t)?t:[]).map((e,t)=>(0,a.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded-full font-medium",style:{backgroundColor:`${b[t%b.length]}20`,color:b[t%b.length],border:`1px solid ${b[t%b.length]}40`},children:[t+1,". ",e.provider]},`${e.provider}-${t}`))})]}),(0,a.jsx)("button",{onClick:()=>v(e),className:"text-text-muted hover:text-red-400 transition-colors ml-2",title:"Delete chain",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},e))})})]})}let f=[{value:"fill-first",label:"Fill First",desc:"Use accounts in priority order",icon:"vertical_align_top"},{value:"round-robin",label:"Round Robin",desc:"Cycle through all accounts",icon:"loop"},{value:"p2c",label:"P2C",desc:"Pick 2 random, use the healthier one",icon:"balance"},{value:"random",label:"Random",desc:"Random account each request",icon:"shuffle"},{value:"least-used",label:"Least Used",desc:"Pick least recently used account",icon:"low_priority"},{value:"cost-optimized",label:"Cost Opt",desc:"Prefer cheapest available account",icon:"savings"}];function j(){let[e,t]=(0,l.useState)({fallbackStrategy:"fill-first"}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)([]),[c,o]=(0,l.useState)(""),[m,x]=(0,l.useState)("");(0,l.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{t(e),n(e.wildcardAliases||[]),r(!1)}).catch(()=>r(!1))},[]);let u=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&t(t=>({...t,...e}))}catch(e){console.error("Failed to update settings:",e)}},h=async()=>{if(!c.trim()||!m.trim())return;let e=[...i,{pattern:c.trim(),target:m.trim()}];await u({wildcardAliases:e}),n(e),o(""),x("")},p=async e=>{let t=i.filter((t,s)=>s!==e);await u({wildcardAliases:t}),n(t)};return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"route"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-2 mb-4",style:{gridAutoRows:"1fr"},children:f.map(t=>(0,a.jsxs)("button",{onClick:()=>u({fallbackStrategy:t.value}),disabled:s,className:`flex flex-col items-center gap-2 p-4 rounded-lg border text-center transition-all ${e.fallbackStrategy===t.value?"border-blue-500/50 bg-blue-500/5 ring-1 ring-blue-500/20":"border-border/50 hover:border-border hover:bg-surface/30"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[24px] ${e.fallbackStrategy===t.value?"text-blue-400":"text-text-muted"}`,children:t.icon}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:`text-sm font-medium ${e.fallbackStrategy===t.value?"text-blue-400":""}`,children:t.label}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:t.desc})]})]},t.value))}),"round-robin"===e.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-3 border-t border-border/30",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(d.pd,{type:"number",min:"1",max:"10",value:e.stickyRoundRobinLimit||3,onChange:e=>u({stickyRoundRobinLimit:parseInt(e.target.value)}),disabled:s,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-3 border-t border-border/30 mt-3",children:["round-robin"===e.fallbackStrategy&&`Distributing requests across accounts with ${e.stickyRoundRobinLimit||3} calls per account.`,"fill-first"===e.fallbackStrategy&&"Using accounts in priority order (Fill First).","p2c"===e.fallbackStrategy&&"Power of Two Choices: picks 2 random accounts and routes to the healthier one.","random"===e.fallbackStrategy&&"Randomly selects an available account for each request.","least-used"===e.fallbackStrategy&&"Picks the account that was used least recently.","cost-optimized"===e.fallbackStrategy&&"Prefers accounts with the lowest cost (priority-based, extensible with actual cost data)."]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"alt_route"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Model Aliases"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Wildcard patterns to remap model names • Use * and ?"})]})]}),i.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-1.5 mb-4",children:i.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg bg-surface/30 border border-border/20",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 text-sm",children:[(0,a.jsx)("span",{className:"font-mono text-purple-400",children:e.pattern}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"arrow_forward"}),(0,a.jsx)("span",{className:"font-mono text-text-main",children:e.target})]}),(0,a.jsx)("button",{onClick:()=>p(t),className:"text-text-muted hover:text-red-400 transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t))}),(0,a.jsxs)("div",{className:"flex gap-2 items-end",children:[(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(d.pd,{label:"Pattern",placeholder:"claude-sonnet-*",value:c,onChange:e=>o(e.target.value)})}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(d.pd,{label:"Target Model",placeholder:"claude-sonnet-4-20250514",value:m,onChange:e=>x(e.target.value)})}),(0,a.jsx)(d.$n,{size:"sm",variant:"primary",onClick:h,className:"mb-[2px]",children:"+ Add"})]})]}),(0,a.jsx)(g,{})]})}function v(){let[e,t]=(0,l.useState)({strategy:"priority",maxRetries:1,retryDelayMs:2e3,timeoutMs:12e4,healthCheckEnabled:!0,healthCheckTimeoutMs:3e3,maxComboDepth:3,trackMetrics:!0}),[s,r]=(0,l.useState)({}),[n,c]=(0,l.useState)(""),[o,m]=(0,l.useState)(!1);(0,l.useEffect)(()=>{fetch("/api/settings/combo-defaults").then(e=>e.json()).then(e=>{e.comboDefaults&&t(e.comboDefaults),e.providerOverrides&&r(e.providerOverrides)}).catch(e=>console.error("Failed to fetch combo defaults:",e))},[]);let x=async()=>{m(!0);try{await fetch("/api/settings/combo-defaults",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboDefaults:e,providerOverrides:s})})}catch(e){console.error("Failed to save combo defaults:",e)}finally{m(!1)}},u=()=>{let e=n.trim().toLowerCase();e&&!s[e]&&(r(t=>({...t,[e]:{maxRetries:1,timeoutMs:12e4}})),c(""))};return(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"tune"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Combo Defaults"}),(0,a.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:"Global combo configuration"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Default Strategy"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applied to new combos without explicit strategy"})]}),(0,a.jsx)("div",{role:"tablist","aria-label":"Combo strategy",className:"grid grid-cols-3 gap-1 p-0.5 rounded-md bg-black/5 dark:bg-white/5",children:[{value:"priority",label:"Priority",icon:"sort"},{value:"weighted",label:"Weighted",icon:"percent"},{value:"round-robin",label:"Round-Robin",icon:"autorenew"},{value:"random",label:"Random",icon:"shuffle"},{value:"least-used",label:"Least-Used",icon:"low_priority"},{value:"cost-optimized",label:"Cost-Opt",icon:"savings"}].map(s=>(0,a.jsxs)("button",{role:"tab","aria-selected":e.strategy===s.value,onClick:()=>t(e=>({...e,strategy:s.value})),className:(0,i.cn)("px-2 py-1 rounded text-xs font-medium transition-all flex items-center justify-center gap-0.5",e.strategy===s.value?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s.icon}),s.label]},s.value))})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 pt-3 border-t border-border/50",children:[{key:"maxRetries",label:"Max Retries",min:0,max:5},{key:"retryDelayMs",label:"Retry Delay (ms)",min:500,max:1e4,step:500},{key:"timeoutMs",label:"Timeout (ms)",min:5e3,max:3e5,step:5e3},{key:"maxComboDepth",label:"Max Nesting Depth",min:1,max:10}].map(({key:s,label:l,min:r,max:i,step:n})=>(0,a.jsx)(d.pd,{label:l,type:"number",min:r,max:i,step:n||1,value:e[s]??"",onChange:e=>t(t=>({...t,[s]:parseInt(e.target.value)||0})),className:"text-sm"},s))}),"round-robin"===e.strategy&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-3 border-t border-border/50",children:[(0,a.jsx)(d.pd,{label:"Concurrency / Model",type:"number",min:1,max:20,value:e.concurrencyPerModel??"",placeholder:"3",onChange:e=>t(t=>({...t,concurrencyPerModel:parseInt(e.target.value)||0})),className:"text-sm"}),(0,a.jsx)(d.pd,{label:"Queue Timeout (ms)",type:"number",min:1e3,max:12e4,step:1e3,value:e.queueTimeoutMs??"",placeholder:"30000",onChange:e=>t(t=>({...t,queueTimeoutMs:parseInt(e.target.value)||0})),className:"text-sm"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-3 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Health Check"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Pre-check provider availability"})]}),(0,a.jsx)(d.lM,{checked:!1!==e.healthCheckEnabled,onChange:()=>t(e=>({...e,healthCheckEnabled:!e.healthCheckEnabled}))})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Track Metrics"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Record per-combo request metrics"})]}),(0,a.jsx)(d.lM,{checked:!1!==e.trackMetrics,onChange:()=>t(e=>({...e,trackMetrics:!e.trackMetrics}))})]})]}),(0,a.jsxs)("div",{className:"pt-3 border-t border-border/50",children:[(0,a.jsx)("p",{className:"font-medium text-sm mb-2",children:"Provider Overrides"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Override timeout and retries per provider. Provider settings override global defaults."}),Object.entries(s).map(([e,t])=>(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs font-mono font-medium min-w-[80px]",children:e}),(0,a.jsx)(d.pd,{type:"number",min:"0",max:"5",value:t.maxRetries??1,onChange:t=>r(s=>({...s,[e]:{...s[e],maxRetries:parseInt(t.target.value)||0}})),className:"text-xs w-16","aria-label":`${e} max retries`}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"retries"}),(0,a.jsx)(d.pd,{type:"number",min:"5000",max:"300000",step:"5000",value:t.timeoutMs??12e4,onChange:t=>r(s=>({...s,[e]:{...s[e],timeoutMs:parseInt(t.target.value)||12e4}})),className:"text-xs w-24","aria-label":`${e} timeout ms`}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"ms"}),(0,a.jsx)("button",{onClick:()=>{r(t=>{let s={...t};return delete s[e],s})},className:"ml-auto text-red-400 hover:text-red-500 transition-colors","aria-label":`Remove ${e} override`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"close"})})]},e)),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-2",children:[(0,a.jsx)(d.pd,{type:"text",placeholder:"e.g. google, openai...",value:n,onChange:e=>c(e.target.value),onKeyDown:e=>"Enter"===e.key&&u(),className:"text-xs flex-1","aria-label":"New provider name"}),(0,a.jsx)(d.$n,{variant:"outline",size:"sm",onClick:u,disabled:!n.trim(),children:"Add"})]})]}),(0,a.jsx)("div",{className:"pt-3 border-t border-border/50",children:(0,a.jsx)(d.$n,{variant:"primary",size:"sm",onClick:x,loading:o,children:"Save Combo Defaults"})})]})]})}function y(){let[e,t]=(0,l.useState)(!1),[s,r]=(0,l.useState)(null),i=(0,l.useRef)(!0),n=async()=>{try{let e=await fetch("/api/settings/proxy?level=global");if(e.ok){let t=await e.json();r(t.proxy||null)}}catch{}};return(0,l.useEffect)(()=>(i.current=!0,async function(){try{let e=await fetch("/api/settings/proxy?level=global");if(!i.current)return;if(e.ok){let t=await e.json();i.current&&r(t.proxy||null)}}catch{}}(),()=>{i.current=!1}),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"vpn_lock"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:"Global Proxy"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Configure a global outbound proxy for all API calls. Individual providers, combos, and keys can override this."}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[s?(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("span",{className:"px-2.5 py-1 rounded text-xs font-bold uppercase bg-emerald-500/15 text-emerald-400 border border-emerald-500/30",children:[s.type,"://",s.host,":",s.port]})}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"No global proxy configured"}),(0,a.jsx)(d.$n,{size:"sm",variant:s?"secondary":"primary",icon:"settings",onClick:()=>{n(),t(!0)},children:s?"Edit":"Configure"})]})]})}),(0,a.jsx)(d.KN,{isOpen:e,onClose:()=>t(!1),level:"global",levelLabel:"Global",onSaved:n})]})}var N=s(97550);function k(){let{theme:e,setTheme:t,isDark:s}=(0,N.D)();return(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"palette"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Appearance"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Dark Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Switch between light and dark themes"})]}),(0,a.jsx)(d.lM,{checked:s,onChange:()=>t(s?"light":"dark")})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-border",children:(0,a.jsx)("div",{role:"tablist","aria-label":"Theme selection",className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{role:"tab","aria-selected":e===s,onClick:()=>t(s),className:(0,i.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize",children:s})]},s))})})]})]})}let w=[{value:"passthrough",label:"Passthrough",desc:"No changes — client controls thinking budget",icon:"arrow_forward"},{value:"auto",label:"Auto",desc:"Strip all thinking config — let provider decide",icon:"auto_awesome"},{value:"custom",label:"Custom",desc:"Set a fixed token budget for all requests",icon:"tune"},{value:"adaptive",label:"Adaptive",desc:"Scale budget based on request complexity",icon:"trending_up"}],C=[{value:"none",label:"None (0 tokens)"},{value:"low",label:"Low (1K tokens)"},{value:"medium",label:"Medium (10K tokens)"},{value:"high",label:"High (128K tokens)"}];function S(){let[e,t]=(0,l.useState)({mode:"passthrough",customBudget:10240,effortLevel:"medium"}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[c,o]=(0,l.useState)("");(0,l.useEffect)(()=>{fetch("/api/settings/thinking-budget").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let m=async s=>{let a={...e,...s};t(a),n(!0),o("");try{(await fetch("/api/settings/thinking-budget",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok?(o("saved"),setTimeout(()=>o(""),2e3)):o("error")}catch{o("error")}finally{n(!1)}};return(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-violet-500/10 text-violet-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"psychology"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Thinking Budget"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Control AI reasoning token usage across all requests"})]}),"saved"===c&&(0,a.jsxs)("span",{className:"ml-auto text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"})," Saved"]})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2 mb-5",children:w.map(t=>(0,a.jsxs)("button",{onClick:()=>m({mode:t.value}),disabled:s||i,className:`flex items-start gap-3 p-3 rounded-lg border text-left transition-all ${e.mode===t.value?"border-violet-500/50 bg-violet-500/5 ring-1 ring-violet-500/20":"border-border/50 hover:border-border hover:bg-surface/30"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] mt-0.5 ${e.mode===t.value?"text-violet-500":"text-text-muted"}`,children:t.icon}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:`text-sm font-medium ${e.mode===t.value?"text-violet-400":""}`,children:t.label}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5 leading-relaxed",children:t.desc})]})]},t.value))}),"custom"===e.mode&&(0,a.jsxs)("div",{className:"p-4 rounded-lg bg-surface/30 border border-border/30 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Token Budget"}),(0,a.jsxs)("span",{className:"text-sm font-mono tabular-nums text-violet-400",children:[e.customBudget.toLocaleString()," tokens"]})]}),(0,a.jsx)("input",{type:"range",min:"0",max:"131072",step:"1024",value:e.customBudget,onChange:e=>m({customBudget:parseInt(e.target.value)}),className:"w-full accent-violet-500"}),(0,a.jsxs)("div",{className:"flex justify-between text-xs text-text-muted mt-1",children:[(0,a.jsx)("span",{children:"Off"}),(0,a.jsx)("span",{children:"1K"}),(0,a.jsx)("span",{children:"10K"}),(0,a.jsx)("span",{children:"64K"}),(0,a.jsx)("span",{children:"128K"})]})]}),"adaptive"===e.mode&&(0,a.jsxs)("div",{className:"p-4 rounded-lg bg-surface/30 border border-border/30",children:[(0,a.jsx)("p",{className:"text-sm font-medium mb-3",children:"Base Effort Level"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Adaptive mode scales from this base level based on message count, tool usage, and prompt length."}),(0,a.jsx)("div",{className:"grid grid-cols-4 gap-2",children:C.map(t=>(0,a.jsx)("button",{onClick:()=>m({effortLevel:t.value}),disabled:s||i,className:`px-3 py-2 rounded-lg text-xs font-medium border transition-all ${e.effortLevel===t.value?"border-violet-500/50 bg-violet-500/10 text-violet-400":"border-border/50 text-text-muted hover:border-border"}`,children:t.value.charAt(0).toUpperCase()+t.value.slice(1)},t.value))})]})]})}function $(){let[e,t]=(0,l.useState)({enabled:!1,prompt:""}),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(""),[c,o]=(0,l.useState)(null);(0,l.useEffect)(()=>{fetch("/api/settings/system-prompt").then(e=>e.json()).then(e=>{t(e),r(!1)}).catch(()=>r(!1))},[]);let m=async s=>{let a={...e,...s};t(a),n("");try{(await fetch("/api/settings/system-prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok&&(n("saved"),setTimeout(()=>n(""),2e3))}catch{n("error")}};return(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"edit_note"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Global System Prompt"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Injected into all requests at proxy level"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:["saved"===i&&(0,a.jsxs)("span",{className:"text-xs font-medium text-emerald-500 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"})," Saved"]}),(0,a.jsx)(d.lM,{checked:e.enabled,onChange:()=>m({enabled:!e.enabled}),disabled:s})]})]}),e.enabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("textarea",{value:e.prompt,onChange:e=>{var s;return s=e.target.value,void(t(e=>({...e,prompt:s})),c&&clearTimeout(c),o(setTimeout(()=>{m({prompt:s})},800)))},placeholder:"Enter system prompt to inject into all requests...",rows:5,className:"w-full px-4 py-3 rounded-lg border border-border/50 bg-surface/30 text-sm placeholder:text-text-muted/50 resize-y min-h-[120px] focus:outline-none focus:ring-1 focus:ring-amber-500/30 focus:border-amber-500/50 transition-colors",disabled:s}),(0,a.jsxs)("div",{className:"absolute bottom-2 right-3 text-xs text-text-muted/60 tabular-nums",children:[e.prompt.length," chars"]})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted/70 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"}),"This prompt is prepended to the system message of every request. Use for global instructions, safety guidelines, or response formatting rules. Send ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-surface/50",children:"_skipSystemPrompt: true"})," in a request to bypass."]})]})]})}function P(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!1),i=()=>{fetch("/api/cache/stats").then(e=>e.json()).then(t).catch(()=>{})};(0,l.useEffect)(i,[]);let n=async()=>{r(!0);try{await fetch("/api/cache/stats",{method:"DELETE"}),i()}finally{r(!1)}};return(0,a.jsxs)(d.Zp,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"cached"}),"Prompt Cache"]}),(0,a.jsx)("button",{onClick:n,disabled:s,className:"px-3 py-1.5 text-xs rounded-lg bg-red-500/10 text-red-400 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:s?"Flushing…":"Flush Cache"})]}),e?(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Size"}),(0,a.jsxs)("p",{className:"font-mono text-lg text-text-main",children:[e.size,"/",e.maxSize]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Hit Rate"}),(0,a.jsxs)("p",{className:"font-mono text-lg text-text-main",children:[e.hitRate?.toFixed(1)??0,"%"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Hits"}),(0,a.jsx)("p",{className:"font-mono text-text-main",children:e.hits??0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Evictions"}),(0,a.jsx)("p",{className:"font-mono text-text-main",children:e.evictions??0})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading cache stats…"})]})}let A={CLOSED:{bg:"bg-emerald-500/15",text:"text-emerald-400",border:"border-emerald-500/30",label:"CLOSED",icon:"check_circle"},OPEN:{bg:"bg-red-500/15",text:"text-red-400",border:"border-red-500/30",label:"OPEN",icon:"error"},HALF_OPEN:{bg:"bg-amber-500/15",text:"text-amber-400",border:"border-amber-500/30",label:"HALF-OPEN",icon:"warning"}},E={closed:{icon:"check_circle",color:"#22c55e",label:"Closed"},"half-open":{icon:"pending",color:"#f59e0b",label:"Half-Open"},open:{icon:"error",color:"#ef4444",label:"Open"}};function T(e){return!e||e<=0?"—":e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}function R({profiles:e,onSave:t,saving:s}){let[r,i]=(0,l.useState)(!1),[n,c]=(0,l.useState)(e);(0,l.useEffect)(()=>{c(e)},[e]);let o=[{key:"transientCooldown",label:"Transient Cooldown",suffix:"ms"},{key:"rateLimitCooldown",label:"Rate Limit Cooldown",suffix:"ms"},{key:"maxBackoffLevel",label:"Max Backoff Level",suffix:""},{key:"circuitBreakerThreshold",label:"CB Threshold",suffix:" fails"},{key:"circuitBreakerReset",label:"CB Reset Time",suffix:"ms"}];return(0,a.jsx)(d.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"tune"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:"Provider Profiles"})]}),r?(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>i(!1),children:"Cancel"}),(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:"save",onClick:()=>{t(n),i(!1)},disabled:s,children:"Save"})]}):(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>i(!0),children:"Edit"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Separate resilience settings for OAuth (session-based) and API Key (metered) providers. OAuth providers have stricter thresholds due to lower rate limits."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:["oauth","apikey"].map(t=>(0,a.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-bold uppercase tracking-wider mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base","aria-hidden":"true",children:"oauth"===t?"lock":"key"}),"oauth"===t?"OAuth Providers":"API Key Providers"]}),(0,a.jsx)("div",{className:"space-y-2",children:o.map(({key:s,label:l,suffix:i})=>(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:l}),r?(0,a.jsx)("input",{type:"number",min:"0",value:n?.[t]?.[s]??0,onChange:e=>c({...n,[t]:{...n[t],[s]:Number(e.target.value)}}),className:"w-24 px-2 py-1 text-xs rounded bg-white/10 border border-white/20 text-right"}):(0,a.jsxs)("span",{className:"text-sm font-mono",children:[e?.[t]?.[s]??"—",i&&e?.[t]?.[s]!=null?i:""]})]},s))})]},t))})]})})}function L({rateLimitStatus:e,defaults:t,onSaveDefaults:s,saving:r}){let[i,n]=(0,l.useState)(!1),[c,o]=(0,l.useState)(t||{});return(0,l.useEffect)(()=>{t&&o(t)},[t]),(0,a.jsx)(d.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"speed"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:"Rate Limiting"})]}),i?(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>n(!1),children:"Cancel"}),(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:"save",onClick:()=>{s(c),n(!1)},disabled:r,children:"Save"})]}):(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>n(!0),children:"Edit"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"API Key providers are automatically rate-limited with safe defaults. Limits are learned from response headers and adapt over time."}),(0,a.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 p-4 mb-4",children:[(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider mb-3 text-text-muted",children:"Default Safety Net"}),(0,a.jsx)("div",{className:"grid grid-cols-3 gap-4",children:[{key:"requestsPerMinute",label:"RPM",suffix:""},{key:"minTimeBetweenRequests",label:"Min Gap",suffix:"ms",format:T},{key:"concurrentRequests",label:"Max Concurrent",suffix:""}].map(({key:e,label:s,format:l})=>(0,a.jsxs)("div",{children:[i?(0,a.jsx)("input",{type:"number",min:"1",value:c[e]??0,onChange:t=>o(s=>({...s,[e]:parseInt(t.target.value)||0})),className:"w-full px-2 py-1 text-lg font-bold rounded bg-white/10 border border-white/20"}):(0,a.jsx)("div",{className:"text-lg font-bold",children:l?l(t?.[e]):t?.[e]??"—"}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:s})]},e))})]}),e&&e.length>0?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider text-text-muted",children:"Active Limiters"}),e.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-black/5 dark:bg-white/5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:e.provider||e.key}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[null!=e.reservoir&&(0,a.jsxs)("span",{children:["Reservoir: ",e.reservoir]}),null!=e.running&&(0,a.jsxs)("span",{children:["Running: ",e.running]}),null!=e.queued&&(0,a.jsxs)("span",{children:["Queued: ",e.queued]})]})]},t))]}):(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active rate limiters yet."})]})})}function O({breakers:e,onReset:t,loading:s}){let l=e.filter(e=>"CLOSED"!==e.state),r=e.length;return(0,a.jsx)(d.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"electrical_services"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:"Circuit Breakers"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:l.length>0?`${l.length} tripped`:`${r} healthy`}),l.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"danger",icon:"restart_alt",onClick:t,disabled:s,children:"Reset All"})]})]}),0===e.length?(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No circuit breakers active yet. They are created automatically when requests flow through the combo pipeline."}):(0,a.jsx)("div",{className:"space-y-2",children:e.map(e=>{let t=A[e.state]||A.CLOSED;return(0,a.jsxs)("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-black/5 dark:bg-white/5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-base ${t.text}`,"aria-hidden":"true",children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium",children:e.name.replace("combo:","")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[e.failureCount>0&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.failureCount," failure",1!==e.failureCount?"s":""]}),(0,a.jsx)("span",{className:`px-2 py-0.5 rounded text-xs font-bold uppercase ${t.bg} ${t.text} border ${t.border}`,children:t.label})]})]},e.name)})})]})})}function B(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(null),c=(0,p.i)(),o=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/policies");if(e.ok){let s=await e.json();t(s)}}catch{}finally{r(!1)}},[]);(0,l.useEffect)(()=>{o();let e=setInterval(o,15e3);return()=>clearInterval(e)},[o]);let m=async e=>{n(e);try{(await fetch("/api/policies",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"unlock",identifier:e})})).ok?(c.success(`Unlocked: ${e}`),await o()):c.error("Failed to unlock")}catch{c.error("Failed to unlock")}finally{n(null)}},x=e?.circuitBreakers||[],u=e?.lockedIdentifiers||[],h=x.some(e=>"closed"!==e.state)||u.length>0;return s?(0,a.jsx)(d.Zp,{className:"p-6",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted animate-pulse",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"policy"}),"Loading policies..."]})}):(0,a.jsx)(d.Zp,{className:"p-0 overflow-hidden",children:(0,a.jsxs)("div",{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary","aria-hidden":"true",children:"policy"}),(0,a.jsx)("h2",{className:"text-lg font-bold",children:"Policies & Locked Identifiers"})]}),h&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:o,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"refresh"})})]}),h?(0,a.jsxs)(a.Fragment,{children:[x.filter(e=>"closed"!==e.state).length>0&&(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-muted mb-2",children:"Circuit Breakers"}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:x.filter(e=>"closed"!==e.state).map((e,t)=>{let s=E[e.state]||E.open;return(0,a.jsx)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg bg-surface/30 border border-border/20",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:s.color},children:s.icon}),(0,a.jsx)("span",{className:"text-sm text-text-main font-medium",children:e.name||e.provider||"Unknown"}),(0,a.jsx)("span",{className:"text-xs px-1.5 py-0.5 rounded-full",style:{backgroundColor:`${s.color}15`,color:s.color},children:s.label}),e.failures>0&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.failures," failures"]})]})},e.name||t)})})]}),u.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-muted mb-2",children:"Locked Identifiers"}),(0,a.jsx)("div",{className:"flex flex-col gap-1.5",children:u.map((e,t)=>{let s="string"==typeof e?e:e.identifier||e.id;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg bg-surface/30 border border-border/20",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-red-400",children:"lock"}),(0,a.jsx)("span",{className:"font-mono text-sm text-text-main",children:s}),"object"==typeof e&&e.lockedAt&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["since ",new Date(e.lockedAt).toLocaleString()]})]}),(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:()=>m(s),disabled:i===s,className:"text-xs",children:i===s?"Unlocking...":"Force Unlock"})]},s||t)})})]})]}):(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"verified_user"})}),(0,a.jsx)("div",{children:(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"All systems operational — no lockouts or tripped breakers"})})]})]})})}function D(){let[e,t]=(0,l.useState)(null),[s,r]=(0,l.useState)(!0),[i,n]=(0,l.useState)(!1),[c,o]=(0,l.useState)(null),m=(0,l.useCallback)(async()=>{try{r(!0);let e=await fetch("/api/resilience");if(!e.ok)throw Error(`Failed to load: ${e.status}`);let s=await e.json();t(s),o(null)}catch(e){o(e.message)}finally{r(!1)}},[]);(0,l.useEffect)(()=>{m();let e=setInterval(m,1e4);return()=>clearInterval(e)},[m]);let x=async()=>{try{if(r(!0),!(await fetch("/api/resilience/reset",{method:"POST"})).ok)throw Error("Reset failed");await m()}catch(e){o(e.message)}finally{r(!1)}},u=async e=>{try{if(n(!0),!(await fetch("/api/resilience",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({profiles:e})})).ok)throw Error("Save failed");await m()}catch(e){o(e.message)}finally{n(!1)}},h=async e=>{try{if(n(!0),!(await fetch("/api/resilience",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaults:e})})).ok)throw Error("Save failed");await m()}catch(e){o(e.message)}finally{n(!1)}};return s&&!e?(0,a.jsxs)("div",{className:"flex items-center justify-center py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"hourglass_empty"}),"Loading resilience status..."]}):c&&!e?(0,a.jsxs)(d.Zp,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"error"}),(0,a.jsx)("span",{className:"text-sm",children:c})]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:m,className:"mt-3",children:"Retry"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(R,{profiles:e?.profiles||{},onSave:u,saving:i}),(0,a.jsx)(L,{rateLimitStatus:e?.rateLimitStatus||[],defaults:e?.defaults||{},onSaveDefaults:h,saving:i}),(0,a.jsx)(O,{breakers:e?.circuitBreakers||[],onReset:x,loading:s}),(0,a.jsx)(B,{})]})}let M=[{id:"general",label:"General",icon:"settings"},{id:"ai",label:"AI",icon:"smart_toy"},{id:"security",label:"Security",icon:"shield"},{id:"routing",label:"Routing",icon:"route"},{id:"resilience",label:"Resilience",icon:"electrical_services"},{id:"advanced",label:"Advanced",icon:"tune"}];function z(){let e=(0,r.useSearchParams)().get("tab"),[t,s]=(0,l.useState)(null),d=t||M.find(t=>t.id===e)?.id||"general";return(0,a.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)("div",{role:"tablist","aria-label":"Settings sections",className:"inline-flex items-center p-1 rounded-lg bg-black/5 dark:bg-white/5 self-start",children:M.map(e=>(0,a.jsxs)("button",{role:"tab","aria-selected":d===e.id,tabIndex:d===e.id?0:-1,onClick:()=>s(e.id),className:(0,i.cn)("flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-all text-sm",d===e.id?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]","aria-hidden":"true",children:e.icon}),(0,a.jsx)("span",{className:"hidden sm:inline",children:e.label})]},e.id))}),(0,a.jsxs)("div",{role:"tabpanel","aria-label":M.find(e=>e.id===d)?.label,children:["general"===d&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(c,{}),(0,a.jsx)(k,{})]})}),"ai"===d&&(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(S,{}),(0,a.jsx)($,{}),(0,a.jsx)(P,{})]}),"security"===d&&(0,a.jsx)(h,{}),"routing"===d&&(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(j,{}),(0,a.jsx)(v,{})]}),"resilience"===d&&(0,a.jsx)(D,{}),"advanced"===d&&(0,a.jsx)(y,{})]}),(0,a.jsxs)("div",{className:"text-center text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[n.vQ.name," v",n.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode — All data stored on your machine"})]})]})})}},99344:(e,t,s)=>{Promise.resolve().then(s.bind(s,49162))}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=99344)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{13504:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>l});var a=s(95155),r=s(12115),i=s(40993),n=s(73321);function l(){let[e,t]=(0,r.useState)(""),[s,l]=(0,r.useState)(""),[d,o]=(0,r.useState)(!1),[c,m]=(0,r.useState)(null),[x,u]=(0,r.useState)(null),[h,p]=(0,r.useState)(!1),b=(0,n.useRouter)();(0,r.useEffect)(()=>{p(!0),async function(){let e=new AbortController,t=setTimeout(()=>e.abort(),5e3),s=window.location.origin;try{let a=await fetch(`${s}/api/settings`,{signal:e.signal});if(clearTimeout(t),a.ok){let e=await a.json();if(!1===e.requireLogin){b.push("/dashboard"),b.refresh();return}m(!!e.hasPassword),u(!!e.setupComplete)}else m(!0),u(!0)}catch(e){clearTimeout(t),m(!0),u(!0)}}()},[b]);let f=async t=>{t.preventDefault(),o(!0),l("");try{let t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})});if(t.ok)sessionStorage.setItem("omniroute_login_time",String(Date.now())),b.push("/dashboard"),b.refresh();else{let e=await t.json();l(e.error||"Invalid password")}}catch(e){l("An error occurred. Please try again.")}finally{o(!1)}};return null===c||null===x?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("div",{className:"w-10 h-10 border-2 border-primary/20 rounded-full"}),(0,a.jsx)("div",{className:"absolute inset-0 w-10 h-10 border-2 border-primary border-t-transparent rounded-full animate-spin"})]}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Loading..."})]})}):c||x?!c&&x?(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-md transition-all duration-700 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-amber-500/10 to-amber-500/5 border border-amber-500/10 mb-6",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-amber-500 text-[40px]",children:"shield_person"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-text-main tracking-tight",children:"Secure Your Instance"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Password protection is not enabled"})]}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-2xl p-8 shadow-soft",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-text-muted leading-relaxed mb-6",children:"Set a password to protect your dashboard and secure your API endpoints from unauthorized access."}),(0,a.jsx)(i.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>b.push("/dashboard/settings?tab=security"),children:"Configure Password"})]})}),(0,a.jsx)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:"OmniRoute — Unified AI API Proxy"})]})}):(0,a.jsxs)("div",{className:"min-h-screen flex bg-bg",children:[(0,a.jsx)("div",{className:"flex-1 flex items-center justify-center p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-sm transition-all duration-700 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"mb-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-8",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-primary-hover flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-white text-[20px]",children:"hub"})}),(0,a.jsx)("span",{className:"text-xl font-semibold text-text-main tracking-tight",children:"OmniRoute"})]}),(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main tracking-tight",children:"Sign in"}),(0,a.jsx)("p",{className:"text-text-muted mt-1.5",children:"Enter your password to continue"})]}),(0,a.jsxs)("form",{onSubmit:f,className:"space-y-5",children:[(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter your password",value:e,onChange:e=>t(e.target.value),required:!0,autoFocus:!0,className:"h-11"}),s&&(0,a.jsxs)("p",{className:"text-sm text-red-500 flex items-center gap-1.5 pt-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"error"}),s]})]}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",className:"w-full h-11 text-sm font-medium",loading:d,children:"Continue"})]}),(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:(0,a.jsx)("a",{href:"/forgot-password",className:"text-sm text-text-muted hover:text-primary transition-colors",children:"Forgot your password?"})})]})}),(0,a.jsx)("div",{className:"hidden lg:flex lg:w-1/2 bg-gradient-to-br from-primary/5 via-primary/3 to-transparent items-center justify-center p-12",children:(0,a.jsx)("div",{className:`max-w-md transition-all duration-700 delay-200 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-text-main mb-3",children:"Unified AI API Proxy"}),(0,a.jsx)("p",{className:"text-text-muted leading-relaxed",children:"Route requests to multiple AI providers through a single endpoint. Load balancing, failover, and usage tracking built in."})]}),(0,a.jsx)("div",{className:"space-y-4",children:[{icon:"swap_horiz",title:"Multi-Provider",desc:"OpenAI, Anthropic, Google, and more"},{icon:"speed",title:"Load Balancing",desc:"Distribute requests intelligently"},{icon:"analytics",title:"Usage Tracking",desc:"Monitor costs and tokens"}].map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4 p-4 rounded-xl bg-surface/50 border border-border",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:e.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-medium text-text-main",children:e.title}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e.desc})]})]},e.icon))})]})})})]}):(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-6",children:(0,a.jsxs)("div",{className:`w-full max-w-md transition-all duration-700 ease-out ${h?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:[(0,a.jsxs)("div",{className:"text-center mb-10",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-20 h-20 rounded-3xl bg-gradient-to-br from-primary/10 to-primary/5 border border-primary/10 mb-6",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[40px]",children:"rocket_launch"})}),(0,a.jsx)("h1",{className:"text-3xl font-bold text-text-main tracking-tight",children:"Welcome"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Let's get your OmniRoute instance configured"})]}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-2xl p-8 shadow-soft",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("p",{className:"text-text-muted leading-relaxed mb-6",children:"Run the onboarding wizard to set up your password and connect your first AI provider."}),(0,a.jsx)(i.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>b.push("/dashboard/onboarding"),children:"Start Onboarding"})]})}),(0,a.jsx)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:"OmniRoute — Unified AI API Proxy"})]})})}},90723:(e,t,s)=>{Promise.resolve().then(s.bind(s,13504))}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=90723)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345],{10520:(e,t,r)=>{Promise.resolve().then(r.bind(r,37145))},37145:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var a=r(95155),n=r(98500),o=r.n(n);function i(){return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen p-6 bg-bg text-text-main text-center",role:"main","aria-labelledby":"not-found-title",children:[(0,a.jsx)("div",{className:"text-[96px] font-extrabold leading-none mb-2 bg-gradient-to-br from-primary to-primary-hover bg-clip-text text-transparent","aria-hidden":"true",children:"404"}),(0,a.jsx)("h1",{id:"not-found-title",className:"text-2xl font-semibold mb-2",children:"Page not found"}),(0,a.jsx)("p",{className:"text-[15px] text-text-muted max-w-[400px] leading-relaxed mb-8",children:"The page you're looking for doesn't exist or has been moved."}),(0,a.jsx)(o(),{href:"/dashboard",className:"px-8 py-3 rounded-xl text-white text-sm font-medium no-underline transition-all duration-200 shadow-warm hover:-translate-y-0.5 bg-gradient-to-br from-primary to-primary-hover hover:shadow-elevated focus:outline-2 focus:outline-offset-2 focus:outline-primary","aria-label":"Return to dashboard",children:"Go to Dashboard"})]})}}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=10520)),_N_E=e.O()}]);
|