omniroute 1.7.13 → 1.7.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +45 -45
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +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.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +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 +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +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 +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +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.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +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.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +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 +3 -3
- 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 +4 -4
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- 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.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.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.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.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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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.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 +1 -1
- 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.js +2 -2
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route.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.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.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.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.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.js +2 -2
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +2 -2
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +2 -2
- 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 +2 -2
- 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.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.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.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.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.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.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.js +2 -2
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route.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.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.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.js +2 -2
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route.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.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.js +2 -2
- 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.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.js +2 -2
- 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.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.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.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 +2 -2
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.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.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.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.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.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.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.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.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route.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.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/model-aliases/route.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.js +2 -2
- 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.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.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.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.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.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.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.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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.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.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.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.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.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.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/music/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/music/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.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.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.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.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.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.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.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.js +2 -2
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page.js +3 -3
- package/app/.next/server/app/docs/page.js.nft.json +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page.js +2 -2
- package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page.js +2 -2
- package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page.js +2 -2
- package/app/.next/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page.js +2 -2
- package/app/.next/server/app/terms/page.js.nft.json +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +45 -45
- package/app/.next/server/chunks/2180.js +1 -1
- package/app/.next/server/chunks/2767.js +3 -3
- package/app/.next/server/chunks/2910.js +1 -1
- package/app/.next/server/chunks/3498.js +1 -1
- package/app/.next/server/chunks/4488.js +1 -1
- package/app/.next/server/chunks/5248.js +1 -0
- package/app/.next/server/chunks/5393.js +2 -0
- package/app/.next/server/chunks/7109.js +1 -1
- package/app/.next/server/chunks/8020.js +3 -3
- package/app/.next/server/chunks/9824.js +2 -2
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +3 -3
- package/app/.next/server/next-font-manifest.js +1 -1
- package/app/.next/server/next-font-manifest.json +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-0ee1f53245d92ec3.js → 5846-07d81ca18232b21d.js} +1 -1
- package/app/.next/static/chunks/{993-9f36b0b069ca090e.js → 993-035473765d7d1871.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6f1750506292c630.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-20786f2c7fdbab57.js → page-52f76c7c91444ec2.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-1dd4d0c348a7b0a6.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-77ab26722f5c56c7.js +15 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-85a3e6a423aceded.js → page-3dce7fccfcf177dd.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-cdb8071441476da9.js → page-3ed2a7685adf9b91.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-84be54df40abf969.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-b480b3cb318782d7.js → page-9a6519bf1468f16e.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-f4a2d6d07df5ddc4.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-ffdc1dcf074c7528.js → page-833d24f322a20f5a.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-1d0ca9b5d3eaf7cd.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-5378e9473a20cd6a.js → page-d424641c7e428be9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-388840686801f3f5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-9c8ffb212f855704.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-f0730d6d62d02e82.js → error-2f0177a2197dd556.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{loading-59cbccd6d5185ca9.js → loading-99ab4d478260d53b.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-31cdb6e15134d8c2.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-40dc5ac82df708e9.js → page-1f022385b812b987.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-cc85c3ff1f63aea6.js → error-e844916e39172c8b.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-19fc771a287bcb4c.js → loading-bb068659ee679ff4.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{page-2442cf2a6452a899.js → page-cea3403400ee20c8.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-69eb8b0eb0e9de00.js → page-a4b8b03ffb39da1d.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-534e13a69cb60a4f.js → page-83b07523f81d6282.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-86a076d820931a30.js → page-9cc99ab874fc36e7.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/{layout-16302e54f9ef3d0e.js → layout-00d5d56af65098a9.js} +1 -1
- package/app/.next/static/chunks/app/callback/{page-0f0ebc0820dd18a5.js → page-585a53f7dc6a30f1.js} +1 -1
- package/app/.next/static/chunks/app/docs/{page-3658b3f15df3a19e.js → page-2fe9dcbeb3f738c0.js} +1 -1
- package/app/.next/static/chunks/app/{error-f918d9961a2368d3.js → error-0d59fc4efafbc38c.js} +1 -1
- package/app/.next/static/chunks/app/forbidden/page-df886dfa2d5bd9fa.js +1 -0
- package/app/.next/static/chunks/app/forgot-password/page-2a495f0b0c653ab4.js +1 -0
- package/app/.next/static/chunks/app/global-error-41eef2a698918fc1.js +1 -0
- package/app/.next/static/chunks/app/landing/page-9d540ab1716f8e3e.js +1 -0
- package/app/.next/static/chunks/app/{layout-070972eb026af319.js → layout-108592eafb959363.js} +1 -1
- package/app/.next/static/chunks/app/login/{page-6c769465e407368f.js → page-121c612ee459e7c2.js} +1 -1
- package/app/.next/static/chunks/app/not-found-1dbd8c3e506fe00f.js +1 -0
- package/app/.next/static/chunks/app/privacy/{page-3658b3f15df3a19e.js → page-2fe9dcbeb3f738c0.js} +1 -1
- package/app/.next/static/chunks/app/terms/{page-3658b3f15df3a19e.js → page-2fe9dcbeb3f738c0.js} +1 -1
- package/app/.next/static/chunks/{main-app-ae230f6bf51a5edb.js → main-app-c9da11a8061df107.js} +1 -1
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/app/.env +0 -122
- package/app/.next/server/chunks/3801.js +0 -2
- package/app/.next/server/chunks/9548.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-ce5214cdf489c9df.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-12d772841a253032.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-5e34630a5dc32825.js +0 -15
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-3f3a5f45e045051f.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-0ae1d6cc5fc4671f.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-72b768421394b42c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-5c87e49261a22fd5.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b38f2d03bae8166a.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-a7fb36872be60fe0.js +0 -1
- package/app/.next/static/chunks/app/forbidden/page-77657dfa95e61cd8.js +0 -1
- package/app/.next/static/chunks/app/forgot-password/page-be3bacc125c30a6b.js +0 -1
- package/app/.next/static/chunks/app/global-error-504ff9093e2a997d.js +0 -1
- package/app/.next/static/chunks/app/landing/page-75b0c988db383cfc.js +0 -1
- package/app/.next/static/chunks/app/not-found-11b712c853d93172.js +0 -1
- /package/app/.next/static/{aCT5wOLH_n6lt0LkCh2w7 → 75GpGu25G2S3zpsEKAfV7}/_buildManifest.js +0 -0
- /package/app/.next/static/{aCT5wOLH_n6lt0LkCh2w7 → 75GpGu25G2S3zpsEKAfV7}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[410],{50910:(e,t,c)=>{"use strict";c.d(t,{c:()=>i});var a=c(33418);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let i=n(0,a.c3);n(0,a.kc)},67040:(e,t,c)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}c.d(t,{cn:()=>a})},73321:(e,t,c)=>{"use strict";var a=c(74645);c.o(a,"useParams")&&c.d(t,{useParams:function(){return a.useParams}}),c.o(a,"usePathname")&&c.d(t,{usePathname:function(){return a.usePathname}}),c.o(a,"useRouter")&&c.d(t,{useRouter:function(){return a.useRouter}}),c.o(a,"useSearchParams")&&c.d(t,{useSearchParams:function(){return a.useSearchParams}})},81060:(e,t,c)=>{"use strict";c.d(t,{default:()=>i});var a=c(95155),n=c(67040);function i({children:e,title:t,subtitle:c,icon:i,action:o,padding:r="md",hover:s=!1,className:u,...d}){return(0,a.jsxs)("div",{className:(0,n.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",s&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[r],u),...d,children:[(t||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,a.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,a.jsxs)("div",{children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),c&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:c})]})]}),o]}),e]})}i.Section=function({children:e,className:t,...c}){return(0,a.jsx)("div",{className:(0,n.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...c,children:e})},i.Row=function({children:e,className:t,...c}){return(0,a.jsx)("div",{className:(0,n.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...c,children:e})},i.ListItem=function({children:e,actions:t,className:c,...i}){return(0,a.jsxs)("div",{className:(0,n.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",c),...i,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity",children:t})]})}},85109:(e,t,c)=>{Promise.resolve().then(c.bind(c,95204))},95204:(e,t,c)=>{"use strict";c.r(t),c.d(t,{default:()=>d});var a=c(95155),n=c(12115),i=c(73321),o=c(81060);let r={cc:{"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"deepseek-v3.2-reasoner":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}},gemini:{"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},minimax:{"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}}};function s({isOpen:e,onClose:t,onSave:c}){let[i,o]=(0,n.useState)({}),[s,u]=(0,n.useState)(!0),[d,p]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&h()},[e]);let h=async()=>{u(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();o(t)}else o(r)}catch(e){console.error("Failed to load pricing:",e),o(r)}finally{u(!1)}},l=async()=>{p(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(e.ok)c?.(),t();else{let t=await e.json();alert(`Failed to save pricing: ${t.error}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{p(!1)}},g=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&o(r)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let m=Object.keys(i).sort(),x=["input","output","cached","reasoning","cache_creation"];return(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,a.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,a.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto p-4",children:s?(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,a.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,a.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),m.map(e=>{let t=Object.keys(i[e]).sort();return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,a.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,a.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),x.map(c=>(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",value:i[e][t][c]||0,onChange:a=>{let n;!isNaN(n=parseFloat(a.target.value))&&!(n<0)&&o(a=>{let i={...a};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={}),i[e][t][c]=n,i})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},c))]},t))})]})})]},e)}),0===m.length&&(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,a.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,a.jsx)("button",{onClick:g,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:d,children:"Reset to Defaults"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:d,children:"Cancel"}),(0,a.jsx)("button",{onClick:l,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:d,children:d?"Saving...":"Save Changes"})]})]})]})})}var u=c(50910);function d(){(0,i.useRouter)();let[e,t]=(0,n.useState)(!1),[c,r]=(0,n.useState)(null),[d,p]=(0,n.useState)(!0),h=(0,u.c)("settings");(0,n.useEffect)(()=>{l()},[]);let l=async()=>{p(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();r(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{p(!1)}};return(0,a.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-3xl font-bold",children:h("pricingSettingsTitle")}),(0,a.jsx)("p",{className:"text-text-muted mt-1",children:h("modelPricingDesc")})]}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:h("editPricing")})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(o.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:h("totalModels")}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(()=>{if(!c)return 0;let e=0;for(let t in c)e+=Object.keys(c[t]).length;return e})()})]}),(0,a.jsxs)(o.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:h("providers")}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(!c?[]:Object.keys(c).sort()).length})]}),(0,a.jsxs)(o.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:h("status")}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:d?"...":h("active")})]})]}),(0,a.jsxs)(o.default,{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:h("howPricingWorks")}),(0,a.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,a.jsxs)("p",{children:[(0,a.jsxs)("strong",{children:[h("costCalculation"),":"]})," ",h("costCalculationDesc")]}),(0,a.jsxs)("p",{children:[(0,a.jsxs)("strong",{children:[h("pricingFormat"),":"]})," ",h("pricingFormatDesc")]}),(0,a.jsx)("p",{children:(0,a.jsxs)("strong",{children:[h("tokenTypes"),":"]})}),(0,a.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("input"),":"]})," ",h("inputTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("output"),":"]})," ",h("outputTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("cached"),":"]})," ",h("cachedTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("reasoning"),":"]})," ",h("reasoningTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("cacheCreation"),":"]})," ",h("cacheCreationTokenDesc")]})]}),(0,a.jsx)("p",{children:h("customPricingNote")})]})]}),(0,a.jsxs)(o.default,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:h("currentPricing")}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:h("viewFullDetails")})]}),d?(0,a.jsx)("div",{className:"text-center py-4 text-text-muted",children:h("loadingPricing")}):c?(0,a.jsxs)("div",{className:"space-y-3",children:[Object.keys(c).slice(0,5).map(e=>(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,a.jsxs)("span",{className:"text-text-muted",children:[Object.keys(c[e]).length," ",h("models")]})]},e)),Object.keys(c).length>5&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",h("moreProviders",{count:Object.keys(c).length-5})]})]}):(0,a.jsx)("div",{className:"text-text-muted",children:h("noPricing")})]}),e&&(0,a.jsx)(s,{isOpen:e,onClose:()=>t(!1),onSave:()=>{l()}})]})}}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=85109)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[410],{43265:(e,t,c)=>{Promise.resolve().then(c.bind(c,95204))},50910:(e,t,c)=>{"use strict";c.d(t,{c:()=>i});var a=c(33418);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let i=n(0,a.c3);n(0,a.kc)},67040:(e,t,c)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}c.d(t,{cn:()=>a})},73321:(e,t,c)=>{"use strict";var a=c(74645);c.o(a,"useParams")&&c.d(t,{useParams:function(){return a.useParams}}),c.o(a,"usePathname")&&c.d(t,{usePathname:function(){return a.usePathname}}),c.o(a,"useRouter")&&c.d(t,{useRouter:function(){return a.useRouter}}),c.o(a,"useSearchParams")&&c.d(t,{useSearchParams:function(){return a.useSearchParams}})},81060:(e,t,c)=>{"use strict";c.d(t,{default:()=>i});var a=c(95155),n=c(67040);function i({children:e,title:t,subtitle:c,icon:i,action:o,padding:r="md",hover:s=!1,className:u,...d}){return(0,a.jsxs)("div",{className:(0,n.cn)("bg-surface","border border-black/5 dark:border-white/5","rounded-lg shadow-sm",s&&"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[r],u),...d,children:[(t||o)&&(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,a.jsx)("div",{className:"p-2 rounded-lg bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:i})}),(0,a.jsxs)("div",{children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),c&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:c})]})]}),o]}),e]})}i.Section=function({children:e,className:t,...c}){return(0,a.jsx)("div",{className:(0,n.cn)("p-4 rounded-lg","bg-black/[0.02] dark:bg-white/[0.02]","border border-black/5 dark:border-white/5",t),...c,children:e})},i.Row=function({children:e,className:t,...c}){return(0,a.jsx)("div",{className:(0,n.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-black/5 dark:border-white/5 last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",t),...c,children:e})},i.ListItem=function({children:e,actions:t,className:c,...i}){return(0,a.jsxs)("div",{className:(0,n.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0","hover:bg-black/[0.02] dark:hover:bg-white/[0.02]","transition-colors",c),...i,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity",children:t})]})}},95204:(e,t,c)=>{"use strict";c.r(t),c.d(t,{default:()=>d});var a=c(95155),n=c(12115),i=c(73321),o=c(81060);let r={cc:{"claude-opus-4-5-20251101":{input:15,output:75,cached:7.5,reasoning:75,cache_creation:15},"claude-sonnet-4-5-20250929":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4-5-20251001":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}},cx:{"gpt-5.2-codex":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.2":{input:5,output:20,cached:2.5,reasoning:30,cache_creation:5},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-mini":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"gpt-5.1":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5-codex":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-codex-mini":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},gc:{"gemini-3-flash-preview":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},qw:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"qwen3-coder-flash":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"vision-model":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5}},if:{"qwen3-coder-plus":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1},"kimi-k2-thinking":{input:1.5,output:6,cached:.75,reasoning:9,cache_creation:1.5},"deepseek-r1":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"deepseek-v3.2-chat":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"deepseek-v3.2-reasoner":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"minimax-m2":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},ag:{"gemini-3.1-pro-low":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3.1-pro-high":{input:4,output:18,cached:.5,reasoning:27,cache_creation:4},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"claude-sonnet-4-6":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-opus-4-6-thinking":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"gpt-oss-120b-medium":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},gh:{"gpt-5":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3},"gpt-5-mini":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"gpt-5.1-codex":{input:4,output:16,cached:2,reasoning:24,cache_creation:4},"gpt-5.1-codex-max":{input:8,output:32,cached:4,reasoning:48,cache_creation:8},"gpt-4.1":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"claude-4.5-sonnet":{input:3,output:15,cached:.3,reasoning:22.5,cache_creation:3},"claude-4.5-opus":{input:5,output:25,cached:.5,reasoning:37.5,cache_creation:5},"claude-4.5-haiku":{input:.5,output:2.5,cached:.05,reasoning:3.75,cache_creation:.5},"gemini-3-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-3-flash":{input:.5,output:3,cached:.03,reasoning:4.5,cache_creation:.5},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"grok-code-fast-1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},openai:{"gpt-4o":{input:2.5,output:10,cached:1.25,reasoning:15,cache_creation:2.5},"gpt-4o-mini":{input:.15,output:.6,cached:.075,reasoning:.9,cache_creation:.15},"gpt-4-turbo":{input:10,output:30,cached:5,reasoning:45,cache_creation:10},o1:{input:15,output:60,cached:7.5,reasoning:90,cache_creation:15},"o1-mini":{input:3,output:12,cached:1.5,reasoning:18,cache_creation:3}},anthropic:{"claude-sonnet-4-20250514":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-opus-4-20250514":{input:15,output:75,cached:7.5,reasoning:112.5,cache_creation:15},"claude-3-5-sonnet-20241022":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3}},gemini:{"gemini-3-pro-preview":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-pro":{input:2,output:12,cached:.25,reasoning:18,cache_creation:2},"gemini-2.5-flash":{input:.3,output:2.5,cached:.03,reasoning:3.75,cache_creation:.3},"gemini-2.5-flash-lite":{input:.15,output:1.25,cached:.015,reasoning:1.875,cache_creation:.15}},openrouter:{auto:{input:2,output:8,cached:1,reasoning:12,cache_creation:2}},glm:{"glm-4.7":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75},"glm-4.6":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5},"glm-4.6v":{input:.75,output:3,cached:.375,reasoning:4.5,cache_creation:.75}},kimi:{"kimi-latest":{input:1,output:4,cached:.5,reasoning:6,cache_creation:1}},minimax:{"MiniMax-M2.1":{input:.5,output:2,cached:.25,reasoning:3,cache_creation:.5}},groq:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b-versatile":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen/qwen3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},blackbox:{"gpt-4o":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gemini-2.5-flash":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"claude-sonnet-4":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-v3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},blackboxai:{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"blackboxai-pro":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},fireworks:{"accounts/fireworks/models/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/deepseek-v3p1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/llama-v3p3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"accounts/fireworks/models/qwen3-235b-a22b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},cerebras:{"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-glm-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-3.3-70b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"llama-4-scout-17b-16e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-235b-a22b-instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"qwen-3-32b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nvidia:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/kimi-k2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"z-ai/glm4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/deepseek-v3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"nvidia/llama-3.3-70b-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta/llama-4-maverick-17b-128e-instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek/deepseek-r1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},nebius:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},siliconflow:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.2":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3.1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-235B-A22B-Instruct-2507":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-Coder-480B-A35B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen3-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"moonshotai/Kimi-K2.5":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"zai-org/GLM-4.7":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"baidu/ERNIE-4.5-300B-A47B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},hyperbolic:{"openai/gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"gpt-oss-120b":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/QwQ-32B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-R1":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"deepseek-ai/DeepSeek-V3":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.3-70B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"meta-llama/Llama-3.2-3B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-72B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"Qwen/Qwen2.5-Coder-32B-Instruct":{input:0,output:0,cached:0,reasoning:0,cache_creation:0},"NousResearch/Hermes-3-Llama-3.1-70B":{input:0,output:0,cached:0,reasoning:0,cache_creation:0}},kiro:{"claude-sonnet-4.5":{input:3,output:15,cached:1.5,reasoning:15,cache_creation:3},"claude-haiku-4.5":{input:.5,output:2.5,cached:.25,reasoning:2.5,cache_creation:.5}}};function s({isOpen:e,onClose:t,onSave:c}){let[i,o]=(0,n.useState)({}),[s,u]=(0,n.useState)(!0),[d,p]=(0,n.useState)(!1);(0,n.useEffect)(()=>{e&&h()},[e]);let h=async()=>{u(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();o(t)}else o(r)}catch(e){console.error("Failed to load pricing:",e),o(r)}finally{u(!1)}},l=async()=>{p(!0);try{let e=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(e.ok)c?.(),t();else{let t=await e.json();alert(`Failed to save pricing: ${t.error}`)}}catch(e){console.error("Failed to save pricing:",e),alert("Failed to save pricing")}finally{p(!1)}},g=async()=>{if(confirm("Reset all pricing to defaults? This cannot be undone."))try{(await fetch("/api/pricing",{method:"DELETE"})).ok&&o(r)}catch(e){console.error("Failed to reset pricing:",e),alert("Failed to reset pricing")}};if(!e)return null;let m=Object.keys(i).sort(),x=["input","output","cached","reasoning","cache_creation"];return(0,a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:(0,a.jsxs)("div",{className:"bg-bg-base border border-border rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 border-b border-border flex items-center justify-between",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Pricing Configuration"}),(0,a.jsx)("button",{onClick:t,className:"text-text-muted hover:text-text text-2xl leading-none",children:"\xd7"})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto p-4",children:s?(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"Loading pricing data..."}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"bg-bg-subtle border border-border rounded-lg p-3 text-sm",children:[(0,a.jsx)("p",{className:"font-medium mb-1",children:"Pricing Rates Format"}),(0,a.jsxs)("p",{className:"text-text-muted",children:["All rates are in ",(0,a.jsx)("strong",{children:"dollars per million tokens"})," ($/1M tokens). Example: Input rate of 2.50 means $2.50 per 1,000,000 input tokens."]})]}),m.map(e=>{let t=Object.keys(i[e]).sort();return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsx)("div",{className:"bg-bg-subtle px-4 py-2 font-semibold text-sm",children:e.toUpperCase()}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-bg-hover text-text-muted uppercase text-xs",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 text-left",children:"Model"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Input"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Output"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cached"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Reasoning"}),(0,a.jsx)("th",{className:"px-3 py-2 text-right",children:"Cache Creation"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border",children:t.map(t=>(0,a.jsxs)("tr",{className:"hover:bg-bg-subtle/50",children:[(0,a.jsx)("td",{className:"px-3 py-2 font-medium",children:t}),x.map(c=>(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",value:i[e][t][c]||0,onChange:a=>{let n;!isNaN(n=parseFloat(a.target.value))&&!(n<0)&&o(a=>{let i={...a};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={}),i[e][t][c]=n,i})},className:"w-20 px-2 py-1 text-right bg-bg-base border border-border rounded focus:outline-none focus:border-primary"})},c))]},t))})]})})]},e)}),0===m.length&&(0,a.jsx)("div",{className:"text-center py-8 text-text-muted",children:"No pricing data available"})]})}),(0,a.jsxs)("div",{className:"p-4 border-t border-border flex items-center justify-between gap-2",children:[(0,a.jsx)("button",{onClick:g,className:"px-4 py-2 text-sm text-red-500 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",disabled:d,children:"Reset to Defaults"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:t,className:"px-4 py-2 text-sm text-text-muted hover:text-text border border-border rounded transition-colors",disabled:d,children:"Cancel"}),(0,a.jsx)("button",{onClick:l,className:"px-4 py-2 text-sm bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-50",disabled:d,children:d?"Saving...":"Save Changes"})]})]})]})})}var u=c(50910);function d(){(0,i.useRouter)();let[e,t]=(0,n.useState)(!1),[c,r]=(0,n.useState)(null),[d,p]=(0,n.useState)(!0),h=(0,u.c)("settings");(0,n.useEffect)(()=>{l()},[]);let l=async()=>{p(!0);try{let e=await fetch("/api/pricing");if(e.ok){let t=await e.json();r(t)}}catch(e){console.error("Failed to load pricing:",e)}finally{p(!1)}};return(0,a.jsxs)("div",{className:"max-w-6xl mx-auto p-6 space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-3xl font-bold",children:h("pricingSettingsTitle")}),(0,a.jsx)("p",{className:"text-text-muted mt-1",children:h("modelPricingDesc")})]}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"px-4 py-2 bg-primary text-white rounded hover:bg-primary/90 transition-colors",children:h("editPricing")})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(o.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:h("totalModels")}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(()=>{if(!c)return 0;let e=0;for(let t in c)e+=Object.keys(c[t]).length;return e})()})]}),(0,a.jsxs)(o.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:h("providers")}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1",children:d?"...":(!c?[]:Object.keys(c).sort()).length})]}),(0,a.jsxs)(o.default,{className:"p-4",children:[(0,a.jsx)("div",{className:"text-text-muted text-sm uppercase font-semibold",children:h("status")}),(0,a.jsx)("div",{className:"text-2xl font-bold mt-1 text-success",children:d?"...":h("active")})]})]}),(0,a.jsxs)(o.default,{className:"p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:h("howPricingWorks")}),(0,a.jsxs)("div",{className:"space-y-3 text-sm text-text-muted",children:[(0,a.jsxs)("p",{children:[(0,a.jsxs)("strong",{children:[h("costCalculation"),":"]})," ",h("costCalculationDesc")]}),(0,a.jsxs)("p",{children:[(0,a.jsxs)("strong",{children:[h("pricingFormat"),":"]})," ",h("pricingFormatDesc")]}),(0,a.jsx)("p",{children:(0,a.jsxs)("strong",{children:[h("tokenTypes"),":"]})}),(0,a.jsxs)("ul",{className:"list-disc list-inside ml-4 space-y-1",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("input"),":"]})," ",h("inputTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("output"),":"]})," ",h("outputTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("cached"),":"]})," ",h("cachedTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("reasoning"),":"]})," ",h("reasoningTokenDesc")]}),(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:[h("cacheCreation"),":"]})," ",h("cacheCreationTokenDesc")]})]}),(0,a.jsx)("p",{children:h("customPricingNote")})]})]}),(0,a.jsxs)(o.default,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:h("currentPricing")}),(0,a.jsx)("button",{onClick:()=>t(!0),className:"text-primary hover:underline text-sm",children:h("viewFullDetails")})]}),d?(0,a.jsx)("div",{className:"text-center py-4 text-text-muted",children:h("loadingPricing")}):c?(0,a.jsxs)("div",{className:"space-y-3",children:[Object.keys(c).slice(0,5).map(e=>(0,a.jsxs)("div",{className:"text-sm",children:[(0,a.jsxs)("span",{className:"font-semibold",children:[e.toUpperCase(),":"]})," ",(0,a.jsxs)("span",{className:"text-text-muted",children:[Object.keys(c[e]).length," ",h("models")]})]},e)),Object.keys(c).length>5&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["+ ",h("moreProviders",{count:Object.keys(c).length-5})]})]}):(0,a.jsx)("div",{className:"text-text-muted",children:h("noPricing")})]}),e&&(0,a.jsx)(s,{isOpen:e,onClose:()=>t(!1),onSave:()=>{l()}})]})}}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=43265)),_N_E=e.O()}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{2824:(e,t,s)=>{"use strict";s.d(t,{default:()=>k});var a=s(95155),r=s(50910),l=s(12115),n=s(40993);function i(e){let t=e("templatePayloads.simpleChat.system"),s=e("templatePayloads.simpleChat.userGreeting"),a=e("templatePayloads.toolCalling.userWeather"),r=e("templatePayloads.toolCalling.toolDescription"),l=e("templatePayloads.toolCalling.cityNameDescription"),n=e("templatePayloads.multiTurn.system"),i=e("templatePayloads.multiTurn.userInitial"),o=e("templatePayloads.multiTurn.assistantExample"),c=e("templatePayloads.multiTurn.userFollowUp"),d=e("templatePayloads.thinking.question"),m=e("templatePayloads.systemPrompt.systemInstruction"),x=e("templatePayloads.systemPrompt.question"),p=e("templatePayloads.streaming.prompt");return[{id:"simple-chat",name:e("templateNames.simple-chat"),icon:"chat",description:e("templateDescriptions.simple-chat"),formats:{openai:{model:"gpt-4o",messages:[{role:"system",content:t},{role:"user",content:s}],stream:!0},claude:{model:"claude-sonnet-4-20250514",system:t,max_tokens:1024,messages:[{role:"user",content:s}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:s}]}],systemInstruction:{parts:[{text:t}]}},"openai-responses":{model:"gpt-4o",input:s,instructions:t}}},{id:"tool-calling",name:e("templateNames.tool-calling"),icon:"build",description:e("templateDescriptions.tool-calling"),formats:{openai:{model:"gpt-4o",messages:[{role:"user",content:a}],tools:[{type:"function",function:{name:"get_weather",description:r,parameters:{type:"object",properties:{location:{type:"string",description:l},unit:{type:"string",enum:["celsius","fahrenheit"]}},required:["location"]}}}],stream:!0},claude:{model:"claude-sonnet-4-20250514",max_tokens:1024,messages:[{role:"user",content:a}],tools:[{name:"get_weather",description:r,input_schema:{type:"object",properties:{location:{type:"string",description:l},unit:{type:"string",enum:["celsius","fahrenheit"]}},required:["location"]}}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:a}]}],tools:[{functionDeclarations:[{name:"get_weather",description:r,parameters:{type:"object",properties:{location:{type:"string",description:l},unit:{type:"string",enum:["celsius","fahrenheit"]}},required:["location"]}}]}]}}},{id:"multi-turn",name:e("templateNames.multi-turn"),icon:"forum",description:e("templateDescriptions.multi-turn"),formats:{openai:{model:"gpt-4o",messages:[{role:"system",content:n},{role:"user",content:i},{role:"assistant",content:o},{role:"user",content:c}],stream:!0},claude:{model:"claude-sonnet-4-20250514",system:n,max_tokens:1024,messages:[{role:"user",content:i},{role:"assistant",content:o},{role:"user",content:c}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:i}]},{role:"model",parts:[{text:o}]},{role:"user",parts:[{text:c}]}],systemInstruction:{parts:[{text:n}]}}}},{id:"thinking",name:e("templateNames.thinking"),icon:"psychology",description:e("templateDescriptions.thinking"),formats:{openai:{model:"o3-mini",messages:[{role:"user",content:d}],stream:!0},claude:{model:"claude-sonnet-4-20250514",max_tokens:16e3,thinking:{type:"enabled",budget_tokens:1e4},messages:[{role:"user",content:d}],stream:!0},gemini:{model:"gemini-2.5-flash-thinking",contents:[{role:"user",parts:[{text:d}]}],generationConfig:{thinkingConfig:{thinkingBudget:1e4}}}}},{id:"system-prompt",name:e("templateNames.system-prompt"),icon:"settings",description:e("templateDescriptions.system-prompt"),formats:{openai:{model:"gpt-4o",messages:[{role:"system",content:m},{role:"user",content:x}],temperature:.7,stream:!0},claude:{model:"claude-sonnet-4-20250514",system:m,max_tokens:2048,messages:[{role:"user",content:x}],temperature:.7,stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:x}]}],systemInstruction:{parts:[{text:m}]},generationConfig:{temperature:.7}}}},{id:"streaming",name:e("templateNames.streaming"),icon:"stream",description:e("templateDescriptions.streaming"),formats:{openai:{model:"gpt-4o",messages:[{role:"user",content:p}],stream:!0,stream_options:{include_usage:!0}},claude:{model:"claude-sonnet-4-20250514",max_tokens:1024,messages:[{role:"user",content:p}],stream:!0},gemini:{model:"gemini-2.5-flash",contents:[{role:"user",parts:[{text:p}]}]}}}]}let o={openai:{label:"OpenAI",color:"emerald",icon:"smart_toy"},"openai-responses":{label:"OpenAI Responses",color:"amber",icon:"swap_horiz"},claude:{label:"Claude",color:"orange",icon:"psychology"},gemini:{label:"Gemini",color:"blue",icon:"auto_awesome"},antigravity:{label:"Antigravity",color:"purple",icon:"rocket_launch"},kiro:{label:"Kiro",color:"cyan",icon:"terminal"},cursor:{label:"Cursor",color:"pink",icon:"edit"},codex:{label:"Codex",color:"yellow",icon:"code"}},c=Object.entries(o).map(([e,t])=>({value:e,label:t.label}));var d=s(75707),m=s.n(d);let x=m()(()=>s.e(8202).then(s.bind(s,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1});function p(){let e=(0,r.c)("translator"),t=(0,r.c)("common"),[s,d]=(0,l.useState)("claude"),[m,p]=(0,l.useState)("openai"),[u,h]=(0,l.useState)(""),[g,b]=(0,l.useState)(""),[f,j]=(0,l.useState)(null),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)(!1),[k,S]=(0,l.useState)(null),_=(0,l.useMemo)(()=>i(e),[e]),C=(0,l.useCallback)(async e=>{if(!e||e.trim().length<5)return void j(null);try{let t=JSON.parse(e);w(!0);let s=await fetch("/api/translator/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:t})}),a=await s.json();a.success&&(j(a.format),d(a.format))}catch{}finally{w(!1)}},[]);(0,l.useEffect)(()=>{let e=setTimeout(()=>{C(u)},600);return()=>clearTimeout(e)},[u,C]);let O=async()=>{if(u.trim()){v(!0),b("");try{let e=JSON.parse(u),t=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:s,targetFormat:m,body:e})}),a=await t.json();a.success?b(JSON.stringify(a.result,null,2)):b(JSON.stringify({error:a.error},null,2))}catch(e){b(JSON.stringify({error:e.message},null,2))}v(!1)}},T=async e=>{try{await navigator.clipboard.writeText(e)}catch{}},P=o[s]||o.openai,D=o[m]||o.openai;return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("formatConverter")}),(0,a.jsx)("p",{children:e("formatConverterDescription")})]})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col sm:flex-row items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("source")}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] text-${P.color}-500`,children:P.icon}),(0,a.jsx)(n.l6,{value:s,onChange:e=>{d(e.target.value),j(null)},options:c,className:"flex-1"}),f&&(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",icon:"auto_awesome",children:e("auto")})]})]}),(0,a.jsx)("button",{onClick:()=>{d(m),p(s),h(g),b(""),j(null)},className:"p-2 rounded-full hover:bg-primary/10 text-text-muted hover:text-primary transition-all mt-4 sm:mt-5",title:e("swapFormats"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:"swap_horiz"})}),(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("target")}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] text-${D.color}-500`,children:D.icon}),(0,a.jsx)(n.l6,{value:m,onChange:e=>p(e.target.value),options:c,className:"flex-1"})]})]}),(0,a.jsx)("div",{className:"pt-0 sm:pt-5",children:(0,a.jsx)(n.$n,{icon:"arrow_forward",onClick:O,loading:y,disabled:!u.trim()||y,className:"w-full sm:w-auto",children:e("translateAction")})})]})}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"input"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("input")}),f&&(0,a.jsx)(n.Ex,{variant:"info",size:"sm",dot:!0,children:o[f]?.label||f}),N&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted animate-spin",children:"progress_activity"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("button",{onClick:()=>T(u),className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:t("copy"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,a.jsx)("button",{onClick:()=>{h(""),b(""),j(null),S(null)},className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:e("clear"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]}),(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(x,{height:"400px",defaultLanguage:"json",value:u,onChange:e=>h(e||""),theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,formatOnPaste:!0,placeholder:e("inputPlaceholder")}})})]})}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"output"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("output")}),g&&(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:o[m]?.label||m})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:(0,a.jsx)("button",{onClick:()=>T(g),className:"p-1.5 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-text-main transition-colors",title:t("copy"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})})})]}),(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(x,{height:"400px",defaultLanguage:"json",value:g,theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,readOnly:!0}})})]})})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"library_books"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("exampleTemplates")}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:e("exampleTemplatesHint")})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2",children:_.map(e=>(0,a.jsxs)("button",{onClick:()=>{h(JSON.stringify(e.formats[s]||e.formats.openai,null,2)),S(e.id),b("")},className:`
|
|
2
2
|
group flex flex-col items-center gap-1.5 p-3 rounded-lg border transition-all text-center
|
|
3
3
|
${k===e.id?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/30 hover:bg-primary/5 text-text-muted hover:text-text-main"}
|
|
4
|
-
`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] ${k===e.id?"text-primary":"text-text-muted group-hover:text-primary"} transition-colors`,children:e.icon}),(0,a.jsx)("span",{className:"text-xs font-medium leading-tight",children:e.name})]},e.id))}),k&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"}),e("templateLoadHint",{format:o[s]?.label||s})]})]})})]})}var u=s(20909);function h(e="openai"){let t=(0,r.c)("translator"),[s,a]=(0,l.useState)(e),[n,i]=(0,l.useState)([]),[o,c]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{(async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),[r,l]=await Promise.all([e.json(),s.json()]),n=new Map((l.nodes||[]).map(e=>[e.id,e])),o=[...new Set((r.connections||[]).filter(e=>!1!==e.isActive).map(e=>e.provider))].map(e=>{let s=u.Q2[e],a=n.get(e),r=s?.name||a?.name||e;return!s&&e.startsWith(u.JH)&&(r=a?.name||t("openaiCompatibleLabel")),!s&&e.startsWith(u.DI)&&(r=a?.name||t("anthropicCompatibleLabel")),{value:e,label:r}}).sort((e,t)=>e.label.localeCompare(t.label)),c=o.length>0?o:Object.entries(u.Q2).map(([e,t])=>({value:e,label:t.name}));i(c),c.length>0&&a(e=>c.some(t=>t.value===e)?e:c[0].value)}catch{let e=Object.entries(u.Q2).map(([e,t])=>({value:e,label:t.name}));i(e),e.length>0&&a(t=>e.some(e=>e.value===t)?t:e[0].value)}finally{c(!1)}})()},[t]),{provider:s,setProvider:a,providerOptions:n,loading:o}}let g={openai:["gpt-","o1-","o3-","o4-"],"openai-responses":["gpt-","o1-","o3-","o4-"],claude:["claude-"],gemini:["gemini-"]};function b(){let[e,t]=(0,l.useState)(""),[s,a]=(0,l.useState)([]),[r,n]=(0,l.useState)(!0);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/v1/models"),t=((await e.json()).data||[]).map(e=>e.id).sort((e,t)=>e.localeCompare(t));a(t)}catch{a([])}finally{n(!1)}})()},[]);let i=(0,l.useCallback)(e=>{if(0===s.length)return"";for(let t of g[e]||[]){let e=s.find(e=>e.startsWith(t));if(e)return e}return s[0]},[s]);return{model:e,setModel:t,availableModels:s,loading:r,pickModelForFormat:i}}let f=m()(()=>s.e(8202).then(s.bind(s,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1});function j(){let e=(0,r.c)("translator"),{provider:t,setProvider:s,providerOptions:i}=h("openai"),{model:d,setModel:m,availableModels:x,pickModelForFormat:p}=b(),[u,g]=(0,l.useState)("openai"),[j,y]=(0,l.useState)(""),[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)([]),[S,_]=(0,l.useState)(null),[C,O]=(0,l.useState)(null),T=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=p(u);e&&m(e)},[u,p,m]);let P=()=>{T.current?.scrollIntoView({behavior:"smooth"})},D=async()=>{if(!j.trim()||v)return;let s=j.trim();y(""),N(!0),k(e=>[...e,{role:"user",content:s}]);let a=[];try{let r,l=[...w.map(e=>({role:e.role,content:e.content})),{role:"user",content:s}];r="claude"===u?{model:d,max_tokens:1024,messages:l,stream:!0}:"gemini"===u?{model:d,contents:l.map(e=>({role:"assistant"===e.role?"model":"user",parts:[{text:e.content}]}))}:"openai-responses"===u?{model:d,input:l.map(e=>({type:"message",role:e.role,content:[{type:"input_text",text:e.content}]})),stream:!0}:{model:d,messages:l,stream:!0},a.push({id:1,name:e("clientRequest"),description:e("clientRequestDescription"),format:u,content:JSON.stringify(r,null,2),status:"done"});let n=await fetch("/api/translator/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:r})}),i=(await n.json()).format||u;a.push({id:2,name:e("formatDetected"),description:e("formatDetectedDescription"),format:i,content:JSON.stringify({detectedFormat:i,clientFormat:u,match:i===u},null,2),status:"done"});let o=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:i,targetFormat:"openai",body:r})}),c=await o.json();a.push({id:3,name:e("openaiIntermediate"),description:e("openaiIntermediateDescription"),format:"openai",content:JSON.stringify(c.result||c,null,2),status:c.success?"done":"error"});let m=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:"openai",provider:t,body:c.result})}),x=await m.json(),p=x.targetFormat||"openai";a.push({id:4,name:e("providerFormat"),description:e("providerFormatDescription"),format:p,content:JSON.stringify(x.result||x,null,2),status:x.success?"done":"error"});let h=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,body:x.result||c.result})});if(h.ok){let t=h.body.getReader(),s=new TextDecoder,r="";for(;;){let{done:e,value:a}=await t.read();if(e)break;r+=s.decode(a,{stream:!0})}a.push({id:5,name:e("providerResponse"),description:e("providerResponseSseDescription"),format:p,content:r.slice(0,5e3)+(r.length>5e3?"\n... (truncated)":""),status:"done"});let l=function(e){let t="";for(let s of e.split("\n")){if(!s.startsWith("data: "))continue;let e=s.slice(6).trim();if("[DONE]"===e)break;try{let s=JSON.parse(e),a=s.choices?.[0]?.delta;a?.content&&(t+=a.content),"content_block_delta"===s.type&&s.delta?.text&&(t+=s.delta.text)}catch{}}return t||e.slice(0,500)}(r);k(t=>[...t,{role:"assistant",content:l||e("noTextExtracted")}])}else{let t=await h.json().catch(()=>({error:e("requestFailed")}));a.push({id:5,name:e("providerResponse"),description:e("providerResponseRawDescription"),format:p,content:JSON.stringify(t,null,2),status:"error"}),k(s=>[...s,{role:"assistant",content:e("errorMessage",{message:t.error||e("requestFailed")})}])}}catch(t){a.push({id:a.length+1,name:e("error"),description:e("unexpectedError"),format:"error",content:JSON.stringify({error:t.message},null,2),status:"error"}),k(s=>[...s,{role:"assistant",content:e("errorMessage",{message:t.message})}])}_(a),O(a.length>0?a[a.length-1].id:null),N(!1),setTimeout(P,100)};return(0,a.jsxs)("div",{className:"space-y-4 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("pipelineDebugger")}),(0,a.jsx)("p",{children:e("chatTesterDescription")}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{className:"text-text-main",children:e("chatTesterFlow")}),"."," ",e("clickStepToInspect")]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 min-w-0",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:e("clientFormat")}),(0,a.jsx)(n.l6,{value:u,onChange:e=>g(e.target.value),options:c.filter(e=>["openai","claude","gemini","openai-responses"].includes(e.value))})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:e("provider")}),(0,a.jsx)(n.l6,{value:t,onChange:e=>s(e.target.value),options:i})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:e("model")}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"text",value:d,onChange:e=>m(e.target.value),list:"model-suggestions",placeholder:e("modelPlaceholder"),className:"w-full bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors"}),(0,a.jsx)("datalist",{id:"model-suggestions",children:x.map(e=>(0,a.jsx)("option",{value:e},e))})]})]})]})}),(0,a.jsxs)(n.Zp,{className:"min-h-[400px] flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 flex-1 overflow-y-auto max-h-[500px] space-y-3",children:[0===w.length&&(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-text-muted py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"chat"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("sendMessageToSeePipeline")}),(0,a.jsxs)("p",{className:"text-xs text-center max-w-xs",children:[e("chatMessageHintPrefix")," ",(0,a.jsx)("strong",{children:o[u]?.label})," ",e("chatMessageHintSuffix")]})]}),w.map((t,s)=>(0,a.jsx)("div",{className:`flex ${"user"===t.role?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[85%] rounded-lg px-3 py-2 text-sm ${"user"===t.role?"bg-primary/10 text-text-main border border-primary/20":"bg-bg-subtle text-text-main border border-border"}`,children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-text-muted mb-1 uppercase",children:"user"===t.role?e("youWithFormat",{format:o[u]?.label}):e("assistant")}),(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.content})]})},s)),(0,a.jsx)("div",{ref:T})]}),(0,a.jsx)("div",{className:"p-3 border-t border-border",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&D(),placeholder:e("typeMessage"),className:"flex-1 bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors",disabled:v}),(0,a.jsx)(n.$n,{icon:"send",onClick:D,loading:v,disabled:!j.trim()||v,children:e("send")})]})})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"account_tree"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("translationPipeline")})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e("clickStepToInspect")})]})}),S?(0,a.jsx)("div",{className:"space-y-2",children:S.map((e,t)=>{let s=o[e.format]||{label:e.format,color:"gray",icon:"code"},r=C===e.id;return(0,a.jsxs)("div",{children:[t>0&&(0,a.jsx)("div",{className:"flex justify-center py-1",children:(0,a.jsx)("div",{className:"w-px h-4 bg-border"})}),(0,a.jsxs)(n.Zp,{className:"error"===e.status?"border-red-500/30":r?"border-primary/30":"",children:[(0,a.jsxs)("button",{onClick:()=>O(r?null:e.id),className:"w-full p-3 flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold ${"error"===e.status?"bg-red-500/10 text-red-500":"done"===e.status?`bg-${s.color}-500/10 text-${s.color}-500`:"bg-bg-subtle text-text-muted"}`,children:"error"===e.status?"!":e.id}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:e.name}),e.description&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted truncate",children:e.description})]}),(0,a.jsx)(n.Ex,{variant:"error"===e.status?"error":"default",size:"sm",children:s.label}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:r?"expand_less":"expand_more"})]}),r&&(0,a.jsx)("div",{className:"px-3 pb-3",children:(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(f,{height:"250px",defaultLanguage:"json",value:e.content,theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:11,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,readOnly:!0}})})})]})]},e.id)})}):(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"account_tree"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("pipelineVisualization")}),(0,a.jsx)("p",{className:"text-xs text-center max-w-xs",children:e("pipelineVisualizationHint")})]})})]})]})]})}let y=[{id:"simple-chat",icon:"chat",templateId:"simple-chat"},{id:"tool-calling",icon:"build",templateId:"tool-calling"},{id:"multi-turn",icon:"forum",templateId:"multi-turn"},{id:"thinking",icon:"psychology",templateId:"thinking"},{id:"system-prompt",icon:"settings",templateId:"system-prompt"},{id:"streaming",icon:"stream",templateId:"streaming"}];function v(){let e=(0,r.c)("translator"),t={"simple-chat":e("scenarioSimpleChat"),"tool-calling":e("scenarioToolCalling"),"multi-turn":e("scenarioMultiTurn"),thinking:e("scenarioThinking"),"system-prompt":e("scenarioSystemPrompt"),streaming:e("scenarioStreaming")},s=(0,l.useMemo)(()=>i(e),[e]),[d,m]=(0,l.useState)("claude"),{provider:x,setProvider:p,providerOptions:u}=h("openai"),{model:g,setModel:f,availableModels:j,pickModelForFormat:v}=b(),[N,w]=(0,l.useState)({}),[k,S]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=v(d);e&&f(e)},[d,v,f]);let _=async t=>{w(e=>({...e,[t.id]:{status:"running"}}));let a=Date.now();try{let r=s.find(e=>e.id===t.templateId),l=r?.formats[d]||r?.formats.openai;if(!l)return void w(s=>({...s,[t.id]:{status:"error",error:e("noTemplateForFormat"),latency:0}}));let n={...l,model:g};l.contents&&(n.model=g);let i=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:d,provider:x,body:n})}),o=await i.json();if(!o.success)return void w(s=>({...s,[t.id]:{status:"error",error:e("translationFailed",{error:o.error}),latency:Date.now()-a}}));let c=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:x,body:o.result})}),m=Date.now()-a;if(!c.ok){let s=await c.json().catch(()=>({}));w(a=>({...a,[t.id]:{status:"error",error:s.error||e("errorMessage",{message:`HTTP ${c.status}`}),latency:m,httpStatus:c.status}}));return}let p=c.body.getReader(),u=0;for(;;){let{done:e}=await p.read();if(e)break;u++}w(e=>({...e,[t.id]:{status:"pass",latency:Date.now()-a,chunks:u}}))}catch(e){w(s=>({...s,[t.id]:{status:"error",error:e.message,latency:Date.now()-a}}))}},C=async()=>{for(let e of(S(!0),w({}),y))await _(e);S(!1)},O=Object.values(N).filter(e=>"pass"===e.status).length,T=Object.values(N).filter(e=>"error"===e.status).length,P=O+T,D=P>0?Math.round(O/P*100):0,E=o[d]||o.openai;return(0,a.jsxs)("div",{className:"space-y-5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("compatibilityTester")}),(0,a.jsx)("p",{children:e("testBenchDescription")})]})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-end gap-4 min-w-0",children:[(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("source")}),(0,a.jsx)(n.l6,{value:d,onChange:e=>{m(e.target.value),w({})},options:c.filter(e=>["openai","claude","gemini","openai-responses"].includes(e.value))})]}),(0,a.jsx)("div",{className:"flex items-center justify-center px-2",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px] text-text-muted",children:"arrow_forward"})}),(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("targetProvider")}),(0,a.jsx)(n.l6,{value:x,onChange:e=>{p(e.target.value),w({})},options:u})]}),(0,a.jsx)(n.$n,{icon:"play_arrow",onClick:C,loading:k,disabled:k,className:"w-full sm:w-auto",children:e("runAllTests")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("model")}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"text",value:g,onChange:e=>f(e.target.value),list:"testbench-model-suggestions",placeholder:e("modelPlaceholder"),className:"w-full bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors"}),(0,a.jsx)("datalist",{id:"testbench-model-suggestions",children:j.map(e=>(0,a.jsx)("option",{value:e},e))})]})]})]})}),P>0&&(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("compatibilityReport")}),(0,a.jsxs)(n.Ex,{variant:D>=80?"success":D>=50?"warning":"error",size:"lg",children:[D,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",O," ",e("passed")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",T," ",e("failed")]})]})]}),(0,a.jsx)("div",{className:"w-full h-2 bg-bg-subtle rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-green-500 to-emerald-400 rounded-full transition-all duration-500",style:{width:`${D}%`}})})]})}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:y.map(s=>{let r=N[s.id],l=r?.status==="running";return(0,a.jsx)(n.Zp,{className:`transition-all ${r?.status==="pass"?"border-green-500/30":r?.status==="error"?"border-red-500/30":""}`,children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-9 h-9 rounded-lg ${r?.status==="pass"?"bg-green-500/10 text-green-500":r?.status==="error"?"bg-red-500/10 text-red-500":"bg-bg-subtle text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:l?"progress_activity":r?.status==="pass"?"check_circle":r?.status==="error"?"error":s.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:t[s.id]||s.id}),(0,a.jsxs)("p",{className:"text-[10px] text-text-muted uppercase",children:[E.label," →"," ",u.find(e=>e.value===x)?.label||x]})]})]})}),r&&"running"!==r.status&&(0,a.jsx)("div",{className:`rounded-lg p-2 text-xs ${"pass"===r.status?"bg-green-500/5 text-green-600 dark:text-green-400":"bg-red-500/5 text-red-600 dark:text-red-400"}`,children:"pass"===r.status?(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{children:e("passedIconLabel")}),(0,a.jsxs)("span",{className:"text-text-muted",children:[r.latency,"ms • ",r.chunks," ",e("chunks")]})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["❌ ",r.error]}),(0,a.jsxs)("p",{className:"text-text-muted mt-0.5",children:[r.latency,"ms"]})]})}),(0,a.jsx)(n.$n,{size:"sm",variant:r?.status==="pass"?"ghost":"outline",icon:l?"progress_activity":"play_arrow",onClick:()=>_(s),disabled:l||k,className:"w-full",children:l?e("running"):r?e("reRun"):e("runTest")})]})},s.id)})})]})}function N(){let e=(0,r.c)("translator"),t=(0,r.c)("common"),[s,i]=(0,l.useState)([]),[c,d]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!0),p=(0,l.useRef)(null),u=e("notAvailableSymbol"),h=t=>e("millisecondsShort",{value:t}),g=async()=>{try{let e=await fetch("/api/translator/history?limit=50");if(e.ok){let t=await e.json();i(t.events||[])}}catch{}finally{d(!1)}};(0,l.useEffect)(()=>(g(),m&&(p.current=setInterval(g,3e3)),()=>{p.current&&clearInterval(p.current)}),[m]);let b=s.filter(e=>"success"===e.status).length,f=s.filter(e=>"error"===e.status).length,j=s.length>0?Math.round(s.reduce((e,t)=>e+(t.latency||0),0)/s.length):0;return(0,a.jsxs)("div",{className:"space-y-5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0","aria-hidden":"true",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("realtime")}),(0,a.jsxs)("p",{children:[e("liveMonitorDescriptionPrefix")," ",(0,a.jsx)("strong",{className:"text-text-main",children:e("chatTester")}),","," ",(0,a.jsx)("strong",{className:"text-text-main",children:e("testBench")}),e("liveMonitorDescriptionSuffix")]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[(0,a.jsx)(w,{icon:"translate",label:e("totalTranslations"),value:s.length,color:"blue"}),(0,a.jsx)(w,{icon:"check_circle",label:e("successful"),value:b,color:"green"}),(0,a.jsx)(w,{icon:"error",label:e("errors"),value:f,color:"red"}),(0,a.jsx)(w,{icon:"speed",label:e("avgLatency"),value:h(j),color:"purple"})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-3 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${m?"text-green-500 animate-pulse":"text-text-muted"}`,"aria-hidden":"true",children:m?"radio_button_checked":"radio_button_unchecked"}),(0,a.jsx)("button",{onClick:()=>x(!m),className:"text-sm text-text-main hover:text-primary transition-colors",children:m?e("liveAutoRefreshing"):e("paused")})]}),(0,a.jsxs)("button",{onClick:g,className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"refresh"}),t("refresh")]})]})}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main mb-3",children:e("recentTranslations")}),c?(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","aria-hidden":"true",children:"progress_activity"}),t("loading")]}):0===s.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30","aria-hidden":"true",children:"monitoring"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("noTranslations")}),(0,a.jsx)("p",{className:"text-xs text-center max-w-sm",children:e("eventsAppearHint")}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 mt-3 text-xs",children:[(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("chatTesterTab")}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("testBenchTab")}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("externalApiCalls")}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("ideCliIntegrations")})]}),(0,a.jsx)("p",{className:"text-[10px] mt-3 text-text-muted/70",children:e("inMemoryNote")})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("time")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("source")}),(0,a.jsx)("th",{className:"pb-2 pr-4"}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("target")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("model")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("status")}),(0,a.jsx)("th",{className:"pb-2 text-right",children:e("latency")})]})}),(0,a.jsx)("tbody",{children:s.map((t,s)=>{let r=o[t.sourceFormat]||{label:t.sourceFormat||"?",color:"gray"},l=o[t.targetFormat]||{label:t.targetFormat||"?",color:"gray"};return(0,a.jsxs)("tr",{className:"border-b border-border/50 hover:bg-bg-subtle/50 transition-colors",children:[(0,a.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted whitespace-nowrap",children:t.timestamp?new Date(t.timestamp).toLocaleTimeString():u}),(0,a.jsx)("td",{className:"py-2 pr-4",children:(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:r.label})}),(0,a.jsx)("td",{className:"py-2 pr-4 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"arrow_forward"})}),(0,a.jsx)("td",{className:"py-2 pr-4",children:(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",children:l.label})}),(0,a.jsx)("td",{className:"py-2 pr-4 text-xs font-mono text-text-muted break-all",children:t.model||u}),(0,a.jsx)("td",{className:"py-2 pr-4",children:"success"===t.status?(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:e("ok")}):(0,a.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:t.statusCode||e("errorShort")})}),(0,a.jsx)("td",{className:"py-2 text-right text-xs text-text-muted",children:t.latency?h(t.latency):u})]},t.id||s)})})]})})]})})]})}function w({icon:e,label:t,value:s,color:r}){return(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-10 h-10 rounded-lg bg-${r}-500/10`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] text-${r}-500`,"aria-hidden":"true",children:e})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-lg font-bold text-text-main",children:s}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:t})]})]})})}function k(){let e=(0,r.c)("translator"),[t,s]=(0,l.useState)("playground"),i=[{value:"playground",label:e("playground"),icon:"code"},{value:"chat-tester",label:e("chatTester"),icon:"chat"},{value:"test-bench",label:e("testBench"),icon:"science"},{value:"live-monitor",label:e("liveMonitor"),icon:"monitoring"}],o={playground:e("modeDescriptionPlayground"),"chat-tester":e("modeDescriptionChatTester"),"test-bench":e("modeDescriptionTestBench"),"live-monitor":e("modeDescriptionLiveMonitor")};return(0,a.jsxs)("div",{className:"p-4 sm:p-8 space-y-6 min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 min-w-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[28px]",children:"translate"}),e("playgroundTitle")]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:o[t]||e("modeDescriptionFallback")})]}),(0,a.jsx)("div",{className:"w-full sm:w-auto overflow-x-auto",children:(0,a.jsx)(n.Iz,{options:i,value:t,onChange:s,size:"md",className:"min-w-max"})})]}),"playground"===t&&(0,a.jsx)(p,{}),"chat-tester"===t&&(0,a.jsx)(j,{}),"test-bench"===t&&(0,a.jsx)(v,{}),"live-monitor"===t&&(0,a.jsx)(N,{})]})}},5214:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=s(17828)},17828:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,s(64054).createAsyncLocalStorage)()},21957:(e,t,s)=>{"use strict";function a({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return a}}),s(95155),s(47650),s(5214),s(2451),s(53887)},34671:(e,t,s)=>{Promise.resolve().then(s.bind(s,2824))},41112:(e,t,s)=>{"use strict";function a({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}}),s(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return i},createSnapshot:function(){return c}};for(var a in s)Object.defineProperty(t,a,{enumerable:!0,get:s[a]});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class l{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let n="u">typeof globalThis&&globalThis.AsyncLocalStorage;function i(){return n?new n:new l}function o(e){return n?n.bind(e):l.bind(e)}function c(){return n?n.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=s(95155),r=s(12115),l=s(41112);function n(e){return{default:e&&"default"in e?e.default:e}}s(21957);let i={loader:()=>Promise.resolve(n(()=>null)),loading:null,ssr:!0},o=function(e){let t={...i,...e},s=(0,r.lazy)(()=>t.loader().then(n)),o=t.loading;function c(e){let n=o?(0,a.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?r.Suspense:r.Fragment,d=t.ssr?(0,a.jsxs)(a.Fragment,{children:[null,(0,a.jsx)(s,{...e})]}):(0,a.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(s,{...e})});return(0,a.jsx)(c,{...i?{fallback:n}:{},children:d})}return c.displayName="LoadableComponent",c}},75707:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}});let a=s(73623)._(s(68635));function r(e,t){let s={};"function"==typeof e&&(s.loader=e);let r={...s,...t};return(0,a.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=34671)),_N_E=e.O()}]);
|
|
4
|
+
`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] ${k===e.id?"text-primary":"text-text-muted group-hover:text-primary"} transition-colors`,children:e.icon}),(0,a.jsx)("span",{className:"text-xs font-medium leading-tight",children:e.name})]},e.id))}),k&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"info"}),e("templateLoadHint",{format:o[s]?.label||s})]})]})})]})}var u=s(20909);function h(e="openai"){let t=(0,r.c)("translator"),[s,a]=(0,l.useState)(e),[n,i]=(0,l.useState)([]),[o,c]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{(async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),[r,l]=await Promise.all([e.json(),s.json()]),n=new Map((l.nodes||[]).map(e=>[e.id,e])),o=[...new Set((r.connections||[]).filter(e=>!1!==e.isActive).map(e=>e.provider))].map(e=>{let s=u.Q2[e],a=n.get(e),r=s?.name||a?.name||e;return!s&&e.startsWith(u.JH)&&(r=a?.name||t("openaiCompatibleLabel")),!s&&e.startsWith(u.DI)&&(r=a?.name||t("anthropicCompatibleLabel")),{value:e,label:r}}).sort((e,t)=>e.label.localeCompare(t.label)),c=o.length>0?o:Object.entries(u.Q2).map(([e,t])=>({value:e,label:t.name}));i(c),c.length>0&&a(e=>c.some(t=>t.value===e)?e:c[0].value)}catch{let e=Object.entries(u.Q2).map(([e,t])=>({value:e,label:t.name}));i(e),e.length>0&&a(t=>e.some(e=>e.value===t)?t:e[0].value)}finally{c(!1)}})()},[t]),{provider:s,setProvider:a,providerOptions:n,loading:o}}let g={openai:["gpt-","o1-","o3-","o4-"],"openai-responses":["gpt-","o1-","o3-","o4-"],claude:["claude-"],gemini:["gemini-"]};function b(){let[e,t]=(0,l.useState)(""),[s,a]=(0,l.useState)([]),[r,n]=(0,l.useState)(!0);(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/v1/models"),t=((await e.json()).data||[]).map(e=>e.id).sort((e,t)=>e.localeCompare(t));a(t)}catch{a([])}finally{n(!1)}})()},[]);let i=(0,l.useCallback)(e=>{if(0===s.length)return"";for(let t of g[e]||[]){let e=s.find(e=>e.startsWith(t));if(e)return e}return s[0]},[s]);return{model:e,setModel:t,availableModels:s,loading:r,pickModelForFormat:i}}let f=m()(()=>s.e(8202).then(s.bind(s,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1});function j(){let e=(0,r.c)("translator"),{provider:t,setProvider:s,providerOptions:i}=h("openai"),{model:d,setModel:m,availableModels:x,pickModelForFormat:p}=b(),[u,g]=(0,l.useState)("openai"),[j,y]=(0,l.useState)(""),[v,N]=(0,l.useState)(!1),[w,k]=(0,l.useState)([]),[S,_]=(0,l.useState)(null),[C,O]=(0,l.useState)(null),T=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=p(u);e&&m(e)},[u,p,m]);let P=()=>{T.current?.scrollIntoView({behavior:"smooth"})},D=async()=>{if(!j.trim()||v)return;let s=j.trim();y(""),N(!0),k(e=>[...e,{role:"user",content:s}]);let a=[];try{let r,l=[...w.map(e=>({role:e.role,content:e.content})),{role:"user",content:s}];r="claude"===u?{model:d,max_tokens:1024,messages:l,stream:!0}:"gemini"===u?{model:d,contents:l.map(e=>({role:"assistant"===e.role?"model":"user",parts:[{text:e.content}]}))}:"openai-responses"===u?{model:d,input:l.map(e=>({type:"message",role:e.role,content:[{type:"input_text",text:e.content}]})),stream:!0}:{model:d,messages:l,stream:!0},a.push({id:1,name:e("clientRequest"),description:e("clientRequestDescription"),format:u,content:JSON.stringify(r,null,2),status:"done"});let n=await fetch("/api/translator/detect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:r})}),i=(await n.json()).format||u;a.push({id:2,name:e("formatDetected"),description:e("formatDetectedDescription"),format:i,content:JSON.stringify({detectedFormat:i,clientFormat:u,match:i===u},null,2),status:"done"});let o=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:i,targetFormat:"openai",body:r})}),c=await o.json();a.push({id:3,name:e("openaiIntermediate"),description:e("openaiIntermediateDescription"),format:"openai",content:JSON.stringify(c.result||c,null,2),status:c.success?"done":"error"});let m=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:"openai",provider:t,body:c.result})}),x=await m.json(),p=x.targetFormat||"openai";a.push({id:4,name:e("providerFormat"),description:e("providerFormatDescription"),format:p,content:JSON.stringify(x.result||x,null,2),status:x.success?"done":"error"});let h=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,body:x.result||c.result})});if(h.ok){let t=h.body.getReader(),s=new TextDecoder,r="";for(;;){let{done:e,value:a}=await t.read();if(e)break;r+=s.decode(a,{stream:!0})}a.push({id:5,name:e("providerResponse"),description:e("providerResponseSseDescription"),format:p,content:r.slice(0,5e3)+(r.length>5e3?"\n... (truncated)":""),status:"done"});let l=function(e){let t="";for(let s of e.split("\n")){if(!s.startsWith("data: "))continue;let e=s.slice(6).trim();if("[DONE]"===e)break;try{let s=JSON.parse(e),a=s.choices?.[0]?.delta;a?.content&&(t+=a.content),"content_block_delta"===s.type&&s.delta?.text&&(t+=s.delta.text)}catch{}}return t||e.slice(0,500)}(r);k(t=>[...t,{role:"assistant",content:l||e("noTextExtracted")}])}else{let t=await h.json().catch(()=>({error:e("requestFailed")}));a.push({id:5,name:e("providerResponse"),description:e("providerResponseRawDescription"),format:p,content:JSON.stringify(t,null,2),status:"error"}),k(s=>[...s,{role:"assistant",content:e("errorMessage",{message:t.error||e("requestFailed")})}])}}catch(t){a.push({id:a.length+1,name:e("error"),description:e("unexpectedError"),format:"error",content:JSON.stringify({error:t.message},null,2),status:"error"}),k(s=>[...s,{role:"assistant",content:e("errorMessage",{message:t.message})}])}_(a),O(a.length>0?a[a.length-1].id:null),N(!1),setTimeout(P,100)};return(0,a.jsxs)("div",{className:"space-y-4 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("pipelineDebugger")}),(0,a.jsx)("p",{children:e("chatTesterDescription")}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{className:"text-text-main",children:e("chatTesterFlow")}),"."," ",e("clickStepToInspect")]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 min-w-0",children:[(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:e("clientFormat")}),(0,a.jsx)(n.l6,{value:u,onChange:e=>g(e.target.value),options:c.filter(e=>["openai","claude","gemini","openai-responses"].includes(e.value))})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:e("provider")}),(0,a.jsx)(n.l6,{value:t,onChange:e=>s(e.target.value),options:i})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1 uppercase tracking-wider",children:e("model")}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"text",value:d,onChange:e=>m(e.target.value),list:"model-suggestions",placeholder:e("modelPlaceholder"),className:"w-full bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors"}),(0,a.jsx)("datalist",{id:"model-suggestions",children:x.map(e=>(0,a.jsx)("option",{value:e},e))})]})]})]})}),(0,a.jsxs)(n.Zp,{className:"min-h-[400px] flex flex-col",children:[(0,a.jsxs)("div",{className:"p-4 flex-1 overflow-y-auto max-h-[500px] space-y-3",children:[0===w.length&&(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-text-muted py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"chat"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("sendMessageToSeePipeline")}),(0,a.jsxs)("p",{className:"text-xs text-center max-w-xs",children:[e("chatMessageHintPrefix")," ",(0,a.jsx)("strong",{children:o[u]?.label})," ",e("chatMessageHintSuffix")]})]}),w.map((t,s)=>(0,a.jsx)("div",{className:`flex ${"user"===t.role?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[85%] rounded-lg px-3 py-2 text-sm ${"user"===t.role?"bg-primary/10 text-text-main border border-primary/20":"bg-bg-subtle text-text-main border border-border"}`,children:[(0,a.jsx)("p",{className:"text-[10px] font-semibold text-text-muted mb-1 uppercase",children:"user"===t.role?e("youWithFormat",{format:o[u]?.label}):e("assistant")}),(0,a.jsx)("p",{className:"whitespace-pre-wrap break-words",children:t.content})]})},s)),(0,a.jsx)("div",{ref:T})]}),(0,a.jsx)("div",{className:"p-3 border-t border-border",children:(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:j,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&D(),placeholder:e("typeMessage"),className:"flex-1 bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors",disabled:v}),(0,a.jsx)(n.$n,{icon:"send",onClick:D,loading:v,disabled:!j.trim()||v,children:e("send")})]})})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 space-y-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"account_tree"}),(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("translationPipeline")})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e("clickStepToInspect")})]})}),S?(0,a.jsx)("div",{className:"space-y-2",children:S.map((e,t)=>{let s=o[e.format]||{label:e.format,color:"gray",icon:"code"},r=C===e.id;return(0,a.jsxs)("div",{children:[t>0&&(0,a.jsx)("div",{className:"flex justify-center py-1",children:(0,a.jsx)("div",{className:"w-px h-4 bg-border"})}),(0,a.jsxs)(n.Zp,{className:"error"===e.status?"border-red-500/30":r?"border-primary/30":"",children:[(0,a.jsxs)("button",{onClick:()=>O(r?null:e.id),className:"w-full p-3 flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-7 h-7 rounded-full text-xs font-bold ${"error"===e.status?"bg-red-500/10 text-red-500":"done"===e.status?`bg-${s.color}-500/10 text-${s.color}-500`:"bg-bg-subtle text-text-muted"}`,children:"error"===e.status?"!":e.id}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:e.name}),e.description&&(0,a.jsx)("p",{className:"text-[10px] text-text-muted truncate",children:e.description})]}),(0,a.jsx)(n.Ex,{variant:"error"===e.status?"error":"default",size:"sm",children:s.label}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:r?"expand_less":"expand_more"})]}),r&&(0,a.jsx)("div",{className:"px-3 pb-3",children:(0,a.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,a.jsx)(f,{height:"250px",defaultLanguage:"json",value:e.content,theme:"vs-dark",options:{minimap:{enabled:!1},fontSize:11,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0,readOnly:!0}})})})]})]},e.id)})}):(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-8 flex flex-col items-center justify-center text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30",children:"account_tree"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("pipelineVisualization")}),(0,a.jsx)("p",{className:"text-xs text-center max-w-xs",children:e("pipelineVisualizationHint")})]})})]})]})]})}let y=[{id:"simple-chat",icon:"chat",templateId:"simple-chat"},{id:"tool-calling",icon:"build",templateId:"tool-calling"},{id:"multi-turn",icon:"forum",templateId:"multi-turn"},{id:"thinking",icon:"psychology",templateId:"thinking"},{id:"system-prompt",icon:"settings",templateId:"system-prompt"},{id:"streaming",icon:"stream",templateId:"streaming"}];function v(){let e=(0,r.c)("translator"),t={"simple-chat":e("scenarioSimpleChat"),"tool-calling":e("scenarioToolCalling"),"multi-turn":e("scenarioMultiTurn"),thinking:e("scenarioThinking"),"system-prompt":e("scenarioSystemPrompt"),streaming:e("scenarioStreaming")},s=(0,l.useMemo)(()=>i(e),[e]),[d,m]=(0,l.useState)("claude"),{provider:x,setProvider:p,providerOptions:u}=h("openai"),{model:g,setModel:f,availableModels:j,pickModelForFormat:v}=b(),[N,w]=(0,l.useState)({}),[k,S]=(0,l.useState)(!1);(0,l.useEffect)(()=>{let e=v(d);e&&f(e)},[d,v,f]);let _=async t=>{w(e=>({...e,[t.id]:{status:"running"}}));let a=Date.now();try{let r=s.find(e=>e.id===t.templateId),l=r?.formats[d]||r?.formats.openai;if(!l)return void w(s=>({...s,[t.id]:{status:"error",error:e("noTemplateForFormat"),latency:0}}));let n={...l,model:g};l.contents&&(n.model=g);let i=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:"direct",sourceFormat:d,provider:x,body:n})}),o=await i.json();if(!o.success)return void w(s=>({...s,[t.id]:{status:"error",error:e("translationFailed",{error:o.error}),latency:Date.now()-a}}));let c=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:x,body:o.result})}),m=Date.now()-a;if(!c.ok){let s=await c.json().catch(()=>({}));w(a=>({...a,[t.id]:{status:"error",error:s.error||e("errorMessage",{message:`HTTP ${c.status}`}),latency:m,httpStatus:c.status}}));return}let p=c.body.getReader(),u=0;for(;;){let{done:e}=await p.read();if(e)break;u++}w(e=>({...e,[t.id]:{status:"pass",latency:Date.now()-a,chunks:u}}))}catch(e){w(s=>({...s,[t.id]:{status:"error",error:e.message,latency:Date.now()-a}}))}},C=async()=>{for(let e of(S(!0),w({}),y))await _(e);S(!1)},O=Object.values(N).filter(e=>"pass"===e.status).length,T=Object.values(N).filter(e=>"error"===e.status).length,P=O+T,D=P>0?Math.round(O/P*100):0,E=o[d]||o.openai;return(0,a.jsxs)("div",{className:"space-y-5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("compatibilityTester")}),(0,a.jsx)("p",{children:e("testBenchDescription")})]})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-end gap-4 min-w-0",children:[(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("source")}),(0,a.jsx)(n.l6,{value:d,onChange:e=>{m(e.target.value),w({})},options:c.filter(e=>["openai","claude","gemini","openai-responses"].includes(e.value))})]}),(0,a.jsx)("div",{className:"flex items-center justify-center px-2",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px] text-text-muted",children:"arrow_forward"})}),(0,a.jsxs)("div",{className:"flex-1 w-full",children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("targetProvider")}),(0,a.jsx)(n.l6,{value:x,onChange:e=>{p(e.target.value),w({})},options:u})]}),(0,a.jsx)(n.$n,{icon:"play_arrow",onClick:C,loading:k,disabled:k,className:"w-full sm:w-auto",children:e("runAllTests")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-text-muted mb-1.5 uppercase tracking-wider",children:e("model")}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{type:"text",value:g,onChange:e=>f(e.target.value),list:"testbench-model-suggestions",placeholder:e("modelPlaceholder"),className:"w-full bg-bg-subtle border border-border rounded-lg px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:outline-none focus:border-primary transition-colors"}),(0,a.jsx)("datalist",{id:"testbench-model-suggestions",children:j.map(e=>(0,a.jsx)("option",{value:e},e))})]})]})]})}),P>0&&(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:e("compatibilityReport")}),(0,a.jsxs)(n.Ex,{variant:D>=80?"success":D>=50?"warning":"error",size:"lg",children:[D,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",O," ",e("passed")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",T," ",e("failed")]})]})]}),(0,a.jsx)("div",{className:"w-full h-2 bg-bg-subtle rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-gradient-to-r from-green-500 to-emerald-400 rounded-full transition-all duration-500",style:{width:`${D}%`}})})]})}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:y.map(s=>{let r=N[s.id],l=r?.status==="running";return(0,a.jsx)(n.Zp,{className:`transition-all ${r?.status==="pass"?"border-green-500/30":r?.status==="error"?"border-red-500/30":""}`,children:(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-9 h-9 rounded-lg ${r?.status==="pass"?"bg-green-500/10 text-green-500":r?.status==="error"?"bg-red-500/10 text-red-500":"bg-bg-subtle text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:l?"progress_activity":r?.status==="pass"?"check_circle":r?.status==="error"?"error":s.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:t[s.id]||s.id}),(0,a.jsxs)("p",{className:"text-[10px] text-text-muted uppercase",children:[E.label," →"," ",u.find(e=>e.value===x)?.label||x]})]})]})}),r&&"running"!==r.status&&(0,a.jsx)("div",{className:`rounded-lg p-2 text-xs ${"pass"===r.status?"bg-green-500/5 text-green-600 dark:text-green-400":"bg-red-500/5 text-red-600 dark:text-red-400"}`,children:"pass"===r.status?(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{children:e("passedIconLabel")}),(0,a.jsxs)("span",{className:"text-text-muted",children:[r.latency,"ms • ",r.chunks," ",e("chunks")]})]}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{children:["❌ ",r.error]}),(0,a.jsxs)("p",{className:"text-text-muted mt-0.5",children:[r.latency,"ms"]})]})}),(0,a.jsx)(n.$n,{size:"sm",variant:r?.status==="pass"?"ghost":"outline",icon:l?"progress_activity":"play_arrow",onClick:()=>_(s),disabled:l||k,className:"w-full",children:l?e("running"):r?e("reRun"):e("runTest")})]})},s.id)})})]})}function N(){let e=(0,r.c)("translator"),t=(0,r.c)("common"),[s,i]=(0,l.useState)([]),[c,d]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!0),p=(0,l.useRef)(null),u=e("notAvailableSymbol"),h=t=>e("millisecondsShort",{value:t}),g=async()=>{try{let e=await fetch("/api/translator/history?limit=50");if(e.ok){let t=await e.json();i(t.events||[])}}catch{}finally{d(!1)}};(0,l.useEffect)(()=>(g(),m&&(p.current=setInterval(g,3e3)),()=>{p.current&&clearInterval(p.current)}),[m]);let b=s.filter(e=>"success"===e.status).length,f=s.filter(e=>"error"===e.status).length,j=s.length>0?Math.round(s.reduce((e,t)=>e+(t.latency||0),0)/s.length):0;return(0,a.jsxs)("div",{className:"space-y-5 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-primary/5 border border-primary/10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px] mt-0.5 shrink-0","aria-hidden":"true",children:"info"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-0.5",children:e("realtime")}),(0,a.jsxs)("p",{children:[e("liveMonitorDescriptionPrefix")," ",(0,a.jsx)("strong",{className:"text-text-main",children:e("chatTester")}),","," ",(0,a.jsx)("strong",{className:"text-text-main",children:e("testBench")}),e("liveMonitorDescriptionSuffix")]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[(0,a.jsx)(w,{icon:"translate",label:e("totalTranslations"),value:s.length,color:"blue"}),(0,a.jsx)(w,{icon:"check_circle",label:e("successful"),value:b,color:"green"}),(0,a.jsx)(w,{icon:"error",label:e("errors"),value:f,color:"red"}),(0,a.jsx)(w,{icon:"speed",label:e("avgLatency"),value:h(j),color:"purple"})]}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-3 flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${m?"text-green-500 animate-pulse":"text-text-muted"}`,"aria-hidden":"true",children:m?"radio_button_checked":"radio_button_unchecked"}),(0,a.jsx)("button",{onClick:()=>x(!m),className:"text-sm text-text-main hover:text-primary transition-colors",children:m?e("liveAutoRefreshing"):e("paused")})]}),(0,a.jsxs)("button",{onClick:g,className:"flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"refresh"}),t("refresh")]})]})}),(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main mb-3",children:e("recentTranslations")}),c?(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","aria-hidden":"true",children:"progress_activity"}),t("loading")]}):0===s.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[48px] mb-3 opacity-30","aria-hidden":"true",children:"monitoring"}),(0,a.jsx)("p",{className:"text-sm font-medium mb-1",children:e("noTranslations")}),(0,a.jsx)("p",{className:"text-xs text-center max-w-sm",children:e("eventsAppearHint")}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 mt-3 text-xs",children:[(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("chatTesterTab")}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("testBenchTab")}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("externalApiCalls")}),(0,a.jsx)("span",{className:"px-2 py-1 rounded-md bg-bg-subtle border border-border",children:e("ideCliIntegrations")})]}),(0,a.jsx)("p",{className:"text-[10px] mt-3 text-text-muted/70",children:e("inMemoryNote")})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"text-left text-xs text-text-muted border-b border-border",children:[(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("time")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("source")}),(0,a.jsx)("th",{className:"pb-2 pr-4"}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("target")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("model")}),(0,a.jsx)("th",{className:"pb-2 pr-4",children:e("status")}),(0,a.jsx)("th",{className:"pb-2 text-right",children:e("latency")})]})}),(0,a.jsx)("tbody",{children:s.map((t,s)=>{let r=o[t.sourceFormat]||{label:t.sourceFormat||"?",color:"gray"},l=o[t.targetFormat]||{label:t.targetFormat||"?",color:"gray"};return(0,a.jsxs)("tr",{className:"border-b border-border/50 hover:bg-bg-subtle/50 transition-colors",children:[(0,a.jsx)("td",{className:"py-2 pr-4 text-xs text-text-muted whitespace-nowrap",children:t.timestamp?new Date(t.timestamp).toLocaleTimeString():u}),(0,a.jsx)("td",{className:"py-2 pr-4",children:(0,a.jsx)(n.Ex,{variant:"default",size:"sm",children:r.label})}),(0,a.jsx)("td",{className:"py-2 pr-4 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"arrow_forward"})}),(0,a.jsx)("td",{className:"py-2 pr-4",children:(0,a.jsx)(n.Ex,{variant:"primary",size:"sm",children:l.label})}),(0,a.jsx)("td",{className:"py-2 pr-4 text-xs font-mono text-text-muted break-all",children:t.model||u}),(0,a.jsx)("td",{className:"py-2 pr-4",children:"success"===t.status?(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:e("ok")}):(0,a.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:t.statusCode||e("errorShort")})}),(0,a.jsx)("td",{className:"py-2 text-right text-xs text-text-muted",children:t.latency?h(t.latency):u})]},t.id||s)})})]})})]})})]})}function w({icon:e,label:t,value:s,color:r}){return(0,a.jsx)(n.Zp,{children:(0,a.jsxs)("div",{className:"p-4 flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex items-center justify-center w-10 h-10 rounded-lg bg-${r}-500/10`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[22px] text-${r}-500`,"aria-hidden":"true",children:e})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-lg font-bold text-text-main",children:s}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted uppercase tracking-wider",children:t})]})]})})}function k(){let e=(0,r.c)("translator"),[t,s]=(0,l.useState)("playground"),i=[{value:"playground",label:e("playground"),icon:"code"},{value:"chat-tester",label:e("chatTester"),icon:"chat"},{value:"test-bench",label:e("testBench"),icon:"science"},{value:"live-monitor",label:e("liveMonitor"),icon:"monitoring"}],o={playground:e("modeDescriptionPlayground"),"chat-tester":e("modeDescriptionChatTester"),"test-bench":e("modeDescriptionTestBench"),"live-monitor":e("modeDescriptionLiveMonitor")};return(0,a.jsxs)("div",{className:"p-4 sm:p-8 space-y-6 min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 min-w-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h1",{className:"text-2xl font-bold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[28px]",children:"translate"}),e("playgroundTitle")]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:o[t]||e("modeDescriptionFallback")})]}),(0,a.jsx)("div",{className:"w-full sm:w-auto overflow-x-auto",children:(0,a.jsx)(n.Iz,{options:i,value:t,onChange:s,size:"md",className:"min-w-max"})})]}),"playground"===t&&(0,a.jsx)(p,{}),"chat-tester"===t&&(0,a.jsx)(j,{}),"test-bench"===t&&(0,a.jsx)(v,{}),"live-monitor"===t&&(0,a.jsx)(N,{})]})}},5214:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return a.workAsyncStorageInstance}});let a=s(17828)},17828:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return a}});let a=(0,s(64054).createAsyncLocalStorage)()},21957:(e,t,s)=>{"use strict";function a({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return a}}),s(95155),s(47650),s(5214),s(2451),s(53887)},41112:(e,t,s)=>{"use strict";function a({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return a}}),s(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={bindSnapshot:function(){return o},createAsyncLocalStorage:function(){return i},createSnapshot:function(){return c}};for(var a in s)Object.defineProperty(t,a,{enumerable:!0,get:s[a]});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class l{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let n="u">typeof globalThis&&globalThis.AsyncLocalStorage;function i(){return n?new n:new l}function o(e){return n?n.bind(e):l.bind(e)}function c(){return n?n.snapshot():function(e,...t){return e(...t)}}},65355:(e,t,s)=>{Promise.resolve().then(s.bind(s,2824))},68635:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let a=s(95155),r=s(12115),l=s(41112);function n(e){return{default:e&&"default"in e?e.default:e}}s(21957);let i={loader:()=>Promise.resolve(n(()=>null)),loading:null,ssr:!0},o=function(e){let t={...i,...e},s=(0,r.lazy)(()=>t.loader().then(n)),o=t.loading;function c(e){let n=o?(0,a.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,i=!t.ssr||!!t.loading,c=i?r.Suspense:r.Fragment,d=t.ssr?(0,a.jsxs)(a.Fragment,{children:[null,(0,a.jsx)(s,{...e})]}):(0,a.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(s,{...e})});return(0,a.jsx)(c,{...i?{fallback:n}:{},children:d})}return c.displayName="LoadableComponent",c}},75707:(e,t,s)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}});let a=s(73623)._(s(68635));function r(e,t){let s={};"function"==typeof e&&(s.loader=e);let r={...s,...t};return(0,a.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=65355)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2825],{39608:(e,l,s)=>{Promise.resolve().then(s.bind(s,97449))},97449:(e,l,s)=>{"use strict";s.r(l),s.d(l,{default:()=>n});var a=s(95155),o=s(50910),r=s(12115),u=s(40993);function n(){let e=(0,o.c)("usage"),[l,s]=(0,r.useState)("logs");return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(u.Iz,{options:[{value:"logs",label:e("loggerTab")},{value:"proxy-logs",label:e("proxyTab")}],value:l,onChange:s}),"logs"===l&&(0,a.jsx)(u.y7,{}),"proxy-logs"===l&&(0,a.jsx)(u.Lo,{})]})}}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=39608)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9305],{69436:(e,s,n)=>{Promise.resolve().then(n.bind(n,17705)),Promise.resolve().then(n.bind(n,80927)),Promise.resolve().then(n.bind(n,76332)),Promise.resolve().then(n.bind(n,35806)),Promise.resolve().then(n.bind(n,81060)),Promise.resolve().then(n.bind(n,54128)),Promise.resolve().then(n.bind(n,71689)),Promise.resolve().then(n.bind(n,44638)),Promise.resolve().then(n.bind(n,66200)),Promise.resolve().then(n.bind(n,51503)),Promise.resolve().then(n.bind(n,99023)),Promise.resolve().then(n.bind(n,89938)),Promise.resolve().then(n.bind(n,34422)),Promise.resolve().then(n.bind(n,1652)),Promise.resolve().then(n.bind(n,92701)),Promise.resolve().then(n.bind(n,18150)),Promise.resolve().then(n.bind(n,97050)),Promise.resolve().then(n.bind(n,21720)),Promise.resolve().then(n.bind(n,92542)),Promise.resolve().then(n.bind(n,91961)),Promise.resolve().then(n.bind(n,71361)),Promise.resolve().then(n.bind(n,85444)),Promise.resolve().then(n.bind(n,61580)),Promise.resolve().then(n.bind(n,80178)),Promise.resolve().then(n.bind(n,48643)),Promise.resolve().then(n.bind(n,8287)),Promise.resolve().then(n.bind(n,37415)),Promise.resolve().then(n.bind(n,33709)),Promise.resolve().then(n.bind(n,42994)),Promise.resolve().then(n.bind(n,34243)),Promise.resolve().then(n.bind(n,55846)),Promise.resolve().then(n.bind(n,6261)),Promise.resolve().then(n.bind(n,19790)),Promise.resolve().then(n.bind(n,45624)),Promise.resolve().then(n.bind(n,25112))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=69436)),_N_E=e.O()}]);
|
package/app/.next/static/chunks/app/callback/{page-0f0ebc0820dd18a5.js → page-585a53f7dc6a30f1.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7852],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7852],{44037:(e,s,t)=>{Promise.resolve().then(t.bind(t,62308))},50910:(e,s,t)=>{"use strict";t.d(s,{c:()=>l});var a=t(33418);function r(e,s){return(...e)=>{try{return s(...e)}catch{throw Error(void 0)}}}let l=r(0,a.c3);r(0,a.kc)},62308:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>i});var a=t(95155),r=t(50910),l=t(12115),n=t(73321);function c(){let e=(0,n.useSearchParams)(),[s,t]=(0,l.useState)("processing"),c=(0,r.c)("auth");return(0,l.useEffect)(()=>{let s=e.get("code"),a=e.get("state"),r=e.get("error"),l={code:s,state:a,error:r,errorDescription:e.get("error_description"),fullUrl:window.location.href},n=!1;if(window.location.origin,window.opener)try{window.opener.postMessage({type:"oauth_callback",data:l},"*"),n=!0}catch(e){console.log("postMessage failed:",e)}try{let e=new BroadcastChannel("oauth_callback");e.postMessage(l),e.close(),n=!0}catch(e){console.log("BroadcastChannel failed:",e)}try{localStorage.setItem("oauth_callback",JSON.stringify({...l,timestamp:Date.now()})),n=!0}catch(e){console.log("localStorage failed:",e)}n&&(s||r)?setTimeout(()=>{window.opener?(t("success"),setTimeout(()=>{window.close(),setTimeout(()=>t("done"),500)},1500)):t("done")},0):setTimeout(()=>t("manual"),0)},[e]),(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"text-center p-8 max-w-md",children:["processing"===s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("h1",{className:"text-xl font-semibold mb-2",children:c("processing")}),(0,a.jsx)("p",{className:"text-text-muted",children:c("pleaseWait")})]}),("success"===s||"done"===s)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,a.jsx)("h1",{className:"text-xl font-semibold mb-2",children:c("authSuccess")}),(0,a.jsx)("p",{className:"text-text-muted",children:c("success"===s?"windowWillClose":"closeTabNow")})]}),"manual"===s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-yellow-100 dark:bg-yellow-900/30 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-yellow-600",children:"info"})}),(0,a.jsx)("h1",{className:"text-xl font-semibold mb-2",children:c("copyUrl")}),(0,a.jsx)("p",{className:"text-text-muted mb-4",children:c("copyUrlManual")}),(0,a.jsx)("div",{className:"bg-surface border border-border rounded-lg p-3 text-left",children:(0,a.jsx)("code",{className:"text-xs break-all",children:window.location.href})})]})]})})}function i(){let e=(0,r.c)("auth");return(0,a.jsx)(l.Suspense,{fallback:(0,a.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,a.jsxs)("div",{className:"text-center p-8",children:[(0,a.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,a.jsx)("p",{className:"text-text-muted",children:e("loading")})]})}),children:(0,a.jsx)(c,{})})}},73321:(e,s,t)=>{"use strict";var a=t(74645);t.o(a,"useParams")&&t.d(s,{useParams:function(){return a.useParams}}),t.o(a,"usePathname")&&t.d(s,{usePathname:function(){return a.usePathname}}),t.o(a,"useRouter")&&t.d(s,{useRouter:function(){return a.useRouter}}),t.o(a,"useSearchParams")&&t.d(s,{useSearchParams:function(){return a.useSearchParams}})}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=44037)),_N_E=e.O()}]);
|
package/app/.next/static/chunks/app/docs/{page-3658b3f15df3a19e.js → page-2fe9dcbeb3f738c0.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7066,9040,9877],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7066,9040,9877],{16680:(e,r,s)=>{Promise.resolve().then(s.bind(s,91930)),Promise.resolve().then(s.t.bind(s,98500,23))},91930:(e,r,s)=>{"use strict";s.d(r,{default:()=>n});var o=s(33418),l=s(95155);function n({locale:e,...r}){if(!e)throw Error(void 0);return(0,l.jsx)(o.Dk,{locale:e,...r})}}},e=>{e.O(0,[3418,8500,8441,3794,7358],()=>e(e.s=16680)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8039],{17267:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>a});var o=t(95155);function a({error:e,reset:r}){return(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-6 text-center",role:"alert","aria-live":"assertive",children:[(0,o.jsx)("div",{className:"text-[64px] mb-4","aria-hidden":"true",children:"\uD83D\uDD27"}),(0,o.jsx)("h1",{className:"text-[28px] font-bold mb-2 text-[var(--color-text-main)]",children:"Internal Server Error"}),(0,o.jsx)("p",{className:"text-[15px] text-[var(--color-text-muted)] max-w-[400px] leading-relaxed mb-2",children:"Something went wrong while processing your request. Our team has been notified and is working on a fix."}),e?.digest&&(0,o.jsxs)("p",{className:"text-xs text-[var(--color-text-muted)] mb-6 font-mono",children:["Error ID: ",e.digest]}),!1,(0,o.jsxs)("div",{className:"flex gap-3",children:[(0,o.jsx)("button",{onClick:r,"aria-label":"Retry loading the page",className:"px-6 py-2.5 rounded-lg text-white text-sm font-semibold cursor-pointer transition-all duration-200 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:"Try Again"}),(0,o.jsx)("a",{href:"/dashboard",className:"px-6 py-2.5 rounded-lg text-[var(--color-text-main)] text-sm font-semibold cursor-pointer transition-all duration-200 border border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] no-underline focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]","aria-label":"Return to dashboard",children:"Go to Dashboard"})]})]})}},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8039],{17267:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>a});var o=t(95155);function a({error:e,reset:r}){return(0,o.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-6 text-center",role:"alert","aria-live":"assertive",children:[(0,o.jsx)("div",{className:"text-[64px] mb-4","aria-hidden":"true",children:"\uD83D\uDD27"}),(0,o.jsx)("h1",{className:"text-[28px] font-bold mb-2 text-[var(--color-text-main)]",children:"Internal Server Error"}),(0,o.jsx)("p",{className:"text-[15px] text-[var(--color-text-muted)] max-w-[400px] leading-relaxed mb-2",children:"Something went wrong while processing your request. Our team has been notified and is working on a fix."}),e?.digest&&(0,o.jsxs)("p",{className:"text-xs text-[var(--color-text-muted)] mb-6 font-mono",children:["Error ID: ",e.digest]}),!1,(0,o.jsxs)("div",{className:"flex gap-3",children:[(0,o.jsx)("button",{onClick:r,"aria-label":"Retry loading the page",className:"px-6 py-2.5 rounded-lg text-white text-sm font-semibold cursor-pointer transition-all duration-200 bg-[var(--color-accent)] hover:bg-[var(--color-accent-hover)] focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:"Try Again"}),(0,o.jsx)("a",{href:"/dashboard",className:"px-6 py-2.5 rounded-lg text-[var(--color-text-main)] text-sm font-semibold cursor-pointer transition-all duration-200 border border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] no-underline focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]","aria-label":"Return to dashboard",children:"Go to Dashboard"})]})]})}},77882:(e,r,t)=>{Promise.resolve().then(t.bind(t,17267))}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=77882)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[200],{50910:(e,t,r)=>{"use strict";r.d(t,{c:()=>s});var a=r(33418);function n(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let s=n(0,a.c3);n(0,a.kc)},62128:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var a=r(95155),n=r(50910),s=r(98500),i=r.n(s);function l(){let e=(0,n.c)("auth");return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-screen p-6 bg-[var(--bg-primary,#0a0a0f)] text-[var(--text-primary,#e0e0e0)] text-center",children:[(0,a.jsx)("div",{className:"text-[96px] font-extrabold leading-none mb-2",style:{background:"linear-gradient(135deg, #ef4444 0%, #f97316 50%, #eab308 100%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:"403"}),(0,a.jsx)("h1",{className:"text-2xl font-semibold mb-2",children:e("accessDenied")}),(0,a.jsx)("p",{className:"text-[15px] text-[var(--text-secondary,#888)] max-w-[400px] leading-relaxed mb-8",children:e("accessDeniedDescription")}),(0,a.jsx)(i(),{href:"/dashboard",className:"px-8 py-3 rounded-[10px] text-white text-sm font-semibold no-underline transition-all duration-200 shadow-[0_4px_16px_rgba(99,102,241,0.3)] hover:-translate-y-0.5",style:{background:"linear-gradient(135deg, #6366f1, #8b5cf6)"},children:e("goToDashboard")})]})}},88263:(e,t,r)=>{Promise.resolve().then(r.bind(r,62128))}},e=>{e.O(0,[3418,8500,8441,3794,7358],()=>e(e.s=88263)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2162],{40182:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>n});var l=t(95155),i=t(50910),a=t(98500),r=t.n(a),d=t(40993);function n(){let e=(0,i.c)("auth");return(0,l.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,l.jsxs)("div",{className:"w-full max-w-lg",children:[(0,l.jsxs)("div",{className:"text-center mb-8",children:[(0,l.jsx)("h1",{className:"text-3xl font-bold text-primary mb-2",children:e("resetPassword")}),(0,l.jsx)("p",{className:"text-text-muted",children:e("resetDescription")})]}),(0,l.jsx)(d.Zp,{className:"mb-4",children:(0,l.jsxs)("div",{className:"flex items-start gap-4 p-2",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-10 rounded-lg bg-primary/10 text-primary shrink-0 mt-0.5",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"terminal"})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold mb-1",children:e("methodCliTitle")}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-3",children:e("methodCliDescription")}),(0,l.jsx)("div",{className:"bg-black/30 rounded-lg p-3 mb-3 font-mono text-sm text-green-400 border border-white/5",children:(0,l.jsx)("code",{children:"npx omniroute reset-password"})}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:e("methodCliHint")})]})]})}),(0,l.jsx)(d.Zp,{className:"mb-6",children:(0,l.jsxs)("div",{className:"flex items-start gap-4 p-2",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-10 rounded-lg bg-amber-500/10 text-amber-500 shrink-0 mt-0.5",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"database"})}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("h2",{className:"text-lg font-semibold mb-1",children:e("methodManualTitle")}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-3",children:e("methodManualDescription")}),(0,l.jsxs)("ol",{className:"text-sm text-text-muted space-y-2 list-decimal list-inside mb-3",children:[(0,l.jsx)("li",{children:e("stopServer")}),(0,l.jsxs)("li",{children:[e("setPasswordInYour")," ",(0,l.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:".env"})," ",e("fileLabelSuffix"),(0,l.jsxs)("div",{className:"bg-black/30 rounded-lg p-2 mt-1 font-mono text-xs text-green-400 border border-white/5",children:["INITIAL_PASSWORD=",e("newPasswordPlaceholder")]})]}),(0,l.jsxs)("li",{children:[e("deleteSettingsFile")," ",(0,l.jsx)("code",{className:"bg-black/30 px-1 rounded text-text-main",children:"data/settings.json"})," ","(",e("orRemovePasswordHashField"),")"]}),(0,l.jsx)("li",{children:e("restartServerWithNewPassword")})]})]})]})}),(0,l.jsx)("div",{className:"text-center",children:(0,l.jsxs)(r(),{href:"/login",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]","aria-hidden":"true",children:"arrow_back"}),e("backToLogin")]})})]})})}},50057:(e,s,t)=>{Promise.resolve().then(t.bind(t,40182))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=50057)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4219],{21728:(e,t,s)=>{Promise.resolve().then(s.bind(s,26719))},26719:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});var n=s(95155);function r({error:e,reset:t}){return(0,n.jsx)("html",{lang:"en",children:(0,n.jsx)("body",{className:"flex flex-col items-center justify-center min-h-screen p-6 bg-[#0a0a0f] text-[#e0e0e0] font-[system-ui,-apple-system,sans-serif] text-center m-0",children:(0,n.jsxs)("main",{role:"alert","aria-live":"assertive",className:"flex flex-col items-center",children:[(0,n.jsx)("div",{className:"text-[64px] mb-4","aria-hidden":"true",children:"⚠️"}),(0,n.jsx)("h1",{className:"text-[28px] font-bold mb-2",children:"Something went wrong"}),(0,n.jsx)("p",{className:"text-[15px] text-[#888] max-w-[400px] leading-relaxed mb-6",children:"An unexpected error occurred. This has been logged and our team will investigate."}),!1,(0,n.jsx)("button",{onClick:t,"aria-label":"Retry loading the page",className:"px-8 py-3 rounded-[10px] text-white border-none text-sm font-semibold cursor-pointer transition-transform duration-200 shadow-[0_4px_16px_rgba(99,102,241,0.3)] hover:-translate-y-0.5 bg-gradient-to-br from-[#6366f1] to-[#8b5cf6] focus:outline-2 focus:outline-offset-2 focus:outline-[#6366f1]",children:"Try Again"})]})})})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=21728)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7018],{22857:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var r=s(95155),a=s(39092),l=s.n(a),o=s(73321),i=s(50910),n=s(12115),d=s(33637);function c(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(!1),a=(0,o.useRouter)();return(0,r.jsxs)("nav",{className:"fixed top-0 z-50 w-full bg-[#0B0E14]/80 backdrop-blur-md border-b border-[#2D333B]",children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between gap-3",children:[(0,r.jsxs)("button",{type:"button",className:"flex items-center gap-3 cursor-pointer bg-transparent border-none p-0 min-w-0",onClick:()=>a.push("/"),"aria-label":e("navigateHome"),children:[(0,r.jsx)("div",{className:"size-8 rounded bg-linear-to-br from-[#E54D5E] to-[#C93D4E] flex items-center justify-center text-white",children:(0,r.jsx)(d.A,{size:20,className:"text-white"})}),(0,r.jsx)("h2",{className:"text-white text-lg sm:text-xl font-bold tracking-tight truncate sm:max-w-none max-w-[160px]",children:e("brandName")})]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-8",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",children:e("featuresLink")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",children:e("howItWorks")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"/docs",children:e("docsLink")}),(0,r.jsxs)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors flex items-center gap-1",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:[e("github"),(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]","aria-hidden":"true",children:"open_in_new"})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4 shrink-0",children:[(0,r.jsx)("button",{onClick:()=>a.push("/dashboard"),className:"hidden sm:flex h-9 items-center justify-center rounded-lg px-4 bg-[#E54D5E] hover:bg-[#C93D4E] transition-all text-white text-sm font-bold shadow-[0_0_15px_rgba(229,77,94,0.4)] hover:shadow-[0_0_20px_rgba(229,77,94,0.6)]",children:e("getStarted")}),(0,r.jsx)("button",{className:"md:hidden text-white",onClick:()=>s(!t),"aria-label":e("toggleMenu"),children:(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:t?"close":"menu"})})]})]}),t&&(0,r.jsx)("div",{className:"md:hidden border-t border-[#2D333B] bg-[#0B0E14]/95 backdrop-blur-md",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#features",onClick:()=>s(!1),children:e("featuresLink")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"#how-it-works",onClick:()=>s(!1),children:e("howItWorks")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"/docs",children:e("docsLink")}),(0,r.jsx)("a",{className:"text-gray-300 hover:text-white text-sm font-medium transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:e("github")}),(0,r.jsx)("button",{onClick:()=>a.push("/dashboard"),className:"h-9 rounded-lg bg-[#E54D5E] hover:bg-[#C93D4E] text-white text-sm font-bold",children:e("getStarted")})]})})]})}function x(){let e=(0,i.c)("landing"),t=(0,o.useRouter)();return(0,r.jsxs)("section",{className:"relative pt-32 pb-20 px-4 sm:px-6 min-h-[90vh] flex flex-col items-center justify-center overflow-hidden",children:[(0,r.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[1000px] h-[500px] bg-[#E54D5E]/10 rounded-full blur-[120px] pointer-events-none"}),(0,r.jsxs)("div",{className:"relative z-10 max-w-4xl w-full text-center flex flex-col items-center gap-8",children:[(0,r.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full border border-[#2D333B] bg-[#111520]/50 px-3 py-1 text-xs font-medium text-[#E54D5E]",children:[(0,r.jsx)("span",{className:"flex h-2 w-2 rounded-full bg-[#E54D5E] animate-pulse"}),e("versionLive")]}),(0,r.jsxs)("h1",{className:"text-4xl sm:text-5xl md:text-7xl font-black leading-[1.1] tracking-tight break-words",children:[e("oneEndpoint")," ",(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#E54D5E]",children:e("allProviders")})]}),(0,r.jsx)("p",{className:"text-lg md:text-xl text-gray-400 max-w-2xl mx-auto font-light break-words",children:e("heroDescription")}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-4 w-full",children:[(0,r.jsxs)("button",{onClick:()=>t.push("/dashboard"),className:"w-full sm:w-auto h-12 px-8 rounded-lg bg-[#E54D5E] hover:bg-[#C93D4E] text-white text-base font-bold transition-all shadow-[0_0_15px_rgba(229,77,94,0.4)] flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:"rocket_launch"}),e("getStarted")]}),(0,r.jsxs)("a",{href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",className:"w-full sm:w-auto h-12 px-8 rounded-lg border border-[#2D333B] bg-[#111520] hover:bg-[#2D333B] text-white text-base font-bold transition-all flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:"code"}),e("viewOnGithub")]})]})]})]})}var m=s(5772);function h(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(0),a=[{id:"claude",name:e("flowToolClaudeCode"),image:"/providers/claude.png"},{id:"codex",name:e("flowToolOpenAICodex"),image:"/providers/codex.png"},{id:"cline",name:e("flowToolCline"),image:"/providers/cline.png"},{id:"cursor",name:e("flowToolCursor"),image:"/providers/cursor.png"}],l=[{id:"openai",name:e("flowProviderOpenAI"),color:"bg-emerald-500",textColor:"text-white"},{id:"anthropic",name:e("flowProviderAnthropic"),color:"bg-orange-400",textColor:"text-white"},{id:"gemini",name:e("flowProviderGemini"),color:"bg-blue-500",textColor:"text-white"},{id:"github",name:e("flowProviderGithubCopilot"),color:"bg-gray-700",textColor:"text-white"}];return(0,n.useEffect)(()=>{let e=setInterval(()=>{s(e=>(e+1)%l.length)},2e3);return()=>clearInterval(e)},[l.length]),(0,r.jsxs)("div",{className:"mt-16 w-full max-w-4xl overflow-hidden",children:[(0,r.jsxs)("div",{className:"relative h-[360px] hidden md:flex items-center justify-center animate-[float_6s_ease-in-out_infinite] overflow-hidden",children:[(0,r.jsxs)("div",{className:"relative z-20 w-32 h-32 rounded-full bg-[#111520] border-2 border-[#E54D5E] shadow-[0_0_40px_rgba(229,77,94,0.3)] flex flex-col items-center justify-center gap-1 group cursor-pointer hover:scale-105 transition-transform duration-500",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-[#E54D5E]","aria-hidden":"true",children:"hub"}),(0,r.jsx)("span",{className:"text-xs font-bold text-white tracking-widest uppercase",children:e("brandName")}),(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border border-[#E54D5E]/30 animate-ping opacity-20"})]}),(0,r.jsx)("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 flex flex-col gap-7",children:a.map(e=>(0,r.jsx)("div",{className:"flex items-center gap-3 opacity-70 hover:opacity-100 transition-opacity group",children:(0,r.jsx)("div",{className:"w-16 h-16 rounded-2xl bg-[#111520] border border-[#2D333B] flex items-center justify-center overflow-hidden p-2 hover:border-[#E54D5E]/50 transition-all hover:scale-105",children:(0,r.jsx)(m.default,{src:e.image,alt:e.name,width:48,height:48,className:"object-contain rounded-xl max-w-[48px] max-h-[48px]",sizes:"48px"})})},e.id))}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none stroke-yellow-700",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 50 C 250 70, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 140 C 250 140, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 210 C 250 210, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"}),(0,r.jsx)("path",{className:"animate-[dash_2s_linear_infinite]",d:"M 60 300 C 250 280, 250 180, 360 180",fill:"none",strokeDasharray:"5,5",strokeWidth:"2"})]}),(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full z-10 pointer-events-none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 50, 740 50",fill:"none",stroke:0===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:0===t?"3":"2",className:0===t?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 130, 740 130",fill:"none",stroke:1===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:1===t?"3":"2",className:1===t?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 230, 740 230",fill:"none",stroke:2===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:2===t?"3":"2",className:2===t?"animate-pulse":""}),(0,r.jsx)("path",{d:"M 440 180 C 550 180, 550 310, 740 310",fill:"none",stroke:3===t?"#E54D5E":"rgb(75, 85, 99)",strokeWidth:3===t?"3":"2",className:3===t?"animate-pulse":""})]}),(0,r.jsx)("div",{className:"absolute right-0 top-0 bottom-0 flex flex-col justify-between py-6",children:l.map((e,s)=>(0,r.jsx)("div",{className:`px-3 py-2 rounded-lg ${e.color} ${e.textColor} flex items-center justify-center font-bold text-[11px] leading-tight text-center shadow-lg hover:scale-110 transition-all cursor-help min-w-[110px] max-w-[140px] ${t===s?"ring-4 ring-[#E54D5E]/50 scale-110":""}`,title:e.name,children:e.name},e.id))})]}),(0,r.jsx)("div",{className:"md:hidden mt-8 w-full p-4 rounded-lg bg-[#111520] border border-[#2D333B]",children:(0,r.jsx)("p",{className:"text-sm text-center text-gray-400",children:e("interactiveDiagram")})})]})}function u(){let e=(0,i.c)("landing");return(0,r.jsx)("section",{className:"py-24 border-y border-[#2D333B] bg-[#111520]/30",id:"how-it-works",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:e("howItWorks")}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:e("howItWorksDescription")})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 relative",children:[(0,r.jsx)("div",{className:"hidden md:block absolute top-12 left-[16%] right-[16%] h-[2px] bg-linear-to-r from-gray-700 via-[#E54D5E] to-gray-700 -z-10"}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#0B0E14] border border-[#2D333B] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-gray-300","aria-hidden":"true",children:"terminal"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 break-words",children:e("howItWorksStep1Title")}),(0,r.jsx)("p",{className:"text-sm text-gray-400 break-words",children:e("howItWorksStep1Description")})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-center md:text-center",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#0B0E14] border-2 border-[#E54D5E] flex items-center justify-center shadow-[0_0_30px_rgba(229,77,94,0.2)] z-10 mx-auto",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl text-[#E54D5E] animate-pulse","aria-hidden":"true",children:"hub"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 text-[#E54D5E] break-words",children:e("howItWorksStep2Title")}),(0,r.jsx)("p",{className:"text-sm text-gray-400 break-words",children:e("howItWorksStep2Description")})]})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-6 relative group md:items-end md:text-right",children:[(0,r.jsx)("div",{className:"w-24 h-24 rounded-2xl bg-[#0B0E14] border border-[#2D333B] flex items-center justify-center shadow-xl group-hover:border-gray-500 transition-colors z-10 mx-auto md:mx-0",children:(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"}),(0,r.jsx)("div",{className:"w-6 h-6 rounded bg-white/10"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-xl font-bold mb-2 break-words",children:e("howItWorksStep3Title")}),(0,r.jsx)("p",{className:"text-sm text-gray-400 break-words",children:e("howItWorksStep3Description")})]})]})]})]})})}let f=[{icon:"link",titleKey:"featureUnifiedEndpointTitle",descKey:"featureUnifiedEndpointDesc",colors:{border:"hover:border-blue-500/50",bg:"hover:bg-blue-500/5",iconBg:"bg-blue-500/10",iconText:"text-blue-500",titleHover:"group-hover:text-blue-400"}},{icon:"bolt",titleKey:"featureEasySetupTitle",descKey:"featureEasySetupDesc",colors:{border:"hover:border-orange-500/50",bg:"hover:bg-orange-500/5",iconBg:"bg-orange-500/10",iconText:"text-orange-500",titleHover:"group-hover:text-orange-400"}},{icon:"shield_with_heart",titleKey:"featureModelFallbackTitle",descKey:"featureModelFallbackDesc",colors:{border:"hover:border-rose-500/50",bg:"hover:bg-rose-500/5",iconBg:"bg-rose-500/10",iconText:"text-rose-500",titleHover:"group-hover:text-rose-400"}},{icon:"monitoring",titleKey:"featureUsageTrackingTitle",descKey:"featureUsageTrackingDesc",colors:{border:"hover:border-purple-500/50",bg:"hover:bg-purple-500/5",iconBg:"bg-purple-500/10",iconText:"text-purple-500",titleHover:"group-hover:text-purple-400"}},{icon:"key",titleKey:"featureOAuthApiKeysTitle",descKey:"featureOAuthApiKeysDesc",colors:{border:"hover:border-amber-500/50",bg:"hover:bg-amber-500/5",iconBg:"bg-amber-500/10",iconText:"text-amber-500",titleHover:"group-hover:text-amber-400"}},{icon:"cloud_sync",titleKey:"featureCloudSyncTitle",descKey:"featureCloudSyncDesc",colors:{border:"hover:border-sky-500/50",bg:"hover:bg-sky-500/5",iconBg:"bg-sky-500/10",iconText:"text-sky-500",titleHover:"group-hover:text-sky-400"}},{icon:"terminal",titleKey:"featureCliSupportTitle",descKey:"featureCliSupportDesc",colors:{border:"hover:border-emerald-500/50",bg:"hover:bg-emerald-500/5",iconBg:"bg-emerald-500/10",iconText:"text-emerald-500",titleHover:"group-hover:text-emerald-400"}},{icon:"dashboard",titleKey:"featureDashboardTitle",descKey:"featureDashboardDesc",colors:{border:"hover:border-fuchsia-500/50",bg:"hover:bg-fuchsia-500/5",iconBg:"bg-fuchsia-500/10",iconText:"text-fuchsia-500",titleHover:"group-hover:text-fuchsia-400"}}];function g(){let e=(0,i.c)("landing");return(0,r.jsx)("section",{className:"py-24 px-6",id:"features",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"mb-16",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-4",children:e("powerfulFeatures")}),(0,r.jsx)("p",{className:"text-gray-400 max-w-xl text-lg",children:e("featuresSubtitle")})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:f.map(t=>(0,r.jsxs)("div",{className:`p-6 rounded-xl bg-[#23180f] border border-[#3a2f27] ${t.colors.border} ${t.colors.bg} transition-all duration-300 group`,children:[(0,r.jsx)("div",{className:`w-10 h-10 rounded-lg ${t.colors.iconBg} flex items-center justify-center mb-4 ${t.colors.iconText} group-hover:scale-110 transition-transform duration-300`,children:(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:t.icon})}),(0,r.jsx)("h3",{className:`text-lg font-bold mb-2 break-words ${t.colors.titleHover} transition-colors`,children:e(t.titleKey)}),(0,r.jsx)("p",{className:"text-sm text-gray-400 leading-relaxed break-words",children:e(t.descKey)})]},t.titleKey))})]})})}function b(){let e=(0,i.c)("landing"),[t,s]=(0,n.useState)(!1),a="http://localhost:20128",l=`${a}/dashboard`,o="npx omniroute";return(0,r.jsx)("section",{className:"py-24 px-6 bg-[#080A0F]",children:(0,r.jsx)("div",{className:"max-w-7xl mx-auto",children:(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row gap-16 items-start",children:[(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:e("getStartedIn30Seconds")}),(0,r.jsx)("p",{className:"text-gray-400 text-lg mb-8",children:e("getStartedDescription")}),(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex gap-4 min-w-0",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#E54D5E]/20 text-[#E54D5E] flex items-center justify-center font-bold",children:"1"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:e("installOmniRoute")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e("installStepDescription")})]})]}),(0,r.jsxs)("div",{className:"flex gap-4 min-w-0",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#E54D5E]/20 text-[#E54D5E] flex items-center justify-center font-bold",children:"2"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:e("openDashboard")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e("openDashboardStepDescription")})]})]}),(0,r.jsxs)("div",{className:"flex gap-4 min-w-0",children:[(0,r.jsx)("div",{className:"flex-none w-8 h-8 rounded-full bg-[#E54D5E]/20 text-[#E54D5E] flex items-center justify-center font-bold",children:"3"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-bold text-lg",children:e("routeRequests")}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:e("routeRequestsStepDescription",{endpoint:a})})]})]})]})]}),(0,r.jsx)("div",{className:"flex-1 w-full",children:(0,r.jsxs)("div",{className:"rounded-xl overflow-hidden bg-[#161B22] border border-[#2D333B] shadow-2xl",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 bg-[#111520] border-b border-gray-700",children:[(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-red-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-yellow-500"}),(0,r.jsx)("div",{className:"w-3 h-3 rounded-full bg-green-500"}),(0,r.jsx)("div",{className:"ml-2 text-xs text-gray-500 font-mono",children:e("terminal")})]}),(0,r.jsxs)("div",{className:"p-6 font-mono text-sm leading-relaxed overflow-x-hidden",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-4 group cursor-pointer min-w-0",onClick:()=>{navigator.clipboard.writeText(o),s(!0),setTimeout(()=>s(!1),2e3)},children:[(0,r.jsx)("span",{className:"text-green-400",children:"$"}),(0,r.jsx)("span",{className:"text-white break-all",children:o}),(0,r.jsx)("span",{className:"ml-auto text-gray-500 text-xs opacity-0 group-hover:opacity-100",children:e(t?"copied":"copy")})]}),(0,r.jsxs)("div",{className:"text-gray-400 mb-6",children:[(0,r.jsx)("span",{className:"text-[#E54D5E]",children:">"})," ",e("startingOmniRoute"),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#E54D5E]",children:">"})," ",e("serverRunningOnLabel")," ",(0,r.jsx)("span",{className:"text-blue-400 break-all",children:a}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-[#E54D5E]",children:">"})," ",e("dashboardLabel"),":"," ",(0,r.jsx)("span",{className:"text-blue-400 break-all",children:l}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-green-400",children:">"})," ",e("readyToRoute")]}),(0,r.jsx)("div",{className:"text-xs text-gray-500 mb-2 border-t border-gray-700 pt-4",children:e("configureProvidersNote")}),(0,r.jsxs)("div",{className:"text-gray-400 text-xs",children:[(0,r.jsx)("span",{className:"text-purple-400",children:e("dataLocation")}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:e("dataLocationMacLinux")})," ",(0,r.jsx)("span",{className:"break-all",children:"~/.omniroute/db.json"}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-gray-500",children:e("dataLocationWindows")})," ",(0,r.jsx)("span",{className:"break-all",children:"%APPDATA%/omniroute/db.json"})]})]})]})})]})})})}function p(){let e=(0,i.c)("landing"),t=new Date().getFullYear();return(0,r.jsx)("footer",{className:"border-t border-[#2D333B] bg-[#080A0F] pt-16 pb-8 px-6",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-8 mb-16",children:[(0,r.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,r.jsx)("div",{className:"size-6 rounded bg-[#E54D5E] flex items-center justify-center text-white",children:(0,r.jsx)(d.A,{size:16,className:"text-white"})}),(0,r.jsx)("h3",{className:"text-white text-lg font-bold",children:e("brandName")})]}),(0,r.jsx)("p",{className:"text-gray-500 text-sm max-w-xs mb-6 break-words",children:e("footerTagline")}),(0,r.jsx)("div",{className:"flex gap-4",children:(0,r.jsx)("a",{className:"text-gray-400 hover:text-white transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:(0,r.jsx)("span",{className:"material-symbols-outlined","aria-hidden":"true",children:"code"})})})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:e("product")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"#features",children:e("featuresLink")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"/dashboard",children:e("dashboardLink")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute/releases",target:"_blank",rel:"noopener noreferrer",children:e("changelog")})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:e("resources")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"/docs",children:e("documentation")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:e("github")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://www.npmjs.com/package/omniroute",target:"_blank",rel:"noopener noreferrer",children:e("npm")})]}),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h4",{className:"font-bold text-white",children:e("legal")}),(0,r.jsx)("a",{className:"text-gray-400 hover:text-[#E54D5E] text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",children:e("mitLicense")})]})]}),(0,r.jsxs)("div",{className:"border-t border-[#2D333B] pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,r.jsx)("p",{className:"text-gray-600 text-sm break-words text-center md:text-left",children:e("copyright",{year:t})}),(0,r.jsxs)("div",{className:"flex gap-6",children:[(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://github.com/diegosouzapw/OmniRoute",target:"_blank",rel:"noopener noreferrer",children:e("github")}),(0,r.jsx)("a",{className:"text-gray-600 hover:text-white text-sm transition-colors",href:"https://www.npmjs.com/package/omniroute",target:"_blank",rel:"noopener noreferrer",children:e("npm")})]})]})]})})}function j(){let e=(0,i.c)("landing"),t=(0,o.useRouter)();return(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 relative text-white font-sans overflow-x-hidden antialiased selection:bg-[#E54D5E] selection:text-white",children:[(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 fixed inset-0 z-0 overflow-hidden pointer-events-none bg-[#0B0E14]",children:[(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(to right, #E54D5E 1px, transparent 1px), linear-gradient(to bottom, #E54D5E 1px, transparent 1px)",backgroundSize:"50px 50px"},className:"jsx-3ff9ed3cf43389 absolute inset-0 opacity-[0.06]"}),(0,r.jsx)("div",{className:"jsx-3ff9ed3cf43389 absolute top-0 left-1/4 w-[700px] h-[700px] bg-[#E54D5E]/12 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"2s",animationDuration:"22s"},className:"jsx-3ff9ed3cf43389 absolute top-1/3 right-1/4 w-[600px] h-[600px] bg-purple-500/10 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{animationDelay:"4s",animationDuration:"25s"},className:"jsx-3ff9ed3cf43389 absolute bottom-0 left-1/2 w-[650px] h-[650px] bg-blue-500/8 rounded-full blur-[130px] animate-blob"}),(0,r.jsx)("div",{style:{background:"radial-gradient(circle at center, transparent 0%, rgba(11, 14, 20, 0.4) 100%)"},className:"jsx-3ff9ed3cf43389 absolute inset-0"})]}),(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 relative z-10",children:[(0,r.jsx)(c,{}),(0,r.jsxs)("main",{className:"jsx-3ff9ed3cf43389",children:[(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 relative",children:[(0,r.jsx)(x,{}),(0,r.jsx)("div",{className:"jsx-3ff9ed3cf43389 flex justify-center pb-20",children:(0,r.jsx)(h,{})})]}),(0,r.jsx)(b,{}),(0,r.jsx)(u,{}),(0,r.jsx)(g,{}),(0,r.jsxs)("section",{className:"jsx-3ff9ed3cf43389 py-24 sm:py-32 px-4 sm:px-6 relative overflow-hidden",children:[(0,r.jsx)("div",{className:"jsx-3ff9ed3cf43389 absolute inset-0 bg-linear-to-t from-[#E54D5E]/5 to-transparent pointer-events-none"}),(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 max-w-4xl mx-auto text-center relative z-10",children:[(0,r.jsx)("h2",{className:"jsx-3ff9ed3cf43389 text-3xl sm:text-4xl md:text-5xl font-black mb-6 break-words",children:e("ctaTitle")}),(0,r.jsx)("p",{className:"jsx-3ff9ed3cf43389 text-lg sm:text-xl text-gray-400 mb-10 max-w-2xl mx-auto break-words",children:e("ctaDescription")}),(0,r.jsxs)("div",{className:"jsx-3ff9ed3cf43389 flex flex-col sm:flex-row items-center justify-center gap-4",children:[(0,r.jsx)("button",{onClick:()=>t.push("/dashboard"),className:"jsx-3ff9ed3cf43389 w-full sm:w-auto h-14 px-10 rounded-lg bg-[#E54D5E] hover:bg-[#C93D4E] text-white text-lg font-bold transition-all shadow-[0_0_20px_rgba(229,77,94,0.5)]",children:e("startFree")}),(0,r.jsx)("button",{onClick:()=>t.push("/docs"),className:"jsx-3ff9ed3cf43389 w-full sm:w-auto h-14 px-10 rounded-lg border border-[#2D333B] hover:bg-[#111520] text-white text-lg font-bold transition-all",children:e("readDocumentation")})]})]})]})]}),(0,r.jsx)(p,{})]}),(0,r.jsx)(l(),{id:"3ff9ed3cf43389",children:"@keyframes float{0%,100%{transform:translatey(0)}50%{transform:translatey(-10px)}}@keyframes dash{to{stroke-dashoffset:-20}}@keyframes blob{0%,100%{transform:translate(0,0)scale(1)}33%{transform:translate(30px,-50px)scale(1.1)}66%{transform:translate(-20px,20px)scale(.9)}}.animate-blob{animation:blob 20s ease-in-out infinite}"})]})}},33637:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var r=s(95155),a=s(14051),l=s.n(a);function o({size:e=20,className:t=""}){return(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:[(0,r.jsx)("circle",{cx:"16",cy:"16",r:"3",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8",cy:"8",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"24",cy:"8",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"8",cy:"24",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"24",cy:"24",r:"2",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"5",r:"1.5",fill:"currentColor"}),(0,r.jsx)("circle",{cx:"16",cy:"27",r:"1.5",fill:"currentColor"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"8",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"24",y2:"8",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"19",x2:"8",y2:"24",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"19",x2:"24",y2:"24",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"16",y2:"5",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"}),(0,r.jsx)("line",{x1:"16",y1:"19",x2:"16",y2:"27",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}o.propTypes={size:l().number,className:l().string}},91621:(e,t,s)=>{Promise.resolve().then(s.bind(s,22857))}},e=>{e.O(0,[3418,8055,2065,8441,3794,7358],()=>e(e.s=91621)),_N_E=e.O()}]);
|
package/app/.next/static/chunks/app/{layout-070972eb026af319.js → layout-108592eafb959363.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{11025:(e,r,l)=>{Promise.resolve().then(l.bind(l,91930)),Promise.resolve().then(l.t.bind(l,95642,23)),Promise.resolve().then(l.t.bind(l,51743,23)),Promise.resolve().then(l.bind(l,55846))},51743:()=>{},91930:(e,r,l)=>{"use strict";l.d(r,{default:()=>a});var s=l(33418),t=l(95155);function a({locale:e,...r}){if(!e)throw Error(void 0);return(0,t.jsx)(s.Dk,{locale:e,...r})}},95642:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}}},e=>{e.O(0,[4781,3334,3418,9751,5846,8441,3794,7358],()=>e(e.s=11025)),_N_E=e.O()}]);
|
package/app/.next/static/chunks/app/login/{page-6c769465e407368f.js → page-121c612ee459e7c2.js}
RENAMED
|
@@ -1 +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:()=>d});var a=s(95155),r=s(50910),i=s(12115),l=s(40993),n=s(73321);function d(){let e=(0,r.c)("auth"),[t,s]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),[o,m]=(0,i.useState)(!1),[x,u]=(0,i.useState)(null),[h,p]=(0,i.useState)(null),[f,b]=(0,i.useState)(!1),j=(0,n.useRouter)();(0,i.useEffect)(()=>{b(!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){j.push("/dashboard"),j.refresh();return}u(!!e.hasPassword),p(!!e.setupComplete)}else u(!0),p(!0)}catch(e){clearTimeout(t),u(!0),p(!0)}}()},[j]);let y=async s=>{s.preventDefault(),m(!0),c("");try{let s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:t})});if(s.ok)sessionStorage.setItem("omniroute_login_time",String(Date.now())),j.push("/dashboard"),j.refresh();else{let t=await s.json();c(t.error||e("invalidPassword"))}}catch(t){c(e("errorOccurredRetry"))}finally{m(!1)}};return null===x||null===h?(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:e("loading")})]})}):x||h?!x&&h?(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 ${f?"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:e("secureYourInstance")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("passwordNotEnabled")})]}),(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:e("setPasswordDescription")}),(0,a.jsx)(l.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>j.push("/dashboard/settings?tab=security"),children:e("configurePassword")})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedAiApiProxy")]})]})}):(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 ${f?"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:e("signIn")}),(0,a.jsx)("p",{className:"text-text-muted mt-1.5",children:e("enterPassword")})]}),(0,a.jsxs)("form",{onSubmit:y,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:e("password")}),(0,a.jsx)(l.pd,{type:"password",placeholder:e("enterPassword"),value:t,onChange:e=>s(e.target.value),required:!0,autoFocus:!0,className:"h-11"}),d&&(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"}),d]})]}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",className:"w-full h-11 text-sm font-medium",loading:o,children:e("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:e("forgotPassword")})})]})}),(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 ${f?"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:e("unifiedAiApiProxy")}),(0,a.jsx)("p",{className:"text-text-muted leading-relaxed",children:e("unifiedAiApiProxyDesc")})]}),(0,a.jsx)("div",{className:"space-y-4",children:[{icon:"swap_horiz",title:e("featureMultiProviderTitle"),desc:e("featureMultiProviderDesc")},{icon:"speed",title:e("featureLoadBalancingTitle"),desc:e("featureLoadBalancingDesc")},{icon:"analytics",title:e("featureUsageTrackingTitle"),desc:e("featureUsageTrackingDesc")}].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 ${f?"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:e("welcome")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("configureInstance")})]}),(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:e("runOnboardingWizard")}),(0,a.jsx)(l.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>j.push("/dashboard/onboarding"),children:e("startOnboarding")})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedProxy")]})]})})}},
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{13504:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var a=s(95155),r=s(50910),i=s(12115),l=s(40993),n=s(73321);function d(){let e=(0,r.c)("auth"),[t,s]=(0,i.useState)(""),[d,c]=(0,i.useState)(""),[o,m]=(0,i.useState)(!1),[x,u]=(0,i.useState)(null),[h,p]=(0,i.useState)(null),[f,b]=(0,i.useState)(!1),j=(0,n.useRouter)();(0,i.useEffect)(()=>{b(!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){j.push("/dashboard"),j.refresh();return}u(!!e.hasPassword),p(!!e.setupComplete)}else u(!0),p(!0)}catch(e){clearTimeout(t),u(!0),p(!0)}}()},[j]);let y=async s=>{s.preventDefault(),m(!0),c("");try{let s=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:t})});if(s.ok)sessionStorage.setItem("omniroute_login_time",String(Date.now())),j.push("/dashboard"),j.refresh();else{let t=await s.json();c(t.error||e("invalidPassword"))}}catch(t){c(e("errorOccurredRetry"))}finally{m(!1)}};return null===x||null===h?(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:e("loading")})]})}):x||h?!x&&h?(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 ${f?"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:e("secureYourInstance")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("passwordNotEnabled")})]}),(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:e("setPasswordDescription")}),(0,a.jsx)(l.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>j.push("/dashboard/settings?tab=security"),children:e("configurePassword")})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedAiApiProxy")]})]})}):(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 ${f?"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:e("signIn")}),(0,a.jsx)("p",{className:"text-text-muted mt-1.5",children:e("enterPassword")})]}),(0,a.jsxs)("form",{onSubmit:y,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:e("password")}),(0,a.jsx)(l.pd,{type:"password",placeholder:e("enterPassword"),value:t,onChange:e=>s(e.target.value),required:!0,autoFocus:!0,className:"h-11"}),d&&(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"}),d]})]}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",className:"w-full h-11 text-sm font-medium",loading:o,children:e("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:e("forgotPassword")})})]})}),(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 ${f?"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:e("unifiedAiApiProxy")}),(0,a.jsx)("p",{className:"text-text-muted leading-relaxed",children:e("unifiedAiApiProxyDesc")})]}),(0,a.jsx)("div",{className:"space-y-4",children:[{icon:"swap_horiz",title:e("featureMultiProviderTitle"),desc:e("featureMultiProviderDesc")},{icon:"speed",title:e("featureLoadBalancingTitle"),desc:e("featureLoadBalancingDesc")},{icon:"analytics",title:e("featureUsageTrackingTitle"),desc:e("featureUsageTrackingDesc")}].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 ${f?"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:e("welcome")}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:e("configureInstance")})]}),(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:e("runOnboardingWizard")}),(0,a.jsx)(l.$n,{variant:"primary",className:"w-full h-11 text-sm font-medium",onClick:()=>j.push("/dashboard/onboarding"),children:e("startOnboarding")})]})}),(0,a.jsxs)("p",{className:"text-center text-xs text-text-muted/60 mt-8",children:["OmniRoute — ",e("unifiedProxy")]})]})})}},90723:(e,t,s)=>{Promise.resolve().then(s.bind(s,13504))}},e=>{e.O(0,[3418,8500,9751,8055,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()}]);
|